From c25c4b335ef28299506efc44649fda2acb056f63 Mon Sep 17 00:00:00 2001 From: Michael Sandstedt Date: Fri, 7 Jan 2022 15:28:16 -0600 Subject: [PATCH 01/64] Fix #13377 for compatibility with #13330 (#13382) The pull requests #13330 and #13377 were merged around the same time, and have caused a small build breakage. This fixes it. --- examples/shell/shell_common/cmd_server.cpp | 4 ++-- third_party/pigweed/repo | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/shell/shell_common/cmd_server.cpp b/examples/shell/shell_common/cmd_server.cpp index e59032c7c6ac98..13698bb17792e6 100644 --- a/examples/shell/shell_common/cmd_server.cpp +++ b/examples/shell/shell_common/cmd_server.cpp @@ -107,8 +107,8 @@ static CHIP_ERROR CmdAppServerUdcPort(int argc, char ** argv) static bool PrintServerSession(void * context, SessionHandle & session) { streamer_printf(streamer_get(), "session id=0x%04x peerSessionId=0x%04x peerNodeId=0x%016" PRIx64 " fabricIdx=%d\r\n", - session.GetLocalSessionId().Value(), session.GetPeerSessionId().Value(), session.GetPeerNodeId(), - session.GetFabricIndex()); + session->AsSecureSession()->GetLocalSessionId(), session->AsSecureSession()->GetPeerSessionId(), + session->AsSecureSession()->GetPeerNodeId(), session->AsSecureSession()->GetFabricIndex()); return true; } diff --git a/third_party/pigweed/repo b/third_party/pigweed/repo index f30bce8bf2513e..444f6d0df8a002 160000 --- a/third_party/pigweed/repo +++ b/third_party/pigweed/repo @@ -1 +1 @@ -Subproject commit f30bce8bf2513e924f461da6f2e7d1f2620a89f3 +Subproject commit 444f6d0df8a002a7c577066dcb1eca939c0a6b13 From 41758c095aff03062a62de4d4727ab05e3378a27 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Fri, 7 Jan 2022 23:40:58 +0100 Subject: [PATCH 02/64] [YAML] Add a mechanism to declare command line variables directly from YAML and support it inside chip-tool (#13115) * [YAML] Add a mechanism to declare command line variables directly from the command line and support it inside chip-tool * Update generated tests content --- .../chip-tool/commands/tests/TestCommand.h | 7 +- .../templates/partials/test_cluster.zapt | 21 +- .../partials/test_cluster_command_value.zapt | 2 + .../partials/test_cluster_value_equals.zapt | 11 +- examples/chip-tool/templates/tests.js | 1 + .../placeholder/linux/include/TestCommand.h | 12 + examples/placeholder/templates/templates.json | 1 + src/app/tests/suites/TestConfigVariables.yaml | 57 + .../common/ClusterTestGeneration.js | 60 +- .../common/variables/Variables.js | 135 + .../chip-tool/zap-generated/test/Commands.h | 4231 ++++++++++------- .../app1/zap-generated/test/Commands.h | 47 +- .../app2/zap-generated/test/Commands.h | 47 +- 13 files changed, 2962 insertions(+), 1670 deletions(-) create mode 100644 src/app/tests/suites/TestConfigVariables.yaml create mode 100644 src/app/zap-templates/common/variables/Variables.js diff --git a/examples/chip-tool/commands/tests/TestCommand.h b/examples/chip-tool/commands/tests/TestCommand.h index 9fe32c392aa54d..3926ea24816486 100644 --- a/examples/chip-tool/commands/tests/TestCommand.h +++ b/examples/chip-tool/commands/tests/TestCommand.h @@ -40,17 +40,12 @@ class TestCommand : public CHIPCommand { AddArgument("node-id", 0, UINT64_MAX, &mNodeId); AddArgument("delayInMs", 0, UINT64_MAX, &mDelayInMs); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("endpoint-id", CHIP_ZCL_ENDPOINT_MIN, CHIP_ZCL_ENDPOINT_MAX, &mEndpointId); AddArgument("PICS", &mPICSFilePath); } /////////// CHIPCommand Interface ///////// CHIP_ERROR RunCommand() override; - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.HasValue() ? mTimeout.Value() : kTimeoutInSeconds); - } + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(kTimeoutInSeconds); } virtual void NextTest() = 0; diff --git a/examples/chip-tool/templates/partials/test_cluster.zapt b/examples/chip-tool/templates/partials/test_cluster.zapt index 0c921234ad2732..0a0a24fdf81835 100644 --- a/examples/chip-tool/templates/partials/test_cluster.zapt +++ b/examples/chip-tool/templates/partials/test_cluster.zapt @@ -2,7 +2,16 @@ class {{filename}}: public TestCommand { public: - {{filename}}(): TestCommand("{{filename}}"), mTestIndex(0) {} + {{filename}}(): TestCommand("{{filename}}"), mTestIndex(0) + { + {{#chip_tests_config}} + {{#if (isString type)}} + AddArgument("{{name}}", &m{{asUpperCamelCase name}}); + {{else}} + AddArgument("{{name}}", {{asTypeMinValue type}}, {{asTypeMaxValue type}}, &m{{asUpperCamelCase name}}); + {{/if}} + {{/chip_tests_config}} + } /////////// TestCommand Interface ///////// void NextTest() override @@ -45,13 +54,17 @@ class {{filename}}: public TestCommand } {{#if timeout}} - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.HasValue() : mTimeout.Value() : {{timeout}}); } + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.HasValue() ? mTimeout.Value() : {{timeout}}); } {{/if}} private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = {{totalTests}}; + {{#chip_tests_config}} + chip::Optional<{{chipType}}> m{{asUpperCamelCase name}}; + {{/chip_tests_config}} + {{#chip_tests_items}} {{#chip_tests_item_response_parameters}} {{#if saveAs}} @@ -156,7 +169,7 @@ class {{filename}}: public TestCommand {{else if isWait}} CHIP_ERROR {{>testCommand}}() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : {{endpoint}}; + const chip::EndpointId endpoint = {{#if (chip_tests_config_has "endpoint")}}mEndpoint.HasValue() ? mEndpoint.Value() : {{/if}}{{endpoint}}; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: {{cluster}} {{#if isAttribute}}Attribute: {{attribute}}{{else}}Command: {{wait}}{{/if}}] {{label}}", endpoint); {{#*inline "waitForTypeName"}}{{#if isAttribute}}Attribute{{else}}Command{{/if}}{{/inline}} {{#*inline "waitForTypeId"}}chip::app::Clusters::{{asUpperCamelCase cluster}}::{{#if isAttribute}}Attributes::{{attribute}}{{else}}Commands::{{wait}}{{/if}}::Id{{/inline}} @@ -172,7 +185,7 @@ class {{filename}}: public TestCommand {{#if isGroupCommand}} const chip::GroupId groupId = {{groupId}}; {{else}} - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : {{endpoint}}; + const chip::EndpointId endpoint = {{#if (chip_tests_config_has "endpoint")}}mEndpoint.HasValue() ? mEndpoint.Value() : {{/if}}{{endpoint}}; {{/if}} {{~#*inline "maybeTimedInteractionTimeout"}} diff --git a/examples/chip-tool/templates/partials/test_cluster_command_value.zapt b/examples/chip-tool/templates/partials/test_cluster_command_value.zapt index b79bfdb34eb2c5..53c59106296911 100644 --- a/examples/chip-tool/templates/partials/test_cluster_command_value.zapt +++ b/examples/chip-tool/templates/partials/test_cluster_command_value.zapt @@ -44,6 +44,8 @@ {{else}} {{#if_is_bitmap type}} static_cast<{{zapTypeToEncodableClusterObjectType type ns=ns}}>({{definedValue}}); + {{else if (chip_tests_config_has definedValue)}} + m{{asUpperCamelCase definedValue}}.HasValue() ? m{{asUpperCamelCase definedValue}}.Value() : {{asTypedLiteral (chip_tests_config_get_default_value definedValue) (chip_tests_config_get_type definedValue)}}; {{else}} {{asTypedLiteral definedValue type}}; {{/if_is_bitmap}} diff --git a/examples/chip-tool/templates/partials/test_cluster_value_equals.zapt b/examples/chip-tool/templates/partials/test_cluster_value_equals.zapt index 161c6ea804ec89..34c9a09757914b 100644 --- a/examples/chip-tool/templates/partials/test_cluster_value_equals.zapt +++ b/examples/chip-tool/templates/partials/test_cluster_value_equals.zapt @@ -30,11 +30,12 @@ {{! Maybe we should add a check for properties in the expected object (other than "global") that are not present in the struct ? }} {{else}} - VerifyOrReturn(CheckValue - {{~#if (isOctetString type)}}AsString("{{label}}", {{actual}}, chip::ByteSpan(chip::Uint8::from_const_char("{{octetStringEscapedForCLiteral expected}}"), {{expected.length}})) - {{else if (isCharString type)}}AsString("{{label}}", {{actual}}, chip::CharSpan("{{expected}}", {{utf8StringLength expected}})) - {{else}}("{{label}}", {{actual}}, {{asTypedLiteral expected type}}) + VerifyOrReturn(CheckValue{{#if (isString type)}}AsString{{/if}}("{{label}}", {{actual}}, + {{~#if (isOctetString type)}}chip::ByteSpan(chip::Uint8::from_const_char("{{octetStringEscapedForCLiteral expected}}"), {{expected.length}}) + {{else if (isCharString type)}}chip::CharSpan("{{expected}}", {{utf8StringLength expected}}) + {{else if (chip_tests_config_has expected)}}m{{asUpperCamelCase expected}}.HasValue() ? m{{asUpperCamelCase expected}}.Value() : {{asTypedLiteral (chip_tests_config_get_default_value expected) (chip_tests_config_get_type expected)}} + {{else}}{{asTypedLiteral expected type}} {{/if}} - ); + )); {{/if_is_struct}} {{/if}} diff --git a/examples/chip-tool/templates/tests.js b/examples/chip-tool/templates/tests.js index 29d60ddf3cdc71..799c661ca274bc 100644 --- a/examples/chip-tool/templates/tests.js +++ b/examples/chip-tool/templates/tests.js @@ -192,6 +192,7 @@ function getTests() 'TestDelayCommands', 'TestLogCommands', 'TestSaveAs', + 'TestConfigVariables', 'TestDescriptorCluster', 'TestBasicInformation', 'TestIdentifyCluster', diff --git a/examples/placeholder/linux/include/TestCommand.h b/examples/placeholder/linux/include/TestCommand.h index 373a96a264fa66..f3032560f48cb9 100644 --- a/examples/placeholder/linux/include/TestCommand.h +++ b/examples/placeholder/linux/include/TestCommand.h @@ -48,6 +48,18 @@ class TestCommand exit(CHIP_NO_ERROR == status ? EXIT_SUCCESS : EXIT_FAILURE); } + template + size_t AddArgument(const char * name, chip::Optional * value) + { + return 0; + } + + template + size_t AddArgument(const char * name, int64_t min, uint64_t max, chip::Optional * value) + { + return 0; + } + CHIP_ERROR Log(const char * message) { ChipLogProgress(chipTool, "%s", message); diff --git a/examples/placeholder/templates/templates.json b/examples/placeholder/templates/templates.json index 3505d79ab47745..f08de0822f95fa 100644 --- a/examples/placeholder/templates/templates.json +++ b/examples/placeholder/templates/templates.json @@ -7,6 +7,7 @@ "../../../src/app/zap-templates/templates/app/helper.js", "../../../src/app/zap-templates/templates/chip/helper.js", "../../../src/app/zap-templates/common/ClusterTestGeneration.js", + "../../../examples/chip-tool/templates/helper.js", "helper.js" ], "override": "../../../src/app/zap-templates/common/override.js", diff --git a/src/app/tests/suites/TestConfigVariables.yaml b/src/app/tests/suites/TestConfigVariables.yaml new file mode 100644 index 00000000000000..868cc79be7784a --- /dev/null +++ b/src/app/tests/suites/TestConfigVariables.yaml @@ -0,0 +1,57 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: Test Cluster Config Variables Tests + +config: + cluster: "Test Cluster" + endpoint: 1 + arg1: + type: INT8U + defaultValue: 5 + returnValueWithArg1: + type: INT8U + defaultValue: 25 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + + - label: "Send Test Add Arguments Command" + command: "testAddArguments" + arguments: + values: + - name: "arg1" + value: 3 + - name: "arg2" + value: 17 + response: + values: + - name: "returnValue" + saveAs: TestAddArgumentDefaultValue + value: 20 + + - label: "Send Test Add Arguments Command" + command: "testAddArguments" + arguments: + values: + - name: "arg1" + value: arg1 + - name: "arg2" + value: TestAddArgumentDefaultValue + response: + values: + - name: "returnValue" + value: returnValueWithArg1 diff --git a/src/app/zap-templates/common/ClusterTestGeneration.js b/src/app/zap-templates/common/ClusterTestGeneration.js index 1b0af61a5bf26d..f672602d0c6b5d 100644 --- a/src/app/zap-templates/common/ClusterTestGeneration.js +++ b/src/app/zap-templates/common/ClusterTestGeneration.js @@ -28,6 +28,7 @@ const templateUtil = require(zapPath + 'dist/src-electron/generator/template-uti const { getClusters, getCommands, getAttributes, isTestOnlyCluster } = require('./simulated-clusters/SimulatedClusters.js'); const { asBlocks, ensureClusters } = require('./ClustersHelper.js'); +const { Variables } = require('./variables/Variables.js'); const kIdentityName = 'identity'; const kClusterName = 'cluster'; @@ -441,7 +442,9 @@ async function chip_tests(list, options) const items = Array.isArray(list) ? list : list.split(','); const names = items.map(name => name.trim()); let tests = names.map(item => parse(item)); - tests = await Promise.all(tests.map(async function(test) { + + const context = this; + tests = await Promise.all(tests.map(async function(test) { test.tests = await Promise.all(test.tests.map(async function(item) { item.global = global; if (item.isCommand) { @@ -453,6 +456,12 @@ async function chip_tests(list, options) } return item; })); + + const variables = await Variables(context, test); + test.variables = { + config : variables.config, + tests : variables.tests, + }; return test; })); return templateUtil.collectBlocks(tests, options, this); @@ -463,6 +472,51 @@ function chip_tests_items(options) return templateUtil.collectBlocks(this.tests, options, this); } +function chip_tests_config(options) +{ + return templateUtil.collectBlocks(this.variables.config, options, this); +} + +function getConfigVariable(context, name) +{ + while (!('variables' in context) && context.parent) { + context = context.parent; + } + + if (typeof context === 'undefined' || !('variables' in context)) { + return null; + } + + return context.variables.config.find(variable => variable.name == name); +} + +function getConfigVariableOrThrow(context, name) +{ + const variable = getConfigVariable(context, name); + if (variable == null) { + throw new Error(`Variable ${name} can not be found`); + } + return variable; +} + +function chip_tests_config_has(name, options) +{ + const variable = getConfigVariable(this, name); + return !!variable; +} + +function chip_tests_config_get_default_value(name, options) +{ + const variable = getConfigVariableOrThrow(this, name); + return variable.defaultValue; +} + +function chip_tests_config_get_type(name, options) +{ + const variable = getConfigVariableOrThrow(this, name); + return variable.type; +} + // test_cluster_command_value and test_cluster_value-equals are recursive partials using #each. At some point the |global| // context is lost and it fails. Make sure to attach the global context as a property of the | value | // that is evaluated. @@ -633,6 +687,10 @@ exports.chip_tests_items = chip_tests_items; exports.chip_tests_item_parameters = chip_tests_item_parameters; exports.chip_tests_item_response_parameters = chip_tests_item_response_parameters; exports.chip_tests_pics = chip_tests_pics; +exports.chip_tests_config = chip_tests_config; +exports.chip_tests_config_has = chip_tests_config_has; +exports.chip_tests_config_get_default_value = chip_tests_config_get_default_value; +exports.chip_tests_config_get_type = chip_tests_config_get_type; exports.isTestOnlyCluster = isTestOnlyCluster; exports.isLiteralNull = isLiteralNull; exports.expectedValueHasProp = expectedValueHasProp; diff --git a/src/app/zap-templates/common/variables/Variables.js b/src/app/zap-templates/common/variables/Variables.js new file mode 100644 index 00000000000000..5c2e77dcac53a7 --- /dev/null +++ b/src/app/zap-templates/common/variables/Variables.js @@ -0,0 +1,135 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * This file contains code for supporting variables into the YAML tests suites. + */ + +// Import helpers from zap core +const zapPath = '../../../../../third_party/zap/repo/dist/src-electron/'; +const zclHelper = require(zapPath + 'generator/helper-zcl.js') +const templateUtil = require(zapPath + 'generator/template-util.js') + +const { getCommands, getAttributes } = require('../simulated-clusters/SimulatedClusters.js'); + +const knownVariables = { + 'endpoint' : { type : 'ENDPOINT_NO', defaultValue : '' }, + 'cluster' : { type : 'CHAR_STRING', defaultValue : '' }, + 'timeout' : { type : 'INT16U', defaultValue : 30 }, +}; + +function throwError(test, errorStr) +{ + console.error('Error in: ' + test.filename + '.yaml for test with label: "' + test.label + '"\n'); + console.error(errorStr); + throw new Error(); +} + +async function getItems(test, promise, itemName) +{ + return promise.then(items => { + const item = items.find(item => item.name.toLowerCase() == itemName.toLowerCase()); + if (!item) { + const names = items.map(item => item.name); + throwError(test, 'Missing ' + itemName + '" in: \n\t* ' + names.join('\n\t* ')); + } + + return item; + }); +} + +async function getCommandInformationsFor(context, test, argumentName) +{ + const command = await getItems(test, getCommands(context, test.cluster), test.command); + const argument = command.response.arguments.find(item => item.name.toLowerCase() == argumentName.toLowerCase()); + return { type : argument.type, chipType : argument.chipType }; +} + +async function getAttributeInformationsFor(context, test, attributeName) +{ + const attribute = await getItems(test, getAttributes(context, test.cluster), attributeName); + return { type : attribute.type, chipType : attribute.chipType }; +} + +async function extractVariablesFromConfig(context, suite) +{ + let variables = []; + + for (const key in suite.config) { + let value = {}; + + const isKnownVariable = key in knownVariables; + + const target = isKnownVariable ? knownVariables[key] : suite.config[key]; + for (const prop in target) { + value[prop] = target[prop]; + } + + if (!isKnownVariable && !('defaultValue' in target)) { + throw new Error(`${suite.filename}: No default value defined for config ${key}`); + } + + value.defaultValue = isKnownVariable ? suite.config[key] : suite.config[key].defaultValue; + value.chipType = await zclHelper.asUnderlyingZclType.call(context, value.type, { 'hash' : {} }); + value.name = key; + variables.push(value); + } + + return variables; +} + +async function extractVariablesFromTests(context, suite) +{ + let variables = {}; + suite.tests.forEach(test => { + test.response.values.filter(value => value.saveAs).forEach(saveAsValue => { + const key = saveAsValue.saveAs; + if (key in variables) { + throwError(test, `Variable with name: ${key} is already registered.`); + } + + if (!test.isCommand && !test.isAttribute) { + throwError(test, `Variable support for step ${test} is not supported. Only commands and attributes are supported.`); + } + + variables[key] = { test, name : saveAsValue.name }; + }); + }); + + const rv = []; + for (const [key, { test, name }] of Object.entries(variables)) { + let variable = await ( + test.isCommand ? getCommandInformationsFor(context, test, name) : getAttributeInformationsFor(context, test, name)); + variable.name = key; + rv.push(variable); + } + + return rv; +} + +async function Variables(context, suite) +{ + return { + config : await extractVariablesFromConfig(context, suite), + tests : await extractVariablesFromTests(context, suite), + }; +} + +// +// Module exports +// +exports.Variables = Variables; diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 4858fb09f9821f..1be643f85855ec 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -143,6 +143,7 @@ class TestList : public Command printf("TestDelayCommands\n"); printf("TestLogCommands\n"); printf("TestSaveAs\n"); + printf("TestConfigVariables\n"); printf("TestDescriptorCluster\n"); printf("TestBasicInformation\n"); printf("TestIdentifyCluster\n"); @@ -163,7 +164,11 @@ class TestList : public Command class Test_TC_BI_1_1 : public TestCommand { public: - Test_TC_BI_1_1() : TestCommand("Test_TC_BI_1_1"), mTestIndex(0) {} + Test_TC_BI_1_1() : TestCommand("Test_TC_BI_1_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -224,6 +229,9 @@ class Test_TC_BI_1_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 5; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -273,7 +281,7 @@ class Test_TC_BI_1_1 : public TestCommand CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -293,7 +301,7 @@ class Test_TC_BI_1_1 : public TestCommand CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -312,7 +320,7 @@ class Test_TC_BI_1_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -334,7 +342,7 @@ class Test_TC_BI_1_1 : public TestCommand CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -356,7 +364,11 @@ class Test_TC_BI_1_1 : public TestCommand class Test_TC_BI_2_1 : public TestCommand { public: - Test_TC_BI_2_1() : TestCommand("Test_TC_BI_2_1"), mTestIndex(0) {} + Test_TC_BI_2_1() : TestCommand("Test_TC_BI_2_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -447,6 +459,9 @@ class Test_TC_BI_2_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 12; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -560,7 +575,7 @@ class Test_TC_BI_2_1 : public TestCommand CHIP_ERROR TestReadMandatoryNonGlobalAttributeOutOfService_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -580,7 +595,7 @@ class Test_TC_BI_2_1 : public TestCommand CHIP_ERROR TestReadMandatoryNonGlobalAttributeConstraintsOutOfService_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -599,7 +614,7 @@ class Test_TC_BI_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryNonGlobalAttributeOutOfService_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -617,7 +632,7 @@ class Test_TC_BI_2_1 : public TestCommand CHIP_ERROR TestReadsBackTheMandatoryNonGlobalAttributeOutOfService_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -637,7 +652,7 @@ class Test_TC_BI_2_1 : public TestCommand CHIP_ERROR TestReadMandatoryNonGlobalAttributeConstraintsPresentValue_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -656,7 +671,7 @@ class Test_TC_BI_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryNonGlobalAttributePresentValue_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -674,7 +689,7 @@ class Test_TC_BI_2_1 : public TestCommand CHIP_ERROR TestReadsBackTheMandatoryNonGlobalAttributePresentValue_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -694,7 +709,7 @@ class Test_TC_BI_2_1 : public TestCommand CHIP_ERROR TestReadMandatoryNonGlobalAttributeStatusFlags_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -714,7 +729,7 @@ class Test_TC_BI_2_1 : public TestCommand CHIP_ERROR TestReadMandatoryNonGlobalAttributeConstraintsStatusFlags_9() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -734,7 +749,7 @@ class Test_TC_BI_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryNonGlobalAttributeStatusFlags_10() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -756,7 +771,7 @@ class Test_TC_BI_2_1 : public TestCommand CHIP_ERROR TestReadsBackTheMandatoryNonGlobalAttributeStatusFlags_11() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -778,7 +793,11 @@ class Test_TC_BI_2_1 : public TestCommand class Test_TC_BI_2_2 : public TestCommand { public: - Test_TC_BI_2_2() : TestCommand("Test_TC_BI_2_2"), mTestIndex(0) {} + Test_TC_BI_2_2() : TestCommand("Test_TC_BI_2_2"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -854,6 +873,9 @@ class Test_TC_BI_2_2 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 9; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -946,7 +968,7 @@ class Test_TC_BI_2_2 : public TestCommand CHIP_ERROR TestReadsPresentValueAttributeFromDut_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -966,7 +988,7 @@ class Test_TC_BI_2_2 : public TestCommand CHIP_ERROR TestReadsOutOfServiceAttributeFromDut_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -986,7 +1008,7 @@ class Test_TC_BI_2_2 : public TestCommand CHIP_ERROR TestReadsStatusFlagsAttributeFromDut_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -1006,7 +1028,7 @@ class Test_TC_BI_2_2 : public TestCommand CHIP_ERROR TestReadsPresentValueAttributeFromDut_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -1026,7 +1048,7 @@ class Test_TC_BI_2_2 : public TestCommand CHIP_ERROR TestReadsOutOfServiceAttributeFromDut_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -1046,7 +1068,7 @@ class Test_TC_BI_2_2 : public TestCommand CHIP_ERROR TestReadsStatusFlagsAttributeFromDut_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -1066,7 +1088,7 @@ class Test_TC_BI_2_2 : public TestCommand CHIP_ERROR TestReadsStatusFlagsAttributeFromDut_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -1086,7 +1108,7 @@ class Test_TC_BI_2_2 : public TestCommand CHIP_ERROR TestReadsStatusFlagsAttributeFromDut_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -1108,7 +1130,11 @@ class Test_TC_BI_2_2 : public TestCommand class Test_TC_BOOL_1_1 : public TestCommand { public: - Test_TC_BOOL_1_1() : TestCommand("Test_TC_BOOL_1_1"), mTestIndex(0) {} + Test_TC_BOOL_1_1() : TestCommand("Test_TC_BOOL_1_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -1169,6 +1195,9 @@ class Test_TC_BOOL_1_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 5; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -1218,7 +1247,7 @@ class Test_TC_BOOL_1_1 : public TestCommand CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BooleanStateClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -1238,7 +1267,7 @@ class Test_TC_BOOL_1_1 : public TestCommand CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BooleanStateClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -1257,7 +1286,7 @@ class Test_TC_BOOL_1_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BooleanStateClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -1279,7 +1308,7 @@ class Test_TC_BOOL_1_1 : public TestCommand CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BooleanStateClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -1301,7 +1330,11 @@ class Test_TC_BOOL_1_1 : public TestCommand class Test_TC_BOOL_2_1 : public TestCommand { public: - Test_TC_BOOL_2_1() : TestCommand("Test_TC_BOOL_2_1"), mTestIndex(0) {} + Test_TC_BOOL_2_1() : TestCommand("Test_TC_BOOL_2_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -1362,6 +1395,9 @@ class Test_TC_BOOL_2_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 5; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -1411,7 +1447,7 @@ class Test_TC_BOOL_2_1 : public TestCommand CHIP_ERROR TestReadMandatoryNonGlobalAttributeStateValue_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BooleanStateClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -1431,7 +1467,7 @@ class Test_TC_BOOL_2_1 : public TestCommand CHIP_ERROR TestReadMandatoryNonGlobalAttributeConstraintsStateValue_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BooleanStateClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -1450,7 +1486,7 @@ class Test_TC_BOOL_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValueToMandatoryNonGlobalAttributeStateValue_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BooleanStateClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -1472,7 +1508,7 @@ class Test_TC_BOOL_2_1 : public TestCommand CHIP_ERROR TestReadsBackTheMandatoryNonGlobalAttributeStateValue_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BooleanStateClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -1494,7 +1530,11 @@ class Test_TC_BOOL_2_1 : public TestCommand class Test_TC_CC_1_1 : public TestCommand { public: - Test_TC_CC_1_1() : TestCommand("Test_TC_CC_1_1"), mTestIndex(0) {} + Test_TC_CC_1_1() : TestCommand("Test_TC_CC_1_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -1547,6 +1587,9 @@ class Test_TC_CC_1_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -1576,7 +1619,7 @@ class Test_TC_CC_1_1 : public TestCommand CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -1595,7 +1638,7 @@ class Test_TC_CC_1_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -1619,7 +1662,11 @@ class Test_TC_CC_1_1 : public TestCommand class Test_TC_CC_2_1 : public TestCommand { public: - Test_TC_CC_2_1() : TestCommand("Test_TC_CC_2_1"), mTestIndex(0) {} + Test_TC_CC_2_1() : TestCommand("Test_TC_CC_2_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -2252,6 +2299,9 @@ class Test_TC_CC_2_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 146; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -3597,7 +3647,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadsMandatoryAttributeCurrentHue_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -3617,7 +3667,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestValidateConstraintsOfAttributeCurrentHue_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -3637,7 +3687,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValueToMandatoryAttributeCurrentHue_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -3659,7 +3709,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadsBackMandatoryAttributeCurrentHue_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -3679,7 +3729,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadsMandatoryAttributeCurrentSaturation_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -3699,7 +3749,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestValidateConstraintsOfAttributeCurrentSaturation_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -3719,7 +3769,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValueToMandatoryAttributeCurrentSaturation_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -3741,7 +3791,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadsBackMandatoryAttributeCurrentSaturation_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -3761,7 +3811,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeCurrentX_9() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -3781,7 +3831,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestValidateConstraintsOfAttributeCurrentX_10() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -3801,7 +3851,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValueToMandatoryAttributeCurrentX_11() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -3823,7 +3873,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadsBackMandatoryAttributeCurrentX_12() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -3843,7 +3893,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeCurrentY_13() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -3863,7 +3913,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestValidateConstraintsOfAttributeCurrentY_14() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -3883,7 +3933,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeCurrentY_15() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -3905,7 +3955,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadsBackMandatoryAttributeCurrentY_16() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -3925,7 +3975,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestValidateConstraintsOfAttributeColorTemperatureMireds_17() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -3945,7 +3995,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestValidateConstraintsOfAttributeColorMode_18() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -3965,7 +4015,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeOptions_19() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -3985,7 +4035,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestValidateConstraintsOfAttributeOptions_20() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4004,7 +4054,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeOptions_21() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4022,7 +4072,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadsBackMandatoryAttributeOptions_22() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4042,7 +4092,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeEnhancedCurrentHue_23() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4062,7 +4112,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestValidateConstraintsOfAttributeEnhancedCurrentHue_24() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4081,7 +4131,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeEnhancedCurrentHue_25() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4103,7 +4153,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadsBackMandatoryAttributeEnhancedCurrentHue_26() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4123,7 +4173,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestValidateConstraintsOfAttributeEnhancedColorMode_27() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4142,7 +4192,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeColorLoopActive_28() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4162,7 +4212,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestValidateConstraintsOfAttributeColorLoopActive_29() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4181,7 +4231,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeColorLoopActive_30() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4203,7 +4253,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadsBackMandatoryAttributeColorLoopActive_31() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4223,7 +4273,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeColorLoopDirection_32() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4243,7 +4293,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestValidateConstraintsOfAttributeColorLoopDirection_33() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4262,7 +4312,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeColorLoopDirection_34() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4284,7 +4334,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadsBackMandatoryAttributeColorLoopDirection_35() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4304,7 +4354,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeColorLoopTime_36() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4324,7 +4374,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestValidateConstraintsOfAttributeColorLoopTime_37() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4343,7 +4393,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeColorLoopTime_38() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4365,7 +4415,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadsBackMandatoryAttributeColorLoopTime_39() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4385,7 +4435,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeColorLoopStartEnhancedHue_40() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4406,7 +4456,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestValidateConstraintsOfAttributeColorLoopStartEnhancedHue_41() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4426,7 +4476,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeColorLoopStartEnhancedHue_42() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4449,7 +4499,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadsBackMandatoryAttributeColorLoopStartEnhancedHue_43() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4470,7 +4520,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeColorLoopStoredEnhancedHue_44() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4491,7 +4541,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestValidateConstraintsOfAttributeColorLoopStoredEnhancedHue_45() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4511,7 +4561,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeColorLoopStoredEnhancedHue_46() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4534,7 +4584,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadsBackMandatoryAttributeColorLoopStoredEnhancedHue_47() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4555,7 +4605,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeColorCapabilities_48() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4575,7 +4625,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestValidateConstraintsOfAttributeColorCapabilities_49() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4595,7 +4645,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeColorCapabilities_50() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4617,7 +4667,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadsBackMandatoryAttributeColorCapabilities_51() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4637,7 +4687,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeColorTempPhysicalMinMireds_52() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4657,7 +4707,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestValidateConstraintsOfAttributeColorTempPhysicalMinMireds_53() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4677,7 +4727,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeColorTempPhysicalMinMireds_54() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4699,7 +4749,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadsBackMandatoryAttributeColorTempPhysicalMinMireds_55() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4719,7 +4769,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeColorTempPhysicalMaxMireds_56() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4739,7 +4789,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestValidateConstraintsOfAttributeColorTempPhysicalMaxMireds_57() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4759,7 +4809,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeColorTempPhysicalMaxMireds_58() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4781,7 +4831,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadsBackMandatoryAttributeColorTempPhysicalMaxMireds_59() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4801,7 +4851,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheOptionalAttributeCoupleColorTempToLevelMinMireds_60() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4821,7 +4871,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToOptionalAttributeCoupleColorTempToLevelMinMireds_61() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4844,7 +4894,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadsBackOptionalAttributeCoupleColorTempToLevelMinMireds_62() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4865,7 +4915,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheOptionalAttributeStartUpColorTemperatureMireds_63() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4886,7 +4936,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToOptionalAttributeStartUpColorTemperatureMireds_64() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4905,7 +4955,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadsBackOptionalAttributeStartUpColorTemperatureMireds_65() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4926,7 +4976,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheOptionalAttributeRemainingTime_66() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4946,7 +4996,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestValidateConstraintsOfAttributeRemainingTime_67() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4966,7 +5016,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToOptionalAttributeRemainingTime_68() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -4988,7 +5038,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadsBackOptionalAttributeRemainingTime_69() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5008,7 +5058,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheOptionalAttributeDriftCompensation_70() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5028,7 +5078,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToOptionalAttributeDriftCompensation_71() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5050,7 +5100,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadsBackOptionalAttributeDriftCompensation_72() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5070,7 +5120,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheOptionalAttributeCompensationText_73() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5090,7 +5140,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeNumberOfPrimaries_74() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5110,7 +5160,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultMandatoryAttributeNumberOfPrimaries_75() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5132,7 +5182,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadBackTheMandatoryAttributeNumberOfPrimaries_76() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5152,7 +5202,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributePrimary1X_77() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5172,7 +5222,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary1X_78() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5194,7 +5244,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadBackTheMandatoryAttributePrimary1X_79() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5214,7 +5264,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributePrimary1Y_80() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5234,7 +5284,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary1Y_81() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5256,7 +5306,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadBackTheMandatoryAttributePrimary1Y_82() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5276,7 +5326,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributePrimary1Intensity_83() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5295,7 +5345,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributePrimary2X_84() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5315,7 +5365,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary2X_85() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5337,7 +5387,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadBackTheMandatoryAttributePrimary2X_86() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5357,7 +5407,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributePrimary2Y_87() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5377,7 +5427,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary2Y_88() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5399,7 +5449,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadBackTheMandatoryAttributePrimary2Y_89() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5419,7 +5469,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestValidateConstraintsOfAttributePrimary2Intensity_90() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5438,7 +5488,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributePrimary3X_91() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5458,7 +5508,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary3X_92() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5480,7 +5530,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadBackTheMandatoryAttributePrimary3X_93() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5500,7 +5550,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributePrimary3Y_94() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5520,7 +5570,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary3Y_95() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5542,7 +5592,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadBackTheMandatoryAttributePrimary3Y_96() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5562,7 +5612,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributePrimary3Intensity_97() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5581,7 +5631,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributePrimary4X_98() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5601,7 +5651,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary4X_99() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5623,7 +5673,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadBackTheMandatoryAttributePrimary4X_100() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5643,7 +5693,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributePrimary4Y_101() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5663,7 +5713,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary4Y_102() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5685,7 +5735,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadBackTheMandatoryAttributePrimary4Y_103() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5705,7 +5755,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributePrimary4Intensity_104() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5724,7 +5774,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributePrimary5X_105() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5744,7 +5794,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary5X_106() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5766,7 +5816,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadBackTheMandatoryAttributePrimary5X_107() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5786,7 +5836,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributePrimary5Y_108() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5806,7 +5856,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary5Y_109() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5828,7 +5878,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadBackTheMandatoryAttributePrimary5Y_110() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5848,7 +5898,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributePrimary5Intensity_111() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5867,7 +5917,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributePrimary6X_112() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5887,7 +5937,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary6X_113() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5909,7 +5959,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadBackTheMandatoryAttributePrimary6X_114() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5929,7 +5979,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributePrimary6Y_115() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5949,7 +5999,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary6Y_116() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5971,7 +6021,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadBackTheMandatoryAttributePrimary6Y_117() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -5991,7 +6041,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributePrimary6Intensity_118() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -6010,7 +6060,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheOptionalAttributeWhitePointX_119() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -6030,7 +6080,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultOptionalAttributeWhitePointX_120() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -6048,7 +6098,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadBackTheOptionalAttributeWhitePointX_121() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -6068,7 +6118,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheOptionalAttributeWhitePointY_122() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -6088,7 +6138,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultOptionalAttributeWhitePointY_123() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -6106,7 +6156,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadBackTheOptionalAttributeWhitePointY_124() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -6126,7 +6176,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheOptionalAttributeColorPointRX_125() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -6146,7 +6196,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointRX_126() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -6164,7 +6214,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadBackTheOptionalAttributeColorPointRX_127() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -6184,7 +6234,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheOptionalAttributeColorPointRY_128() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -6204,7 +6254,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointRY_129() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -6222,7 +6272,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadBackTheOptionalAttributeColorPointRY_130() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -6242,7 +6292,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheOptionalAttributeColorPointRIntensity_131() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -6261,7 +6311,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheOptionalAttributeColorPointGX_132() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -6281,7 +6331,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointGX_133() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -6299,7 +6349,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadBackTheOptionalAttributeColorPointGX_134() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -6319,7 +6369,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheOptionalAttributeColorPointGY_135() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -6339,7 +6389,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointGY_136() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -6357,7 +6407,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadBackTheOptionalAttributeColorPointGY_137() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -6377,7 +6427,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheOptionalAttributeColorPointGIntensity_138() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -6396,7 +6446,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheOptionalAttributeColorPointBX_139() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -6416,7 +6466,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointBX_140() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -6434,7 +6484,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadBackTheOptionalAttributeColorPointBX_141() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -6454,7 +6504,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheOptionalAttributeColorPointBY_142() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -6474,7 +6524,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointBY_143() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -6492,7 +6542,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadBackTheOptionalAttributeColorPointBY_144() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -6512,7 +6562,7 @@ class Test_TC_CC_2_1 : public TestCommand CHIP_ERROR TestReadTheOptionalAttributeColorPointBIntensity_145() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -6533,7 +6583,11 @@ class Test_TC_CC_2_1 : public TestCommand class Test_TC_CC_3_1 : public TestCommand { public: - Test_TC_CC_3_1() : TestCommand("Test_TC_CC_3_1"), mTestIndex(0) {} + Test_TC_CC_3_1() : TestCommand("Test_TC_CC_3_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -6609,6 +6663,9 @@ class Test_TC_CC_3_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 9; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); @@ -6641,7 +6698,7 @@ class Test_TC_CC_3_1 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -6664,7 +6721,7 @@ class Test_TC_CC_3_1 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -6684,7 +6741,7 @@ class Test_TC_CC_3_1 : public TestCommand CHIP_ERROR TestMoveToHueShortestDistanceCommand_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::MoveToHue::Type; RequestType request; @@ -6712,7 +6769,7 @@ class Test_TC_CC_3_1 : public TestCommand CHIP_ERROR TestMoveToHueLongestDistanceCommand_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::MoveToHue::Type; RequestType request; @@ -6740,7 +6797,7 @@ class Test_TC_CC_3_1 : public TestCommand CHIP_ERROR TestMoveToHueUpCommand_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::MoveToHue::Type; RequestType request; @@ -6768,7 +6825,7 @@ class Test_TC_CC_3_1 : public TestCommand CHIP_ERROR TestMoveToHueDownCommand_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::MoveToHue::Type; RequestType request; @@ -6796,7 +6853,7 @@ class Test_TC_CC_3_1 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -6819,7 +6876,7 @@ class Test_TC_CC_3_1 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -6841,7 +6898,11 @@ class Test_TC_CC_3_1 : public TestCommand class Test_TC_CC_3_2 : public TestCommand { public: - Test_TC_CC_3_2() : TestCommand("Test_TC_CC_3_2"), mTestIndex(0) {} + Test_TC_CC_3_2() : TestCommand("Test_TC_CC_3_2"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -6917,6 +6978,9 @@ class Test_TC_CC_3_2 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 9; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); @@ -6949,7 +7013,7 @@ class Test_TC_CC_3_2 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -6972,7 +7036,7 @@ class Test_TC_CC_3_2 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -6992,7 +7056,7 @@ class Test_TC_CC_3_2 : public TestCommand CHIP_ERROR TestMoveHueUpCommand_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::MoveHue::Type; RequestType request; @@ -7019,7 +7083,7 @@ class Test_TC_CC_3_2 : public TestCommand CHIP_ERROR TestMoveHueStopCommand_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::MoveHue::Type; RequestType request; @@ -7046,7 +7110,7 @@ class Test_TC_CC_3_2 : public TestCommand CHIP_ERROR TestMoveHueDownCommand_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::MoveHue::Type; RequestType request; @@ -7073,7 +7137,7 @@ class Test_TC_CC_3_2 : public TestCommand CHIP_ERROR TestMoveHueStopCommand_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::MoveHue::Type; RequestType request; @@ -7100,7 +7164,7 @@ class Test_TC_CC_3_2 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -7123,7 +7187,7 @@ class Test_TC_CC_3_2 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -7145,7 +7209,11 @@ class Test_TC_CC_3_2 : public TestCommand class Test_TC_CC_3_3 : public TestCommand { public: - Test_TC_CC_3_3() : TestCommand("Test_TC_CC_3_3"), mTestIndex(0) {} + Test_TC_CC_3_3() : TestCommand("Test_TC_CC_3_3"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -7213,6 +7281,9 @@ class Test_TC_CC_3_3 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 7; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); @@ -7245,7 +7316,7 @@ class Test_TC_CC_3_3 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -7268,7 +7339,7 @@ class Test_TC_CC_3_3 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -7288,7 +7359,7 @@ class Test_TC_CC_3_3 : public TestCommand CHIP_ERROR TestStepHueUpCommand_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::StepHue::Type; RequestType request; @@ -7316,7 +7387,7 @@ class Test_TC_CC_3_3 : public TestCommand CHIP_ERROR TestStepHueDownCommand_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::StepHue::Type; RequestType request; @@ -7344,7 +7415,7 @@ class Test_TC_CC_3_3 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -7367,7 +7438,7 @@ class Test_TC_CC_3_3 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -7389,7 +7460,11 @@ class Test_TC_CC_3_3 : public TestCommand class Test_TC_CC_4_1 : public TestCommand { public: - Test_TC_CC_4_1() : TestCommand("Test_TC_CC_4_1"), mTestIndex(0) {} + Test_TC_CC_4_1() : TestCommand("Test_TC_CC_4_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -7453,6 +7528,9 @@ class Test_TC_CC_4_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 6; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); @@ -7485,7 +7563,7 @@ class Test_TC_CC_4_1 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -7508,7 +7586,7 @@ class Test_TC_CC_4_1 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -7528,7 +7606,7 @@ class Test_TC_CC_4_1 : public TestCommand CHIP_ERROR TestMoveToSaturationCommand_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type; RequestType request; @@ -7555,7 +7633,7 @@ class Test_TC_CC_4_1 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -7578,7 +7656,7 @@ class Test_TC_CC_4_1 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -7600,7 +7678,11 @@ class Test_TC_CC_4_1 : public TestCommand class Test_TC_CC_4_2 : public TestCommand { public: - Test_TC_CC_4_2() : TestCommand("Test_TC_CC_4_2"), mTestIndex(0) {} + Test_TC_CC_4_2() : TestCommand("Test_TC_CC_4_2"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -7684,6 +7766,9 @@ class Test_TC_CC_4_2 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 11; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); @@ -7716,7 +7801,7 @@ class Test_TC_CC_4_2 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -7739,7 +7824,7 @@ class Test_TC_CC_4_2 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -7759,7 +7844,7 @@ class Test_TC_CC_4_2 : public TestCommand CHIP_ERROR TestMoveSaturationUpCommand_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type; RequestType request; @@ -7786,7 +7871,7 @@ class Test_TC_CC_4_2 : public TestCommand CHIP_ERROR TestMoveSaturationDownCommand_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type; RequestType request; @@ -7813,7 +7898,7 @@ class Test_TC_CC_4_2 : public TestCommand CHIP_ERROR TestMoveSaturationUpCommand_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type; RequestType request; @@ -7840,7 +7925,7 @@ class Test_TC_CC_4_2 : public TestCommand CHIP_ERROR TestMoveSaturationStopCommand_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type; RequestType request; @@ -7867,7 +7952,7 @@ class Test_TC_CC_4_2 : public TestCommand CHIP_ERROR TestMoveSaturationDownCommand_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type; RequestType request; @@ -7894,7 +7979,7 @@ class Test_TC_CC_4_2 : public TestCommand CHIP_ERROR TestMoveSaturationStopCommand_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type; RequestType request; @@ -7921,7 +8006,7 @@ class Test_TC_CC_4_2 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_9() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -7944,7 +8029,7 @@ class Test_TC_CC_4_2 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -7966,7 +8051,11 @@ class Test_TC_CC_4_2 : public TestCommand class Test_TC_CC_4_3 : public TestCommand { public: - Test_TC_CC_4_3() : TestCommand("Test_TC_CC_4_3"), mTestIndex(0) {} + Test_TC_CC_4_3() : TestCommand("Test_TC_CC_4_3"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -8034,6 +8123,9 @@ class Test_TC_CC_4_3 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 7; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); @@ -8066,7 +8158,7 @@ class Test_TC_CC_4_3 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -8089,7 +8181,7 @@ class Test_TC_CC_4_3 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -8109,7 +8201,7 @@ class Test_TC_CC_4_3 : public TestCommand CHIP_ERROR TestStepSaturationUpCommand_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::StepSaturation::Type; RequestType request; @@ -8137,7 +8229,7 @@ class Test_TC_CC_4_3 : public TestCommand CHIP_ERROR TestStepSaturationDownCommand_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::StepSaturation::Type; RequestType request; @@ -8165,7 +8257,7 @@ class Test_TC_CC_4_3 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -8188,7 +8280,7 @@ class Test_TC_CC_4_3 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -8210,7 +8302,11 @@ class Test_TC_CC_4_3 : public TestCommand class Test_TC_CC_4_4 : public TestCommand { public: - Test_TC_CC_4_4() : TestCommand("Test_TC_CC_4_4"), mTestIndex(0) {} + Test_TC_CC_4_4() : TestCommand("Test_TC_CC_4_4"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -8274,6 +8370,9 @@ class Test_TC_CC_4_4 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 6; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); @@ -8306,7 +8405,7 @@ class Test_TC_CC_4_4 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -8329,7 +8428,7 @@ class Test_TC_CC_4_4 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -8349,7 +8448,7 @@ class Test_TC_CC_4_4 : public TestCommand CHIP_ERROR TestMoveToCurrentHueAndSaturationCommand_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Type; RequestType request; @@ -8377,7 +8476,7 @@ class Test_TC_CC_4_4 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -8400,7 +8499,7 @@ class Test_TC_CC_4_4 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -8422,7 +8521,11 @@ class Test_TC_CC_4_4 : public TestCommand class Test_TC_CC_5_1 : public TestCommand { public: - Test_TC_CC_5_1() : TestCommand("Test_TC_CC_5_1"), mTestIndex(0) {} + Test_TC_CC_5_1() : TestCommand("Test_TC_CC_5_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -8486,6 +8589,9 @@ class Test_TC_CC_5_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 6; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); @@ -8518,7 +8624,7 @@ class Test_TC_CC_5_1 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -8541,7 +8647,7 @@ class Test_TC_CC_5_1 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -8561,7 +8667,7 @@ class Test_TC_CC_5_1 : public TestCommand CHIP_ERROR TestMoveToColorCommand_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::MoveToColor::Type; RequestType request; @@ -8589,7 +8695,7 @@ class Test_TC_CC_5_1 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -8612,7 +8718,7 @@ class Test_TC_CC_5_1 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -8634,7 +8740,11 @@ class Test_TC_CC_5_1 : public TestCommand class Test_TC_CC_5_2 : public TestCommand { public: - Test_TC_CC_5_2() : TestCommand("Test_TC_CC_5_2"), mTestIndex(0) {} + Test_TC_CC_5_2() : TestCommand("Test_TC_CC_5_2"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -8702,6 +8812,9 @@ class Test_TC_CC_5_2 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 7; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); @@ -8734,7 +8847,7 @@ class Test_TC_CC_5_2 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -8757,7 +8870,7 @@ class Test_TC_CC_5_2 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -8777,7 +8890,7 @@ class Test_TC_CC_5_2 : public TestCommand CHIP_ERROR TestMoveColorCommand_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::MoveColor::Type; RequestType request; @@ -8804,7 +8917,7 @@ class Test_TC_CC_5_2 : public TestCommand CHIP_ERROR TestStopMoveStepCommand_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type; RequestType request; @@ -8829,7 +8942,7 @@ class Test_TC_CC_5_2 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -8852,7 +8965,7 @@ class Test_TC_CC_5_2 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -8874,7 +8987,11 @@ class Test_TC_CC_5_2 : public TestCommand class Test_TC_CC_5_3 : public TestCommand { public: - Test_TC_CC_5_3() : TestCommand("Test_TC_CC_5_3"), mTestIndex(0) {} + Test_TC_CC_5_3() : TestCommand("Test_TC_CC_5_3"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -8938,6 +9055,9 @@ class Test_TC_CC_5_3 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 6; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); @@ -8970,7 +9090,7 @@ class Test_TC_CC_5_3 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -8993,7 +9113,7 @@ class Test_TC_CC_5_3 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -9013,7 +9133,7 @@ class Test_TC_CC_5_3 : public TestCommand CHIP_ERROR TestStepColorCommand_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::StepColor::Type; RequestType request; @@ -9041,7 +9161,7 @@ class Test_TC_CC_5_3 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -9064,7 +9184,7 @@ class Test_TC_CC_5_3 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -9086,7 +9206,11 @@ class Test_TC_CC_5_3 : public TestCommand class Test_TC_CC_6_1 : public TestCommand { public: - Test_TC_CC_6_1() : TestCommand("Test_TC_CC_6_1"), mTestIndex(0) {} + Test_TC_CC_6_1() : TestCommand("Test_TC_CC_6_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -9150,6 +9274,9 @@ class Test_TC_CC_6_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 6; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); @@ -9182,7 +9309,7 @@ class Test_TC_CC_6_1 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -9205,7 +9332,7 @@ class Test_TC_CC_6_1 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -9225,7 +9352,7 @@ class Test_TC_CC_6_1 : public TestCommand CHIP_ERROR TestMoveToColorTemperatureCommand_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type; RequestType request; @@ -9252,7 +9379,7 @@ class Test_TC_CC_6_1 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -9275,7 +9402,7 @@ class Test_TC_CC_6_1 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -9297,7 +9424,11 @@ class Test_TC_CC_6_1 : public TestCommand class Test_TC_CC_6_2 : public TestCommand { public: - Test_TC_CC_6_2() : TestCommand("Test_TC_CC_6_2"), mTestIndex(0) {} + Test_TC_CC_6_2() : TestCommand("Test_TC_CC_6_2"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -9369,6 +9500,9 @@ class Test_TC_CC_6_2 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 8; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); @@ -9401,7 +9535,7 @@ class Test_TC_CC_6_2 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -9424,7 +9558,7 @@ class Test_TC_CC_6_2 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -9444,7 +9578,7 @@ class Test_TC_CC_6_2 : public TestCommand CHIP_ERROR TestMoveUpColorTemperatureCommand_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type; RequestType request; @@ -9473,7 +9607,7 @@ class Test_TC_CC_6_2 : public TestCommand CHIP_ERROR TestStopColorTemperatureCommand_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type; RequestType request; @@ -9502,7 +9636,7 @@ class Test_TC_CC_6_2 : public TestCommand CHIP_ERROR TestMoveDownColorTemperatureCommand_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type; RequestType request; @@ -9531,7 +9665,7 @@ class Test_TC_CC_6_2 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -9554,7 +9688,7 @@ class Test_TC_CC_6_2 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -9576,7 +9710,11 @@ class Test_TC_CC_6_2 : public TestCommand class Test_TC_CC_6_3 : public TestCommand { public: - Test_TC_CC_6_3() : TestCommand("Test_TC_CC_6_3"), mTestIndex(0) {} + Test_TC_CC_6_3() : TestCommand("Test_TC_CC_6_3"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -9644,6 +9782,9 @@ class Test_TC_CC_6_3 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 7; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); @@ -9676,7 +9817,7 @@ class Test_TC_CC_6_3 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -9699,7 +9840,7 @@ class Test_TC_CC_6_3 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -9719,7 +9860,7 @@ class Test_TC_CC_6_3 : public TestCommand CHIP_ERROR TestStepUpColorTemperatureCommand_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type; RequestType request; @@ -9749,7 +9890,7 @@ class Test_TC_CC_6_3 : public TestCommand CHIP_ERROR TestStepDownColorTemperatureCommand_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type; RequestType request; @@ -9779,7 +9920,7 @@ class Test_TC_CC_6_3 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -9802,7 +9943,7 @@ class Test_TC_CC_6_3 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -9824,7 +9965,11 @@ class Test_TC_CC_6_3 : public TestCommand class Test_TC_CC_7_1 : public TestCommand { public: - Test_TC_CC_7_1() : TestCommand("Test_TC_CC_7_1"), mTestIndex(0) {} + Test_TC_CC_7_1() : TestCommand("Test_TC_CC_7_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -9893,6 +10038,9 @@ class Test_TC_CC_7_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 7; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); @@ -9935,7 +10083,7 @@ class Test_TC_CC_7_1 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -9958,7 +10106,7 @@ class Test_TC_CC_7_1 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -9978,7 +10126,7 @@ class Test_TC_CC_7_1 : public TestCommand CHIP_ERROR TestEnhancedMoveToHueCommand_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type; RequestType request; @@ -10006,7 +10154,7 @@ class Test_TC_CC_7_1 : public TestCommand CHIP_ERROR TestCheckRemainingTimeAttributeValueMatchedTheValueSentByTheLastCommand_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -10026,7 +10174,7 @@ class Test_TC_CC_7_1 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -10049,7 +10197,7 @@ class Test_TC_CC_7_1 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -10071,7 +10219,11 @@ class Test_TC_CC_7_1 : public TestCommand class Test_TC_CC_7_2 : public TestCommand { public: - Test_TC_CC_7_2() : TestCommand("Test_TC_CC_7_2"), mTestIndex(0) {} + Test_TC_CC_7_2() : TestCommand("Test_TC_CC_7_2"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -10147,6 +10299,9 @@ class Test_TC_CC_7_2 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 9; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); @@ -10179,7 +10334,7 @@ class Test_TC_CC_7_2 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -10202,7 +10357,7 @@ class Test_TC_CC_7_2 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -10222,7 +10377,7 @@ class Test_TC_CC_7_2 : public TestCommand CHIP_ERROR TestEnhancedMoveHueDownCommand_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type; RequestType request; @@ -10249,7 +10404,7 @@ class Test_TC_CC_7_2 : public TestCommand CHIP_ERROR TestEnhancedMoveHueStopCommand_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type; RequestType request; @@ -10276,7 +10431,7 @@ class Test_TC_CC_7_2 : public TestCommand CHIP_ERROR TestEnhancedMoveHueUpCommand_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type; RequestType request; @@ -10303,7 +10458,7 @@ class Test_TC_CC_7_2 : public TestCommand CHIP_ERROR TestEnhancedMoveHueStopCommand_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type; RequestType request; @@ -10330,7 +10485,7 @@ class Test_TC_CC_7_2 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -10353,7 +10508,7 @@ class Test_TC_CC_7_2 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -10375,7 +10530,11 @@ class Test_TC_CC_7_2 : public TestCommand class Test_TC_CC_7_3 : public TestCommand { public: - Test_TC_CC_7_3() : TestCommand("Test_TC_CC_7_3"), mTestIndex(0) {} + Test_TC_CC_7_3() : TestCommand("Test_TC_CC_7_3"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -10443,6 +10602,9 @@ class Test_TC_CC_7_3 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 7; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); @@ -10475,7 +10637,7 @@ class Test_TC_CC_7_3 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -10498,7 +10660,7 @@ class Test_TC_CC_7_3 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -10518,7 +10680,7 @@ class Test_TC_CC_7_3 : public TestCommand CHIP_ERROR TestEnhancedStepHueUpCommand_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type; RequestType request; @@ -10546,7 +10708,7 @@ class Test_TC_CC_7_3 : public TestCommand CHIP_ERROR TestEnhancedStepHueDownCommand_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type; RequestType request; @@ -10574,7 +10736,7 @@ class Test_TC_CC_7_3 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -10597,7 +10759,7 @@ class Test_TC_CC_7_3 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -10619,7 +10781,11 @@ class Test_TC_CC_7_3 : public TestCommand class Test_TC_CC_7_4 : public TestCommand { public: - Test_TC_CC_7_4() : TestCommand("Test_TC_CC_7_4"), mTestIndex(0) {} + Test_TC_CC_7_4() : TestCommand("Test_TC_CC_7_4"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -10683,6 +10849,9 @@ class Test_TC_CC_7_4 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 6; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); @@ -10715,7 +10884,7 @@ class Test_TC_CC_7_4 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -10738,7 +10907,7 @@ class Test_TC_CC_7_4 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -10758,7 +10927,7 @@ class Test_TC_CC_7_4 : public TestCommand CHIP_ERROR TestEnhancedMoveToHueAndSaturationCommand_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type; RequestType request; @@ -10786,7 +10955,7 @@ class Test_TC_CC_7_4 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -10809,7 +10978,7 @@ class Test_TC_CC_7_4 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -10831,7 +11000,11 @@ class Test_TC_CC_7_4 : public TestCommand class Test_TC_CC_8_1 : public TestCommand { public: - Test_TC_CC_8_1() : TestCommand("Test_TC_CC_8_1"), mTestIndex(0) {} + Test_TC_CC_8_1() : TestCommand("Test_TC_CC_8_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -10939,6 +11112,9 @@ class Test_TC_CC_8_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 17; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); @@ -11051,7 +11227,7 @@ class Test_TC_CC_8_1 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -11074,7 +11250,7 @@ class Test_TC_CC_8_1 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -11094,7 +11270,7 @@ class Test_TC_CC_8_1 : public TestCommand CHIP_ERROR TestColorLoopSetCommandSetAllAttributes_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -11124,7 +11300,7 @@ class Test_TC_CC_8_1 : public TestCommand CHIP_ERROR TestCheckColorLoopDirectionValue_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -11144,7 +11320,7 @@ class Test_TC_CC_8_1 : public TestCommand CHIP_ERROR TestCheckColorLoopTimeValue_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -11164,7 +11340,7 @@ class Test_TC_CC_8_1 : public TestCommand CHIP_ERROR TestCheckColorLoopStartEnhancedHueValue_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -11185,7 +11361,7 @@ class Test_TC_CC_8_1 : public TestCommand CHIP_ERROR TestCheckColorLoopActiveValue_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -11205,7 +11381,7 @@ class Test_TC_CC_8_1 : public TestCommand CHIP_ERROR TestColorLoopSetCommandStartColorLoop_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -11235,7 +11411,7 @@ class Test_TC_CC_8_1 : public TestCommand CHIP_ERROR TestCheckColorLoopActiveValue_9() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -11255,7 +11431,7 @@ class Test_TC_CC_8_1 : public TestCommand CHIP_ERROR TestColorLoopSetCommandSetDirectionAndTimeWhileRunning_10() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -11285,7 +11461,7 @@ class Test_TC_CC_8_1 : public TestCommand CHIP_ERROR TestCheckColorLoopDirectionValue_11() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -11305,7 +11481,7 @@ class Test_TC_CC_8_1 : public TestCommand CHIP_ERROR TestCheckColorLoopTimeValue_12() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -11325,7 +11501,7 @@ class Test_TC_CC_8_1 : public TestCommand CHIP_ERROR TestColorLoopSetCommandSetDirectionWhileRunning_13() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -11355,7 +11531,7 @@ class Test_TC_CC_8_1 : public TestCommand CHIP_ERROR TestCheckColorLoopDirectionValue_14() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -11375,7 +11551,7 @@ class Test_TC_CC_8_1 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_15() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -11398,7 +11574,7 @@ class Test_TC_CC_8_1 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_16() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -11420,7 +11596,11 @@ class Test_TC_CC_8_1 : public TestCommand class Test_TC_CC_9_1 : public TestCommand { public: - Test_TC_CC_9_1() : TestCommand("Test_TC_CC_9_1"), mTestIndex(0) {} + Test_TC_CC_9_1() : TestCommand("Test_TC_CC_9_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -11609,6 +11789,9 @@ class Test_TC_CC_9_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 37; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); @@ -11791,7 +11974,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestPreconditionTurnOnLightForColorControlTests_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -11814,7 +11997,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -11834,7 +12017,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -11864,7 +12047,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -11884,7 +12067,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -11914,7 +12097,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestReadColorLoopDirectionAttributeFromDut_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -11934,7 +12117,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -11964,7 +12147,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestReadColorLoopTimeAttributeFromDut_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -11984,7 +12167,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_9() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -12014,7 +12197,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestReadColorLoopStartEnhancedHueAttributeFromDut_10() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -12035,7 +12218,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_11() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -12065,7 +12248,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_12() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -12085,7 +12268,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_13() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -12115,7 +12298,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_14() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -12135,7 +12318,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_15() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -12165,7 +12348,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestReadColorLoopDirectionAttributeFromDut_16() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -12185,7 +12368,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_17() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -12215,7 +12398,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_18() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -12235,7 +12418,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_19() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -12265,7 +12448,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_20() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -12285,7 +12468,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestEnhancedMoveToHueCommand10_21() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type; RequestType request; @@ -12319,7 +12502,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestReadEnhancedCurrentHueAttributeFromDut_23() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -12339,7 +12522,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_24() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -12369,7 +12552,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestReadColorLoopDirectionAttributeFromDut_25() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -12389,7 +12572,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_26() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -12419,7 +12602,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_27() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -12439,7 +12622,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_28() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -12469,7 +12652,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_29() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -12489,7 +12672,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_30() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -12519,7 +12702,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestReadColorLoopDirectionAttributeFromDut_31() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -12539,7 +12722,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_32() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -12569,7 +12752,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_33() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -12589,7 +12772,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_34() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -12619,7 +12802,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_35() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -12639,7 +12822,7 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestTurnOffLightForColorControlTests_36() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -12664,7 +12847,11 @@ class Test_TC_CC_9_1 : public TestCommand class Test_TC_CC_9_2 : public TestCommand { public: - Test_TC_CC_9_2() : TestCommand("Test_TC_CC_9_2"), mTestIndex(0) {} + Test_TC_CC_9_2() : TestCommand("Test_TC_CC_9_2"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -12764,6 +12951,9 @@ class Test_TC_CC_9_2 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 15; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); @@ -12856,7 +13046,7 @@ class Test_TC_CC_9_2 : public TestCommand CHIP_ERROR TestPreconditionTurnOnLightForColorControlTests_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -12879,7 +13069,7 @@ class Test_TC_CC_9_2 : public TestCommand CHIP_ERROR TestPreconditionCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -12899,7 +13089,7 @@ class Test_TC_CC_9_2 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -12929,7 +13119,7 @@ class Test_TC_CC_9_2 : public TestCommand CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -12949,7 +13139,7 @@ class Test_TC_CC_9_2 : public TestCommand CHIP_ERROR TestReadColorLoopDirectionAttributeFromDut_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -12969,7 +13159,7 @@ class Test_TC_CC_9_2 : public TestCommand CHIP_ERROR TestReadColorLoopTimeAttributeFromDut_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -12989,7 +13179,7 @@ class Test_TC_CC_9_2 : public TestCommand CHIP_ERROR TestReadColorLoopStartEnhancedHueAttributeFromDut_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -13010,7 +13200,7 @@ class Test_TC_CC_9_2 : public TestCommand CHIP_ERROR TestColorLoopSetCommandSetAllAttributes_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -13040,7 +13230,7 @@ class Test_TC_CC_9_2 : public TestCommand CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_9() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -13060,7 +13250,7 @@ class Test_TC_CC_9_2 : public TestCommand CHIP_ERROR TestColorLoopSetCommandStartColorLoop_10() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -13090,7 +13280,7 @@ class Test_TC_CC_9_2 : public TestCommand CHIP_ERROR TestReadColorLoopDirectionAttributeFromDut_11() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -13110,7 +13300,7 @@ class Test_TC_CC_9_2 : public TestCommand CHIP_ERROR TestColorLoopSetCommandStartColorLoop_12() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -13140,7 +13330,7 @@ class Test_TC_CC_9_2 : public TestCommand CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_13() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -13160,7 +13350,7 @@ class Test_TC_CC_9_2 : public TestCommand CHIP_ERROR TestTurnOffLightForColorControlTests_14() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -13185,7 +13375,11 @@ class Test_TC_CC_9_2 : public TestCommand class Test_TC_CC_9_3 : public TestCommand { public: - Test_TC_CC_9_3() : TestCommand("Test_TC_CC_9_3"), mTestIndex(0) {} + Test_TC_CC_9_3() : TestCommand("Test_TC_CC_9_3"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -13285,6 +13479,9 @@ class Test_TC_CC_9_3 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 15; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); @@ -13377,7 +13574,7 @@ class Test_TC_CC_9_3 : public TestCommand CHIP_ERROR TestPreconditionTurnOnLightForColorControlTests_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -13400,7 +13597,7 @@ class Test_TC_CC_9_3 : public TestCommand CHIP_ERROR TestPreconditionCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -13420,7 +13617,7 @@ class Test_TC_CC_9_3 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -13450,7 +13647,7 @@ class Test_TC_CC_9_3 : public TestCommand CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -13470,7 +13667,7 @@ class Test_TC_CC_9_3 : public TestCommand CHIP_ERROR TestReadColorLoopDirectionAttributeFromDut_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -13490,7 +13687,7 @@ class Test_TC_CC_9_3 : public TestCommand CHIP_ERROR TestReadColorLoopTimeAttributeFromDut_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -13510,7 +13707,7 @@ class Test_TC_CC_9_3 : public TestCommand CHIP_ERROR TestReadColorLoopStartEnhancedHueAttributeFromDut_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -13531,7 +13728,7 @@ class Test_TC_CC_9_3 : public TestCommand CHIP_ERROR TestColorLoopSetCommandSetAllAttributes_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -13561,7 +13758,7 @@ class Test_TC_CC_9_3 : public TestCommand CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_9() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -13581,7 +13778,7 @@ class Test_TC_CC_9_3 : public TestCommand CHIP_ERROR TestColorLoopSetCommandStartColorLoop_10() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -13611,7 +13808,7 @@ class Test_TC_CC_9_3 : public TestCommand CHIP_ERROR TestReadColorLoopTimeAttributeFromDut_11() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -13631,7 +13828,7 @@ class Test_TC_CC_9_3 : public TestCommand CHIP_ERROR TestColorLoopSetCommandStartColorLoop_12() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -13661,7 +13858,7 @@ class Test_TC_CC_9_3 : public TestCommand CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_13() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -13681,7 +13878,7 @@ class Test_TC_CC_9_3 : public TestCommand CHIP_ERROR TestTurnOffLightForColorControlTests_14() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -13706,7 +13903,11 @@ class Test_TC_CC_9_3 : public TestCommand class Test_TC_DD_1_5 : public TestCommand { public: - Test_TC_DD_1_5() : TestCommand("Test_TC_DD_1_5"), mTestIndex(0) {} + Test_TC_DD_1_5() : TestCommand("Test_TC_DD_1_5"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -13750,6 +13951,9 @@ class Test_TC_DD_1_5 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 1; + chip::Optional mCluster; + chip::Optional mEndpoint; + // // Tests methods // @@ -13765,7 +13969,11 @@ class Test_TC_DD_1_5 : public TestCommand class Test_TC_DD_1_6 : public TestCommand { public: - Test_TC_DD_1_6() : TestCommand("Test_TC_DD_1_6"), mTestIndex(0) {} + Test_TC_DD_1_6() : TestCommand("Test_TC_DD_1_6"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -13817,6 +14025,9 @@ class Test_TC_DD_1_6 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; + chip::Optional mCluster; + chip::Optional mEndpoint; + // // Tests methods // @@ -13845,7 +14056,11 @@ class Test_TC_DD_1_6 : public TestCommand class Test_TC_DD_1_7 : public TestCommand { public: - Test_TC_DD_1_7() : TestCommand("Test_TC_DD_1_7"), mTestIndex(0) {} + Test_TC_DD_1_7() : TestCommand("Test_TC_DD_1_7"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -13893,6 +14108,9 @@ class Test_TC_DD_1_7 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 2; + chip::Optional mCluster; + chip::Optional mEndpoint; + // // Tests methods // @@ -13914,7 +14132,11 @@ class Test_TC_DD_1_7 : public TestCommand class Test_TC_DD_1_8 : public TestCommand { public: - Test_TC_DD_1_8() : TestCommand("Test_TC_DD_1_8"), mTestIndex(0) {} + Test_TC_DD_1_8() : TestCommand("Test_TC_DD_1_8"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -13962,6 +14184,9 @@ class Test_TC_DD_1_8 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 2; + chip::Optional mCluster; + chip::Optional mEndpoint; + // // Tests methods // @@ -13982,7 +14207,11 @@ class Test_TC_DD_1_8 : public TestCommand class Test_TC_DD_1_9 : public TestCommand { public: - Test_TC_DD_1_9() : TestCommand("Test_TC_DD_1_9"), mTestIndex(0) {} + Test_TC_DD_1_9() : TestCommand("Test_TC_DD_1_9"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -14034,6 +14263,9 @@ class Test_TC_DD_1_9 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; + chip::Optional mCluster; + chip::Optional mEndpoint; + // // Tests methods // @@ -14061,7 +14293,11 @@ class Test_TC_DD_1_9 : public TestCommand class Test_TC_DM_1_1 : public TestCommand { public: - Test_TC_DM_1_1() : TestCommand("Test_TC_DM_1_1"), mTestIndex(0) {} + Test_TC_DM_1_1() : TestCommand("Test_TC_DM_1_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -14181,6 +14417,9 @@ class Test_TC_DM_1_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 20; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -14383,7 +14622,7 @@ class Test_TC_DM_1_1 : public TestCommand CHIP_ERROR TestQueryInteractionModelVersion_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -14402,7 +14641,7 @@ class Test_TC_DM_1_1 : public TestCommand CHIP_ERROR TestQueryVendorName_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -14422,7 +14661,7 @@ class Test_TC_DM_1_1 : public TestCommand CHIP_ERROR TestQueryVendorID_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -14441,7 +14680,7 @@ class Test_TC_DM_1_1 : public TestCommand CHIP_ERROR TestQueryProductName_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -14461,7 +14700,7 @@ class Test_TC_DM_1_1 : public TestCommand CHIP_ERROR TestQueryProductID_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -14480,7 +14719,7 @@ class Test_TC_DM_1_1 : public TestCommand CHIP_ERROR TestQueryNodeLabel_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -14500,7 +14739,7 @@ class Test_TC_DM_1_1 : public TestCommand CHIP_ERROR TestQueryUserLocation_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -14521,7 +14760,7 @@ class Test_TC_DM_1_1 : public TestCommand CHIP_ERROR TestQueryHardwareVersion_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -14540,7 +14779,7 @@ class Test_TC_DM_1_1 : public TestCommand CHIP_ERROR TestQueryHardwareVersionString_9() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -14561,7 +14800,7 @@ class Test_TC_DM_1_1 : public TestCommand CHIP_ERROR TestQuerySoftwareVersion_10() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -14580,7 +14819,7 @@ class Test_TC_DM_1_1 : public TestCommand CHIP_ERROR TestQuerySoftwareVersionString_11() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -14602,7 +14841,7 @@ class Test_TC_DM_1_1 : public TestCommand CHIP_ERROR TestQueryManufacturingDate_12() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -14627,7 +14866,7 @@ class Test_TC_DM_1_1 : public TestCommand CHIP_ERROR TestQueryPartNumber_13() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -14650,7 +14889,7 @@ class Test_TC_DM_1_1 : public TestCommand CHIP_ERROR TestQueryProductURL_14() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -14674,7 +14913,7 @@ class Test_TC_DM_1_1 : public TestCommand CHIP_ERROR TestQueryProductLabel_15() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -14697,7 +14936,7 @@ class Test_TC_DM_1_1 : public TestCommand CHIP_ERROR TestQuerySerialNumber_16() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -14720,7 +14959,7 @@ class Test_TC_DM_1_1 : public TestCommand CHIP_ERROR TestQueryLocalConfigDisabled_17() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -14742,7 +14981,7 @@ class Test_TC_DM_1_1 : public TestCommand CHIP_ERROR TestQueryReachable_18() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -14764,7 +15003,7 @@ class Test_TC_DM_1_1 : public TestCommand CHIP_ERROR TestQueryUniqueID_19() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -14789,7 +15028,11 @@ class Test_TC_DM_1_1 : public TestCommand class Test_TC_DM_3_1 : public TestCommand { public: - Test_TC_DM_3_1() : TestCommand("Test_TC_DM_3_1"), mTestIndex(0) {} + Test_TC_DM_3_1() : TestCommand("Test_TC_DM_3_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -14833,6 +15076,9 @@ class Test_TC_DM_3_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 1; + chip::Optional mCluster; + chip::Optional mEndpoint; + // // Tests methods // @@ -14847,7 +15093,11 @@ class Test_TC_DM_3_1 : public TestCommand class Test_TC_DM_2_2 : public TestCommand { public: - Test_TC_DM_2_2() : TestCommand("Test_TC_DM_2_2"), mTestIndex(0) {} + Test_TC_DM_2_2() : TestCommand("Test_TC_DM_2_2"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -14907,6 +15157,9 @@ class Test_TC_DM_2_2 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 5; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -14963,7 +15216,7 @@ class Test_TC_DM_2_2 : public TestCommand CHIP_ERROR TestQueryFabricsList_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::OperationalCredentialsClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -14989,7 +15242,7 @@ class Test_TC_DM_2_2 : public TestCommand CHIP_ERROR TestQuerySupportedFabrics_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::OperationalCredentialsClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -15010,7 +15263,7 @@ class Test_TC_DM_2_2 : public TestCommand CHIP_ERROR TestQueryCommissionedFabrics_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::OperationalCredentialsClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -15031,7 +15284,7 @@ class Test_TC_DM_2_2 : public TestCommand CHIP_ERROR TestQueryUserTrustedRootCertificates_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::OperationalCredentialsClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -15053,7 +15306,11 @@ class Test_TC_DM_2_2 : public TestCommand class Test_TC_EMR_1_1 : public TestCommand { public: - Test_TC_EMR_1_1() : TestCommand("Test_TC_EMR_1_1"), mTestIndex(0) {} + Test_TC_EMR_1_1() : TestCommand("Test_TC_EMR_1_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -15114,6 +15371,9 @@ class Test_TC_EMR_1_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 5; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -15163,7 +15423,7 @@ class Test_TC_EMR_1_1 : public TestCommand CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ElectricalMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -15184,7 +15444,7 @@ class Test_TC_EMR_1_1 : public TestCommand CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ElectricalMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -15204,7 +15464,7 @@ class Test_TC_EMR_1_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ElectricalMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -15227,7 +15487,7 @@ class Test_TC_EMR_1_1 : public TestCommand CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ElectricalMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -15250,7 +15510,11 @@ class Test_TC_EMR_1_1 : public TestCommand class Test_TC_FLW_1_1 : public TestCommand { public: - Test_TC_FLW_1_1() : TestCommand("Test_TC_FLW_1_1"), mTestIndex(0) {} + Test_TC_FLW_1_1() : TestCommand("Test_TC_FLW_1_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -15303,6 +15567,9 @@ class Test_TC_FLW_1_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -15332,7 +15599,7 @@ class Test_TC_FLW_1_1 : public TestCommand CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::FlowMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -15351,7 +15618,7 @@ class Test_TC_FLW_1_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::FlowMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -15375,7 +15642,11 @@ class Test_TC_FLW_1_1 : public TestCommand class Test_TC_FLW_2_1 : public TestCommand { public: - Test_TC_FLW_2_1() : TestCommand("Test_TC_FLW_2_1"), mTestIndex(0) {} + Test_TC_FLW_2_1() : TestCommand("Test_TC_FLW_2_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -15451,6 +15722,9 @@ class Test_TC_FLW_2_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 9; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -15537,7 +15811,7 @@ class Test_TC_FLW_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::FlowMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -15556,7 +15830,7 @@ class Test_TC_FLW_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeMinMeasuredValue_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::FlowMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -15575,7 +15849,7 @@ class Test_TC_FLW_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeMaxMeasuredValue_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::FlowMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -15594,7 +15868,7 @@ class Test_TC_FLW_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValueToOptionalAttributeMinMeasuredValue_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::FlowMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -15616,7 +15890,7 @@ class Test_TC_FLW_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValueToOptionalAttributeMaxMeasuredValue_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::FlowMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -15638,7 +15912,7 @@ class Test_TC_FLW_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::FlowMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -15657,7 +15931,7 @@ class Test_TC_FLW_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeMinMeasuredValue_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::FlowMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -15676,7 +15950,7 @@ class Test_TC_FLW_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeMaxMeasuredValue_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::FlowMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -15697,7 +15971,11 @@ class Test_TC_FLW_2_1 : public TestCommand class Test_TC_FLW_2_2 : public TestCommand { public: - Test_TC_FLW_2_2() : TestCommand("Test_TC_FLW_2_2"), mTestIndex(0) {} + Test_TC_FLW_2_2() : TestCommand("Test_TC_FLW_2_2"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -15749,6 +16027,9 @@ class Test_TC_FLW_2_2 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -15781,7 +16062,7 @@ class Test_TC_FLW_2_2 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::FlowMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -15800,7 +16081,7 @@ class Test_TC_FLW_2_2 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::FlowMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -15821,7 +16102,11 @@ class Test_TC_FLW_2_2 : public TestCommand class Test_TC_ILL_1_1 : public TestCommand { public: - Test_TC_ILL_1_1() : TestCommand("Test_TC_ILL_1_1"), mTestIndex(0) {} + Test_TC_ILL_1_1() : TestCommand("Test_TC_ILL_1_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -15882,6 +16167,9 @@ class Test_TC_ILL_1_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 5; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -15931,7 +16219,7 @@ class Test_TC_ILL_1_1 : public TestCommand CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::IlluminanceMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -15952,7 +16240,7 @@ class Test_TC_ILL_1_1 : public TestCommand CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::IlluminanceMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -15972,7 +16260,7 @@ class Test_TC_ILL_1_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::IlluminanceMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -15995,7 +16283,7 @@ class Test_TC_ILL_1_1 : public TestCommand CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::IlluminanceMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -16018,7 +16306,11 @@ class Test_TC_ILL_1_1 : public TestCommand class Test_TC_LVL_1_1 : public TestCommand { public: - Test_TC_LVL_1_1() : TestCommand("Test_TC_LVL_1_1"), mTestIndex(0) {} + Test_TC_LVL_1_1() : TestCommand("Test_TC_LVL_1_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -16071,6 +16363,9 @@ class Test_TC_LVL_1_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -16100,7 +16395,7 @@ class Test_TC_LVL_1_1 : public TestCommand CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -16119,7 +16414,7 @@ class Test_TC_LVL_1_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -16143,7 +16438,11 @@ class Test_TC_LVL_1_1 : public TestCommand class Test_TC_LVL_2_1 : public TestCommand { public: - Test_TC_LVL_2_1() : TestCommand("Test_TC_LVL_2_1"), mTestIndex(0) {} + Test_TC_LVL_2_1() : TestCommand("Test_TC_LVL_2_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -16239,6 +16538,9 @@ class Test_TC_LVL_2_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 14; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -16301,7 +16603,7 @@ class Test_TC_LVL_2_1 : public TestCommand CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -16321,7 +16623,7 @@ class Test_TC_LVL_2_1 : public TestCommand CHIP_ERROR TestSendsAMoveToLevelCommand_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; RequestType request; @@ -16354,7 +16656,7 @@ class Test_TC_LVL_2_1 : public TestCommand CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -16374,7 +16676,7 @@ class Test_TC_LVL_2_1 : public TestCommand CHIP_ERROR TestSendsAMoveToLevelCommand_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; RequestType request; @@ -16407,7 +16709,7 @@ class Test_TC_LVL_2_1 : public TestCommand CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -16427,7 +16729,7 @@ class Test_TC_LVL_2_1 : public TestCommand CHIP_ERROR TestReadsOnOffTransitionTimeAttributeFromDut_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -16447,7 +16749,7 @@ class Test_TC_LVL_2_1 : public TestCommand CHIP_ERROR TestSendsAMoveToLevelCommand_9() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; RequestType request; @@ -16480,7 +16782,7 @@ class Test_TC_LVL_2_1 : public TestCommand CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_11() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -16500,7 +16802,7 @@ class Test_TC_LVL_2_1 : public TestCommand CHIP_ERROR TestResetLevelTo254_12() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; RequestType request; @@ -16535,7 +16837,11 @@ class Test_TC_LVL_2_1 : public TestCommand class Test_TC_LVL_3_1 : public TestCommand { public: - Test_TC_LVL_3_1() : TestCommand("Test_TC_LVL_3_1"), mTestIndex(0) {} + Test_TC_LVL_3_1() : TestCommand("Test_TC_LVL_3_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -16643,6 +16949,9 @@ class Test_TC_LVL_3_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 17; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -16732,7 +17041,7 @@ class Test_TC_LVL_3_1 : public TestCommand CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -16752,7 +17061,7 @@ class Test_TC_LVL_3_1 : public TestCommand CHIP_ERROR TestReadsMaxLevelAttributeFromDut_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -16772,7 +17081,7 @@ class Test_TC_LVL_3_1 : public TestCommand CHIP_ERROR TestSendsAMoveUpCommand_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::LevelControl::Commands::Move::Type; RequestType request; @@ -16805,7 +17114,7 @@ class Test_TC_LVL_3_1 : public TestCommand CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -16825,7 +17134,7 @@ class Test_TC_LVL_3_1 : public TestCommand CHIP_ERROR TestReadsMinLevelAttributeFromDut_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -16845,7 +17154,7 @@ class Test_TC_LVL_3_1 : public TestCommand CHIP_ERROR TestSendsAMoveDownCommand_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::LevelControl::Commands::Move::Type; RequestType request; @@ -16878,7 +17187,7 @@ class Test_TC_LVL_3_1 : public TestCommand CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_9() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -16898,7 +17207,7 @@ class Test_TC_LVL_3_1 : public TestCommand CHIP_ERROR TestWriteDefaultMoveRateAttributeFromDut_10() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -16917,7 +17226,7 @@ class Test_TC_LVL_3_1 : public TestCommand CHIP_ERROR TestReadsDefaultMoveRateAttributeFromDut_11() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -16938,7 +17247,7 @@ class Test_TC_LVL_3_1 : public TestCommand CHIP_ERROR TestSendsAMoveUpCommandAtDefaultMoveRate_12() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::LevelControl::Commands::Move::Type; RequestType request; @@ -16971,7 +17280,7 @@ class Test_TC_LVL_3_1 : public TestCommand CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_14() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -16991,7 +17300,7 @@ class Test_TC_LVL_3_1 : public TestCommand CHIP_ERROR TestResetLevelTo254_15() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; RequestType request; @@ -17026,7 +17335,11 @@ class Test_TC_LVL_3_1 : public TestCommand class Test_TC_LVL_4_1 : public TestCommand { public: - Test_TC_LVL_4_1() : TestCommand("Test_TC_LVL_4_1"), mTestIndex(0) {} + Test_TC_LVL_4_1() : TestCommand("Test_TC_LVL_4_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -17114,6 +17427,9 @@ class Test_TC_LVL_4_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 12; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); @@ -17156,7 +17472,7 @@ class Test_TC_LVL_4_1 : public TestCommand CHIP_ERROR TestSendingOnCommand_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -17179,7 +17495,7 @@ class Test_TC_LVL_4_1 : public TestCommand CHIP_ERROR TestPreconditionDutLevelIsSetTo0x80_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::LevelControl::Commands::Step::Type; RequestType request; @@ -17213,7 +17529,7 @@ class Test_TC_LVL_4_1 : public TestCommand CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -17233,7 +17549,7 @@ class Test_TC_LVL_4_1 : public TestCommand CHIP_ERROR TestSendsStepDownCommandToDut_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::LevelControl::Commands::Step::Type; RequestType request; @@ -17267,7 +17583,7 @@ class Test_TC_LVL_4_1 : public TestCommand CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -17287,7 +17603,7 @@ class Test_TC_LVL_4_1 : public TestCommand CHIP_ERROR TestSendsAStepUpCommand_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::LevelControl::Commands::Step::Type; RequestType request; @@ -17321,7 +17637,7 @@ class Test_TC_LVL_4_1 : public TestCommand CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_10() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -17341,7 +17657,7 @@ class Test_TC_LVL_4_1 : public TestCommand CHIP_ERROR TestSendingOffCommand_11() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -17366,7 +17682,11 @@ class Test_TC_LVL_4_1 : public TestCommand class Test_TC_LVL_5_1 : public TestCommand { public: - Test_TC_LVL_5_1() : TestCommand("Test_TC_LVL_5_1"), mTestIndex(0) {} + Test_TC_LVL_5_1() : TestCommand("Test_TC_LVL_5_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -17438,6 +17758,9 @@ class Test_TC_LVL_5_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 8; + chip::Optional mCluster; + chip::Optional mEndpoint; + // // Tests methods // @@ -17450,7 +17773,7 @@ class Test_TC_LVL_5_1 : public TestCommand CHIP_ERROR TestSendingOnCommand_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -17473,7 +17796,7 @@ class Test_TC_LVL_5_1 : public TestCommand CHIP_ERROR TestPreconditionDutLevelIsSetTo0x80_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::LevelControl::Commands::Step::Type; RequestType request; @@ -17507,7 +17830,7 @@ class Test_TC_LVL_5_1 : public TestCommand CHIP_ERROR TestSendsAMoveUpCommandToDut_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::LevelControl::Commands::Move::Type; RequestType request; @@ -17540,7 +17863,7 @@ class Test_TC_LVL_5_1 : public TestCommand CHIP_ERROR TestSendsStopCommandToDut_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::LevelControl::Commands::Stop::Type; RequestType request; @@ -17565,7 +17888,7 @@ class Test_TC_LVL_5_1 : public TestCommand CHIP_ERROR TestSendingOffCommand_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -17590,7 +17913,11 @@ class Test_TC_LVL_5_1 : public TestCommand class Test_TC_MC_1_1 : public TestCommand { public: - Test_TC_MC_1_1() : TestCommand("Test_TC_MC_1_1"), mTestIndex(0) {} + Test_TC_MC_1_1() : TestCommand("Test_TC_MC_1_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -17643,6 +17970,9 @@ class Test_TC_MC_1_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -17672,7 +18002,7 @@ class Test_TC_MC_1_1 : public TestCommand CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::MediaInputClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -17691,7 +18021,7 @@ class Test_TC_MC_1_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::MediaInputClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -17715,7 +18045,11 @@ class Test_TC_MC_1_1 : public TestCommand class Test_TC_MC_2_1 : public TestCommand { public: - Test_TC_MC_2_1() : TestCommand("Test_TC_MC_2_1"), mTestIndex(0) {} + Test_TC_MC_2_1() : TestCommand("Test_TC_MC_2_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -17763,6 +18097,9 @@ class Test_TC_MC_2_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 2; + chip::Optional mCluster; + chip::Optional mEndpoint; + // // Tests methods // @@ -17775,7 +18112,7 @@ class Test_TC_MC_2_1 : public TestCommand CHIP_ERROR TestPutTheDeviceIntoLowPowerMode_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::LowPower::Commands::Sleep::Type; RequestType request; @@ -17800,7 +18137,11 @@ class Test_TC_MC_2_1 : public TestCommand class Test_TC_MC_3_1 : public TestCommand { public: - Test_TC_MC_3_1() : TestCommand("Test_TC_MC_3_1"), mTestIndex(0) {} + Test_TC_MC_3_1() : TestCommand("Test_TC_MC_3_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -17844,6 +18185,9 @@ class Test_TC_MC_3_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 1; + chip::Optional mCluster; + chip::Optional mEndpoint; + // // Tests methods // @@ -17858,7 +18202,11 @@ class Test_TC_MC_3_1 : public TestCommand class Test_TC_MC_3_2 : public TestCommand { public: - Test_TC_MC_3_2() : TestCommand("Test_TC_MC_3_2"), mTestIndex(0) {} + Test_TC_MC_3_2() : TestCommand("Test_TC_MC_3_2"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -17902,6 +18250,9 @@ class Test_TC_MC_3_2 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 1; + chip::Optional mCluster; + chip::Optional mEndpoint; + // // Tests methods // @@ -17916,7 +18267,11 @@ class Test_TC_MC_3_2 : public TestCommand class Test_TC_MC_3_3 : public TestCommand { public: - Test_TC_MC_3_3() : TestCommand("Test_TC_MC_3_3"), mTestIndex(0) {} + Test_TC_MC_3_3() : TestCommand("Test_TC_MC_3_3"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -17960,6 +18315,9 @@ class Test_TC_MC_3_3 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 1; + chip::Optional mCluster; + chip::Optional mEndpoint; + // // Tests methods // @@ -17974,7 +18332,11 @@ class Test_TC_MC_3_3 : public TestCommand class Test_TC_MC_3_4 : public TestCommand { public: - Test_TC_MC_3_4() : TestCommand("Test_TC_MC_3_4"), mTestIndex(0) {} + Test_TC_MC_3_4() : TestCommand("Test_TC_MC_3_4"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -18018,6 +18380,9 @@ class Test_TC_MC_3_4 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 1; + chip::Optional mCluster; + chip::Optional mEndpoint; + // // Tests methods // @@ -18032,7 +18397,11 @@ class Test_TC_MC_3_4 : public TestCommand class Test_TC_MC_3_5 : public TestCommand { public: - Test_TC_MC_3_5() : TestCommand("Test_TC_MC_3_5"), mTestIndex(0) {} + Test_TC_MC_3_5() : TestCommand("Test_TC_MC_3_5"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -18076,6 +18445,9 @@ class Test_TC_MC_3_5 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 1; + chip::Optional mCluster; + chip::Optional mEndpoint; + // // Tests methods // @@ -18090,7 +18462,11 @@ class Test_TC_MC_3_5 : public TestCommand class Test_TC_MC_3_6 : public TestCommand { public: - Test_TC_MC_3_6() : TestCommand("Test_TC_MC_3_6"), mTestIndex(0) {} + Test_TC_MC_3_6() : TestCommand("Test_TC_MC_3_6"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -18134,6 +18510,9 @@ class Test_TC_MC_3_6 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 1; + chip::Optional mCluster; + chip::Optional mEndpoint; + // // Tests methods // @@ -18148,7 +18527,11 @@ class Test_TC_MC_3_6 : public TestCommand class Test_TC_MC_3_7 : public TestCommand { public: - Test_TC_MC_3_7() : TestCommand("Test_TC_MC_3_7"), mTestIndex(0) {} + Test_TC_MC_3_7() : TestCommand("Test_TC_MC_3_7"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -18192,6 +18575,9 @@ class Test_TC_MC_3_7 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 1; + chip::Optional mCluster; + chip::Optional mEndpoint; + // // Tests methods // @@ -18206,7 +18592,11 @@ class Test_TC_MC_3_7 : public TestCommand class Test_TC_MC_3_8 : public TestCommand { public: - Test_TC_MC_3_8() : TestCommand("Test_TC_MC_3_8"), mTestIndex(0) {} + Test_TC_MC_3_8() : TestCommand("Test_TC_MC_3_8"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -18250,6 +18640,9 @@ class Test_TC_MC_3_8 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 1; + chip::Optional mCluster; + chip::Optional mEndpoint; + // // Tests methods // @@ -18264,7 +18657,11 @@ class Test_TC_MC_3_8 : public TestCommand class Test_TC_MC_3_9 : public TestCommand { public: - Test_TC_MC_3_9() : TestCommand("Test_TC_MC_3_9"), mTestIndex(0) {} + Test_TC_MC_3_9() : TestCommand("Test_TC_MC_3_9"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -18308,6 +18705,9 @@ class Test_TC_MC_3_9 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 1; + chip::Optional mCluster; + chip::Optional mEndpoint; + // // Tests methods // @@ -18322,7 +18722,11 @@ class Test_TC_MC_3_9 : public TestCommand class Test_TC_MC_3_10 : public TestCommand { public: - Test_TC_MC_3_10() : TestCommand("Test_TC_MC_3_10"), mTestIndex(0) {} + Test_TC_MC_3_10() : TestCommand("Test_TC_MC_3_10"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -18366,6 +18770,9 @@ class Test_TC_MC_3_10 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 1; + chip::Optional mCluster; + chip::Optional mEndpoint; + // // Tests methods // @@ -18380,7 +18787,11 @@ class Test_TC_MC_3_10 : public TestCommand class Test_TC_MC_3_11 : public TestCommand { public: - Test_TC_MC_3_11() : TestCommand("Test_TC_MC_3_11"), mTestIndex(0) {} + Test_TC_MC_3_11() : TestCommand("Test_TC_MC_3_11"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -18424,6 +18835,9 @@ class Test_TC_MC_3_11 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 1; + chip::Optional mCluster; + chip::Optional mEndpoint; + // // Tests methods // @@ -18438,7 +18852,11 @@ class Test_TC_MC_3_11 : public TestCommand class Test_TC_OCC_1_1 : public TestCommand { public: - Test_TC_OCC_1_1() : TestCommand("Test_TC_OCC_1_1"), mTestIndex(0) {} + Test_TC_OCC_1_1() : TestCommand("Test_TC_OCC_1_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -18495,6 +18913,9 @@ class Test_TC_OCC_1_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 4; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -18534,7 +18955,7 @@ class Test_TC_OCC_1_1 : public TestCommand CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OccupancySensingClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -18554,7 +18975,7 @@ class Test_TC_OCC_1_1 : public TestCommand CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OccupancySensingClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -18573,7 +18994,7 @@ class Test_TC_OCC_1_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OccupancySensingClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -18597,7 +19018,11 @@ class Test_TC_OCC_1_1 : public TestCommand class Test_TC_OCC_2_1 : public TestCommand { public: - Test_TC_OCC_2_1() : TestCommand("Test_TC_OCC_2_1"), mTestIndex(0) {} + Test_TC_OCC_2_1() : TestCommand("Test_TC_OCC_2_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -18681,6 +19106,9 @@ class Test_TC_OCC_2_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 10; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -18774,7 +19202,7 @@ class Test_TC_OCC_2_1 : public TestCommand CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancy_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OccupancySensingClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -18794,7 +19222,7 @@ class Test_TC_OCC_2_1 : public TestCommand CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancy_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OccupancySensingClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -18816,7 +19244,7 @@ class Test_TC_OCC_2_1 : public TestCommand CHIP_ERROR TestReadsBackMandatoryAttributeOccupancy_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OccupancySensingClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -18836,7 +19264,7 @@ class Test_TC_OCC_2_1 : public TestCommand CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancySensorType_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OccupancySensingClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -18857,7 +19285,7 @@ class Test_TC_OCC_2_1 : public TestCommand CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancySensorType_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OccupancySensingClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -18880,7 +19308,7 @@ class Test_TC_OCC_2_1 : public TestCommand CHIP_ERROR TestReadsBackMandatoryAttributeOccupancySensorType_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OccupancySensingClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -18901,7 +19329,7 @@ class Test_TC_OCC_2_1 : public TestCommand CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancySensorTypeBitmap_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OccupancySensingClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -18923,7 +19351,7 @@ class Test_TC_OCC_2_1 : public TestCommand CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancySensorTypeBitmap_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OccupancySensingClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -18946,7 +19374,7 @@ class Test_TC_OCC_2_1 : public TestCommand CHIP_ERROR TestReadsBackMandatoryAttributeOccupancySensorTypeBitmap_9() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OccupancySensingClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -18969,7 +19397,11 @@ class Test_TC_OCC_2_1 : public TestCommand class Test_TC_OCC_2_2 : public TestCommand { public: - Test_TC_OCC_2_2() : TestCommand("Test_TC_OCC_2_2"), mTestIndex(0) {} + Test_TC_OCC_2_2() : TestCommand("Test_TC_OCC_2_2"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -19021,6 +19453,9 @@ class Test_TC_OCC_2_2 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -19053,7 +19488,7 @@ class Test_TC_OCC_2_2 : public TestCommand CHIP_ERROR TestReadsOccupancyAttributeFromDut_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OccupancySensingClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -19072,7 +19507,7 @@ class Test_TC_OCC_2_2 : public TestCommand CHIP_ERROR TestReadsOccupancyAttributeFromDut_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OccupancySensingClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -19093,7 +19528,11 @@ class Test_TC_OCC_2_2 : public TestCommand class Test_TC_OO_1_1 : public TestCommand { public: - Test_TC_OO_1_1() : TestCommand("Test_TC_OO_1_1"), mTestIndex(0) {} + Test_TC_OO_1_1() : TestCommand("Test_TC_OO_1_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -19174,6 +19613,9 @@ class Test_TC_OO_1_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 10; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); @@ -19266,7 +19708,7 @@ class Test_TC_OO_1_1 : public TestCommand CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -19286,7 +19728,7 @@ class Test_TC_OO_1_1 : public TestCommand CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -19305,7 +19747,7 @@ class Test_TC_OO_1_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -19327,7 +19769,7 @@ class Test_TC_OO_1_1 : public TestCommand CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -19347,7 +19789,7 @@ class Test_TC_OO_1_1 : public TestCommand CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -19367,7 +19809,7 @@ class Test_TC_OO_1_1 : public TestCommand CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -19386,7 +19828,7 @@ class Test_TC_OO_1_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToOptionalGlobalAttributeFeatureMap_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -19408,7 +19850,7 @@ class Test_TC_OO_1_1 : public TestCommand CHIP_ERROR TestReadsBackOptionalGlobalAttributeFeatureMap_9() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -19430,7 +19872,11 @@ class Test_TC_OO_1_1 : public TestCommand class Test_TC_OO_2_1 : public TestCommand { public: - Test_TC_OO_2_1() : TestCommand("Test_TC_OO_2_1"), mTestIndex(0) {} + Test_TC_OO_2_1() : TestCommand("Test_TC_OO_2_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -19522,6 +19968,9 @@ class Test_TC_OO_2_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 13; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -19645,7 +20094,7 @@ class Test_TC_OO_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeOnOff_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -19665,7 +20114,7 @@ class Test_TC_OO_2_1 : public TestCommand CHIP_ERROR TestReadsBackMandatoryAttributeOnOff_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -19685,7 +20134,7 @@ class Test_TC_OO_2_1 : public TestCommand CHIP_ERROR TestReadLtAttributeGlobalSceneControl_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -19705,7 +20154,7 @@ class Test_TC_OO_2_1 : public TestCommand CHIP_ERROR TestReadLtAttributeOnTime_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -19725,7 +20174,7 @@ class Test_TC_OO_2_1 : public TestCommand CHIP_ERROR TestReadLtAttributeOffWaitTime_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -19745,7 +20194,7 @@ class Test_TC_OO_2_1 : public TestCommand CHIP_ERROR TestReadLtAttributeStartUpOnOff_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -19765,7 +20214,7 @@ class Test_TC_OO_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValueToLtAttributeOnTime_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -19783,7 +20232,7 @@ class Test_TC_OO_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValueToLtAttributeOffWaitTime_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -19801,7 +20250,7 @@ class Test_TC_OO_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValueToLtAttributeStartUpOnOff_9() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -19819,7 +20268,7 @@ class Test_TC_OO_2_1 : public TestCommand CHIP_ERROR TestReadsBackLtAttributeOnTime_10() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -19839,7 +20288,7 @@ class Test_TC_OO_2_1 : public TestCommand CHIP_ERROR TestReadsBackLtAttributeOffWaitTime_11() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -19859,7 +20308,7 @@ class Test_TC_OO_2_1 : public TestCommand CHIP_ERROR TestReadsBackLtAttributeStartUpOnOff_12() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -19881,7 +20330,11 @@ class Test_TC_OO_2_1 : public TestCommand class Test_TC_OO_2_2 : public TestCommand { public: - Test_TC_OO_2_2() : TestCommand("Test_TC_OO_2_2"), mTestIndex(0) {} + Test_TC_OO_2_2() : TestCommand("Test_TC_OO_2_2"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -19981,6 +20434,9 @@ class Test_TC_OO_2_2 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 15; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); @@ -20063,7 +20519,7 @@ class Test_TC_OO_2_2 : public TestCommand CHIP_ERROR TestSendOffCommand_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -20086,7 +20542,7 @@ class Test_TC_OO_2_2 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -20106,7 +20562,7 @@ class Test_TC_OO_2_2 : public TestCommand CHIP_ERROR TestSendOnCommand_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -20129,7 +20585,7 @@ class Test_TC_OO_2_2 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -20149,7 +20605,7 @@ class Test_TC_OO_2_2 : public TestCommand CHIP_ERROR TestSendOffCommand_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -20172,7 +20628,7 @@ class Test_TC_OO_2_2 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -20192,7 +20648,7 @@ class Test_TC_OO_2_2 : public TestCommand CHIP_ERROR TestSendToggleCommand_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Toggle::Type; RequestType request; @@ -20215,7 +20671,7 @@ class Test_TC_OO_2_2 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterToggleCommand_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -20235,7 +20691,7 @@ class Test_TC_OO_2_2 : public TestCommand CHIP_ERROR TestSendToggleCommand_9() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Toggle::Type; RequestType request; @@ -20258,7 +20714,7 @@ class Test_TC_OO_2_2 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterToggleCommand_10() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -20278,7 +20734,7 @@ class Test_TC_OO_2_2 : public TestCommand CHIP_ERROR TestSendOnCommand_11() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -20301,7 +20757,7 @@ class Test_TC_OO_2_2 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_12() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -20321,7 +20777,7 @@ class Test_TC_OO_2_2 : public TestCommand CHIP_ERROR TestSendOffCommand_13() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -20344,7 +20800,7 @@ class Test_TC_OO_2_2 : public TestCommand CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_14() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -20366,7 +20822,11 @@ class Test_TC_OO_2_2 : public TestCommand class Test_TC_OO_2_3 : public TestCommand { public: - Test_TC_OO_2_3() : TestCommand("Test_TC_OO_2_3"), mTestIndex(0) {} + Test_TC_OO_2_3() : TestCommand("Test_TC_OO_2_3"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -20594,6 +21054,9 @@ class Test_TC_OO_2_3 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 47; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); @@ -20936,7 +21399,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestSendOnCommand_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -20965,7 +21428,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsOnOffAttributeFromDut_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -20985,7 +21448,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsGlobalSceneControlAttributeFromDut_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21005,7 +21468,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestSendOnCommand_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -21034,7 +21497,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsOnOffAttributeFromDut_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21054,7 +21517,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsGlobalSceneControlAttributeFromDut_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21074,7 +21537,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestSendOnCommand_9() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -21103,7 +21566,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsOnOffAttributeFromDut_11() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21123,7 +21586,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsGlobalSceneControlAttributeFromDut_12() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21143,7 +21606,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsOnTimeAttributeFromDut_13() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21163,7 +21626,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsOffWaitTimeAttributeFromDut_14() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21183,7 +21646,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestSendOnCommand_15() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -21206,7 +21669,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsOnOffAttributeFromDut_16() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21226,7 +21689,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsOnTimeAttributeFromDut_17() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21246,7 +21709,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsOffWaitTimeAttributeFromDut_18() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21266,7 +21729,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestSendOffCommand_19() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -21289,7 +21752,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsOnOffAttributeFromDut_20() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21309,7 +21772,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsOnTimeAttributeFromDut_21() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21329,7 +21792,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsOnOffAttributeFromDut_22() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21349,7 +21812,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsOnTimeAttributeFromDut_23() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21369,7 +21832,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsOffWaitTimeAttributeFromDut_24() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21389,7 +21852,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestSendOnCommand_25() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -21412,7 +21875,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsOnTimeAttributeFromDut_26() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21432,7 +21895,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsOffWaitTimeAttributeFromDut_27() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21452,7 +21915,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestSendOffCommand_28() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -21475,7 +21938,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsOnOffAttributeFromDut_29() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21495,7 +21958,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsOnTimeAttributeFromDut_30() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21515,7 +21978,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsOnOffAttributeFromDut_31() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21535,7 +21998,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsOnTimeAttributeFromDut_32() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21555,7 +22018,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestSendOnCommand_33() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -21578,7 +22041,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsOnOffAttributeFromDut_34() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21598,7 +22061,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsOnTimeAttributeFromDut_35() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21618,7 +22081,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsOffWaitTimeAttributeFromDut_36() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21638,7 +22101,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestSendOffCommand_37() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -21661,7 +22124,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsOnOffAttributeFromDut_38() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21681,7 +22144,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsOnTimeAttributeFromDut_39() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21701,7 +22164,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsOnOffAttributeFromDut_40() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21721,7 +22184,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsOnTimeAttributeFromDut_41() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21741,7 +22204,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsOffWaitTimeAttributeFromDut_42() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21761,7 +22224,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsOnOffAttributeFromDut_43() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21781,7 +22244,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsOnTimeAttributeFromDut_44() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21801,7 +22264,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestReadsOffWaitTimeAttributeFromDut_45() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21821,7 +22284,7 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestSendOffCommand_46() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -21846,7 +22309,11 @@ class Test_TC_OO_2_3 : public TestCommand class Test_TC_PRS_1_1 : public TestCommand { public: - Test_TC_PRS_1_1() : TestCommand("Test_TC_PRS_1_1"), mTestIndex(0) {} + Test_TC_PRS_1_1() : TestCommand("Test_TC_PRS_1_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -21899,6 +22366,9 @@ class Test_TC_PRS_1_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -21928,7 +22398,7 @@ class Test_TC_PRS_1_1 : public TestCommand CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PressureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21947,7 +22417,7 @@ class Test_TC_PRS_1_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PressureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -21972,7 +22442,11 @@ class Test_TC_PRS_1_1 : public TestCommand class Test_TC_PRS_2_1 : public TestCommand { public: - Test_TC_PRS_2_1() : TestCommand("Test_TC_PRS_2_1"), mTestIndex(0) {} + Test_TC_PRS_2_1() : TestCommand("Test_TC_PRS_2_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -22052,6 +22526,9 @@ class Test_TC_PRS_2_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 10; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -22145,7 +22622,7 @@ class Test_TC_PRS_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeConstraintsMeasuredValue_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PressureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -22164,7 +22641,7 @@ class Test_TC_PRS_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeMeasuredValue_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PressureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -22186,7 +22663,7 @@ class Test_TC_PRS_2_1 : public TestCommand CHIP_ERROR TestReadsBackMandatoryAttributeMeasuredValue_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PressureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -22206,7 +22683,7 @@ class Test_TC_PRS_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeConstraintsMinMeasuredValue_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PressureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -22226,7 +22703,7 @@ class Test_TC_PRS_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeMinMeasuredValue_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PressureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -22249,7 +22726,7 @@ class Test_TC_PRS_2_1 : public TestCommand CHIP_ERROR TestReadsBackMandatoryAttributeMinMeasuredValue_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PressureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -22270,7 +22747,7 @@ class Test_TC_PRS_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeConstraintsMaxMeasuredValue_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PressureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -22290,7 +22767,7 @@ class Test_TC_PRS_2_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeMaxMeasuredValue_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PressureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -22313,7 +22790,7 @@ class Test_TC_PRS_2_1 : public TestCommand CHIP_ERROR TestReadsBackMandatoryAttributeMaxMeasuredValue_9() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PressureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -22336,7 +22813,11 @@ class Test_TC_PRS_2_1 : public TestCommand class Test_TC_PCC_1_1 : public TestCommand { public: - Test_TC_PCC_1_1() : TestCommand("Test_TC_PCC_1_1"), mTestIndex(0) {} + Test_TC_PCC_1_1() : TestCommand("Test_TC_PCC_1_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -22393,6 +22874,9 @@ class Test_TC_PCC_1_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 4; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -22432,7 +22916,7 @@ class Test_TC_PCC_1_1 : public TestCommand CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -22452,7 +22936,7 @@ class Test_TC_PCC_1_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -22475,7 +22959,7 @@ class Test_TC_PCC_1_1 : public TestCommand CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -22497,7 +22981,11 @@ class Test_TC_PCC_1_1 : public TestCommand class Test_TC_PCC_2_1 : public TestCommand { public: - Test_TC_PCC_2_1() : TestCommand("Test_TC_PCC_2_1"), mTestIndex(0) {} + Test_TC_PCC_2_1() : TestCommand("Test_TC_PCC_2_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -22573,6 +23061,9 @@ class Test_TC_PCC_2_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 9; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -22665,7 +23156,7 @@ class Test_TC_PCC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeMaxPressure_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -22685,7 +23176,7 @@ class Test_TC_PCC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeEffectiveOperationMode_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -22705,7 +23196,7 @@ class Test_TC_PCC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeEffectiveControlMode_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -22725,7 +23216,7 @@ class Test_TC_PCC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeCapacity_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -22745,7 +23236,7 @@ class Test_TC_PCC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeMaxPressure_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -22765,7 +23256,7 @@ class Test_TC_PCC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeEffectiveOperationMode_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -22785,7 +23276,7 @@ class Test_TC_PCC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeEffectiveControlMode_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -22805,7 +23296,7 @@ class Test_TC_PCC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeCapacity_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -22827,7 +23318,11 @@ class Test_TC_PCC_2_1 : public TestCommand class Test_TC_PCC_2_2 : public TestCommand { public: - Test_TC_PCC_2_2() : TestCommand("Test_TC_PCC_2_2"), mTestIndex(0) {} + Test_TC_PCC_2_2() : TestCommand("Test_TC_PCC_2_2"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -22883,6 +23378,9 @@ class Test_TC_PCC_2_2 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 4; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -22916,7 +23414,7 @@ class Test_TC_PCC_2_2 : public TestCommand CHIP_ERROR TestWrite1ToTheOperationModeAttributeToDutOperationMode_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -22935,7 +23433,7 @@ class Test_TC_PCC_2_2 : public TestCommand CHIP_ERROR TestWrite2ToTheOperationModeAttributeToDutOperationMode_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -22954,7 +23452,7 @@ class Test_TC_PCC_2_2 : public TestCommand CHIP_ERROR TestWrite3ToTheOperationModeAttributeToDutOperationMode_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -22975,7 +23473,11 @@ class Test_TC_PCC_2_2 : public TestCommand class Test_TC_PCC_2_3 : public TestCommand { public: - Test_TC_PCC_2_3() : TestCommand("Test_TC_PCC_2_3"), mTestIndex(0) {} + Test_TC_PCC_2_3() : TestCommand("Test_TC_PCC_2_3"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -23027,6 +23529,9 @@ class Test_TC_PCC_2_3 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -23056,7 +23561,7 @@ class Test_TC_PCC_2_3 : public TestCommand CHIP_ERROR TestWrite0ToTheOperationModeAttributeToDut_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -23075,7 +23580,7 @@ class Test_TC_PCC_2_3 : public TestCommand CHIP_ERROR TestReadsTheAttributeEffectiveOperationMode_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -23098,7 +23603,11 @@ class Test_TC_PCC_2_3 : public TestCommand class Test_TC_RH_1_1 : public TestCommand { public: - Test_TC_RH_1_1() : TestCommand("Test_TC_RH_1_1"), mTestIndex(0) {} + Test_TC_RH_1_1() : TestCommand("Test_TC_RH_1_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -23151,6 +23660,9 @@ class Test_TC_RH_1_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -23180,7 +23692,7 @@ class Test_TC_RH_1_1 : public TestCommand CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::RelativeHumidityMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -23200,7 +23712,7 @@ class Test_TC_RH_1_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::RelativeHumidityMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -23225,7 +23737,11 @@ class Test_TC_RH_1_1 : public TestCommand class Test_TC_RH_2_1 : public TestCommand { public: - Test_TC_RH_2_1() : TestCommand("Test_TC_RH_2_1"), mTestIndex(0) {} + Test_TC_RH_2_1() : TestCommand("Test_TC_RH_2_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -23277,6 +23793,9 @@ class Test_TC_RH_2_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -23309,7 +23828,7 @@ class Test_TC_RH_2_1 : public TestCommand CHIP_ERROR TestReadsConstraintsOfAttributeMeasuredValue_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::RelativeHumidityMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -23329,7 +23848,7 @@ class Test_TC_RH_2_1 : public TestCommand CHIP_ERROR TestReadsConstraintsOfAttributeMinMeasuredValue_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::RelativeHumidityMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -23352,7 +23871,11 @@ class Test_TC_RH_2_1 : public TestCommand class Test_TC_RH_2_2 : public TestCommand { public: - Test_TC_RH_2_2() : TestCommand("Test_TC_RH_2_2"), mTestIndex(0) {} + Test_TC_RH_2_2() : TestCommand("Test_TC_RH_2_2"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -23404,6 +23927,9 @@ class Test_TC_RH_2_2 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -23436,7 +23962,7 @@ class Test_TC_RH_2_2 : public TestCommand CHIP_ERROR TestReadsMeasuredValueAttributeFromDut_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::RelativeHumidityMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -23456,7 +23982,7 @@ class Test_TC_RH_2_2 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::RelativeHumidityMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -23478,7 +24004,11 @@ class Test_TC_RH_2_2 : public TestCommand class Test_TC_TM_1_1 : public TestCommand { public: - Test_TC_TM_1_1() : TestCommand("Test_TC_TM_1_1"), mTestIndex(0) {} + Test_TC_TM_1_1() : TestCommand("Test_TC_TM_1_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -23539,6 +24069,9 @@ class Test_TC_TM_1_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 5; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -23588,7 +24121,7 @@ class Test_TC_TM_1_1 : public TestCommand CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TemperatureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -23609,7 +24142,7 @@ class Test_TC_TM_1_1 : public TestCommand CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TemperatureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -23629,7 +24162,7 @@ class Test_TC_TM_1_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TemperatureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -23652,7 +24185,7 @@ class Test_TC_TM_1_1 : public TestCommand CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TemperatureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -23675,7 +24208,11 @@ class Test_TC_TM_1_1 : public TestCommand class Test_TC_TM_2_1 : public TestCommand { public: - Test_TC_TM_2_1() : TestCommand("Test_TC_TM_2_1"), mTestIndex(0) {} + Test_TC_TM_2_1() : TestCommand("Test_TC_TM_2_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -23723,6 +24260,9 @@ class Test_TC_TM_2_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 2; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -23745,7 +24285,7 @@ class Test_TC_TM_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TemperatureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -23767,7 +24307,11 @@ class Test_TC_TM_2_1 : public TestCommand class Test_TC_TM_2_2 : public TestCommand { public: - Test_TC_TM_2_2() : TestCommand("Test_TC_TM_2_2"), mTestIndex(0) {} + Test_TC_TM_2_2() : TestCommand("Test_TC_TM_2_2"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -23819,6 +24363,9 @@ class Test_TC_TM_2_2 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -23851,7 +24398,7 @@ class Test_TC_TM_2_2 : public TestCommand CHIP_ERROR TestReadsMeasuredValueAttributeFromDut_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TemperatureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -23871,7 +24418,7 @@ class Test_TC_TM_2_2 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TemperatureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -23893,7 +24440,11 @@ class Test_TC_TM_2_2 : public TestCommand class Test_TC_TSTAT_1_1 : public TestCommand { public: - Test_TC_TSTAT_1_1() : TestCommand("Test_TC_TSTAT_1_1"), mTestIndex(0) {} + Test_TC_TSTAT_1_1() : TestCommand("Test_TC_TSTAT_1_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -23950,6 +24501,9 @@ class Test_TC_TSTAT_1_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 4; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -23989,7 +24543,7 @@ class Test_TC_TSTAT_1_1 : public TestCommand CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -24008,7 +24562,7 @@ class Test_TC_TSTAT_1_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -24030,7 +24584,7 @@ class Test_TC_TSTAT_1_1 : public TestCommand CHIP_ERROR TestReadTheOptionalGlobalAttributeConstraintsFeatureMap_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -24051,7 +24605,11 @@ class Test_TC_TSTAT_1_1 : public TestCommand class Test_TC_TSTAT_2_1 : public TestCommand { public: - Test_TC_TSTAT_2_1() : TestCommand("Test_TC_TSTAT_2_1"), mTestIndex(0) {} + Test_TC_TSTAT_2_1() : TestCommand("Test_TC_TSTAT_2_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -24381,6 +24939,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 61; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -24945,7 +25506,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutLocalTemperature_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -24964,7 +25525,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadsMandatoryAttributesFromDutAbsMinHeatSetpointLimit_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -24984,7 +25545,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutAbsMinHeatSetpointLimit_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25005,7 +25566,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMinHeatSetpointLimit_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25027,7 +25588,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadBackMandatoryAttributesFromDutAbsMinHeatSetpointLimit_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25047,7 +25608,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadsMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25067,7 +25628,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25088,7 +25649,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMaxHeatSetpointLimit_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25110,7 +25671,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadBackMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_9() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25130,7 +25691,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadsMandatoryAttributesFromDutAbsMinCoolSetpointLimit_10() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25150,7 +25711,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutAbsMinCoolSetpointLimit_11() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25171,7 +25732,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMinCoolSetpointLimit_12() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25193,7 +25754,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadBackMandatoryAttributesFromDutAbsMinCoolSetpointLimit_13() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25213,7 +25774,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadsMandatoryAttributesFromDutAbsMaxCoolSetpointLimit_14() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25233,7 +25794,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutAbsMaxCoolSetpointLimit_15() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25254,7 +25815,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMaxCoolSetpointLimit_16() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25276,7 +25837,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadBackMandatoryAttributesFromDutAbsMaxCoolSetpointLimit_17() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25296,7 +25857,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadsMandatoryAttributesFromDutOccupiedCoolingSetpoint_18() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25316,7 +25877,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutOccupiedCoolingSetpoint_19() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25337,7 +25898,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutOccupiedCoolingSetpoint_20() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25355,7 +25916,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadBackMandatoryAttributesFromDutOccupiedCoolingSetpoint_21() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25375,7 +25936,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadsMandatoryAttributesFromDutOccupiedHeatingSetpoint_22() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25395,7 +25956,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutOccupiedHeatingSetpoint_23() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25416,7 +25977,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutOccupiedHeatingSetpoint_24() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25434,7 +25995,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadBackMandatoryAttributesFromDutOccupiedHeatingSetpoint_25() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25454,7 +26015,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadsMandatoryAttributesFromDutMinHeatSetpointLimit_26() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25474,7 +26035,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutMinHeatSetpointLimit_27() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25495,7 +26056,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMinHeatSetpointLimit_28() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25513,7 +26074,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadBackMandatoryAttributesFromDutMinHeatSetpointLimit_29() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25533,7 +26094,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadsMandatoryAttributesFromDutMaxHeatSetpointLimit_30() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25553,7 +26114,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutMaxHeatSetpointLimit_31() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25574,7 +26135,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMaxHeatSetpointLimit_32() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25592,7 +26153,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadBackMandatoryAttributesFromDutMaxHeatSetpointLimit_33() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25612,7 +26173,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadsMandatoryAttributesFromDutMinCoolSetpointLimit_34() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25632,7 +26193,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutMinCoolSetpointLimit_35() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25653,7 +26214,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMinCoolSetpointLimit_36() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25671,7 +26232,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadBackMandatoryAttributesFromDutMinCoolSetpointLimit_37() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25691,7 +26252,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadsMandatoryAttributesFromDutMaxCoolSetpointLimit_38() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25711,7 +26272,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutMaxCoolSetpointLimit_39() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25732,7 +26293,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMaxCoolSetpointLimit_40() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25750,7 +26311,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadBackMandatoryAttributesFromDutMaxCoolSetpointLimit_41() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25770,7 +26331,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadsMandatoryAttributesFromDutControlSequenceOfOperation_42() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25791,7 +26352,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutControlSequenceOfOperation_43() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25812,7 +26373,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutControlSequenceOfOperation_44() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25831,7 +26392,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadBackMandatoryAttributesFromDutControlSequenceOfOperation_45() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25852,7 +26413,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadsMandatoryAttributesFromDutSystemMode_46() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25872,7 +26433,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutSystemMode_47() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25892,7 +26453,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutSystemMode_48() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25910,7 +26471,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadBackMandatoryAttributesFromDutSystemMode_49() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25930,7 +26491,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadsOptionalAttributesFromDutMinSetpointDeadBand_50() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25950,7 +26511,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutMinSetpointDeadBand_51() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25970,7 +26531,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutMinSetpointDeadBand_52() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -25988,7 +26549,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadBackOptionalAttributesFromDutMinSetpointDeadBand_53() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -26008,7 +26569,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutStartOfWeek_54() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -26028,7 +26589,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutStartOfWeek_55() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -26050,7 +26611,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadBackOptionalAttributesFromDutStartOfWeek_56() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -26070,7 +26631,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutNumberOfWeeklyTransitions_57() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -26090,7 +26651,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutNumberOfWeeklyTransitions_58() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -26113,7 +26674,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutNumberOfDailyTransitions_59() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -26132,7 +26693,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutNumberOfDailyTransitions_60() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -26157,7 +26718,11 @@ class Test_TC_TSTAT_2_1 : public TestCommand class Test_TC_TSTAT_2_2 : public TestCommand { public: - Test_TC_TSTAT_2_2() : TestCommand("Test_TC_TSTAT_2_2"), mTestIndex(0) {} + Test_TC_TSTAT_2_2() : TestCommand("Test_TC_TSTAT_2_2"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -26544,6 +27109,9 @@ class Test_TC_TSTAT_2_2 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 50; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -26941,7 +27509,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestReadsOccupiedCoolingSetpointAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -26961,7 +27529,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForOccupiedCoolingSetpointAttribute_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -26979,7 +27547,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfOccupiedCoolingSetpointAttribute_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -26999,7 +27567,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestWritesTheLimitOfMinCoolSetpointLimitToOccupiedCoolingSetpointAttribute_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27017,7 +27585,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestWritesTheLimitOfMaxCoolSetpointLimitToOccupiedCoolingSetpointAttribute_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27035,7 +27603,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestReadsOccupiedHeatingSetpointAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27055,7 +27623,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForOccupiedHeatingSetpointAttribute_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27073,7 +27641,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfOccupiedHeatingSetpointAttribute_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27093,7 +27661,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestWritesTheLimitOfMinHeatSetpointLimitToOccupiedHeatingSetpointAttribute_9() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27111,7 +27679,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestWritesTheLimitOfMaxHeatSetpointLimitToOccupiedHeatingSetpointAttribute_10() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27129,7 +27697,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestReadsMinHeatSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_11() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27149,7 +27717,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMinHeatSetpointLimitAttribute_12() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27167,7 +27735,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinHeatSetpointLimitAttribute_13() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27187,7 +27755,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestWritesTheLimitOfAbsMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_14() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27205,7 +27773,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_15() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27223,7 +27791,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestReadsMaxHeatSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_16() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27243,7 +27811,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMaxHeatSetpointLimitAttribute_17() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27261,7 +27829,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxHeatSetpointLimitAttribute_18() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27281,7 +27849,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestWritesTheLimitOfAbsMinHeatSetpointLimitToMaxHeatSetpointLimitAttribute_19() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27299,7 +27867,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMaxHeatSetpointLimitAttribute_20() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27317,7 +27885,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestReadsMinCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_21() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27337,7 +27905,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMinCoolSetpointLimitAttribute_22() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27355,7 +27923,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinCoolSetpointLimitAttribute_23() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27375,7 +27943,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestWritesTheLimitOfAbsMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_24() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27393,7 +27961,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestWritesTheLimitOfMaxCoolSetpointLimitToMinCoolSetpointLimitAttribute_25() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27411,7 +27979,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestReadsMaxCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_26() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27431,7 +27999,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMaxCoolSetpointLimitAttribute_27() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27449,7 +28017,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxCoolSetpointLimitAttribute_28() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27469,7 +28037,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestWritesTheLimitOfAbsMinCoolSetpointLimitToMaxCoolSetpointLimitAttribute_29() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27487,7 +28055,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestWritesTheLimitOfMaxCoolSetpointLimitToMaxCoolSetpointLimitAttribute_30() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27505,7 +28073,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestWritesSetsBackTheLimitOfMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_31() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27523,7 +28091,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestWritesSetsBackTheLimitOfMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_32() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27541,7 +28109,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestWritesSetsBackTheLimitOfMinHeatSetpointLimitToMaxHeatSetpointLimitAttribute_33() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27559,7 +28127,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestWritesSetsBackTheLimitOfMaxHeatSetpointLimitToMaxHeatSetpointLimitAttribute_34() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27577,7 +28145,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestWritesSetsBackTheLimitOfMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_35() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27595,7 +28163,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestWritesSetsBackTheLimitOfMaxCoolSetpointLimitToMinCoolSetpointLimitAttribute_36() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27613,7 +28181,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestWritesSetsBackTheLimitOfMinCoolSetpointLimitToMaxCoolSetpointLimitAttribute_37() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27631,7 +28199,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestWritesSetsBackTheLimitOfMaxCoolSetpointLimitToMaxCoolSetpointLimitAttribute_38() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27649,7 +28217,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestReadsControlSequenceOfOperationFromServerDutAndVerifiesThatTheValueIsValid_39() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27670,7 +28238,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestWriteAttributeCommandForControlSequenceOfOperationWithANewValidValue_40() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27689,7 +28257,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestReadItBackAgainToConfirmTheSuccessfulWrite_41() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27710,7 +28278,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestSetsOccupiedHeatingSetpointToDefaultValue_42() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27728,7 +28296,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestSetsOccupiedHeatingSetpointToDefaultValue_43() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27746,7 +28314,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestSetsOccupiedCoolingSetpointToDefaultValue_44() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27764,7 +28332,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestSetsOccupiedCoolingSetpointToDefaultValue_45() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27782,7 +28350,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestSetsOccupiedCoolingSetpointToDefaultValue_46() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27800,7 +28368,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestSetsOccupiedHeatingSetpointToDefaultValue_47() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27818,7 +28386,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestSetsOccupiedCoolingSetpointToDefaultValue_48() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27836,7 +28404,7 @@ class Test_TC_TSTAT_2_2 : public TestCommand CHIP_ERROR TestSetsOccupiedHeatingSetpointToDefaultValue_49() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27856,7 +28424,11 @@ class Test_TC_TSTAT_2_2 : public TestCommand class Test_TC_TSUIC_1_1 : public TestCommand { public: - Test_TC_TSUIC_1_1() : TestCommand("Test_TC_TSUIC_1_1"), mTestIndex(0) {} + Test_TC_TSUIC_1_1() : TestCommand("Test_TC_TSUIC_1_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -27909,6 +28481,9 @@ class Test_TC_TSUIC_1_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -27938,7 +28513,7 @@ class Test_TC_TSUIC_1_1 : public TestCommand CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27958,7 +28533,7 @@ class Test_TC_TSUIC_1_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -27984,7 +28559,11 @@ class Test_TC_TSUIC_1_1 : public TestCommand class Test_TC_TSUIC_2_1 : public TestCommand { public: - Test_TC_TSUIC_2_1() : TestCommand("Test_TC_TSUIC_2_1"), mTestIndex(0) {} + Test_TC_TSUIC_2_1() : TestCommand("Test_TC_TSUIC_2_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -28088,6 +28667,9 @@ class Test_TC_TSUIC_2_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 16; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -28241,7 +28823,7 @@ class Test_TC_TSUIC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeTemperatureDisplayMode_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -28263,7 +28845,7 @@ class Test_TC_TSUIC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeTemperatureDisplayMode_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -28284,7 +28866,7 @@ class Test_TC_TSUIC_2_1 : public TestCommand CHIP_ERROR TestWriteToTheMandatoryAttributeTemperatureDisplayMode_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -28304,7 +28886,7 @@ class Test_TC_TSUIC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeTemperatureDisplayMode_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -28326,7 +28908,7 @@ class Test_TC_TSUIC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeTemperatureDisplayMode_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -28347,7 +28929,7 @@ class Test_TC_TSUIC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeKeypadLockout_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -28368,7 +28950,7 @@ class Test_TC_TSUIC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeKeypadLockout_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -28388,7 +28970,7 @@ class Test_TC_TSUIC_2_1 : public TestCommand CHIP_ERROR TestWriteToTheMandatoryAttributeKeypadLockout_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -28407,7 +28989,7 @@ class Test_TC_TSUIC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeKeypadLockout_9() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -28428,7 +29010,7 @@ class Test_TC_TSUIC_2_1 : public TestCommand CHIP_ERROR TestReadTheMandatoryAttributeKeypadLockout_10() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -28448,7 +29030,7 @@ class Test_TC_TSUIC_2_1 : public TestCommand CHIP_ERROR TestReadTheOptionalAttributeScheduleProgrammingVisibility_11() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -28470,7 +29052,7 @@ class Test_TC_TSUIC_2_1 : public TestCommand CHIP_ERROR TestReadTheOptionalAttributeScheduleProgrammingVisibility_12() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -28491,7 +29073,7 @@ class Test_TC_TSUIC_2_1 : public TestCommand CHIP_ERROR TestWriteToTheMandatoryAttributeScheduleProgrammingVisibility_13() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -28511,7 +29093,7 @@ class Test_TC_TSUIC_2_1 : public TestCommand CHIP_ERROR TestReadTheOptionalAttributeScheduleProgrammingVisibility_14() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -28533,7 +29115,7 @@ class Test_TC_TSUIC_2_1 : public TestCommand CHIP_ERROR TestReadTheOptionalAttributeScheduleProgrammingVisibility_15() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -28556,7 +29138,11 @@ class Test_TC_TSUIC_2_1 : public TestCommand class Test_TC_TSUIC_2_2 : public TestCommand { public: - Test_TC_TSUIC_2_2() : TestCommand("Test_TC_TSUIC_2_2"), mTestIndex(0) {} + Test_TC_TSUIC_2_2() : TestCommand("Test_TC_TSUIC_2_2"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -28648,6 +29234,9 @@ class Test_TC_TSUIC_2_2 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 11; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -28730,7 +29319,7 @@ class Test_TC_TSUIC_2_2 : public TestCommand CHIP_ERROR TestWritesAValueOf0ToTemperatureDisplayModeAttributeOfDut_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -28750,7 +29339,7 @@ class Test_TC_TSUIC_2_2 : public TestCommand CHIP_ERROR TestWritesAValueOf1ToTemperatureDisplayModeAttributeOfDut_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -28770,7 +29359,7 @@ class Test_TC_TSUIC_2_2 : public TestCommand CHIP_ERROR TestWritesAValueOf0ToKeypadLockoutAttributeOfDut_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -28789,7 +29378,7 @@ class Test_TC_TSUIC_2_2 : public TestCommand CHIP_ERROR TestWritesAValueOf1ToKeypadLockoutAttributeOfDut_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -28808,7 +29397,7 @@ class Test_TC_TSUIC_2_2 : public TestCommand CHIP_ERROR TestWritesAValueOf2ToKeypadLockoutAttributeOfDut_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -28827,7 +29416,7 @@ class Test_TC_TSUIC_2_2 : public TestCommand CHIP_ERROR TestWritesAValueOf3ToKeypadLockoutAttributeOfDut_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -28846,7 +29435,7 @@ class Test_TC_TSUIC_2_2 : public TestCommand CHIP_ERROR TestWritesAValueOf4ToKeypadLockoutAttributeOfDut_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -28865,7 +29454,7 @@ class Test_TC_TSUIC_2_2 : public TestCommand CHIP_ERROR TestWritesAValueOf5ToKeypadLockoutAttributeOfDut_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -28884,7 +29473,7 @@ class Test_TC_TSUIC_2_2 : public TestCommand CHIP_ERROR TestWritesAValueOf0ToScheduleProgrammingVisibilityAttributeOfDut_9() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -28904,7 +29493,7 @@ class Test_TC_TSUIC_2_2 : public TestCommand CHIP_ERROR TestWritesAValueOf1ToScheduleProgrammingVisibilityAttributeOfDut_10() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -28926,7 +29515,11 @@ class Test_TC_TSUIC_2_2 : public TestCommand class Test_TC_DIAGTH_1_1 : public TestCommand { public: - Test_TC_DIAGTH_1_1() : TestCommand("Test_TC_DIAGTH_1_1"), mTestIndex(0) {} + Test_TC_DIAGTH_1_1() : TestCommand("Test_TC_DIAGTH_1_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -28987,6 +29580,9 @@ class Test_TC_DIAGTH_1_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 5; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -29036,7 +29632,7 @@ class Test_TC_DIAGTH_1_1 : public TestCommand CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::ThreadNetworkDiagnosticsClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -29057,7 +29653,7 @@ class Test_TC_DIAGTH_1_1 : public TestCommand CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::ThreadNetworkDiagnosticsClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -29077,7 +29673,7 @@ class Test_TC_DIAGTH_1_1 : public TestCommand CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::ThreadNetworkDiagnosticsClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -29100,7 +29696,7 @@ class Test_TC_DIAGTH_1_1 : public TestCommand CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::ThreadNetworkDiagnosticsClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -29123,7 +29719,11 @@ class Test_TC_DIAGTH_1_1 : public TestCommand class Test_TC_WNCV_1_1 : public TestCommand { public: - Test_TC_WNCV_1_1() : TestCommand("Test_TC_WNCV_1_1"), mTestIndex(0) {} + Test_TC_WNCV_1_1() : TestCommand("Test_TC_WNCV_1_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -29193,6 +29793,9 @@ class Test_TC_WNCV_1_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 7; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -29259,7 +29862,7 @@ class Test_TC_WNCV_1_1 : public TestCommand CHIP_ERROR Test2ReadTheGlobalAttributeClusterRevision_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -29280,7 +29883,7 @@ class Test_TC_WNCV_1_1 : public TestCommand CHIP_ERROR Test3aWriteAValueIntoTheRoMandatoryGlobalAttributeClusterRevision_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -29302,7 +29905,7 @@ class Test_TC_WNCV_1_1 : public TestCommand CHIP_ERROR Test3bReadsBackGlobalAttributeClusterRevision_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -29323,7 +29926,7 @@ class Test_TC_WNCV_1_1 : public TestCommand CHIP_ERROR Test2ReadTheGlobalAttributeFeatureMap_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -29343,7 +29946,7 @@ class Test_TC_WNCV_1_1 : public TestCommand CHIP_ERROR Test3aWriteTheDefaultValueToOptionalGlobalAttributeFeatureMap_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -29365,7 +29968,7 @@ class Test_TC_WNCV_1_1 : public TestCommand CHIP_ERROR Test3bReadsBackGlobalAttributeFeatureMap_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -29388,7 +29991,11 @@ class Test_TC_WNCV_1_1 : public TestCommand class Test_TC_WNCV_2_1 : public TestCommand { public: - Test_TC_WNCV_2_1() : TestCommand("Test_TC_WNCV_2_1"), mTestIndex(0) {} + Test_TC_WNCV_2_1() : TestCommand("Test_TC_WNCV_2_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -29681,6 +30288,9 @@ class Test_TC_WNCV_2_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 55; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -30191,7 +30801,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test2ReadTheRoMandatoryAttributeDefaultType_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30211,7 +30821,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test3aWriteAValueIntoTheRoMandatoryAttributeType_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30233,7 +30843,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test3bReadsBackTheRoMandatoryAttributeType_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30254,7 +30864,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test2ReadTheRoMandatoryAttributeDefaultConfigStatus_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30274,7 +30884,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test3aWriteAValueIntoTheRoMandatoryAttributeConfigStatus_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30296,7 +30906,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test3bReadsBackTheRoMandatoryAttributeConfigStatus_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30317,7 +30927,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test2ReadTheRoMandatoryAttributeDefaultOperationalStatus_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30337,7 +30947,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test3aWriteAValueIntoTheRoMandatoryAttributeOperationalStatus_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30359,7 +30969,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test3bReadsBackTheRoMandatoryAttributeOperationalStatus_9() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30380,7 +30990,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test2ReadTheRoMandatoryAttributeDefaultEndProductType_10() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30400,7 +31010,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test3aWriteAValueIntoTheRoMandatoryAttributeEndProductType_11() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30422,7 +31032,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test3bReadsBackTheRoMandatoryAttributeEndProductType_12() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30443,7 +31053,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test2ReadTheRwMandatoryAttributeDefaultMode_13() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30463,7 +31073,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test3aWriteAValueIntoTheRwMandatoryAttributeMode_14() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30481,7 +31091,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test3bReadsBackTheRwMandatoryAttributeMode_15() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30501,7 +31111,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultTargetPositionLiftPercent100ths_16() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30523,7 +31133,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeTargetPositionLiftPercent100ths_17() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30547,7 +31157,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeTargetPositionLiftPercent100ths_18() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30569,7 +31179,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultTargetPositionTiltPercent100ths_19() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30591,7 +31201,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeTargetPositionTiltPercent100ths_20() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30615,7 +31225,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeTargetPositionTiltPercent100ths_21() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30637,7 +31247,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultCurrentPositionLiftPercent100ths_22() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30659,7 +31269,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeCurrentPositionLiftPercent100ths_23() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30683,7 +31293,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeCurrentPositionLiftPercent100ths_24() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30705,7 +31315,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultCurrentPositionTiltPercent100ths_25() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30727,7 +31337,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeCurrentPositionTiltPercent100ths_26() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30751,7 +31361,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeCurrentPositionTiltPercent100ths_27() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30773,7 +31383,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultInstalledOpenLimitLift_28() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30794,7 +31404,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeInstalledOpenLimitLift_29() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30817,7 +31427,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeInstalledOpenLimitLift_30() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30838,7 +31448,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultInstalledClosedLimitLift_31() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30859,7 +31469,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeInstalledClosedLimitLift_32() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30882,7 +31492,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeInstalledClosedLimitLift_33() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30903,7 +31513,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultInstalledOpenLimitTilt_34() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30924,7 +31534,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeInstalledOpenLimitTilt_35() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30947,7 +31557,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeInstalledOpenLimitTilt_36() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30968,7 +31578,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultInstalledClosedLimitTilt_37() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -30989,7 +31599,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeInstalledClosedLimitTilt_38() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -31012,7 +31622,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeInstalledClosedLimitTilt_39() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -31033,7 +31643,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test4ReadTheRoMandatoryAttributeDefaultSafetyStatus_40() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -31053,7 +31663,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test5aWriteAValueIntoTheRoMandatoryAttributeSafetyStatus_41() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -31075,7 +31685,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test5bReadsBackTheRoMandatoryAttributeSafetyStatus_42() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -31096,7 +31706,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test4ReadTheRoOptionalAttributeDefaultCurrentPositionLift_43() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -31116,7 +31726,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test5aWriteAValueIntoTheRoOptionalAttributeCurrentPositionLift_44() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -31139,7 +31749,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test5bReadsBackTheRoOptionalAttributeCurrentPositionLift_45() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -31159,7 +31769,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test4ReadTheRoOptionalAttributeDefaultCurrentPositionTilt_46() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -31179,7 +31789,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test5aWriteAValueIntoTheRoOptionalAttributeCurrentPositionTilt_47() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -31202,7 +31812,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test5bReadsBackTheRoOptionalAttributeCurrentPositionTilt_48() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -31222,7 +31832,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test4ReadTheRoOptionalAttributeDefaultCurrentPositionLiftPercentage_49() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -31243,7 +31853,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test5aWriteAValueIntoTheRoOptionalAttributeCurrentPositionLiftPercentage_50() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -31267,7 +31877,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test5bReadsBackTheRoOptionalAttributeCurrentPositionLiftPercentage_51() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -31289,7 +31899,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test4ReadTheRoOptionalAttributeDefaultCurrentPositionTiltPercentage_52() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -31310,7 +31920,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test5aWriteAValueIntoTheRoOptionalAttributeCurrentPositionTiltPercentage_53() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -31334,7 +31944,7 @@ class Test_TC_WNCV_2_1 : public TestCommand CHIP_ERROR Test5bReadsBackTheRoOptionalAttributeCurrentPositionTiltPercentage_54() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -31358,7 +31968,11 @@ class Test_TC_WNCV_2_1 : public TestCommand class Test_TC_WNCV_2_2 : public TestCommand { public: - Test_TC_WNCV_2_2() : TestCommand("Test_TC_WNCV_2_2"), mTestIndex(0) {} + Test_TC_WNCV_2_2() : TestCommand("Test_TC_WNCV_2_2"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -31402,6 +32016,9 @@ class Test_TC_WNCV_2_2 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 1; + chip::Optional mCluster; + chip::Optional mEndpoint; + // // Tests methods // @@ -31416,7 +32033,11 @@ class Test_TC_WNCV_2_2 : public TestCommand class Test_TC_WNCV_2_4 : public TestCommand { public: - Test_TC_WNCV_2_4() : TestCommand("Test_TC_WNCV_2_4"), mTestIndex(0) {} + Test_TC_WNCV_2_4() : TestCommand("Test_TC_WNCV_2_4"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -31468,6 +32089,9 @@ class Test_TC_WNCV_2_4 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -31500,7 +32124,7 @@ class Test_TC_WNCV_2_4 : public TestCommand CHIP_ERROR TestReadsTypeAttributeFromDut_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -31520,7 +32144,7 @@ class Test_TC_WNCV_2_4 : public TestCommand CHIP_ERROR TestReadsTypeAttributeConstraints_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -31542,7 +32166,11 @@ class Test_TC_WNCV_2_4 : public TestCommand class Test_TC_WNCV_2_5 : public TestCommand { public: - Test_TC_WNCV_2_5() : TestCommand("Test_TC_WNCV_2_5"), mTestIndex(0) {} + Test_TC_WNCV_2_5() : TestCommand("Test_TC_WNCV_2_5"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -31594,6 +32222,9 @@ class Test_TC_WNCV_2_5 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -31626,7 +32257,7 @@ class Test_TC_WNCV_2_5 : public TestCommand CHIP_ERROR TestReadsEndProductTypeAttributeFromDut_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -31646,7 +32277,7 @@ class Test_TC_WNCV_2_5 : public TestCommand CHIP_ERROR TestReadsEndProductTypeAttributeConstraintsFromDut_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -31668,7 +32299,11 @@ class Test_TC_WNCV_2_5 : public TestCommand class Test_TC_WNCV_3_1 : public TestCommand { public: - Test_TC_WNCV_3_1() : TestCommand("Test_TC_WNCV_3_1"), mTestIndex(0) {} + Test_TC_WNCV_3_1() : TestCommand("Test_TC_WNCV_3_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -31724,6 +32359,9 @@ class Test_TC_WNCV_3_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 4; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); @@ -31746,7 +32384,7 @@ class Test_TC_WNCV_3_1 : public TestCommand CHIP_ERROR Test1aThAdjustsTheTheDutToANonOpenPosition_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::WindowCovering::Commands::DownOrClose::Type; RequestType request; @@ -31769,7 +32407,7 @@ class Test_TC_WNCV_3_1 : public TestCommand CHIP_ERROR Test2aThSendsUpOrOpenCommandToDut_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Type; RequestType request; @@ -31792,7 +32430,7 @@ class Test_TC_WNCV_3_1 : public TestCommand CHIP_ERROR Test3aThReadsOperationalStatusAttributeFromDut_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -31814,7 +32452,11 @@ class Test_TC_WNCV_3_1 : public TestCommand class Test_TC_WNCV_3_2 : public TestCommand { public: - Test_TC_WNCV_3_2() : TestCommand("Test_TC_WNCV_3_2"), mTestIndex(0) {} + Test_TC_WNCV_3_2() : TestCommand("Test_TC_WNCV_3_2"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -31870,6 +32512,9 @@ class Test_TC_WNCV_3_2 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 4; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); @@ -31892,7 +32537,7 @@ class Test_TC_WNCV_3_2 : public TestCommand CHIP_ERROR Test1aThAdjustsTheTheDutToANonClosedPosition_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Type; RequestType request; @@ -31915,7 +32560,7 @@ class Test_TC_WNCV_3_2 : public TestCommand CHIP_ERROR Test2aThSendsDownOrCloseCommandToDut_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::WindowCovering::Commands::DownOrClose::Type; RequestType request; @@ -31938,7 +32583,7 @@ class Test_TC_WNCV_3_2 : public TestCommand CHIP_ERROR Test3aThReadsOperationalStatusAttributeFromDut_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -31960,7 +32605,11 @@ class Test_TC_WNCV_3_2 : public TestCommand class Test_TC_WNCV_3_3 : public TestCommand { public: - Test_TC_WNCV_3_3() : TestCommand("Test_TC_WNCV_3_3"), mTestIndex(0) {} + Test_TC_WNCV_3_3() : TestCommand("Test_TC_WNCV_3_3"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -32016,6 +32665,9 @@ class Test_TC_WNCV_3_3 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 4; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); @@ -32038,7 +32690,7 @@ class Test_TC_WNCV_3_3 : public TestCommand CHIP_ERROR Test1aThAdjustsTheTheDutToANonOpenPosition_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Type; RequestType request; @@ -32061,7 +32713,7 @@ class Test_TC_WNCV_3_3 : public TestCommand CHIP_ERROR Test2aThSendsStopMotionCommandToDut_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::WindowCovering::Commands::StopMotion::Type; RequestType request; @@ -32084,7 +32736,7 @@ class Test_TC_WNCV_3_3 : public TestCommand CHIP_ERROR Test2bThReadsOperationalStatusAttributeFromDut_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -32106,7 +32758,11 @@ class Test_TC_WNCV_3_3 : public TestCommand class TV_TargetNavigatorCluster : public TestCommand { public: - TV_TargetNavigatorCluster() : TestCommand("TV_TargetNavigatorCluster"), mTestIndex(0) {} + TV_TargetNavigatorCluster() : TestCommand("TV_TargetNavigatorCluster"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -32162,6 +32818,9 @@ class TV_TargetNavigatorCluster : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 4; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -32197,7 +32856,7 @@ class TV_TargetNavigatorCluster : public TestCommand CHIP_ERROR TestReadAttributeTargetNavigatorList_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TargetNavigatorClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -32230,7 +32889,7 @@ class TV_TargetNavigatorCluster : public TestCommand CHIP_ERROR TestReadAttributeCurrentNavigatorTarget_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TargetNavigatorClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -32251,7 +32910,7 @@ class TV_TargetNavigatorCluster : public TestCommand CHIP_ERROR TestNavigateTargetRequestCommand_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TargetNavigator::Commands::NavigateTargetRequest::Type; RequestType request; @@ -32285,7 +32944,11 @@ class TV_TargetNavigatorCluster : public TestCommand class TV_AudioOutputCluster : public TestCommand { public: - TV_AudioOutputCluster() : TestCommand("TV_AudioOutputCluster"), mTestIndex(0) {} + TV_AudioOutputCluster() : TestCommand("TV_AudioOutputCluster"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -32345,6 +33008,9 @@ class TV_AudioOutputCluster : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 5; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -32380,7 +33046,7 @@ class TV_AudioOutputCluster : public TestCommand CHIP_ERROR TestReadAttributeAudioOutputList_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 2; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 2; chip::Controller::AudioOutputClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -32420,7 +33086,7 @@ class TV_AudioOutputCluster : public TestCommand CHIP_ERROR TestReadAttributeCurrentAudioOutput_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 2; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 2; chip::Controller::AudioOutputClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -32440,7 +33106,7 @@ class TV_AudioOutputCluster : public TestCommand CHIP_ERROR TestSelectOutputCommand_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 2; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 2; using RequestType = chip::app::Clusters::AudioOutput::Commands::SelectOutputRequest::Type; RequestType request; @@ -32464,7 +33130,7 @@ class TV_AudioOutputCluster : public TestCommand CHIP_ERROR TestRenameOutputCommand_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 2; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 2; using RequestType = chip::app::Clusters::AudioOutput::Commands::RenameOutputRequest::Type; RequestType request; @@ -32491,7 +33157,11 @@ class TV_AudioOutputCluster : public TestCommand class TV_ApplicationLauncherCluster : public TestCommand { public: - TV_ApplicationLauncherCluster() : TestCommand("TV_ApplicationLauncherCluster"), mTestIndex(0) {} + TV_ApplicationLauncherCluster() : TestCommand("TV_ApplicationLauncherCluster"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -32551,6 +33221,9 @@ class TV_ApplicationLauncherCluster : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 5; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -32573,7 +33246,7 @@ class TV_ApplicationLauncherCluster : public TestCommand CHIP_ERROR TestReadAttributeApplicationLauncherList_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ApplicationLauncherClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -32601,7 +33274,7 @@ class TV_ApplicationLauncherCluster : public TestCommand CHIP_ERROR TestLaunchAppCommand_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ApplicationLauncher::Commands::LaunchAppRequest::Type; RequestType request; @@ -32637,7 +33310,7 @@ class TV_ApplicationLauncherCluster : public TestCommand CHIP_ERROR TestStopAppCommand_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ApplicationLauncher::Commands::StopAppRequest::Type; RequestType request; @@ -32672,7 +33345,7 @@ class TV_ApplicationLauncherCluster : public TestCommand CHIP_ERROR TestHideAppCommand_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ApplicationLauncher::Commands::HideAppRequest::Type; RequestType request; @@ -32709,7 +33382,11 @@ class TV_ApplicationLauncherCluster : public TestCommand class TV_KeypadInputCluster : public TestCommand { public: - TV_KeypadInputCluster() : TestCommand("TV_KeypadInputCluster"), mTestIndex(0) {} + TV_KeypadInputCluster() : TestCommand("TV_KeypadInputCluster"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -32757,6 +33434,9 @@ class TV_KeypadInputCluster : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 2; + chip::Optional mCluster; + chip::Optional mEndpoint; + // // Tests methods // @@ -32769,7 +33449,7 @@ class TV_KeypadInputCluster : public TestCommand CHIP_ERROR TestSendKeyCommand_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::KeypadInput::Commands::SendKeyRequest::Type; RequestType request; @@ -32800,7 +33480,11 @@ class TV_KeypadInputCluster : public TestCommand class TV_AccountLoginCluster : public TestCommand { public: - TV_AccountLoginCluster() : TestCommand("TV_AccountLoginCluster"), mTestIndex(0) {} + TV_AccountLoginCluster() : TestCommand("TV_AccountLoginCluster"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -32856,6 +33540,9 @@ class TV_AccountLoginCluster : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 4; + chip::Optional mCluster; + chip::Optional mEndpoint; + // // Tests methods // @@ -32868,7 +33555,7 @@ class TV_AccountLoginCluster : public TestCommand CHIP_ERROR TestGetSetupPinCommand_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; using RequestType = chip::app::Clusters::AccountLogin::Commands::GetSetupPINRequest::Type; RequestType request; @@ -32898,7 +33585,7 @@ class TV_AccountLoginCluster : public TestCommand CHIP_ERROR TestLoginCommand_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; using RequestType = chip::app::Clusters::AccountLogin::Commands::LoginRequest::Type; RequestType request; @@ -32924,7 +33611,7 @@ class TV_AccountLoginCluster : public TestCommand CHIP_ERROR TestLogoutCommand_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; using RequestType = chip::app::Clusters::AccountLogin::Commands::LogoutRequest::Type; RequestType request; @@ -32950,7 +33637,11 @@ class TV_AccountLoginCluster : public TestCommand class TV_WakeOnLanCluster : public TestCommand { public: - TV_WakeOnLanCluster() : TestCommand("TV_WakeOnLanCluster"), mTestIndex(0) {} + TV_WakeOnLanCluster() : TestCommand("TV_WakeOnLanCluster"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -32998,6 +33689,9 @@ class TV_WakeOnLanCluster : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 2; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -33020,7 +33714,7 @@ class TV_WakeOnLanCluster : public TestCommand CHIP_ERROR TestReadMacAddress_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WakeOnLanClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -33042,7 +33736,11 @@ class TV_WakeOnLanCluster : public TestCommand class TV_ApplicationBasicCluster : public TestCommand { public: - TV_ApplicationBasicCluster() : TestCommand("TV_ApplicationBasicCluster"), mTestIndex(0) {} + TV_ApplicationBasicCluster() : TestCommand("TV_ApplicationBasicCluster"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -33110,6 +33808,9 @@ class TV_ApplicationBasicCluster : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 7; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -33182,7 +33883,7 @@ class TV_ApplicationBasicCluster : public TestCommand CHIP_ERROR TestReadAttributeVendorName_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; chip::Controller::ApplicationBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -33202,7 +33903,7 @@ class TV_ApplicationBasicCluster : public TestCommand CHIP_ERROR TestReadAttributeVendorId_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; chip::Controller::ApplicationBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -33222,7 +33923,7 @@ class TV_ApplicationBasicCluster : public TestCommand CHIP_ERROR TestReadAttributeApplicationName_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; chip::Controller::ApplicationBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -33242,7 +33943,7 @@ class TV_ApplicationBasicCluster : public TestCommand CHIP_ERROR TestReadAttributeProductId_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; chip::Controller::ApplicationBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -33262,7 +33963,7 @@ class TV_ApplicationBasicCluster : public TestCommand CHIP_ERROR TestReadAttributeApplicationStatus_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; chip::Controller::ApplicationBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -33282,7 +33983,7 @@ class TV_ApplicationBasicCluster : public TestCommand CHIP_ERROR TestReadAttributeApplicationVersion_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; chip::Controller::ApplicationBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -33304,7 +34005,11 @@ class TV_ApplicationBasicCluster : public TestCommand class TV_MediaPlaybackCluster : public TestCommand { public: - TV_MediaPlaybackCluster() : TestCommand("TV_MediaPlaybackCluster"), mTestIndex(0) {} + TV_MediaPlaybackCluster() : TestCommand("TV_MediaPlaybackCluster"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -33416,6 +34121,9 @@ class TV_MediaPlaybackCluster : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 18; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -33488,7 +34196,7 @@ class TV_MediaPlaybackCluster : public TestCommand CHIP_ERROR TestReadAttributePlaybackState_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; chip::Controller::MediaPlaybackClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -33508,7 +34216,7 @@ class TV_MediaPlaybackCluster : public TestCommand CHIP_ERROR TestReadAttributeStartTime_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; chip::Controller::MediaPlaybackClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -33528,7 +34236,7 @@ class TV_MediaPlaybackCluster : public TestCommand CHIP_ERROR TestReadAttributeDuration_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; chip::Controller::MediaPlaybackClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -33548,7 +34256,7 @@ class TV_MediaPlaybackCluster : public TestCommand CHIP_ERROR TestReadAttributePlaybackSpeed_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; chip::Controller::MediaPlaybackClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -33568,7 +34276,7 @@ class TV_MediaPlaybackCluster : public TestCommand CHIP_ERROR TestReadAttributeSeekRangeEnd_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; chip::Controller::MediaPlaybackClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -33588,7 +34296,7 @@ class TV_MediaPlaybackCluster : public TestCommand CHIP_ERROR TestReadAttributeSeekRangeStart_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; chip::Controller::MediaPlaybackClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -33608,7 +34316,7 @@ class TV_MediaPlaybackCluster : public TestCommand CHIP_ERROR TestMediaPlaybackPlayCommand_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; using RequestType = chip::app::Clusters::MediaPlayback::Commands::PlayRequest::Type; RequestType request; @@ -33636,7 +34344,7 @@ class TV_MediaPlaybackCluster : public TestCommand CHIP_ERROR TestMediaPlaybackPauseCommand_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; using RequestType = chip::app::Clusters::MediaPlayback::Commands::PauseRequest::Type; RequestType request; @@ -33664,7 +34372,7 @@ class TV_MediaPlaybackCluster : public TestCommand CHIP_ERROR TestMediaPlaybackStopCommand_9() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; using RequestType = chip::app::Clusters::MediaPlayback::Commands::StopRequest::Type; RequestType request; @@ -33692,7 +34400,7 @@ class TV_MediaPlaybackCluster : public TestCommand CHIP_ERROR TestMediaPlaybackStartOverCommand_10() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; using RequestType = chip::app::Clusters::MediaPlayback::Commands::StartOverRequest::Type; RequestType request; @@ -33720,7 +34428,7 @@ class TV_MediaPlaybackCluster : public TestCommand CHIP_ERROR TestMediaPlaybackPreviousCommand_11() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; using RequestType = chip::app::Clusters::MediaPlayback::Commands::PreviousRequest::Type; RequestType request; @@ -33748,7 +34456,7 @@ class TV_MediaPlaybackCluster : public TestCommand CHIP_ERROR TestMediaPlaybackNextCommand_12() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; using RequestType = chip::app::Clusters::MediaPlayback::Commands::NextRequest::Type; RequestType request; @@ -33776,7 +34484,7 @@ class TV_MediaPlaybackCluster : public TestCommand CHIP_ERROR TestMediaPlaybackRewindCommand_13() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; using RequestType = chip::app::Clusters::MediaPlayback::Commands::RewindRequest::Type; RequestType request; @@ -33804,7 +34512,7 @@ class TV_MediaPlaybackCluster : public TestCommand CHIP_ERROR TestMediaPlaybackFastForwardCommand_14() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; using RequestType = chip::app::Clusters::MediaPlayback::Commands::FastForwardRequest::Type; RequestType request; @@ -33832,7 +34540,7 @@ class TV_MediaPlaybackCluster : public TestCommand CHIP_ERROR TestMediaPlaybackSkipForwardCommand_15() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; using RequestType = chip::app::Clusters::MediaPlayback::Commands::SkipForwardRequest::Type; RequestType request; @@ -33861,7 +34569,7 @@ class TV_MediaPlaybackCluster : public TestCommand CHIP_ERROR TestMediaPlaybackSkipBackwardCommand_16() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; using RequestType = chip::app::Clusters::MediaPlayback::Commands::SkipBackwardRequest::Type; RequestType request; @@ -33890,7 +34598,7 @@ class TV_MediaPlaybackCluster : public TestCommand CHIP_ERROR TestMediaPlaybackSeekCommand_17() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; using RequestType = chip::app::Clusters::MediaPlayback::Commands::SeekRequest::Type; RequestType request; @@ -33921,7 +34629,11 @@ class TV_MediaPlaybackCluster : public TestCommand class TV_ChannelCluster : public TestCommand { public: - TV_ChannelCluster() : TestCommand("TV_ChannelCluster"), mTestIndex(0) {} + TV_ChannelCluster() : TestCommand("TV_ChannelCluster"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -33981,6 +34693,9 @@ class TV_ChannelCluster : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 5; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -34005,7 +34720,7 @@ class TV_ChannelCluster : public TestCommand CHIP_ERROR TestReadAttributeChannelList_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ChannelClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -34045,7 +34760,7 @@ class TV_ChannelCluster : public TestCommand CHIP_ERROR TestChangeChannelCommand_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::Channel::Commands::ChangeChannelRequest::Type; RequestType request; @@ -34082,7 +34797,7 @@ class TV_ChannelCluster : public TestCommand CHIP_ERROR TestChangeChannelByNumberCommand_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::Channel::Commands::ChangeChannelByNumberRequest::Type; RequestType request; @@ -34107,7 +34822,7 @@ class TV_ChannelCluster : public TestCommand CHIP_ERROR TestSkipChannelCommand_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::Channel::Commands::SkipChannelRequest::Type; RequestType request; @@ -34133,7 +34848,11 @@ class TV_ChannelCluster : public TestCommand class TV_LowPowerCluster : public TestCommand { public: - TV_LowPowerCluster() : TestCommand("TV_LowPowerCluster"), mTestIndex(0) {} + TV_LowPowerCluster() : TestCommand("TV_LowPowerCluster"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -34181,6 +34900,9 @@ class TV_LowPowerCluster : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 2; + chip::Optional mCluster; + chip::Optional mEndpoint; + // // Tests methods // @@ -34193,7 +34915,7 @@ class TV_LowPowerCluster : public TestCommand CHIP_ERROR TestSleepInputStatusCommand_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::LowPower::Commands::Sleep::Type; RequestType request; @@ -34218,7 +34940,11 @@ class TV_LowPowerCluster : public TestCommand class TV_ContentLauncherCluster : public TestCommand { public: - TV_ContentLauncherCluster() : TestCommand("TV_ContentLauncherCluster"), mTestIndex(0) {} + TV_ContentLauncherCluster() : TestCommand("TV_ContentLauncherCluster"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -34278,6 +35004,9 @@ class TV_ContentLauncherCluster : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 5; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -34310,7 +35039,7 @@ class TV_ContentLauncherCluster : public TestCommand CHIP_ERROR TestReadAttributeAcceptHeaderList_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ContentLauncherClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -34337,7 +35066,7 @@ class TV_ContentLauncherCluster : public TestCommand CHIP_ERROR TestReadAttributeSupportedStreamingProtocols_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ContentLauncherClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -34358,7 +35087,7 @@ class TV_ContentLauncherCluster : public TestCommand CHIP_ERROR TestLaunchContentCommand_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ContentLauncher::Commands::LaunchContentRequest::Type; RequestType request; @@ -34392,7 +35121,7 @@ class TV_ContentLauncherCluster : public TestCommand CHIP_ERROR TestLaunchUrlCommand_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ContentLauncher::Commands::LaunchURLRequest::Type; RequestType request; @@ -34464,7 +35193,11 @@ class TV_ContentLauncherCluster : public TestCommand class TV_MediaInputCluster : public TestCommand { public: - TV_MediaInputCluster() : TestCommand("TV_MediaInputCluster"), mTestIndex(0) {} + TV_MediaInputCluster() : TestCommand("TV_MediaInputCluster"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -34532,6 +35265,9 @@ class TV_MediaInputCluster : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 7; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -34567,7 +35303,7 @@ class TV_MediaInputCluster : public TestCommand CHIP_ERROR TestReadAttributeMediaInputList_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::MediaInputClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -34604,7 +35340,7 @@ class TV_MediaInputCluster : public TestCommand CHIP_ERROR TestReadCurrentMediaInput_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::MediaInputClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -34624,7 +35360,7 @@ class TV_MediaInputCluster : public TestCommand CHIP_ERROR TestSelectInputCommand_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::MediaInput::Commands::SelectInputRequest::Type; RequestType request; @@ -34648,7 +35384,7 @@ class TV_MediaInputCluster : public TestCommand CHIP_ERROR TestHideInputStatusCommand_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::MediaInput::Commands::HideInputStatusRequest::Type; RequestType request; @@ -34671,7 +35407,7 @@ class TV_MediaInputCluster : public TestCommand CHIP_ERROR TestShowInputStatusCommand_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::MediaInput::Commands::ShowInputStatusRequest::Type; RequestType request; @@ -34694,7 +35430,7 @@ class TV_MediaInputCluster : public TestCommand CHIP_ERROR TestRenameInputCommand_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::MediaInput::Commands::RenameInputRequest::Type; RequestType request; @@ -34721,7 +35457,11 @@ class TV_MediaInputCluster : public TestCommand class TestCluster : public TestCommand { public: - TestCluster() : TestCommand("TestCluster"), mTestIndex(0) {} + TestCluster() : TestCommand("TestCluster"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -36765,6 +37505,9 @@ class TestCluster : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 472; + chip::Optional mCluster; + chip::Optional mEndpoint; + typedef void (*Test_TestCluster_list_int8u_ReportCallback)(void * context, const chip::app::DataModel::DecodableList & value); Test_TestCluster_list_int8u_ReportCallback mTest_TestCluster_list_int8u_Reported = nullptr; @@ -40642,7 +41385,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendTestCommand_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::Test::Type; RequestType request; @@ -40665,7 +41408,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendTestNotHandledCommand_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestNotHandled::Type; RequestType request; @@ -40692,7 +41435,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendTestSpecificCommand_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestSpecific::Type; RequestType request; @@ -40720,7 +41463,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendTestAddArgumentsCommand_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type; RequestType request; @@ -40750,7 +41493,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendFailingTestAddArgumentsCommand_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type; RequestType request; @@ -40779,7 +41522,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeBooleanDefaultValue_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -40799,7 +41542,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeBooleanTrue_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -40817,7 +41560,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeBooleanTrue_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -40837,7 +41580,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeBooleanFalse_9() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -40855,7 +41598,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeBooleanFalse_10() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -40875,7 +41618,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeBitmap8DefaultValue_11() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -40895,7 +41638,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeBitmap8MaxValue_12() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -40913,7 +41656,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeBitmap8MaxValue_13() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -40933,7 +41676,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeBitmap8MinValue_14() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -40951,7 +41694,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeBitmap8MinValue_15() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -40971,7 +41714,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeBitmap16DefaultValue_16() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -40991,7 +41734,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeBitmap16MaxValue_17() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41009,7 +41752,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeBitmap16MaxValue_18() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41029,7 +41772,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeBitmap16MinValue_19() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41047,7 +41790,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeBitmap16MinValue_20() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41067,7 +41810,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeBitmap32DefaultValue_21() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41087,7 +41830,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeBitmap32MaxValue_22() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41105,7 +41848,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeBitmap32MaxValue_23() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41125,7 +41868,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeBitmap32MinValue_24() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41143,7 +41886,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeBitmap32MinValue_25() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41163,7 +41906,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeBitmap64DefaultValue_26() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41183,7 +41926,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeBitmap64MaxValue_27() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41201,7 +41944,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeBitmap64MaxValue_28() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41221,7 +41964,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeBitmap64MinValue_29() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41239,7 +41982,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeBitmap64MinValue_30() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41259,7 +42002,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeInt8uDefaultValue_31() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41279,7 +42022,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeInt8uMaxValue_32() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41297,7 +42040,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeInt8uMaxValue_33() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41317,7 +42060,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeInt8uMinValue_34() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41335,7 +42078,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeInt8uMinValue_35() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41355,7 +42098,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeInt16uDefaultValue_36() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41375,7 +42118,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeInt16uMaxValue_37() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41393,7 +42136,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeInt16uMaxValue_38() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41413,7 +42156,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeInt16uMinValue_39() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41431,7 +42174,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeInt16uMinValue_40() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41451,7 +42194,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeInt32uDefaultValue_41() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41471,7 +42214,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeInt32uMaxValue_42() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41489,7 +42232,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeInt32uMaxValue_43() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41509,7 +42252,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeInt32uMinValue_44() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41527,7 +42270,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeInt32uMinValue_45() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41547,7 +42290,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeInt64uDefaultValue_46() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41567,7 +42310,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeInt64uMaxValue_47() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41585,7 +42328,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeInt64uMaxValue_48() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41605,7 +42348,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeInt64uMinValue_49() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41623,7 +42366,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeInt64uMinValue_50() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41643,7 +42386,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeInt8sDefaultValue_51() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41663,7 +42406,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeInt8sMaxValue_52() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41681,7 +42424,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeInt8sMaxValue_53() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41701,7 +42444,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeInt8sMinValue_54() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41719,7 +42462,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeInt8sMinValue_55() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41739,7 +42482,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeInt8sDefaultValue_56() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41757,7 +42500,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeInt8sDefaultValue_57() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41777,7 +42520,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeInt16sDefaultValue_58() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41797,7 +42540,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeInt16sMaxValue_59() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41815,7 +42558,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeInt16sMaxValue_60() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41835,7 +42578,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeInt16sMinValue_61() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41853,7 +42596,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeInt16sMinValue_62() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41873,7 +42616,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeInt16sDefaultValue_63() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41891,7 +42634,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeInt16sDefaultValue_64() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41911,7 +42654,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeInt32sDefaultValue_65() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41931,7 +42674,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeInt32sMaxValue_66() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41949,7 +42692,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeInt32sMaxValue_67() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41969,7 +42712,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeInt32sMinValue_68() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -41987,7 +42730,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeInt32sMinValue_69() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42007,7 +42750,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeInt32sDefaultValue_70() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42025,7 +42768,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeInt32sDefaultValue_71() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42045,7 +42788,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeInt64sDefaultValue_72() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42065,7 +42808,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeInt64sMaxValue_73() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42083,7 +42826,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeInt64sMaxValue_74() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42103,7 +42846,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeInt64sMinValue_75() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42121,7 +42864,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeInt64sMinValue_76() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42141,7 +42884,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeInt64sDefaultValue_77() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42159,7 +42902,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeInt64sDefaultValue_78() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42179,7 +42922,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeSingleDefaultValue_79() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42199,7 +42942,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeSingleMediumValue_80() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42217,7 +42960,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeSingleMediumValue_81() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42237,7 +42980,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeSingleLargeValue_82() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42255,7 +42998,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeSingleLargeValue_83() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42275,7 +43018,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeSingleSmallValue_84() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42293,7 +43036,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeSingleSmallValue_85() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42313,7 +43056,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeSingleDefaultValue_86() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42331,7 +43074,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeSingleDefaultValue_87() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42351,7 +43094,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeDoubleDefaultValue_88() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42371,7 +43114,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeDoubleMediumValue_89() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42389,7 +43132,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeDoubleMediumValue_90() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42409,7 +43152,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeDoubleLargeValue_91() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42427,7 +43170,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeDoubleLargeValue_92() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42447,7 +43190,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeDoubleSmallValue_93() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42465,7 +43208,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeDoubleSmallValue_94() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42485,7 +43228,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeDoubleDefaultValue_95() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42503,7 +43246,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeDoubleDefaultValue_96() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42523,7 +43266,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeEnum8DefaultValue_97() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42543,7 +43286,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeEnum8MaxValue_98() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42561,7 +43304,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeEnum8MaxValue_99() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42581,7 +43324,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeEnum8MinValue_100() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42599,7 +43342,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeEnum8MinValue_101() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42619,7 +43362,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeEnum16DefaultValue_102() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42639,7 +43382,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeEnum16MaxValue_103() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42657,7 +43400,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeEnum16MaxValue_104() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42677,7 +43420,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeEnum16MinValue_105() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42695,7 +43438,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeEnum16MinValue_106() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42715,7 +43458,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeOctetStringDefaultValue_107() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42735,7 +43478,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeOctetStringWithEmbeddedNull_108() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42753,7 +43496,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeOctetStringWithEmbeddedNull_109() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42774,7 +43517,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeOctetStringWithWeirdChars_110() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42793,7 +43536,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeOctetStringWithWeirdChars_111() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42814,7 +43557,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeOctetString_112() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42832,7 +43575,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeOctetString_113() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42853,7 +43596,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeOctetString_114() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42876,7 +43619,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeOctetString_115() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42897,7 +43640,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeOctetString_116() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42915,7 +43658,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeLongOctetStringDefaultValue_117() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42935,7 +43678,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeLongOctetString_118() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42958,7 +43701,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeLongOctetString_119() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -42985,7 +43728,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeLongOctetString_120() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -43003,7 +43746,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeCharStringDefaultValue_121() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -43023,7 +43766,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeCharString_122() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -43041,7 +43784,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeCharString_123() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -43061,7 +43804,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeCharStringValueTooLong_124() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -43083,7 +43826,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeCharString_125() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -43103,7 +43846,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeCharStringEmpty_126() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -43121,7 +43864,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeLongCharStringDefaultValue_127() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -43141,7 +43884,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeLongCharString_128() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -43163,7 +43906,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeLongCharString_129() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -43188,7 +43931,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeLongCharString_130() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -43206,7 +43949,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeListLongOctetString_131() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -43273,7 +44016,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeEpochUsDefaultValue_132() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -43293,7 +44036,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeEpochUsMaxValue_133() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -43311,7 +44054,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeEpochUsMaxValue_134() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -43331,7 +44074,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeEpochUsMinValue_135() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -43349,7 +44092,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeEpochUsMinValue_136() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -43369,7 +44112,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeEpochSDefaultValue_137() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -43389,7 +44132,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeEpochSMaxValue_138() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -43407,7 +44150,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeEpochSMaxValue_139() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -43427,7 +44170,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeEpochSMinValue_140() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -43445,7 +44188,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeEpochSMinValue_141() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -43465,7 +44208,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeUnsupported_142() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -43488,7 +44231,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteattributeUnsupported_143() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -43509,7 +44252,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendTestCommandToUnsupportedEndpoint_144() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 200; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 200; using RequestType = chip::app::Clusters::TestCluster::Commands::Test::Type; RequestType request; @@ -43536,7 +44279,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendTestCommandToUnsupportedCluster_145() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; using RequestType = chip::app::Clusters::TestCluster::Commands::Test::Type; RequestType request; @@ -43563,7 +44306,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeVendorIdDefaultValue_146() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -43583,7 +44326,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeVendorId_147() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -43601,7 +44344,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeVendorId_148() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -43621,7 +44364,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestRestoreAttributeVendorId_149() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -43639,7 +44382,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendACommandWithAVendorIdAndEnum_150() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestEnumsRequest::Type; RequestType request; @@ -43671,7 +44414,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendTestCommandWithStructArgumentAndArg1bIsTrue_151() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type; RequestType request; @@ -43708,7 +44451,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendTestCommandWithStructArgumentAndArg1bIsFalse_152() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type; RequestType request; @@ -43745,7 +44488,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendTestCommandWithNestedStructArgumentAndArg1cbIsTrue_153() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestNestedStructArgumentRequest::Type; RequestType request; @@ -43785,7 +44528,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendTestCommandWithNestedStructArgumentArg1cbIsFalse_154() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestNestedStructArgumentRequest::Type; RequestType request; @@ -43825,7 +44568,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendTestCommandWithNestedStructListArgumentAndAllFieldsBOfArg1dAreTrue_155() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestNestedStructListArgumentRequest::Type; RequestType request; @@ -43904,7 +44647,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendTestCommandWithNestedStructListArgumentAndSomeFieldsBOfArg1dAreFalse_156() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestNestedStructListArgumentRequest::Type; RequestType request; @@ -43983,7 +44726,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendTestCommandWithStructArgumentAndSeeWhatWeGetBack_157() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::SimpleStructEchoRequest::Type; RequestType request; @@ -44027,7 +44770,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendTestCommandWithListOfInt8uAndNoneOfThemIsSetTo0_158() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type; RequestType request; @@ -44067,7 +44810,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendTestCommandWithListOfInt8uAndOneOfThemIsSetTo0_159() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type; RequestType request; @@ -44108,7 +44851,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendTestCommandWithListOfInt8uAndGetItReversed_160() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type; RequestType request; @@ -44169,7 +44912,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendTestCommandWithEmptyListOfInt8uAndGetAnEmptyListBack_161() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type; RequestType request; @@ -44202,7 +44945,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsTrue_162() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type; RequestType request; @@ -44252,7 +44995,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsFalse_163() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type; RequestType request; @@ -44302,7 +45045,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendTestCommandWithListOfNestedStructListArgumentAndAllFieldsBOfElementsOfArg1dAreTrue_164() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestListNestedStructListArgumentRequest::Type; RequestType request; @@ -44385,7 +45128,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendTestCommandWithNestedStructListArgumentAndSomeFieldsBOfElementsOfArg1dAreFalse_165() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestListNestedStructListArgumentRequest::Type; RequestType request; @@ -44468,7 +45211,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeListWithListOfInt8uAndNoneOfThemIsSetTo0_166() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -44492,7 +45235,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeListWithListOfInt8u_167() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -44523,7 +45266,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeListWithListOfOctetString_168() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -44547,7 +45290,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeListWithListOfOctetString_169() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -44582,7 +45325,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeListWithListOfListStructOctetString_170() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -44620,7 +45363,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeListWithListOfListStructOctetString_171() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -44661,7 +45404,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendTestCommandWithOptionalArgSet_172() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type; RequestType request; @@ -44704,7 +45447,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendTestCommandWithoutItsOptionalArg_173() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type; RequestType request; @@ -44734,7 +45477,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadListOfStructsContainingNullablesAndOptionals_174() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -44767,7 +45510,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteListOfStructsContainingNullablesAndOptionals_175() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -44800,7 +45543,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadListOfStructsContainingNullablesAndOptionalsAfterWriting_176() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -44844,7 +45587,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableBooleanNull_177() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -44862,7 +45605,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableBooleanNull_178() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -44882,7 +45625,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableBooleanTrue_179() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -44901,7 +45644,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableBooleanTrue_180() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -44922,7 +45665,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableBitmap8MaxValue_181() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -44941,7 +45684,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableBitmap8MaxValue_182() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -44962,7 +45705,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableBitmap8InvalidValue_183() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -44985,7 +45728,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableBitmap8UnchangedValue_184() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45006,7 +45749,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableBitmap8NullValue_185() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45024,7 +45767,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableBitmap8NullValue_186() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45044,7 +45787,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableBitmap16MaxValue_187() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45063,7 +45806,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableBitmap16MaxValue_188() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45084,7 +45827,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableBitmap16InvalidValue_189() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45107,7 +45850,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableBitmap16UnchangedValue_190() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45128,7 +45871,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableBitmap16NullValue_191() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45146,7 +45889,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableBitmap16NullValue_192() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45166,7 +45909,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableBitmap32MaxValue_193() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45185,7 +45928,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableBitmap32MaxValue_194() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45206,7 +45949,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableBitmap32InvalidValue_195() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45229,7 +45972,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableBitmap32UnchangedValue_196() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45250,7 +45993,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableBitmap32NullValue_197() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45268,7 +46011,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableBitmap32NullValue_198() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45288,7 +46031,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableBitmap64MaxValue_199() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45307,7 +46050,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableBitmap64MaxValue_200() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45328,7 +46071,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableBitmap64InvalidValue_201() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45351,7 +46094,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableBitmap64UnchangedValue_202() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45372,7 +46115,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableBitmap64NullValue_203() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45390,7 +46133,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableBitmap64NullValue_204() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45410,7 +46153,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt8uMinValue_205() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45429,7 +46172,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt8uMinValue_206() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45450,7 +46193,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt8uMaxValue_207() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45469,7 +46212,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt8uMaxValue_208() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45490,7 +46233,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt8uInvalidValue_209() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45513,7 +46256,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt8uUnchangedValue_210() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45534,7 +46277,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt8uUnchangedValueWithConstraint_211() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45554,7 +46297,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt8uNullValue_212() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45572,7 +46315,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt8uNullValue_213() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45592,7 +46335,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt8uNullValueRange_214() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45611,7 +46354,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt8uNullValueNot_215() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45631,7 +46374,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt8uValue_216() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45650,7 +46393,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt8uValueInRange_217() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45669,7 +46412,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt8uNotValueOk_218() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45689,7 +46432,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt16uMinValue_219() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45708,7 +46451,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt16uMinValue_220() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45729,7 +46472,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt16uMaxValue_221() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45748,7 +46491,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt16uMaxValue_222() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45769,7 +46512,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt16uInvalidValue_223() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45792,7 +46535,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt16uUnchangedValue_224() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45813,7 +46556,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt16uNullValue_225() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45831,7 +46574,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt16uNullValue_226() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45851,7 +46594,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt16uNullValueRange_227() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45870,7 +46613,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt16uNullValueNot_228() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45890,7 +46633,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt16uValue_229() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45909,7 +46652,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt16uValueInRange_230() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45928,7 +46671,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt16uNotValueOk_231() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45948,7 +46691,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt32uMinValue_232() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45967,7 +46710,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt32uMinValue_233() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -45988,7 +46731,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt32uMaxValue_234() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46007,7 +46750,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt32uMaxValue_235() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46028,7 +46771,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt32uInvalidValue_236() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46051,7 +46794,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt32uUnchangedValue_237() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46072,7 +46815,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt32uNullValue_238() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46090,7 +46833,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt32uNullValue_239() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46110,7 +46853,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt32uNullValueRange_240() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46129,7 +46872,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt32uNullValueNot_241() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46149,7 +46892,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt32uValue_242() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46168,7 +46911,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt32uValueInRange_243() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46187,7 +46930,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt32uNotValueOk_244() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46207,7 +46950,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt64uMinValue_245() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46226,7 +46969,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt64uMinValue_246() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46247,7 +46990,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt64uMaxValue_247() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46266,7 +47009,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt64uMaxValue_248() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46287,7 +47030,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt64uInvalidValue_249() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46310,7 +47053,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt64uUnchangedValue_250() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46331,7 +47074,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt64uNullValue_251() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46349,7 +47092,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt64uNullValue_252() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46369,7 +47112,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt64uNullValueRange_253() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46388,7 +47131,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt64uNullValueNot_254() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46408,7 +47151,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt64uValue_255() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46427,7 +47170,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt64uValueInRange_256() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46446,7 +47189,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt64uNotValueOk_257() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46466,7 +47209,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt8sMinValue_258() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46485,7 +47228,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt8sMinValue_259() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46506,7 +47249,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt8sInvalidValue_260() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46529,7 +47272,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt8sUnchangedValue_261() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46550,7 +47293,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt8sNullValue_262() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46568,7 +47311,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt8sNullValue_263() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46588,7 +47331,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt8sNullValueRange_264() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46608,7 +47351,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt8sNullValueNot_265() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46628,7 +47371,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt8sValue_266() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46647,7 +47390,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt8sValueInRange_267() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46667,7 +47410,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt8sNotValueOk_268() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46687,7 +47430,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt16sMinValue_269() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46706,7 +47449,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt16sMinValue_270() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46727,7 +47470,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt16sInvalidValue_271() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46750,7 +47493,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt16sUnchangedValue_272() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46771,7 +47514,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt16sNullValue_273() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46789,7 +47532,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt16sNullValue_274() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46809,7 +47552,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt16sNullValueRange_275() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46829,7 +47572,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt16sNullValueNot_276() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46849,7 +47592,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt16sValue_277() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46868,7 +47611,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt16sValueInRange_278() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46888,7 +47631,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt16sNotValueOk_279() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46908,7 +47651,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt32sMinValue_280() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46927,7 +47670,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt32sMinValue_281() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46948,7 +47691,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt32sInvalidValue_282() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46971,7 +47714,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt32sUnchangedValue_283() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -46992,7 +47735,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt32sNullValue_284() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47010,7 +47753,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt32sNullValue_285() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47030,7 +47773,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt32sNullValueRange_286() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47050,7 +47793,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt32sNullValueNot_287() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47070,7 +47813,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt32sValue_288() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47089,7 +47832,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt32sValueInRange_289() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47109,7 +47852,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt32sNotValueOk_290() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47129,7 +47872,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt64sMinValue_291() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47148,7 +47891,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt64sMinValue_292() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47169,7 +47912,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt64sInvalidValue_293() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47192,7 +47935,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt64sUnchangedValue_294() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47213,7 +47956,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt64sNullValue_295() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47231,7 +47974,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt64sNullValue_296() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47251,7 +47994,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt64sNullValueRange_297() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47271,7 +48014,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt64sNullValueNot_298() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47291,7 +48034,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableInt64sValue_299() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47310,7 +48053,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt64sValueInRange_300() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47330,7 +48073,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableInt64sNotValueOk_301() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47350,7 +48093,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableSingleMediumValue_302() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47369,7 +48112,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableSingleMediumValue_303() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47390,7 +48133,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableSingleLargestValue_304() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47409,7 +48152,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableSingleLargestValue_305() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47430,7 +48173,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableSingleSmallestValue_306() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47449,7 +48192,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableSingleSmallestValue_307() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47470,7 +48213,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableSingleNullValue_308() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47488,7 +48231,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableSingleNullValue_309() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47508,7 +48251,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableSingle0Value_310() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47527,7 +48270,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableSingle0Value_311() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47548,7 +48291,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableDoubleMediumValue_312() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47567,7 +48310,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableDoubleMediumValue_313() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47588,7 +48331,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableDoubleLargestValue_314() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47607,7 +48350,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableDoubleLargestValue_315() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47628,7 +48371,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableDoubleSmallestValue_316() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47647,7 +48390,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableDoubleSmallestValue_317() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47668,7 +48411,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableDoubleNullValue_318() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47686,7 +48429,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableDoubleNullValue_319() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47706,7 +48449,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableDouble0Value_320() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47725,7 +48468,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableDouble0Value_321() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47746,7 +48489,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableEnum8MinValue_322() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47765,7 +48508,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableEnum8MinValue_323() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47786,7 +48529,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableEnum8MaxValue_324() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47805,7 +48548,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableEnum8MaxValue_325() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47826,7 +48569,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableEnum8InvalidValue_326() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47849,7 +48592,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableEnum8UnchangedValue_327() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47870,7 +48613,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableEnum8NullValue_328() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47888,7 +48631,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableEnum8NullValue_329() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47908,7 +48651,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableEnum16MinValue_330() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47927,7 +48670,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableEnum16MinValue_331() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47948,7 +48691,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableEnum16MaxValue_332() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47967,7 +48710,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableEnum16MaxValue_333() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -47988,7 +48731,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableEnum16InvalidValue_334() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48011,7 +48754,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableEnum16UnchangedValue_335() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48032,7 +48775,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableEnum16NullValue_336() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48050,7 +48793,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableEnum16NullValue_337() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48070,7 +48813,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableSimpleEnumMinValue_338() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48089,7 +48832,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableSimpleEnumMinValue_339() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48111,7 +48854,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableSimpleEnumMaxValue_340() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48130,7 +48873,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableSimpleEnumMaxValue_341() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48152,7 +48895,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableSimpleEnumInvalidValue_342() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48175,7 +48918,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableSimpleEnumUnchangedValue_343() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48197,7 +48940,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableSimpleEnumNullValue_344() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48215,7 +48958,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableSimpleEnumNullValue_345() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48236,7 +48979,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableOctetStringDefaultValue_346() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48258,7 +49001,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableOctetString_347() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48278,7 +49021,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableOctetString_348() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48300,7 +49043,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableOctetString_349() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48318,7 +49061,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableOctetString_350() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48338,7 +49081,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableOctetString_351() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48357,7 +49100,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableOctetString_352() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48379,7 +49122,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableCharStringDefaultValue_353() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48400,7 +49143,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableCharString_354() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48419,7 +49162,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableCharString_355() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48440,7 +49183,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableCharStringValueTooLong_356() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48458,7 +49201,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableCharString_357() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48478,7 +49221,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteAttributeNullableCharStringEmpty_358() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48497,7 +49240,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeNullableCharString_359() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48518,7 +49261,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeFromNonexistentEndpoint_360() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 200; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 200; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48537,7 +49280,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadAttributeFromNonexistentCluster_361() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48556,7 +49299,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendACommandThatTakesAnOptionalParameterButDoNotSetIt_362() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestSimpleOptionalArgumentRequest::Type; RequestType request; @@ -48583,7 +49326,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendACommandThatTakesAnOptionalParameterButDoNotSetIt_363() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestSimpleOptionalArgumentRequest::Type; RequestType request; @@ -48608,7 +49351,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReportSubscribeToListAttribute_364() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48638,7 +49381,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestSubscribeToListAttribute_365() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48673,7 +49416,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteSubscribedToListAttribute_366() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48697,7 +49440,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestCheckForListAttributeReport_367() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48729,7 +49472,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadRangeRestrictedUnsigned8BitInteger_368() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48749,7 +49492,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMinValueToARangeRestrictedUnsigned8BitInteger_369() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48771,7 +49514,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteJustBelowRangeValueToARangeRestrictedUnsigned8BitInteger_370() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48793,7 +49536,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteJustAboveRangeValueToARangeRestrictedUnsigned8BitInteger_371() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48815,7 +49558,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMaxValueToARangeRestrictedUnsigned8BitInteger_372() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48837,7 +49580,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyRangeRestrictedUnsigned8BitIntegerValueHasNotChanged_373() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48857,7 +49600,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMinValidValueToARangeRestrictedUnsigned8BitInteger_374() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48875,7 +49618,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMinValid_375() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48895,7 +49638,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMaxValidValueToARangeRestrictedUnsigned8BitInteger_376() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48913,7 +49656,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMaxValid_377() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48933,7 +49676,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMiddleValidValueToARangeRestrictedUnsigned8BitInteger_378() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48951,7 +49694,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMidValid_379() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48971,7 +49714,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadRangeRestrictedUnsigned16BitInteger_380() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -48991,7 +49734,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMinValueToARangeRestrictedUnsigned16BitInteger_381() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49013,7 +49756,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteJustBelowRangeValueToARangeRestrictedUnsigned16BitInteger_382() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49035,7 +49778,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteJustAboveRangeValueToARangeRestrictedUnsigned16BitInteger_383() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49057,7 +49800,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMaxValueToARangeRestrictedUnsigned16BitInteger_384() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49079,7 +49822,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyRangeRestrictedUnsigned16BitIntegerValueHasNotChanged_385() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49099,7 +49842,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMinValidValueToARangeRestrictedUnsigned16BitInteger_386() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49117,7 +49860,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMinValid_387() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49137,7 +49880,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMaxValidValueToARangeRestrictedUnsigned16BitInteger_388() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49155,7 +49898,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMaxValid_389() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49175,7 +49918,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMiddleValidValueToARangeRestrictedUnsigned16BitInteger_390() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49193,7 +49936,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMidValid_391() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49213,7 +49956,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadRangeRestrictedSigned8BitInteger_392() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49233,7 +49976,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMinValueToARangeRestrictedSigned8BitInteger_393() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49255,7 +49998,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteJustBelowRangeValueToARangeRestrictedSigned8BitInteger_394() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49277,7 +50020,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteJustAboveRangeValueToARangeRestrictedSigned8BitInteger_395() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49299,7 +50042,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMaxValueToARangeRestrictedSigned8BitInteger_396() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49321,7 +50064,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyRangeRestrictedSigned8BitIntegerValueHasNotChanged_397() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49341,7 +50084,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMinValidValueToARangeRestrictedSigned8BitInteger_398() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49359,7 +50102,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMinValid_399() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49379,7 +50122,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMaxValidValueToARangeRestrictedSigned8BitInteger_400() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49397,7 +50140,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMaxValid_401() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49417,7 +50160,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMiddleValidValueToARangeRestrictedSigned8BitInteger_402() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49435,7 +50178,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMidValid_403() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49455,7 +50198,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadRangeRestrictedSigned16BitInteger_404() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49475,7 +50218,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMinValueToARangeRestrictedSigned16BitInteger_405() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49497,7 +50240,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteJustBelowRangeValueToARangeRestrictedSigned16BitInteger_406() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49519,7 +50262,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteJustAboveRangeValueToARangeRestrictedSigned16BitInteger_407() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49541,7 +50284,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMaxValueToARangeRestrictedSigned16BitInteger_408() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49563,7 +50306,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyRangeRestrictedSigned16BitIntegerValueHasNotChanged_409() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49583,7 +50326,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMinValidValueToARangeRestrictedSigned16BitInteger_410() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49601,7 +50344,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMinValid_411() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49621,7 +50364,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMaxValidValueToARangeRestrictedSigned16BitInteger_412() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49639,7 +50382,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMaxValid_413() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49659,7 +50402,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMiddleValidValueToARangeRestrictedSigned16BitInteger_414() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49677,7 +50420,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMidValid_415() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49697,7 +50440,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadNullableRangeRestrictedUnsigned8BitInteger_416() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49719,7 +50462,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMinValueToANullableRangeRestrictedUnsigned8BitInteger_417() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49743,7 +50486,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteJustBelowRangeValueToANullableRangeRestrictedUnsigned8BitInteger_418() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49767,7 +50510,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteJustAboveRangeValueToANullableRangeRestrictedUnsigned8BitInteger_419() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49791,7 +50534,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMaxValueToANullableRangeRestrictedUnsigned8BitInteger_420() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49815,7 +50558,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueHasNotChanged_421() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49837,7 +50580,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMinValidValueToANullableRangeRestrictedUnsigned8BitInteger_422() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49857,7 +50600,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMinValid_423() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49879,7 +50622,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMaxValidValueToANullableRangeRestrictedUnsigned8BitInteger_424() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49899,7 +50642,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMaxValid_425() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49921,7 +50664,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMiddleValidValueToANullableRangeRestrictedUnsigned8BitInteger_426() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49941,7 +50684,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMidValid_427() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49963,7 +50706,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteNullValueToANullableRangeRestrictedUnsigned8BitInteger_428() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -49982,7 +50725,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsNull_429() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50003,7 +50746,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadNullableRangeRestrictedUnsigned16BitInteger_430() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50025,7 +50768,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMinValueToANullableRangeRestrictedUnsigned16BitInteger_431() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50049,7 +50792,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteJustBelowRangeValueToANullableRangeRestrictedUnsigned16BitInteger_432() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50073,7 +50816,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteJustAboveRangeValueToANullableRangeRestrictedUnsigned16BitInteger_433() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50097,7 +50840,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMaxValueToANullableRangeRestrictedUnsigned16BitInteger_434() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50121,7 +50864,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueHasNotChanged_435() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50143,7 +50886,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMinValidValueToANullableRangeRestrictedUnsigned16BitInteger_436() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50163,7 +50906,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMinValid_437() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50185,7 +50928,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMaxValidValueToANullableRangeRestrictedUnsigned16BitInteger_438() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50205,7 +50948,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMaxValid_439() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50227,7 +50970,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMiddleValidValueToANullableRangeRestrictedUnsigned16BitInteger_440() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50247,7 +50990,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMidValid_441() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50269,7 +51012,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteNullValueToANullableRangeRestrictedUnsigned16BitInteger_442() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50288,7 +51031,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsNull_443() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50309,7 +51052,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadNullableRangeRestrictedSigned8BitInteger_444() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50331,7 +51074,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMinValueToANullableRangeRestrictedSigned8BitInteger_445() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50355,7 +51098,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteJustBelowRangeValueToANullableRangeRestrictedSigned8BitInteger_446() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50379,7 +51122,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteJustAboveRangeValueToANullableRangeRestrictedSigned8BitInteger_447() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50403,7 +51146,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMaxValueToANullableRangeRestrictedSigned8BitInteger_448() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50427,7 +51170,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueHasNotChanged_449() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50449,7 +51192,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMinValidValueToANullableRangeRestrictedSigned8BitInteger_450() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50469,7 +51212,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMinValid_451() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50491,7 +51234,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMaxValidValueToANullableRangeRestrictedSigned8BitInteger_452() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50511,7 +51254,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMaxValid_453() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50533,7 +51276,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMiddleValidValueToANullableRangeRestrictedSigned8BitInteger_454() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50553,7 +51296,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMidValid_455() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50575,7 +51318,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteNullValueToANullableRangeRestrictedSigned8BitInteger_456() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50594,7 +51337,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtNull_457() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50615,7 +51358,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestReadNullableRangeRestrictedSigned16BitInteger_458() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50637,7 +51380,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMinValueToANullableRangeRestrictedSigned16BitInteger_459() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50661,7 +51404,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteJustBelowRangeValueToANullableRangeRestrictedSigned16BitInteger_460() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50685,7 +51428,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteJustAboveRangeValueToANullableRangeRestrictedSigned16BitInteger_461() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50709,7 +51452,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMaxValueToANullableRangeRestrictedSigned16BitInteger_462() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50733,7 +51476,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueHasNotChanged_463() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50755,7 +51498,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMinValidValueToANullableRangeRestrictedSigned16BitInteger_464() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50775,7 +51518,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMinValid_465() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50797,7 +51540,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMaxValidValueToANullableRangeRestrictedSigned16BitInteger_466() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50817,7 +51560,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMaxValid_467() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50839,7 +51582,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteMiddleValidValueToANullableRangeRestrictedSigned16BitInteger_468() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50859,7 +51602,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMidValid_469() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50881,7 +51624,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestWriteNullValueToANullableRangeRestrictedSigned16BitInteger_470() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50900,7 +51643,7 @@ class TestCluster : public TestCommand CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsNull_471() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -50923,7 +51666,11 @@ class TestCluster : public TestCommand class TestClusterComplexTypes : public TestCommand { public: - TestClusterComplexTypes() : TestCommand("TestClusterComplexTypes"), mTestIndex(0) {} + TestClusterComplexTypes() : TestCommand("TestClusterComplexTypes"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -51052,6 +51799,9 @@ class TestClusterComplexTypes : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 21; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); @@ -51183,7 +51933,7 @@ class TestClusterComplexTypes : public TestCommand CHIP_ERROR TestSendTestCommandWithOptionalArgSetToNull_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type; RequestType request; @@ -51221,7 +51971,7 @@ class TestClusterComplexTypes : public TestCommand CHIP_ERROR TestSendCommandThatNeedsTimedInvokeWithoutATimeoutValue_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TimedInvokeRequest::Type; RequestType request; @@ -51249,7 +51999,7 @@ class TestClusterComplexTypes : public TestCommand CHIP_ERROR TestSendCommandThatNeedsTimedInvokeWithALongTimeoutValue_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TimedInvokeRequest::Type; RequestType request; @@ -51273,7 +52023,7 @@ class TestClusterComplexTypes : public TestCommand CHIP_ERROR TestSendCommandThatNeedsTimedInvokeWithATooShortTimeoutValue_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TimedInvokeRequest::Type; RequestType request; @@ -51309,7 +52059,7 @@ class TestClusterComplexTypes : public TestCommand CHIP_ERROR TestSendCommandThatDoesNotNeedTimedInvokeWithALongTimeoutValue_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::Test::Type; RequestType request; @@ -51333,7 +52083,7 @@ class TestClusterComplexTypes : public TestCommand CHIP_ERROR TestSendCommandThatDoesNotNeedTimedInvokeWithATooShortTimeoutValue_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::Test::Type; RequestType request; @@ -51369,7 +52119,7 @@ class TestClusterComplexTypes : public TestCommand CHIP_ERROR TestReadAttributeThatNeedsTimedWriteInitialState_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -51389,7 +52139,7 @@ class TestClusterComplexTypes : public TestCommand CHIP_ERROR TestWriteAttributeThatNeedsTimedWriteWithoutATimeoutValue_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -51411,7 +52161,7 @@ class TestClusterComplexTypes : public TestCommand CHIP_ERROR TestReadAttributeThatNeedsTimedWriteStateUnchanged1_9() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -51431,7 +52181,7 @@ class TestClusterComplexTypes : public TestCommand CHIP_ERROR TestWriteAttributeThatNeedsTimedWriteWithATooShortTimeoutValue_10() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -51461,7 +52211,7 @@ class TestClusterComplexTypes : public TestCommand CHIP_ERROR TestReadAttributeThatNeedsTimedWriteStateUnchanged2_11() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -51481,7 +52231,7 @@ class TestClusterComplexTypes : public TestCommand CHIP_ERROR TestWriteAttributeThatNeedsTimedWriteWithALongTimeoutValue_12() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -51499,7 +52249,7 @@ class TestClusterComplexTypes : public TestCommand CHIP_ERROR TestReadAttributeThatNeedsTimedWriteStateChanged_13() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -51519,7 +52269,7 @@ class TestClusterComplexTypes : public TestCommand CHIP_ERROR TestWriteAttributeThatNeedsTimedWriteResetToDefault_14() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -51537,7 +52287,7 @@ class TestClusterComplexTypes : public TestCommand CHIP_ERROR TestReadAttributeThatDoesNotNeedTimedWriteInitialValue_15() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -51557,7 +52307,7 @@ class TestClusterComplexTypes : public TestCommand CHIP_ERROR TestWriteAttributeThatDoesNotNeedTimedWriteWithATooShortTimeoutValue_16() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -51587,7 +52337,7 @@ class TestClusterComplexTypes : public TestCommand CHIP_ERROR TestReadAttributeThatDoesNotNeedTimedWriteUnchangedValue_17() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -51607,7 +52357,7 @@ class TestClusterComplexTypes : public TestCommand CHIP_ERROR TestWriteAttributeThatDoesNotNeedTimedWriteWithALongTimeoutValue_18() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -51625,7 +52375,7 @@ class TestClusterComplexTypes : public TestCommand CHIP_ERROR TestReadAttributeThatDoesNotNeedTimedWriteChangedValue_19() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -51645,7 +52395,7 @@ class TestClusterComplexTypes : public TestCommand CHIP_ERROR TestWriteAttributeThatDoesNotNeedTimedWriteResetToDefault_20() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -51665,7 +52415,11 @@ class TestClusterComplexTypes : public TestCommand class TestConstraints : public TestCommand { public: - TestConstraints() : TestCommand("TestConstraints"), mTestIndex(0) {} + TestConstraints() : TestCommand("TestConstraints"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -51753,6 +52507,9 @@ class TestConstraints : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 12; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -51863,7 +52620,7 @@ class TestConstraints : public TestCommand CHIP_ERROR TestWriteAttributeInt32uValue_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -51881,7 +52638,7 @@ class TestConstraints : public TestCommand CHIP_ERROR TestReadAttributeInt32uValueMinValueConstraints_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -51900,7 +52657,7 @@ class TestConstraints : public TestCommand CHIP_ERROR TestReadAttributeInt32uValueMaxValueConstraints_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -51919,7 +52676,7 @@ class TestConstraints : public TestCommand CHIP_ERROR TestReadAttributeInt32uValueNotValueConstraints_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -51939,7 +52696,7 @@ class TestConstraints : public TestCommand CHIP_ERROR TestWriteAttributeInt32uValueBackToDefaultValue_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -51957,7 +52714,7 @@ class TestConstraints : public TestCommand CHIP_ERROR TestWriteAttributeCharStringValue_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -51975,7 +52732,7 @@ class TestConstraints : public TestCommand CHIP_ERROR TestReadAttributeCharStringValueMinLengthConstraints_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -51994,7 +52751,7 @@ class TestConstraints : public TestCommand CHIP_ERROR TestReadAttributeCharStringValueMaxLengthConstraints_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -52013,7 +52770,7 @@ class TestConstraints : public TestCommand CHIP_ERROR TestReadAttributeCharStringValueStartsWithConstraints_9() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -52032,7 +52789,7 @@ class TestConstraints : public TestCommand CHIP_ERROR TestReadAttributeCharStringValueEndsWithConstraints_10() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -52051,7 +52808,7 @@ class TestConstraints : public TestCommand CHIP_ERROR TestWriteAttributeCharStringValueBackToDefaultValue_11() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -52071,7 +52828,11 @@ class TestConstraints : public TestCommand class TestDelayCommands : public TestCommand { public: - TestDelayCommands() : TestCommand("TestDelayCommands"), mTestIndex(0) {} + TestDelayCommands() : TestCommand("TestDelayCommands"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -52119,6 +52880,9 @@ class TestDelayCommands : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 2; + chip::Optional mCluster; + chip::Optional mEndpoint; + // // Tests methods // @@ -52139,7 +52903,11 @@ class TestDelayCommands : public TestCommand class TestLogCommands : public TestCommand { public: - TestLogCommands() : TestCommand("TestLogCommands"), mTestIndex(0) {} + TestLogCommands() : TestCommand("TestLogCommands"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -52191,6 +52959,9 @@ class TestLogCommands : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; + chip::Optional mCluster; + chip::Optional mEndpoint; + // // Tests methods // @@ -52217,7 +52988,11 @@ class TestLogCommands : public TestCommand class TestSaveAs : public TestCommand { public: - TestSaveAs() : TestCommand("TestSaveAs"), mTestIndex(0) {} + TestSaveAs() : TestCommand("TestSaveAs"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -52633,6 +53408,9 @@ class TestSaveAs : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 94; + chip::Optional mCluster; + chip::Optional mEndpoint; + uint8_t TestAddArgumentDefaultValue; bool readAttributeBooleanDefaultValue; uint8_t readAttributeBitmap8DefaultValue; @@ -53457,7 +54235,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestSendTestAddArgumentsCommand_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type; RequestType request; @@ -53488,7 +54266,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestSendTestAddArgumentsCommand_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type; RequestType request; @@ -53518,7 +54296,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestSendTestAddArgumentsCommand_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type; RequestType request; @@ -53548,7 +54326,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeBooleanDefaultValue_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -53569,7 +54347,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeBooleanNotDefaultValue_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -53587,7 +54365,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeBooleanNotDefaultValue_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -53607,7 +54385,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeBooleanDefaultValue_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -53625,7 +54403,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeBooleanFalse_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -53645,7 +54423,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeBitmap8DefaultValue_9() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -53666,7 +54444,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeBitmap8NotDefaultValue_10() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -53684,7 +54462,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeBitmap8NotDefaultValue_11() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -53704,7 +54482,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeBitmap8DefaultValue_12() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -53722,7 +54500,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeBitmap8DefaultValue_13() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -53742,7 +54520,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeBitmap16DefaultValue_14() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -53763,7 +54541,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeBitmap16NotDefaultValue_15() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -53781,7 +54559,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeBitmap16NotDefaultValue_16() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -53801,7 +54579,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeBitmap16DefaultValue_17() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -53819,7 +54597,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeBitmap16DefaultValue_18() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -53839,7 +54617,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeBitmap32DefaultValue_19() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -53860,7 +54638,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeBitmap32NotDefaultValue_20() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -53878,7 +54656,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeBitmap32NotDefaultValue_21() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -53898,7 +54676,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeBitmap32DefaultValue_22() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -53916,7 +54694,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeBitmap32DefaultValue_23() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -53936,7 +54714,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeBitmap64DefaultValue_24() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -53957,7 +54735,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeBitmap64NotDefaultValue_25() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -53975,7 +54753,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeBitmap64DefaultValue_26() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -53995,7 +54773,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeBitmap64DefaultValue_27() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54013,7 +54791,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeBitmap64DefaultValue_28() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54033,7 +54811,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeInt8uDefaultValue_29() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54054,7 +54832,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeInt8uNotDefaultValue_30() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54072,7 +54850,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeInt8uNotDefaultValue_31() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54092,7 +54870,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeInt8uDefaultValue_32() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54110,7 +54888,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeInt8uDefaultValue_33() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54130,7 +54908,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeInt16uDefaultValue_34() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54151,7 +54929,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeInt16uNotDefaultValue_35() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54169,7 +54947,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeInt16uNotDefaultValue_36() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54189,7 +54967,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeInt16uDefaultValue_37() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54207,7 +54985,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeInt16uDefaultValue_38() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54227,7 +55005,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeInt32uDefaultValue_39() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54248,7 +55026,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeInt32uNotDefaultValue_40() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54266,7 +55044,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeInt32uNotDefaultValue_41() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54286,7 +55064,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeInt32uDefaultValue_42() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54304,7 +55082,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeInt32uDefaultValue_43() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54324,7 +55102,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeInt64uDefaultValue_44() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54345,7 +55123,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeInt64uNotDefaultValue_45() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54363,7 +55141,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeInt64uNotDefaultValue_46() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54383,7 +55161,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeInt64uDefaultValue_47() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54401,7 +55179,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeInt64uDefaultValue_48() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54421,7 +55199,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeInt8sDefaultValue_49() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54442,7 +55220,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeInt8sNotDefaultValue_50() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54460,7 +55238,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeInt8sNotDefaultValue_51() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54480,7 +55258,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeInt8sDefaultValue_52() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54498,7 +55276,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeInt8sDefaultValue_53() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54518,7 +55296,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeInt16sDefaultValue_54() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54539,7 +55317,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeInt16sNotDefaultValue_55() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54557,7 +55335,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeInt16sNotDefaultValue_56() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54577,7 +55355,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeInt16sDefaultValue_57() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54595,7 +55373,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeInt16sDefaultValue_58() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54615,7 +55393,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeInt32sDefaultValue_59() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54636,7 +55414,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeInt32sNotDefaultValue_60() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54654,7 +55432,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeInt32sNotDefaultValue_61() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54674,7 +55452,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeInt32sDefaultValue_62() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54692,7 +55470,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeInt32sDefaultValue_63() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54712,7 +55490,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeInt64sDefaultValue_64() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54733,7 +55511,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeIntsNotDefaultValue_65() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54751,7 +55529,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeInt64sNotDefaultValue_66() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54771,7 +55549,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeInt64sDefaultValue_67() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54789,7 +55567,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeInt64sDefaultValue_68() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54809,7 +55587,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeEnum8DefaultValue_69() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54830,7 +55608,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeEnum8NotDefaultValue_70() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54848,7 +55626,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeEnum8NotDefaultValue_71() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54868,7 +55646,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeEnum8DefaultValue_72() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54886,7 +55664,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeEnum8DefaultValue_73() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54906,7 +55684,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeEnum16DefaultValue_74() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54927,7 +55705,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeEnum16NotDefaultValue_75() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54945,7 +55723,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeEnum16NotDefaultValue_76() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54965,7 +55743,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeEnum16DefaultValue_77() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -54983,7 +55761,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeEnum16DefaultValue_78() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -55003,7 +55781,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeEpochUsDefaultValue_79() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -55024,7 +55802,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeEpochUsNotDefaultValue_80() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -55042,7 +55820,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeEpochUsNotDefaultValue_81() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -55062,7 +55840,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeEpochUsDefaultValue_82() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -55080,7 +55858,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeEpochUsDefaultValue_83() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -55100,7 +55878,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeEpochSDefaultValue_84() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -55121,7 +55899,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeEpochSNotDefaultValue_85() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -55139,7 +55917,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeEpochSNotDefaultValue_86() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -55159,7 +55937,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeEpochSDefaultValue_87() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -55177,7 +55955,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeEpochSDefaultValue_88() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -55197,7 +55975,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeVendorIdDefaultValue_89() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -55218,7 +55996,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeVendorIdNotDefaultValue_90() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -55236,7 +56014,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeVendorIdNotDefaultValue_91() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -55256,7 +56034,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestWriteAttributeVendorIdDefaultValue_92() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -55274,7 +56052,7 @@ class TestSaveAs : public TestCommand CHIP_ERROR TestReadAttributeVendorIdDefaultValue_93() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -55293,10 +56071,154 @@ class TestSaveAs : public TestCommand } }; +class TestConfigVariables : public TestCommand +{ +public: + TestConfigVariables() : TestCommand("TestConfigVariables"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("arg1", 0, UINT8_MAX, &mArg1); + AddArgument("returnValueWithArg1", 0, UINT8_MAX, &mReturnValueWithArg1); + } + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: TestConfigVariables\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: TestConfigVariables\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Send Test Add Arguments Command\n"); + err = TestSendTestAddArgumentsCommand_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Send Test Add Arguments Command\n"); + err = TestSendTestAddArgumentsCommand_2(); + 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 = 3; + + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mArg1; + chip::Optional mReturnValueWithArg1; + + uint8_t TestAddArgumentDefaultValue; + + // + // Tests methods + // + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + SetIdentity(kIdentityAlpha); + return WaitForCommissionee(); + } + + CHIP_ERROR TestSendTestAddArgumentsCommand_1() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type; + + RequestType request; + request.arg1 = 3; + request.arg2 = 17; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_1(data.returnValue); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_1(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_1(uint8_t returnValue) + { + VerifyOrReturn(CheckValue("returnValue", returnValue, 20)); + + TestAddArgumentDefaultValue = returnValue; + NextTest(); + } + + CHIP_ERROR TestSendTestAddArgumentsCommand_2() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type; + + RequestType request; + request.arg1 = mArg1.HasValue() ? mArg1.Value() : 5; + request.arg2 = TestAddArgumentDefaultValue; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_2(data.returnValue); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_2(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_2(uint8_t returnValue) + { + VerifyOrReturn(CheckValue("returnValue", returnValue, mReturnValueWithArg1.HasValue() ? mReturnValueWithArg1.Value() : 25)); + + NextTest(); + } +}; + class TestDescriptorCluster : public TestCommand { public: - TestDescriptorCluster() : TestCommand("TestDescriptorCluster"), mTestIndex(0) {} + TestDescriptorCluster() : TestCommand("TestDescriptorCluster"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -55356,6 +56278,9 @@ class TestDescriptorCluster : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 5; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -55410,7 +56335,7 @@ class TestDescriptorCluster : public TestCommand CHIP_ERROR TestReadAttributeDeviceList_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::DescriptorClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -55437,7 +56362,7 @@ class TestDescriptorCluster : public TestCommand CHIP_ERROR TestReadAttributeServerList_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::DescriptorClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -55506,7 +56431,7 @@ class TestDescriptorCluster : public TestCommand CHIP_ERROR TestReadAttributeClientList_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::DescriptorClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -55529,7 +56454,7 @@ class TestDescriptorCluster : public TestCommand CHIP_ERROR TestReadAttributePartsList_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::DescriptorClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -55558,7 +56483,11 @@ class TestDescriptorCluster : public TestCommand class TestBasicInformation : public TestCommand { public: - TestBasicInformation() : TestCommand("TestBasicInformation"), mTestIndex(0) {} + TestBasicInformation() : TestCommand("TestBasicInformation"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -55614,6 +56543,9 @@ class TestBasicInformation : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 4; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -55650,7 +56582,7 @@ class TestBasicInformation : public TestCommand CHIP_ERROR TestWriteLocation_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -55668,7 +56600,7 @@ class TestBasicInformation : public TestCommand CHIP_ERROR TestRestoreInitialLocationValue_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -55686,7 +56618,7 @@ class TestBasicInformation : public TestCommand CHIP_ERROR TestReadAttributeListValue_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -55753,7 +56685,11 @@ class TestBasicInformation : public TestCommand class TestIdentifyCluster : public TestCommand { public: - TestIdentifyCluster() : TestCommand("TestIdentifyCluster"), mTestIndex(0) {} + TestIdentifyCluster() : TestCommand("TestIdentifyCluster"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -55801,6 +56737,9 @@ class TestIdentifyCluster : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 2; + chip::Optional mCluster; + chip::Optional mEndpoint; + // // Tests methods // @@ -55813,7 +56752,7 @@ class TestIdentifyCluster : public TestCommand CHIP_ERROR TestSendIdentifyCommandAndExpectSuccessResponse_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; using RequestType = chip::app::Clusters::Identify::Commands::Identify::Type; RequestType request; @@ -55839,7 +56778,11 @@ class TestIdentifyCluster : public TestCommand class TestGroupsCluster : public TestCommand { public: - TestGroupsCluster() : TestCommand("TestGroupsCluster"), mTestIndex(0) {} + TestGroupsCluster() : TestCommand("TestGroupsCluster"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -55955,6 +56898,9 @@ class TestGroupsCluster : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 19; + chip::Optional mCluster; + chip::Optional mEndpoint; + // // Tests methods // @@ -55967,7 +56913,7 @@ class TestGroupsCluster : public TestCommand CHIP_ERROR TestViewGroup0Invalid_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; RequestType request; @@ -55998,7 +56944,7 @@ class TestGroupsCluster : public TestCommand CHIP_ERROR TestViewGroup1NotFound_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; RequestType request; @@ -56029,7 +56975,7 @@ class TestGroupsCluster : public TestCommand CHIP_ERROR TestAddGroup1New_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::Groups::Commands::AddGroup::Type; RequestType request; @@ -56061,7 +57007,7 @@ class TestGroupsCluster : public TestCommand CHIP_ERROR TestViewGroup1New_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; RequestType request; @@ -56094,7 +57040,7 @@ class TestGroupsCluster : public TestCommand CHIP_ERROR TestViewGroup2NotFound_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; RequestType request; @@ -56125,7 +57071,7 @@ class TestGroupsCluster : public TestCommand CHIP_ERROR TestGetGroupMembership1All_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::Groups::Commands::GetGroupMembership::Type; RequestType request; @@ -56162,7 +57108,7 @@ class TestGroupsCluster : public TestCommand CHIP_ERROR TestViewGroup3NotFound_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; RequestType request; @@ -56193,7 +57139,7 @@ class TestGroupsCluster : public TestCommand CHIP_ERROR TestViewGroup1Existing_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; RequestType request; @@ -56226,7 +57172,7 @@ class TestGroupsCluster : public TestCommand CHIP_ERROR TestRemoveGroup0Invalid_9() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::Groups::Commands::RemoveGroup::Type; RequestType request; @@ -56257,7 +57203,7 @@ class TestGroupsCluster : public TestCommand CHIP_ERROR TestRemoveGroup4NotFound_10() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::Groups::Commands::RemoveGroup::Type; RequestType request; @@ -56288,7 +57234,7 @@ class TestGroupsCluster : public TestCommand CHIP_ERROR TestViewGroup1NotRemoved_11() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; RequestType request; @@ -56321,7 +57267,7 @@ class TestGroupsCluster : public TestCommand CHIP_ERROR TestViewGroup2Removed_12() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; RequestType request; @@ -56352,7 +57298,7 @@ class TestGroupsCluster : public TestCommand CHIP_ERROR TestGetGroupMembership3_13() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::Groups::Commands::GetGroupMembership::Type; RequestType request; @@ -56394,7 +57340,7 @@ class TestGroupsCluster : public TestCommand CHIP_ERROR TestRemoveAll_14() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type; RequestType request; @@ -56417,7 +57363,7 @@ class TestGroupsCluster : public TestCommand CHIP_ERROR TestViewGroup1Removed_15() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; RequestType request; @@ -56448,7 +57394,7 @@ class TestGroupsCluster : public TestCommand CHIP_ERROR TestViewGroup2StillRemoved_16() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; RequestType request; @@ -56479,7 +57425,7 @@ class TestGroupsCluster : public TestCommand CHIP_ERROR TestViewGroup3Removed_17() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; RequestType request; @@ -56510,7 +57456,7 @@ class TestGroupsCluster : public TestCommand CHIP_ERROR TestGetGroupMembership4_18() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::Groups::Commands::GetGroupMembership::Type; RequestType request; @@ -56553,7 +57499,11 @@ class TestGroupsCluster : public TestCommand class TestGroupKeyManagementCluster : public TestCommand { public: - TestGroupKeyManagementCluster() : TestCommand("TestGroupKeyManagementCluster"), mTestIndex(0) {} + TestGroupKeyManagementCluster() : TestCommand("TestGroupKeyManagementCluster"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -56605,6 +57555,9 @@ class TestGroupKeyManagementCluster : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -56637,7 +57590,7 @@ class TestGroupKeyManagementCluster : public TestCommand CHIP_ERROR TestReadMaxGroupsPerFabric_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::GroupKeyManagementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -56658,7 +57611,7 @@ class TestGroupKeyManagementCluster : public TestCommand CHIP_ERROR TestReadMaxGroupKeysPerFabric_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::GroupKeyManagementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -56681,7 +57634,11 @@ class TestGroupKeyManagementCluster : public TestCommand class TestOperationalCredentialsCluster : public TestCommand { public: - TestOperationalCredentialsCluster() : TestCommand("TestOperationalCredentialsCluster"), mTestIndex(0) {} + TestOperationalCredentialsCluster() : TestCommand("TestOperationalCredentialsCluster"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -56737,6 +57694,9 @@ class TestOperationalCredentialsCluster : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 4; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -56779,7 +57739,7 @@ class TestOperationalCredentialsCluster : public TestCommand CHIP_ERROR TestReadNumberOfSupportedFabrics_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::OperationalCredentialsClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -56800,7 +57760,7 @@ class TestOperationalCredentialsCluster : public TestCommand CHIP_ERROR TestReadNumberOfCommissionedFabrics_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::OperationalCredentialsClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -56821,7 +57781,7 @@ class TestOperationalCredentialsCluster : public TestCommand CHIP_ERROR TestReadCurrentFabricIndex_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::OperationalCredentialsClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -56844,7 +57804,11 @@ class TestOperationalCredentialsCluster : public TestCommand class TestModeSelectCluster : public TestCommand { public: - TestModeSelectCluster() : TestCommand("TestModeSelectCluster"), mTestIndex(0) {} + TestModeSelectCluster() : TestCommand("TestModeSelectCluster"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -56920,6 +57884,9 @@ class TestModeSelectCluster : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 9; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -56995,7 +57962,7 @@ class TestModeSelectCluster : public TestCommand CHIP_ERROR TestReadCurrentMode_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ModeSelectClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -57015,7 +57982,7 @@ class TestModeSelectCluster : public TestCommand CHIP_ERROR TestReadOnMode_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ModeSelectClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -57035,7 +58002,7 @@ class TestModeSelectCluster : public TestCommand CHIP_ERROR TestReadStartUpMode_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ModeSelectClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -57055,7 +58022,7 @@ class TestModeSelectCluster : public TestCommand CHIP_ERROR TestReadDescription_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ModeSelectClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -57075,7 +58042,7 @@ class TestModeSelectCluster : public TestCommand CHIP_ERROR TestReadSupportedModes_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ModeSelectClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -57113,7 +58080,7 @@ class TestModeSelectCluster : public TestCommand CHIP_ERROR TestChangeToSupportedMode_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type; RequestType request; @@ -57137,7 +58104,7 @@ class TestModeSelectCluster : public TestCommand CHIP_ERROR TestVerifyCurrentModeChange_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ModeSelectClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -57157,7 +58124,7 @@ class TestModeSelectCluster : public TestCommand CHIP_ERROR TestChangeToUnsupportedMode_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type; RequestType request; @@ -57187,7 +58154,11 @@ class TestModeSelectCluster : public TestCommand class TestGroupMessaging : public TestCommand { public: - TestGroupMessaging() : TestCommand("TestGroupMessaging"), mTestIndex(0) {} + TestGroupMessaging() : TestCommand("TestGroupMessaging"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -57239,6 +58210,9 @@ class TestGroupMessaging : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnDoneCallback_1(void * context) { (static_cast(context))->OnDoneResponse_1(); } static void OnFailureCallback_1(void * context, EmberAfStatus status) @@ -57311,7 +58285,11 @@ class TestGroupMessaging : public TestCommand class Test_TC_DIAGSW_1_1 : public TestCommand { public: - Test_TC_DIAGSW_1_1() : TestCommand("Test_TC_DIAGSW_1_1"), mTestIndex(0) {} + Test_TC_DIAGSW_1_1() : TestCommand("Test_TC_DIAGSW_1_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -57368,6 +58346,9 @@ class Test_TC_DIAGSW_1_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 4; + chip::Optional mCluster; + chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); @@ -57410,7 +58391,7 @@ class Test_TC_DIAGSW_1_1 : public TestCommand CHIP_ERROR TestReadsCurrentHeapFreeNonGlobalAttributeValueFromDut_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::SoftwareDiagnosticsClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -57432,7 +58413,7 @@ class Test_TC_DIAGSW_1_1 : public TestCommand CHIP_ERROR TestReadsCurrentHeapUsedNonGlobalAttributeValueFromDut_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::SoftwareDiagnosticsClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -57454,7 +58435,7 @@ class Test_TC_DIAGSW_1_1 : public TestCommand CHIP_ERROR TestReadsCurrentHeapHighWaterMarkNonGlobalAttributeValueFromDut_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::SoftwareDiagnosticsClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -57479,7 +58460,11 @@ class Test_TC_DIAGSW_1_1 : public TestCommand class Test_TC_DIAGSW_2_1 : public TestCommand { public: - Test_TC_DIAGSW_2_1() : TestCommand("Test_TC_DIAGSW_2_1"), mTestIndex(0) {} + Test_TC_DIAGSW_2_1() : TestCommand("Test_TC_DIAGSW_2_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -57519,6 +58504,9 @@ class Test_TC_DIAGSW_2_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; + chip::Optional mCluster; + chip::Optional mEndpoint; + // // Tests methods // @@ -57527,7 +58515,11 @@ class Test_TC_DIAGSW_2_1 : public TestCommand class Test_TC_DIAGSW_3_2 : public TestCommand { public: - Test_TC_DIAGSW_3_2() : TestCommand("Test_TC_DIAGSW_3_2"), mTestIndex(0) {} + Test_TC_DIAGSW_3_2() : TestCommand("Test_TC_DIAGSW_3_2"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -57571,6 +58563,9 @@ class Test_TC_DIAGSW_3_2 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 1; + chip::Optional mCluster; + chip::Optional mEndpoint; + // // Tests methods // @@ -57585,7 +58580,11 @@ class Test_TC_DIAGSW_3_2 : public TestCommand class TestSubscribe_OnOff : public TestCommand { public: - TestSubscribe_OnOff() : TestCommand("TestSubscribe_OnOff"), mTestIndex(0) {} + TestSubscribe_OnOff() : TestCommand("TestSubscribe_OnOff"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -57657,6 +58656,9 @@ class TestSubscribe_OnOff : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 8; + chip::Optional mCluster; + chip::Optional mEndpoint; + typedef void (*Test_TestSubscribe_OnOff_OnOff_ReportCallback)(void * context, bool value); Test_TestSubscribe_OnOff_OnOff_ReportCallback mTest_TestSubscribe_OnOff_OnOff_Reported = nullptr; @@ -57723,7 +58725,7 @@ class TestSubscribe_OnOff : public TestCommand CHIP_ERROR TestSetOnOffAttributeToFalse_1() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -57746,7 +58748,7 @@ class TestSubscribe_OnOff : public TestCommand CHIP_ERROR TestReportSubscribeOnOffAttribute_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -57765,7 +58767,7 @@ class TestSubscribe_OnOff : public TestCommand CHIP_ERROR TestSubscribeOnOffAttribute_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -57799,7 +58801,7 @@ class TestSubscribe_OnOff : public TestCommand CHIP_ERROR TestTurnOnTheLightToSeeAttributeChange_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -57822,7 +58824,7 @@ class TestSubscribe_OnOff : public TestCommand CHIP_ERROR TestCheckForAttributeReport_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -57843,7 +58845,7 @@ class TestSubscribe_OnOff : public TestCommand CHIP_ERROR TestTurnOffTheLightToSeeAttributeChange_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -57866,7 +58868,7 @@ class TestSubscribe_OnOff : public TestCommand CHIP_ERROR TestCheckForAttributeReport_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); @@ -58003,6 +59005,7 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), diff --git a/zzz_generated/placeholder/app1/zap-generated/test/Commands.h b/zzz_generated/placeholder/app1/zap-generated/test/Commands.h index 5e024cde0733d8..bab2de8270d0fa 100644 --- a/zzz_generated/placeholder/app1/zap-generated/test/Commands.h +++ b/zzz_generated/placeholder/app1/zap-generated/test/Commands.h @@ -24,7 +24,11 @@ class Test_TC_DM_1_3_Simulated : public TestCommand { public: - Test_TC_DM_1_3_Simulated() : TestCommand("Test_TC_DM_1_3_Simulated"), mTestIndex(0) {} + Test_TC_DM_1_3_Simulated() : TestCommand("Test_TC_DM_1_3_Simulated"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -148,6 +152,9 @@ class Test_TC_DM_1_3_Simulated : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 21; + chip::Optional mCluster; + chip::Optional mEndpoint; + // // Tests methods // @@ -166,7 +173,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQueryInteractionModelVersion_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: InteractionModelVersion] Query Interaction Model Version", endpoint); @@ -179,7 +186,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQueryVendorName_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: VendorName] Query Vendor Name", endpoint); ClearAttributeAndCommandPaths(); @@ -190,7 +197,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQueryVendorID_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: VendorID] Query VendorID", endpoint); ClearAttributeAndCommandPaths(); @@ -201,7 +208,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQueryProductName_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: ProductName] Query Product Name", endpoint); ClearAttributeAndCommandPaths(); @@ -212,7 +219,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQueryProductID_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: ProductID] Query ProductID", endpoint); ClearAttributeAndCommandPaths(); @@ -223,7 +230,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQueryNodeLabel_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: NodeLabel] Query Node Label", endpoint); ClearAttributeAndCommandPaths(); @@ -234,7 +241,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQueryUserLocation_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: Location] Query User Location", endpoint); ClearAttributeAndCommandPaths(); @@ -245,7 +252,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQueryHardwareVersion_9() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: HardwareVersion] Query HardwareVersion", endpoint); ClearAttributeAndCommandPaths(); @@ -256,7 +263,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQueryHardwareVersionString_10() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: HardwareVersionString] Query HardwareVersionString", endpoint); @@ -268,7 +275,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQuerySoftwareVersion_11() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: SoftwareVersion] Query SoftwareVersion", endpoint); ClearAttributeAndCommandPaths(); @@ -279,7 +286,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQuerySoftwareVersionString_12() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: SoftwareVersionString] Query SoftwareVersionString", endpoint); @@ -291,7 +298,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQueryManufacturingDate_13() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: ManufacturingDate] Query ManufacturingDate", endpoint); ClearAttributeAndCommandPaths(); @@ -302,7 +309,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQueryPartNumber_14() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: PartNumber] Query PartNumber", endpoint); ClearAttributeAndCommandPaths(); @@ -313,7 +320,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQueryProductURL_15() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: ProductURL] Query ProductURL", endpoint); ClearAttributeAndCommandPaths(); @@ -324,7 +331,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQueryProductLabel_16() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: ProductLabel] Query ProductLabel", endpoint); ClearAttributeAndCommandPaths(); @@ -335,7 +342,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQuerySerialNumber_17() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: SerialNumber] Query SerialNumber", endpoint); ClearAttributeAndCommandPaths(); @@ -346,7 +353,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQueryLocalConfigDisabled_18() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: LocalConfigDisabled] Query LocalConfigDisabled", endpoint); @@ -358,7 +365,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQueryReachable_19() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: Reachable] Query Reachable", endpoint); ClearAttributeAndCommandPaths(); @@ -369,7 +376,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQueryUniqueID_20() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: UniqueID] Query UniqueID", endpoint); ClearAttributeAndCommandPaths(); diff --git a/zzz_generated/placeholder/app2/zap-generated/test/Commands.h b/zzz_generated/placeholder/app2/zap-generated/test/Commands.h index 5e024cde0733d8..bab2de8270d0fa 100644 --- a/zzz_generated/placeholder/app2/zap-generated/test/Commands.h +++ b/zzz_generated/placeholder/app2/zap-generated/test/Commands.h @@ -24,7 +24,11 @@ class Test_TC_DM_1_3_Simulated : public TestCommand { public: - Test_TC_DM_1_3_Simulated() : TestCommand("Test_TC_DM_1_3_Simulated"), mTestIndex(0) {} + Test_TC_DM_1_3_Simulated() : TestCommand("Test_TC_DM_1_3_Simulated"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } /////////// TestCommand Interface ///////// void NextTest() override @@ -148,6 +152,9 @@ class Test_TC_DM_1_3_Simulated : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 21; + chip::Optional mCluster; + chip::Optional mEndpoint; + // // Tests methods // @@ -166,7 +173,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQueryInteractionModelVersion_2() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: InteractionModelVersion] Query Interaction Model Version", endpoint); @@ -179,7 +186,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQueryVendorName_3() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: VendorName] Query Vendor Name", endpoint); ClearAttributeAndCommandPaths(); @@ -190,7 +197,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQueryVendorID_4() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: VendorID] Query VendorID", endpoint); ClearAttributeAndCommandPaths(); @@ -201,7 +208,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQueryProductName_5() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: ProductName] Query Product Name", endpoint); ClearAttributeAndCommandPaths(); @@ -212,7 +219,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQueryProductID_6() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: ProductID] Query ProductID", endpoint); ClearAttributeAndCommandPaths(); @@ -223,7 +230,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQueryNodeLabel_7() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: NodeLabel] Query Node Label", endpoint); ClearAttributeAndCommandPaths(); @@ -234,7 +241,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQueryUserLocation_8() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: Location] Query User Location", endpoint); ClearAttributeAndCommandPaths(); @@ -245,7 +252,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQueryHardwareVersion_9() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: HardwareVersion] Query HardwareVersion", endpoint); ClearAttributeAndCommandPaths(); @@ -256,7 +263,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQueryHardwareVersionString_10() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: HardwareVersionString] Query HardwareVersionString", endpoint); @@ -268,7 +275,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQuerySoftwareVersion_11() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: SoftwareVersion] Query SoftwareVersion", endpoint); ClearAttributeAndCommandPaths(); @@ -279,7 +286,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQuerySoftwareVersionString_12() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: SoftwareVersionString] Query SoftwareVersionString", endpoint); @@ -291,7 +298,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQueryManufacturingDate_13() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: ManufacturingDate] Query ManufacturingDate", endpoint); ClearAttributeAndCommandPaths(); @@ -302,7 +309,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQueryPartNumber_14() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: PartNumber] Query PartNumber", endpoint); ClearAttributeAndCommandPaths(); @@ -313,7 +320,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQueryProductURL_15() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: ProductURL] Query ProductURL", endpoint); ClearAttributeAndCommandPaths(); @@ -324,7 +331,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQueryProductLabel_16() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: ProductLabel] Query ProductLabel", endpoint); ClearAttributeAndCommandPaths(); @@ -335,7 +342,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQuerySerialNumber_17() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: SerialNumber] Query SerialNumber", endpoint); ClearAttributeAndCommandPaths(); @@ -346,7 +353,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQueryLocalConfigDisabled_18() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: LocalConfigDisabled] Query LocalConfigDisabled", endpoint); @@ -358,7 +365,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQueryReachable_19() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: Reachable] Query Reachable", endpoint); ClearAttributeAndCommandPaths(); @@ -369,7 +376,7 @@ class Test_TC_DM_1_3_Simulated : public TestCommand CHIP_ERROR TestQueryUniqueID_20() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; ChipLogError(chipTool, "[Endpoint: 0x%08x Cluster: Basic Attribute: UniqueID] Query UniqueID", endpoint); ClearAttributeAndCommandPaths(); From d6db458c4cf854f6582b3ab0eec8240bd16d3635 Mon Sep 17 00:00:00 2001 From: Marc Lepage <67919234+mlepage-google@users.noreply.github.com> Date: Fri, 7 Jan 2022 18:02:55 -0500 Subject: [PATCH 03/64] Add cats to subject descriptor (#13384) Meow. --- src/transport/SecureSession.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transport/SecureSession.cpp b/src/transport/SecureSession.cpp index d9e27361cbc6ce..3a9be04d8912e6 100644 --- a/src/transport/SecureSession.cpp +++ b/src/transport/SecureSession.cpp @@ -27,8 +27,8 @@ Access::SubjectDescriptor SecureSession::GetSubjectDescriptor() const { subjectDescriptor.authMode = Access::AuthMode::kCase; subjectDescriptor.subject = mPeerNodeId; + subjectDescriptor.cats = mPeerCATs; subjectDescriptor.fabricIndex = mFabric; - // TODO(#10243): add CATs } else if (IsPAKEKeyId(mPeerNodeId)) { From b53521c4ee34cc9d53d7524d446ccd9be0af3fa0 Mon Sep 17 00:00:00 2001 From: Michael Sandstedt Date: Fri, 7 Jan 2022 17:49:40 -0600 Subject: [PATCH 04/64] Cleanup CASESession and PASESession lifetime (#13357) The fix in #12794 means that the CASESession and PASESession objects do not need to persist for ExchangeMessageDispatch::SendMessage to succeed at the final ACK of session establishment. Instead, SendMessage uses the SessionEstablishmentExchangeDispatch global singleton. This means we can address 13146 such that CASESession and PASESession may actually be freed or reused when completion callbacks fire. This will only work, however, if these objects clear themselves as delegates for their exchange contexts when discarding references to these. This commit does so. This commit also reorders all calls to mDelegate->OnSessionEstablished and mDelegate->OnSessionEstablishmentError to occur last in any given method in case mDelegate frees or reuses the CASESession or PASESession objects on execution of these completion callbacks. With this, we can remove the code in the OperationalDeviceProxy that defers release of the CASESession object until after an iteration of the event loop. Now when OnSessionEstablished fires, the CASESession can be reused or discarded immediately. --- src/app/OperationalDeviceProxy.cpp | 19 +++----- src/app/OperationalDeviceProxy.h | 2 +- src/protocols/secure_channel/CASESession.cpp | 49 ++++++++++++++------ src/protocols/secure_channel/CASESession.h | 6 +++ src/protocols/secure_channel/PASESession.cpp | 37 +++++++++++---- src/protocols/secure_channel/PASESession.h | 6 +++ 6 files changed, 82 insertions(+), 37 deletions(-) diff --git a/src/app/OperationalDeviceProxy.cpp b/src/app/OperationalDeviceProxy.cpp index 0164e5c08247d6..5d3aca2620cf91 100644 --- a/src/app/OperationalDeviceProxy.cpp +++ b/src/app/OperationalDeviceProxy.cpp @@ -217,7 +217,7 @@ void OperationalDeviceProxy::HandleCASEConnectionFailure(void * context, CASECli device->DequeueConnectionSuccessCallbacks(/* executeCallback */ false); device->DequeueConnectionFailureCallbacks(error, /* executeCallback */ true); - device->DeferCloseCASESession(); + device->CloseCASESession(); } void OperationalDeviceProxy::HandleCASEConnected(void * context, CASEClient * client) @@ -238,7 +238,7 @@ void OperationalDeviceProxy::HandleCASEConnected(void * context, CASEClient * cl device->DequeueConnectionFailureCallbacks(CHIP_NO_ERROR, /* executeCallback */ false); device->DequeueConnectionSuccessCallbacks(/* executeCallback */ true); - device->DeferCloseCASESession(); + device->CloseCASESession(); } } @@ -276,22 +276,15 @@ void OperationalDeviceProxy::Clear() mInitParams = DeviceProxyInitParams(); } -void OperationalDeviceProxy::CloseCASESessionTask(System::Layer * layer, void * context) +void OperationalDeviceProxy::CloseCASESession() { - OperationalDeviceProxy * device = static_cast(context); - if (device->mCASEClient) + if (mCASEClient) { - device->mInitParams.clientPool->Release(device->mCASEClient); - device->mCASEClient = nullptr; + mInitParams.clientPool->Release(mCASEClient); + mCASEClient = nullptr; } } -void OperationalDeviceProxy::DeferCloseCASESession() -{ - // Defer the release for the pending Ack to be sent - mSystemLayer->ScheduleWork(CloseCASESessionTask, this); -} - void OperationalDeviceProxy::OnSessionReleased() { mState = State::Initialized; diff --git a/src/app/OperationalDeviceProxy.h b/src/app/OperationalDeviceProxy.h index 91dd127706ebce..292c58c07728ea 100644 --- a/src/app/OperationalDeviceProxy.h +++ b/src/app/OperationalDeviceProxy.h @@ -235,7 +235,7 @@ class DLL_EXPORT OperationalDeviceProxy : public DeviceProxy, SessionReleaseDele static void CloseCASESessionTask(System::Layer * layer, void * context); - void DeferCloseCASESession(); + void CloseCASESession(); void EnqueueConnectionCallbacks(Callback::Callback * onConnection, Callback::Callback * onFailure); diff --git a/src/protocols/secure_channel/CASESession.cpp b/src/protocols/secure_channel/CASESession.cpp index ff9b25b9ca2750..a069263f371b50 100644 --- a/src/protocols/secure_channel/CASESession.cpp +++ b/src/protocols/secure_channel/CASESession.cpp @@ -122,6 +122,19 @@ void CASESession::CloseExchange() } } +void CASESession::DiscardExchange() +{ + if (mExchangeCtxt != nullptr) + { + // Make sure the exchange doesn't try to notify us when it closes, + // since we might be dead by then. + mExchangeCtxt->SetDelegate(nullptr); + // Null out mExchangeCtxt so that Clear() doesn't try closing it. The + // exchange will handle that. + mExchangeCtxt = nullptr; + } +} + CHIP_ERROR CASESession::ToCachable(CASESessionCachable & cachableSession) { const NodeId peerNodeId = GetPeerNodeId(); @@ -252,11 +265,12 @@ void CASESession::OnResponseTimeout(ExchangeContext * ec) VerifyOrReturn(mExchangeCtxt == ec, ChipLogError(SecureChannel, "CASESession::OnResponseTimeout exchange doesn't match")); ChipLogError(SecureChannel, "CASESession timed out while waiting for a response from the peer. Current state was %" PRIu8, mState); - mDelegate->OnSessionEstablishmentError(CHIP_ERROR_TIMEOUT); - // Null out mExchangeCtxt so that Clear() doesn't try closing it. The + // Discard the exchange so that Clear() doesn't try closing it. The // exchange will handle that. - mExchangeCtxt = nullptr; + DiscardExchange(); Clear(); + // Do this last in case the delegate frees us. + mDelegate->OnSessionEstablishmentError(CHIP_ERROR_TIMEOUT); } CHIP_ERROR CASESession::DeriveSecureSession(CryptoContext & session, CryptoContext::SessionRole role) @@ -683,10 +697,12 @@ CHIP_ERROR CASESession::HandleSigma2Resume(System::PacketBufferHandle && msg) mCASESessionEstablished = true; - // Forget our exchange, as no additional messages are expected from the peer - mExchangeCtxt = nullptr; + // Discard the exchange so that Clear() doesn't try closing it. The + // exchange will handle that. + DiscardExchange(); // Call delegate to indicate session establishment is successful + // Do this last in case the delegate frees us. mDelegate->OnSessionEstablished(); exit: @@ -1117,10 +1133,12 @@ CHIP_ERROR CASESession::HandleSigma3(System::PacketBufferHandle && msg) mCASESessionEstablished = true; - // Forget our exchange, as no additional messages are expected from the peer - mExchangeCtxt = nullptr; + // Discard the exchange so that Clear() doesn't try closing it. The + // exchange will handle that. + DiscardExchange(); // Call delegate to indicate session establishment is successful + // Do this last in case the delegate frees us. mDelegate->OnSessionEstablished(); exit: @@ -1301,16 +1319,18 @@ void CASESession::OnSuccessStatusReport() ChipLogProgress(SecureChannel, "Success status report received. Session was established"); mCASESessionEstablished = true; - // Forget our exchange, as no additional messages are expected from the peer - mExchangeCtxt = nullptr; - - // Call delegate to indicate pairing completion - mDelegate->OnSessionEstablished(); + // Discard the exchange so that Clear() doesn't try closing it. The + // exchange will handle that. + DiscardExchange(); mState = kInitialized; // TODO: Set timestamp on the new session, to allow selecting a least-recently-used session for eviction // on running out of session contexts. + + // Call delegate to indicate pairing completion. + // Do this last in case the delegate frees us. + mDelegate->OnSessionEstablished(); } CHIP_ERROR CASESession::OnFailureStatusReport(Protocols::SecureChannel::GeneralStatusCode generalCode, uint16_t protocolCode) @@ -1522,10 +1542,11 @@ CHIP_ERROR CASESession::OnMessageReceived(ExchangeContext * ec, const PayloadHea // Call delegate to indicate session establishment failure. if (err != CHIP_NO_ERROR) { - // Null out mExchangeCtxt so that Clear() doesn't try closing it. The + // Discard the exchange so that Clear() doesn't try closing it. The // exchange will handle that. - mExchangeCtxt = nullptr; + DiscardExchange(); Clear(); + // Do this last in case the delegate frees us. mDelegate->OnSessionEstablishmentError(err); } return err; diff --git a/src/protocols/secure_channel/CASESession.h b/src/protocols/secure_channel/CASESession.h index b266158c011f4d..a780c298a6dd9a 100644 --- a/src/protocols/secure_channel/CASESession.h +++ b/src/protocols/secure_channel/CASESession.h @@ -220,6 +220,12 @@ class DLL_EXPORT CASESession : public Messaging::ExchangeDelegate, public Pairin void CloseExchange(); + /** + * Clear our reference to our exchange context pointer so that it can close + * itself at some later time. + */ + void DiscardExchange(); + // TODO: Remove this and replace with system method to retrieve current time CHIP_ERROR SetEffectiveTime(void); diff --git a/src/protocols/secure_channel/PASESession.cpp b/src/protocols/secure_channel/PASESession.cpp index 4056ee1a44da31..3f1d29cadc146e 100644 --- a/src/protocols/secure_channel/PASESession.cpp +++ b/src/protocols/secure_channel/PASESession.cpp @@ -116,6 +116,19 @@ void PASESession::CloseExchange() } } +void PASESession::DiscardExchange() +{ + if (mExchangeCtxt != nullptr) + { + // Make sure the exchange doesn't try to notify us when it closes, + // since we might be dead by then. + mExchangeCtxt->SetDelegate(nullptr); + // Null out mExchangeCtxt so that Clear() doesn't try closing it. The + // exchange will handle that. + mExchangeCtxt = nullptr; + } +} + CHIP_ERROR PASESession::Serialize(PASESessionSerialized & output) { PASESessionSerializable serializable; @@ -349,11 +362,12 @@ void PASESession::OnResponseTimeout(ExchangeContext * ec) ChipLogError(SecureChannel, "PASESession timed out while waiting for a response from the peer. Expected message type was %" PRIu8, to_underlying(mNextExpectedMsg)); - mDelegate->OnSessionEstablishmentError(CHIP_ERROR_TIMEOUT); - // Null out mExchangeCtxt so that Clear() doesn't try closing it. The + // Discard the exchange so that Clear() doesn't try closing it. The // exchange will handle that. - mExchangeCtxt = nullptr; + DiscardExchange(); Clear(); + // Do this last in case the delegate frees us. + mDelegate->OnSessionEstablishmentError(CHIP_ERROR_TIMEOUT); } CHIP_ERROR PASESession::DeriveSecureSession(CryptoContext & session, CryptoContext::SessionRole role) @@ -829,10 +843,12 @@ CHIP_ERROR PASESession::HandleMsg3(System::PacketBufferHandle && msg) mPairingComplete = true; - // Forget our exchange, as no additional messages are expected from the peer - mExchangeCtxt = nullptr; + // Discard the exchange so that Clear() doesn't try closing it. The + // exchange will handle that. + DiscardExchange(); // Call delegate to indicate pairing completion + // Do this last in case the delegate frees us. mDelegate->OnSessionEstablished(); exit: @@ -848,10 +864,12 @@ void PASESession::OnSuccessStatusReport() { mPairingComplete = true; - // Forget our exchange, as no additional messages are expected from the peer - mExchangeCtxt = nullptr; + // Discard the exchange so that Clear() doesn't try closing it. The + // exchange will handle that. + DiscardExchange(); // Call delegate to indicate pairing completion + // Do this last in case the delegate frees us. mDelegate->OnSessionEstablished(); } @@ -942,11 +960,12 @@ CHIP_ERROR PASESession::OnMessageReceived(ExchangeContext * exchange, const Payl // Call delegate to indicate pairing failure if (err != CHIP_NO_ERROR) { - // Null out mExchangeCtxt so that Clear() doesn't try closing it. The + // Discard the exchange so that Clear() doesn't try closing it. The // exchange will handle that. - mExchangeCtxt = nullptr; + DiscardExchange(); Clear(); ChipLogError(SecureChannel, "Failed during PASE session setup. %s", ErrorStr(err)); + // Do this last in case the delegate frees us. mDelegate->OnSessionEstablishmentError(err); } return err; diff --git a/src/protocols/secure_channel/PASESession.h b/src/protocols/secure_channel/PASESession.h index 4bb43440b0cc37..f3ff1ae62f0df0 100644 --- a/src/protocols/secure_channel/PASESession.h +++ b/src/protocols/secure_channel/PASESession.h @@ -263,6 +263,12 @@ class DLL_EXPORT PASESession : public Messaging::ExchangeDelegate, public Pairin void CloseExchange(); + /** + * Clear our reference to our exchange context pointer so that it can close + * itself at some later time. + */ + void DiscardExchange(); + SessionEstablishmentDelegate * mDelegate = nullptr; Protocols::SecureChannel::MsgType mNextExpectedMsg = Protocols::SecureChannel::MsgType::PASE_PakeError; From 8c653eb791d169cd70e85b36164e3e461a5ba6e5 Mon Sep 17 00:00:00 2001 From: Martin Turon Date: Fri, 7 Jan 2022 20:10:35 -0800 Subject: [PATCH 05/64] [shell] Improve session pretty print to properly handle all types. (#13386) --- examples/shell/shell_common/cmd_server.cpp | 35 ++++++++++++++++++++-- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/examples/shell/shell_common/cmd_server.cpp b/examples/shell/shell_common/cmd_server.cpp index 13698bb17792e6..45a5b2460ada05 100644 --- a/examples/shell/shell_common/cmd_server.cpp +++ b/examples/shell/shell_common/cmd_server.cpp @@ -29,10 +29,13 @@ #include #include +#include + using namespace chip; using namespace chip::Shell; using namespace chip::Credentials; using namespace chip::ArgParser; +using namespace chip::Transport; // Anonymous namespace for file-scoped, static variables. namespace { @@ -106,9 +109,35 @@ static CHIP_ERROR CmdAppServerUdcPort(int argc, char ** argv) static bool PrintServerSession(void * context, SessionHandle & session) { - streamer_printf(streamer_get(), "session id=0x%04x peerSessionId=0x%04x peerNodeId=0x%016" PRIx64 " fabricIdx=%d\r\n", - session->AsSecureSession()->GetLocalSessionId(), session->AsSecureSession()->GetPeerSessionId(), - session->AsSecureSession()->GetPeerNodeId(), session->AsSecureSession()->GetFabricIndex()); + switch (session->GetSessionType()) + { + case Session::SessionType::kSecure: { + SecureSession * secureSession = session->AsSecureSession(); + SecureSession::Type secureSessionType = secureSession->GetSecureSessionType(); + streamer_printf( + streamer_get(), "session type=SECURE %s id=0x%04x peerSessionId=0x%04x peerNodeId=0x%016" PRIx64 " fabricIdx=%d\r\n", + secureSessionType == SecureSession::Type::kCASE ? "CASE" : "PASE", secureSession->GetLocalSessionId(), + secureSession->AsSecureSession()->GetPeerSessionId(), secureSession->GetPeerNodeId(), secureSession->GetFabricIndex()); + break; + } + + case Session::SessionType::kUnauthenticated: { + UnauthenticatedSession * unsecuredSession = session->AsUnauthenticatedSession(); + streamer_printf(streamer_get(), "session type=UNSECURED id=0x0000 peerNodeId=0x%016\r\n", + unsecuredSession->GetPeerNodeId()); + break; + } + + case Session::SessionType::kGroup: { + GroupSession * groupSession = session->AsGroupSession(); + streamer_printf(streamer_get(), "session type=GROUP id=0x%04x fabricIdx=%d\r\n", groupSession->GetGroupId(), + groupSession->GetFabricIndex()); + break; + } + + default: + streamer_printf(streamer_get(), "session type=UNDEFINED\r\n"); + } return true; } From 010465624ea28a02201a00c698190b8a75465c66 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Sat, 8 Jan 2022 13:37:34 +0800 Subject: [PATCH 06/64] [esp32] Add lighting example (#13174) * [esp32] Add lighting example * [esp32] Enable light example compilation in CI --- .github/workflows/examples-esp32.yaml | 5 +- .../esp32/main/Kconfig.projbuild | 2 +- examples/lighting-app/esp32/.gitignore | 3 + examples/lighting-app/esp32/CMakeLists.txt | 35 +++ examples/lighting-app/esp32/README.md | 124 +++++++++++ .../esp32/main/CHIPDeviceManager.cpp | 106 +++++++++ .../lighting-app/esp32/main/CMakeLists.txt | 59 +++++ .../esp32/main/DeviceCallbacks.cpp | 203 ++++++++++++++++++ .../lighting-app/esp32/main/Kconfig.projbuild | 109 ++++++++++ .../lighting-app/esp32/main/LEDWidget.cpp | 113 ++++++++++ .../esp32/main/include/CHIPDeviceManager.h | 122 +++++++++++ .../esp32/main/include/DeviceCallbacks.h | 48 +++++ .../esp32/main/include/LEDWidget.h | 56 +++++ examples/lighting-app/esp32/main/main.cpp | 86 ++++++++ examples/lighting-app/esp32/partitions.csv | 6 + .../lighting-app/esp32/sdkconfig.defaults | 41 ++++ .../esp32/third_party/connectedhomeip | 1 + scripts/build/build/targets.py | 1 + scripts/build/builders/esp32.py | 5 + .../testdata/all_targets_except_host.txt | 1 + .../build/testdata/build_all_except_host.txt | 18 ++ .../glob_star_targets_except_host.txt | 1 + 22 files changed, 1143 insertions(+), 2 deletions(-) create mode 100644 examples/lighting-app/esp32/.gitignore create mode 100644 examples/lighting-app/esp32/CMakeLists.txt create mode 100644 examples/lighting-app/esp32/README.md create mode 100644 examples/lighting-app/esp32/main/CHIPDeviceManager.cpp create mode 100644 examples/lighting-app/esp32/main/CMakeLists.txt create mode 100644 examples/lighting-app/esp32/main/DeviceCallbacks.cpp create mode 100644 examples/lighting-app/esp32/main/Kconfig.projbuild create mode 100644 examples/lighting-app/esp32/main/LEDWidget.cpp create mode 100644 examples/lighting-app/esp32/main/include/CHIPDeviceManager.h create mode 100644 examples/lighting-app/esp32/main/include/DeviceCallbacks.h create mode 100644 examples/lighting-app/esp32/main/include/LEDWidget.h create mode 100644 examples/lighting-app/esp32/main/main.cpp create mode 100644 examples/lighting-app/esp32/partitions.csv create mode 100644 examples/lighting-app/esp32/sdkconfig.defaults create mode 120000 examples/lighting-app/esp32/third_party/connectedhomeip diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index 54298cf4320eb5..decbb6af143bb3 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -26,7 +26,7 @@ jobs: # TODO ESP32 https://github.com/project-chip/connectedhomeip/issues/1510 esp32: name: ESP32 - timeout-minutes: 95 + timeout-minutes: 105 runs-on: ubuntu-latest if: github.actor != 'restyled-io[bot]' @@ -90,6 +90,9 @@ jobs: - name: Build example Pigweed App timeout-minutes: 10 run: scripts/examples/esp_example.sh pigweed-app sdkconfig.defaults + - name: Build example Lighting App + timeout-minutes: 10 + run: scripts/examples/esp_example.sh lighting-app sdkconfig.defaults - name: Build example Lock App timeout-minutes: 10 run: scripts/examples/esp_example.sh lock-app sdkconfig.defaults diff --git a/examples/all-clusters-app/esp32/main/Kconfig.projbuild b/examples/all-clusters-app/esp32/main/Kconfig.projbuild index 0960168aadca4a..307b7f6ccb83bc 100644 --- a/examples/all-clusters-app/esp32/main/Kconfig.projbuild +++ b/examples/all-clusters-app/esp32/main/Kconfig.projbuild @@ -40,7 +40,7 @@ menu "Demo" bool "M5Stack" depends on IDF_TARGET_ESP32 config DEVICE_TYPE_ESP32_C3_DEVKITM - bool "EXP32C3-DevKitM" + bool "ESP32C3-DevKitM" depends on IDF_TARGET_ESP32C3 endchoice diff --git a/examples/lighting-app/esp32/.gitignore b/examples/lighting-app/esp32/.gitignore new file mode 100644 index 00000000000000..a90ab6f1e57d5a --- /dev/null +++ b/examples/lighting-app/esp32/.gitignore @@ -0,0 +1,3 @@ +/build/ +/sdkconfig +/sdkconfig.old diff --git a/examples/lighting-app/esp32/CMakeLists.txt b/examples/lighting-app/esp32/CMakeLists.txt new file mode 100644 index 00000000000000..3c73988719f27e --- /dev/null +++ b/examples/lighting-app/esp32/CMakeLists.txt @@ -0,0 +1,35 @@ +# +# Copyright (c) 2021 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# The following lines of boilerplate have to be in your project's +# CMakeLists in this exact order for cmake to work correctly +cmake_minimum_required(VERSION 3.5) +include($ENV{IDF_PATH}/tools/cmake/project.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/../../common/cmake/idf_flashing.cmake) + +set(EXTRA_COMPONENT_DIRS + "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/config/esp32/components" + "${CMAKE_CURRENT_LIST_DIR}/../../common/QRCode" + "${IDF_PATH}/examples/common_components" +) + +project(chip-lighting-app) + +# C++17 is required for RPC build. +idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND) +idf_build_set_property(C_COMPILE_OPTIONS "-Os;-DLWIP_IPV6_SCOPES=0" APPEND) + +flashing_script() diff --git a/examples/lighting-app/esp32/README.md b/examples/lighting-app/esp32/README.md new file mode 100644 index 00000000000000..99a847938d8d63 --- /dev/null +++ b/examples/lighting-app/esp32/README.md @@ -0,0 +1,124 @@ +# Matter ESP32 Lighting Example + +This example demonstrates the Matter Lighting application on ESP platforms. + +--- + +- [Matter ESP32 Lighting Example](#matter-esp32-lighting-example) + - [Supported Devices](#supported-devices) + - [Building the Example Application](#building-the-example-application) + - [Commissioning over BLE using chip-tool](#commissioning-over-ble-using-chip-tool) + - [Cluster Control](#cluster-control) + +--- + +## Supported Devices + +The demo application is intended to work on following categories of ESP32 +devices: + +- [ESP32-DevKitC](https://www.espressif.com/en/products/hardware/esp32-devkitc/overview) +- [ESP32-WROVER-KIT_V4.1](https://www.espressif.com/en/products/hardware/esp-wrover-kit/overview) +- [ESP32C3-DevKitM](https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/hw-reference/esp32c3/user-guide-devkitm-1.html). +- [ESP32S3-DevKitM](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/user-guide-devkitm-1.html). + +## Building the Example Application + +Building the example application requires the use of the Espressif IoT +Development Framework ([ESP-IDF](https://github.com/espressif/esp-idf)). + +The VSCode devcontainer has these components pre-installed, so you can skip this +step. To install these components manually, follow these steps: + +- Clone the Espressif ESP-IDF and checkout + [v4.4-beta1 pre-release](https://github.com/espressif/esp-idf/releases/tag/v4.4-beta1) + + $ mkdir ${HOME}/tools + $ cd ${HOME}/tools + $ git clone https://github.com/espressif/esp-idf.git + $ cd esp-idf + $ git checkout v4.4-beta1 + $ git submodule update --init + $ ./install.sh + +- Install ninja-build + + $ sudo apt-get install ninja-build + +Currently building in VSCode _and_ deploying from native is not supported, so +make sure the IDF_PATH has been exported(See the manual setup steps above). + +- Setting up the environment + + $ cd ${HOME}/tools/esp-idf + $ ./install.sh + $ . ./export.sh + $ cd {path-to-connectedhomeip} + + To download and install packages. + + $ source ./scripts/bootstrap.sh + $ source ./scripts/activate.sh + + If packages are already installed then simply activate them. + + $ source ./scripts/activate.sh + +- Target Set + + $ idf.py set-target esp32 + or + $ idf.py set-target esp32c3 + or + $ idf.py set-target esp32s3 + +- To build the demo application. + + $ idf.py build + +- After building the application, to flash it outside of VSCode, connect your + device via USB. Then run the following command to flash the demo application + onto the device and then monitor its output. If necessary, replace + `/dev/tty.SLAB_USBtoUART`(MacOS) with the correct USB device name for your + system(like `/dev/ttyUSB0` on Linux). Note that sometimes you might have to + press and hold the `boot` button on the device while it's trying to connect + before flashing. + + $ idf.py -p /dev/tty.SLAB_USBtoUART flash monitor + + Note: Some users might have to install the + [VCP driver](https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers) + before the device shows up on `/dev/tty`. + +- Quit the monitor by hitting `Ctrl+]`. + + Note: You can see a menu of various monitor commands by hitting + `Ctrl+t Ctrl+h` while the monitor is running. + +- If desired, the monitor can be run again like so: + + $ idf.py -p /dev/tty.SLAB_USBtoUART monitor + +## Commissioning over BLE using chip-tool + +- Please build the standalone chip-tool as described [here](../../chip-tool) +- Commissioning the Lighting device + + $ ./out/debug/chip-tool pairing ble-wifi 12345 20202021 3840 + +## Cluster Control + +- After successful commissioning, use the OnOff cluster command to control the + OnOff attribute. This allows you to toggle a parameter implemented by the + device to be On or Off. + + $ ./out/debug/chip-tool onoff on 12345 1 + +- On + [ESP32C3-DevKitM](https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/hw-reference/esp32c3/user-guide-devkitm-1.html) + or + [ESP32S3-DevKitM](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/user-guide-devkitm-1.html) + board, there is an on-board RGB-LED. Use ColorControl cluster command to + control the color attributes: + + $ ./out/debug/chip-tool colorcontrol move-to-hue-and-saturation 240 100 0 0 0 12345 1 diff --git a/examples/lighting-app/esp32/main/CHIPDeviceManager.cpp b/examples/lighting-app/esp32/main/CHIPDeviceManager.cpp new file mode 100644 index 00000000000000..f0dec73f04e17b --- /dev/null +++ b/examples/lighting-app/esp32/main/CHIPDeviceManager.cpp @@ -0,0 +1,106 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * This file implements the CHIP Device Interface that is used by + * applications to interact with the CHIP stack + * + */ + +#include + +#include "CHIPDeviceManager.h" +#include +#include +#include +#include +#include +#include + +using namespace ::chip; + +namespace chip { + +namespace DeviceManager { + +using namespace ::chip::DeviceLayer; + +void CHIPDeviceManager::CommonDeviceEventHandler(const ChipDeviceEvent * event, intptr_t arg) +{ + CHIPDeviceManagerCallbacks * cb = reinterpret_cast(arg); + if (cb != nullptr) + { + cb->DeviceEventCallback(event, reinterpret_cast(cb)); + } +} + +CHIP_ERROR CHIPDeviceManager::Init(CHIPDeviceManagerCallbacks * cb) +{ + CHIP_ERROR err; + mCB = cb; + RendezvousInformationFlags flags = RendezvousInformationFlags(CONFIG_RENDEZVOUS_MODE); + + // Initialize the CHIP stack. + err = PlatformMgr().InitChipStack(); + SuccessOrExit(err); + + if (flags.Has(RendezvousInformationFlag::kBLE)) + { + ConnectivityMgr().SetBLEAdvertisingEnabled(true); + } + else if (flags.Has(RendezvousInformationFlag::kSoftAP)) + { + // TODO(cecille): Fix for the case where BLE and SoftAP are both enabled.` + ConnectivityMgr().SetBLEAdvertisingEnabled(false); + ConnectivityMgr().SetWiFiAPMode(ConnectivityManager::kWiFiAPMode_Enabled); + } + else + { + // If rendezvous is bypassed, enable SoftAP so that the device can still + // be communicated with via its SoftAP as needed. + ConnectivityMgr().SetWiFiAPMode(ConnectivityManager::kWiFiAPMode_Enabled); + } + + err = Platform::MemoryInit(); + SuccessOrExit(err); + + // Register a function to receive events from the CHIP device layer. Note that calls to + // this function will happen on the CHIP event loop thread, not the app_main thread. + PlatformMgr().AddEventHandler(CHIPDeviceManager::CommonDeviceEventHandler, reinterpret_cast(cb)); + + // Start a task to run the CHIP Device event loop. + err = PlatformMgr().StartEventLoopTask(); + SuccessOrExit(err); + +exit: + return err; +} +} // namespace DeviceManager +} // namespace chip + +void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t mask, uint8_t type, + uint16_t size, uint8_t * value) +{ + chip::DeviceManager::CHIPDeviceManagerCallbacks * cb = + chip::DeviceManager::CHIPDeviceManager::GetInstance().GetCHIPDeviceManagerCallbacks(); + if (cb != nullptr) + { + cb->PostAttributeChangeCallback(attributePath.mEndpointId, attributePath.mClusterId, attributePath.mAttributeId, mask, type, + size, value); + } +} diff --git a/examples/lighting-app/esp32/main/CMakeLists.txt b/examples/lighting-app/esp32/main/CMakeLists.txt new file mode 100644 index 00000000000000..f4a667cd42fb53 --- /dev/null +++ b/examples/lighting-app/esp32/main/CMakeLists.txt @@ -0,0 +1,59 @@ +# +# Copyright (c) 2021 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.) + +idf_component_register(PRIV_INCLUDE_DIRS + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/lighting-app" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/lighting-app/lighting-common/color_format" + "${CMAKE_CURRENT_LIST_DIR}/include" + SRC_DIRS + "${CMAKE_CURRENT_LIST_DIR}" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/attributes" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/lighting-app/zap-generated" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/route_hook" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/shell_extension" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/lighting-app/lighting-common/color_format" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/administrator-commissioning-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/basic" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/bindings" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/descriptor" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/diagnostic-logs-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/color-control-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ethernet-network-diagnostics-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/fixed-label-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general-commissioning-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general-diagnostics-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/identify-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/level-control" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/network-commissioning-old" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/occupancy-sensor-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/on-off-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/operational-credentials-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/power-source-configuration-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/software-diagnostics-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/switch-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thread-network-diagnostics-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/user-label-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/wifi-network-diagnostics-server" + PRIV_REQUIRES chip QRCode bt led_strip) + +set_property(TARGET ${COMPONENT_LIB} PROPERTY CXX_STANDARD 17) +target_compile_options(${COMPONENT_LIB} PRIVATE "-DLWIP_IPV6_SCOPES=0" "-DCHIP_HAVE_CONFIG_H") diff --git a/examples/lighting-app/esp32/main/DeviceCallbacks.cpp b/examples/lighting-app/esp32/main/DeviceCallbacks.cpp new file mode 100644 index 00000000000000..f1697ec10da1e6 --- /dev/null +++ b/examples/lighting-app/esp32/main/DeviceCallbacks.cpp @@ -0,0 +1,203 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file DeviceCallbacks.cpp + * + * Implements all the callbacks to the application from the CHIP Stack + * + **/ + +#include "DeviceCallbacks.h" +#include "LEDWidget.h" + +#include "esp_err.h" +#include "esp_heap_caps.h" +#include "esp_log.h" +#include "route_hook/esp_route_hook.h" +#include +#include +#include +#include +#include + +static const char * TAG = "light-app-callbacks"; + +extern LEDWidget AppLED; + +using namespace chip; +using namespace chip::Inet; +using namespace chip::System; +using namespace chip::DeviceLayer; +using namespace chip::app::Clusters; + +void DeviceCallbacks::DeviceEventCallback(const ChipDeviceEvent * event, intptr_t arg) +{ + switch (event->Type) + { + case DeviceEventType::kInternetConnectivityChange: + OnInternetConnectivityChange(event); + break; + + case DeviceEventType::kSessionEstablished: + OnSessionEstablished(event); + break; + + case DeviceEventType::kCHIPoBLEConnectionEstablished: + ESP_LOGI(TAG, "CHIPoBLE connection established"); + break; + + case DeviceEventType::kCHIPoBLEConnectionClosed: + ESP_LOGI(TAG, "CHIPoBLE disconnected"); + break; + + case DeviceEventType::kCommissioningComplete: + ESP_LOGI(TAG, "Commissioning complete"); + break; + + case DeviceEventType::kInterfaceIpAddressChanged: + if ((event->InterfaceIpAddressChanged.Type == InterfaceIpChangeType::kIpV4_Assigned) || + (event->InterfaceIpAddressChanged.Type == InterfaceIpChangeType::kIpV6_Assigned)) + { + // MDNS server restart on any ip assignment: if link local ipv6 is configured, that + // will not trigger a 'internet connectivity change' as there is no internet + // connectivity. MDNS still wants to refresh its listening interfaces to include the + // newly selected address. + chip::app::DnssdServer::Instance().StartServer(); + } + if (event->InterfaceIpAddressChanged.Type == InterfaceIpChangeType::kIpV6_Assigned) + { + ESP_ERROR_CHECK(esp_route_hook_init(esp_netif_get_handle_from_ifkey("WIFI_STA_DEF"))); + } + break; + } + + ESP_LOGI(TAG, "Current free heap: %zu\n", heap_caps_get_free_size(MALLOC_CAP_8BIT)); +} + +void DeviceCallbacks::PostAttributeChangeCallback(EndpointId endpointId, ClusterId clusterId, AttributeId attributeId, uint8_t mask, + uint8_t type, uint16_t size, uint8_t * value) +{ + ESP_LOGI(TAG, "PostAttributeChangeCallback - Cluster ID: '0x%04x', EndPoint ID: '0x%02x', Attribute ID: '0x%04x'", clusterId, + endpointId, attributeId); + + switch (clusterId) + { + case OnOff::Id: + OnOnOffPostAttributeChangeCallback(endpointId, attributeId, value); + break; + + case LevelControl::Id: + OnLevelControlAttributeChangeCallback(endpointId, attributeId, value); + break; + +#if CONFIG_LED_TYPE_RMT + case ColorControl::Id: + OnColorControlAttributeChangeCallback(endpointId, attributeId, value); + break; +#endif + + default: + ESP_LOGI(TAG, "Unhandled cluster ID: %d", clusterId); + break; + } + + ESP_LOGI(TAG, "Current free heap: %zu\n", heap_caps_get_free_size(MALLOC_CAP_8BIT)); +} + +void DeviceCallbacks::OnInternetConnectivityChange(const ChipDeviceEvent * event) +{ + if (event->InternetConnectivityChange.IPv4 == kConnectivity_Established) + { + ESP_LOGI(TAG, "Server ready at: %s:%d", event->InternetConnectivityChange.address, CHIP_PORT); + chip::app::DnssdServer::Instance().StartServer(); + } + else if (event->InternetConnectivityChange.IPv4 == kConnectivity_Lost) + { + ESP_LOGE(TAG, "Lost IPv4 connectivity..."); + } + if (event->InternetConnectivityChange.IPv6 == kConnectivity_Established) + { + ESP_LOGI(TAG, "IPv6 Server ready..."); + chip::app::DnssdServer::Instance().StartServer(); + } + else if (event->InternetConnectivityChange.IPv6 == kConnectivity_Lost) + { + ESP_LOGE(TAG, "Lost IPv6 connectivity..."); + } +} + +void DeviceCallbacks::OnSessionEstablished(const ChipDeviceEvent * event) +{ + if (event->SessionEstablished.IsCommissioner) + { + ESP_LOGI(TAG, "Commissioner detected!"); + } +} + +void DeviceCallbacks::OnOnOffPostAttributeChangeCallback(EndpointId endpointId, AttributeId attributeId, uint8_t * value) +{ + VerifyOrExit(attributeId == OnOff::Attributes::OnOff::Id, ESP_LOGI(TAG, "Unhandled Attribute ID: '0x%04x", attributeId)); + VerifyOrExit(endpointId == 1, ESP_LOGE(TAG, "Unexpected EndPoint ID: `0x%02x'", endpointId)); + + AppLED.Set(*value); + +exit: + return; +} + +void DeviceCallbacks::OnLevelControlAttributeChangeCallback(EndpointId endpointId, AttributeId attributeId, uint8_t * value) +{ + VerifyOrExit(attributeId == LevelControl::Attributes::CurrentLevel::Id, + ESP_LOGI(TAG, "Unhandled Attribute ID: '0x%04x", attributeId)); + VerifyOrExit(endpointId == 1, ESP_LOGE(TAG, "Unexpected EndPoint ID: `0x%02x'", endpointId)); + + AppLED.SetBrightness(*value); + +exit: + return; +} + +// Currently ColorControl cluster is supported for ESP32C3_DEVKITM and ESP32S3_DEVKITM which have an on-board RGB-LED +#if CONFIG_LED_TYPE_RMT +void DeviceCallbacks::OnColorControlAttributeChangeCallback(EndpointId endpointId, AttributeId attributeId, uint8_t * value) +{ + uint8_t hue, saturation; + + VerifyOrExit(attributeId == ColorControl::Attributes::CurrentHue::Id || + attributeId == ColorControl::Attributes::CurrentSaturation::Id, + ESP_LOGI(TAG, "Unhandled AttributeId ID: '0x%04x", attributeId)); + VerifyOrExit(endpointId == 1, ESP_LOGE(TAG, "Unexpected EndPoint ID: `0x%02x'", endpointId)); + + if (attributeId == ColorControl::Attributes::CurrentHue::Id) + { + hue = *value; + emberAfReadServerAttribute(endpointId, ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, &saturation, + sizeof(uint8_t)); + } + else + { + saturation = *value; + emberAfReadServerAttribute(endpointId, ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, &hue, sizeof(uint8_t)); + } + AppLED.SetColor(hue, saturation); + +exit: + return; +} +#endif // CONFIG_LED_TYPE_RMT diff --git a/examples/lighting-app/esp32/main/Kconfig.projbuild b/examples/lighting-app/esp32/main/Kconfig.projbuild new file mode 100644 index 00000000000000..839c53f3997d5c --- /dev/null +++ b/examples/lighting-app/esp32/main/Kconfig.projbuild @@ -0,0 +1,109 @@ +# +# Copyright (c) 2021 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Description: +# Configuration options CHIP ESP32 demo application. +# + +menu "Demo" + + choice + prompt "Device Type" + default DEVICE_TYPE_ESP32_DEVKITC if IDF_TARGET_ESP32 + default DEVICE_TYPE_ESP32_C3_DEVKITM if IDF_TARGET_ESP32C3 + default DEVICE_TYPE_ESP32_S3_DEVKITM if IDF_TARGET_ESP32S3 + help + Specifies the type of ESP32 device. + + Note that the "ESP32-DevKitC" choice is compatible with a number of clone devices + available from third-party manufacturers. + + config DEVICE_TYPE_ESP32_DEVKITC + bool "ESP32-DevKitC" + depends on IDF_TARGET_ESP32 + config DEVICE_TYPE_ESP32_WROVER_KIT + bool "ESP32-WROVER-KIT_V4.1" + depends on IDF_TARGET_ESP32 + config DEVICE_TYPE_ESP32_C3_DEVKITM + bool "ESP32C3-DevKitM" + depends on IDF_TARGET_ESP32C3 + config DEVICE_TYPE_ESP32_S3_DEVKITM + bool "ESP32S3-DevKitM" + depends on IDF_TARGET_ESP32S3 + endchoice + + choice LED_TYPE + prompt "LED type" + default LED_TYPE_RMT if DEVICE_TYPE_ESP32_C3_DEVKITM || DEVICE_TYPE_ESP32_S3_DEVKITM + default LED_TYPE_GPIO + help + Defines the default LED type used in the example + + config LED_TYPE_GPIO + bool "GPIO" + config LED_TYPE_RMT + bool "RMT - Addressable LED" + endchoice + + config LED_RMT_CHANNEL + depends on LED_TYPE_RMT + int "RMT Channel" + range 0 7 + default 0 + help + Set the RMT peripheral channel. + ESP32 RMT channel from 0 to 7 + ESP32-S3 RMT channel from 0 to 3 + ESP32-C3 RMT channel from 0 to 1 + + config LED_GPIO + int "LED GPIO number" + range 0 48 + default 26 if DEVICE_TYPE_ESP32_WROVER_KIT + default 8 if DEVICE_TYPE_ESP32_C3_DEVKITM + default 48 if DEVICE_TYPE_ESP32_S3_DEVKITM + default 5 + help + GPIO number (IOxx) to blink on and off or the RMT signal for the addressable LED. + + choice + prompt "Rendezvous Mode" + default RENDEZVOUS_MODE_BLE + help + Specifies the Rendezvous mode of the peripheral. + + config RENDEZVOUS_MODE_BYPASS + bool "Bypass" + config RENDEZVOUS_MODE_WIFI + bool "Wi-Fi" + config RENDEZVOUS_MODE_BLE + bool "BLE" + config RENDEZVOUS_MODE_THREAD + bool "Thread" + config RENDEZVOUS_MODE_ETHERNET + bool "Ethernet" + endchoice + + config RENDEZVOUS_MODE + int + range 0 8 + default 0 if RENDEZVOUS_MODE_BYPASS + default 1 if RENDEZVOUS_MODE_WIFI + default 2 if RENDEZVOUS_MODE_BLE + default 4 if RENDEZVOUS_MODE_THREAD + default 8 if RENDEZVOUS_MODE_ETHERNET + +endmenu diff --git a/examples/lighting-app/esp32/main/LEDWidget.cpp b/examples/lighting-app/esp32/main/LEDWidget.cpp new file mode 100644 index 00000000000000..57a1fba9c3ed8e --- /dev/null +++ b/examples/lighting-app/esp32/main/LEDWidget.cpp @@ -0,0 +1,113 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "LEDWidget.h" +#include "color_format.h" + +void LEDWidget::Init(void) +{ + mState = false; + mBrightness = UINT8_MAX; + +#if CONFIG_LED_TYPE_RMT + rmt_config_t config = RMT_DEFAULT_CONFIG_TX((gpio_num_t) CONFIG_LED_GPIO, (rmt_channel_t) CONFIG_LED_RMT_CHANNEL); + led_strip_config_t strip_config = LED_STRIP_DEFAULT_CONFIG(1, (led_strip_dev_t) config.channel); + + config.clk_div = 2; + rmt_config(&config); + rmt_driver_install(config.channel, 0, 0); + + mStrip = led_strip_new_rmt_ws2812(&strip_config); + mHue = 0; + mSaturation = 0; +#else + mGPIONum = (gpio_num_t) CONFIG_LED_GPIO; + ledc_timer_config_t ledc_timer = { + .speed_mode = LEDC_LOW_SPEED_MODE, // timer mode + .duty_resolution = LEDC_TIMER_8_BIT, // resolution of PWM duty + .timer_num = LEDC_TIMER_1, // timer index + .freq_hz = 5000, // frequency of PWM signal + .clk_cfg = LEDC_AUTO_CLK, // Auto select the source clock + }; + ledc_timer_config(&ledc_timer); + ledc_channel_config_t ledc_channel = { + .gpio_num = mGPIONum, + .speed_mode = LEDC_LOW_SPEED_MODE, + .channel = LEDC_CHANNEL_0, + .intr_type = LEDC_INTR_DISABLE, + .timer_sel = LEDC_TIMER_1, + .duty = 0, + .hpoint = 0, + }; + ledc_channel_config(&ledc_channel); +#endif // CONFIG_LED_TYPE_RMT +} + +void LEDWidget::Set(bool state) +{ + if (state == mState) + return; + + mState = state; + + DoSet(); +} + +void LEDWidget::SetBrightness(uint8_t brightness) +{ + if (brightness == mBrightness) + return; + + mBrightness = brightness; + + DoSet(); +} + +#if CONFIG_LED_TYPE_RMT +void LEDWidget::SetColor(uint8_t Hue, uint8_t Saturation) +{ + if (Hue == mHue && Saturation == mSaturation) + return; + + mHue = Hue; + mSaturation = Saturation; + + DoSet(); +} +#endif // CONFIG_LED_TYPE_RMT + +void LEDWidget::DoSet(void) +{ + uint8_t brightness = mState ? mBrightness : 0; + +#if CONFIG_LED_TYPE_RMT + if (mStrip) + { + HsvColor_t hsv = { mHue, mSaturation, brightness }; + RgbColor_t rgb = HsvToRgb(hsv); + + mStrip->set_pixel(mStrip, 0, rgb.r, rgb.g, rgb.b); + mStrip->refresh(mStrip, 100); + } +#else + if (mGPIONum < GPIO_NUM_MAX) + { + ledc_set_duty(LEDC_LOW_SPEED_MODE, LEDC_CHANNEL_0, brightness); + ledc_update_duty(LEDC_LOW_SPEED_MODE, LEDC_CHANNEL_0); + } +#endif // CONFIG_LED_TYPE_RMT +} diff --git a/examples/lighting-app/esp32/main/include/CHIPDeviceManager.h b/examples/lighting-app/esp32/main/include/CHIPDeviceManager.h new file mode 100644 index 00000000000000..e3f71df1c84c63 --- /dev/null +++ b/examples/lighting-app/esp32/main/include/CHIPDeviceManager.h @@ -0,0 +1,122 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * This file contains definitions for the CHIP DeviceManager Interface + * + * This object will co-ordinate multiple activities such as + * initialisation, rendezvous, session mgmt and other such + * activities within the CHIP stack. This is a singleton object. + */ + +#pragma once + +#include +#include +#include + +#include + +#include +#include + +#include + +namespace chip { +namespace DeviceManager { + +/** + * @brief + * This class provides a skeleton for all the callback functions. The functions will be + * called by other objects within the CHIP stack for specific events. + * Applications interested in receiving specific callbacks can specialize this class and handle + * these events in their implementation of this class. + */ +class DLL_EXPORT CHIPDeviceManagerCallbacks +{ +public: + /** + * @brief + * Called when CHIP Device events (PublicEventTypes) are triggered. + * + * @param event ChipDeviceEvent that occurred + * @param arg arguments specific to the event, if any + */ + virtual void DeviceEventCallback(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg); + /** + * @brief + * Called after an attribute has been changed + * + * @param endpoint endpoint id + * @param clusterID cluster id + * @param attributeId attribute id that was changed + * @param mask mask of the attribute + * @param manufacturerCode manufacturer code + * @param type attribute type + * @param size size of the attribute + * @param value pointer to the new value + */ + virtual void PostAttributeChangeCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId, + uint8_t mask, uint8_t type, uint16_t size, uint8_t * value) + {} + virtual ~CHIPDeviceManagerCallbacks() {} +}; + +/** + * @brief + * A common class that drives other components of the CHIP stack + */ +class DLL_EXPORT CHIPDeviceManager +{ +public: + CHIPDeviceManager(const CHIPDeviceManager &) = delete; + CHIPDeviceManager(const CHIPDeviceManager &&) = delete; + CHIPDeviceManager & operator=(const CHIPDeviceManager &) = delete; + + static CHIPDeviceManager & GetInstance() + { + static CHIPDeviceManager instance; + return instance; + } + + /** + * @brief + * Initialise CHIPDeviceManager + * + * @param cb Application's instance of the CHIPDeviceManagerCallbacks for consuming events + */ + CHIP_ERROR Init(CHIPDeviceManagerCallbacks * cb); + /** + * @brief + * Fetch a pointer to the registered CHIPDeviceManagerCallbacks object. + * + */ + CHIPDeviceManagerCallbacks * GetCHIPDeviceManagerCallbacks() { return mCB; } + + /** + * Use internally for registration of the ChipDeviceEvents + */ + static void CommonDeviceEventHandler(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg); + +private: + CHIPDeviceManagerCallbacks * mCB = nullptr; + CHIPDeviceManager() {} +}; + +} // namespace DeviceManager +} // namespace chip diff --git a/examples/lighting-app/esp32/main/include/DeviceCallbacks.h b/examples/lighting-app/esp32/main/include/DeviceCallbacks.h new file mode 100644 index 00000000000000..31ca1dfa738cd5 --- /dev/null +++ b/examples/lighting-app/esp32/main/include/DeviceCallbacks.h @@ -0,0 +1,48 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file DeviceCallbacks.h + * + * Implementations for the DeviceManager callbacks for this application + * + **/ + +#pragma once + +#include "CHIPDeviceManager.h" +#include +#include + +class DeviceCallbacks : public chip::DeviceManager::CHIPDeviceManagerCallbacks +{ +public: + virtual void DeviceEventCallback(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg); + virtual void PostAttributeChangeCallback(chip::EndpointId endpointId, chip::ClusterId clusterId, chip::AttributeId attributeId, + uint8_t mask, uint8_t type, uint16_t size, uint8_t * value); + +private: + void OnInternetConnectivityChange(const chip::DeviceLayer::ChipDeviceEvent * event); + void OnSessionEstablished(const chip::DeviceLayer::ChipDeviceEvent * event); + void OnIdentifyPostAttributeChangeCallback(chip::EndpointId endpointId, chip::AttributeId attributeId, uint8_t * value); + void OnOnOffPostAttributeChangeCallback(chip::EndpointId endpointId, chip::AttributeId attributeId, uint8_t * value); + void OnLevelControlAttributeChangeCallback(chip::EndpointId endpointId, chip::AttributeId attributeId, uint8_t * value); +#if CONFIG_LED_TYPE_RMT + void OnColorControlAttributeChangeCallback(chip::EndpointId endpointId, chip::AttributeId attributeId, uint8_t * value); +#endif +}; diff --git a/examples/lighting-app/esp32/main/include/LEDWidget.h b/examples/lighting-app/esp32/main/include/LEDWidget.h new file mode 100644 index 00000000000000..c60ee9271c207c --- /dev/null +++ b/examples/lighting-app/esp32/main/include/LEDWidget.h @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "driver/gpio.h" + +#if CONFIG_LED_TYPE_RMT +#include "driver/rmt.h" +#include "led_strip.h" +#else +#include "driver/ledc.h" +#include "hal/ledc_types.h" +#endif + +class LEDWidget +{ +public: + void Init(void); + + void Set(bool state); + + void SetBrightness(uint8_t brightness); + +#if CONFIG_LED_TYPE_RMT + void SetColor(uint8_t Hue, uint8_t Saturation); +#endif + +private: + bool mState; + uint8_t mBrightness; + +#if CONFIG_LED_TYPE_RMT + uint8_t mHue; + uint8_t mSaturation; + led_strip_t * mStrip; +#else + gpio_num_t mGPIONum; +#endif + + void DoSet(void); +}; diff --git a/examples/lighting-app/esp32/main/main.cpp b/examples/lighting-app/esp32/main/main.cpp new file mode 100644 index 00000000000000..5a703183850757 --- /dev/null +++ b/examples/lighting-app/esp32/main/main.cpp @@ -0,0 +1,86 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "CHIPDeviceManager.h" +#include "DeviceCallbacks.h" +#include "LEDWidget.h" + +#include "esp_log.h" +#include "esp_spi_flash.h" +#include "esp_system.h" +#include "freertos/FreeRTOS.h" +#include "freertos/task.h" +#include "nvs_flash.h" +#include "shell_extension/launch.h" +#include +#include +#include +#include + +using namespace ::chip; +using namespace ::chip::Credentials; +using namespace ::chip::DeviceManager; +using namespace ::chip::DeviceLayer; + +LEDWidget AppLED; + +static const char * TAG = "light-app"; + +static DeviceCallbacks EchoCallbacks; + +static void InitServer(intptr_t context) +{ + // Print QR Code URL + PrintOnboardingCodes(chip::RendezvousInformationFlags(CONFIG_RENDEZVOUS_MODE)); + + chip::Server::GetInstance().Init(); + + // Initialize device attestation config + SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); +} + +extern "C" void app_main() +{ + // Initialize the ESP NVS layer. + esp_err_t err = nvs_flash_init(); + if (err != ESP_OK) + { + ESP_LOGE(TAG, "nvs_flash_init() failed: %s", esp_err_to_name(err)); + return; + } + + ESP_LOGI(TAG, "=================================================="); + ESP_LOGI(TAG, "chip-esp32-light-example starting"); + ESP_LOGI(TAG, "=================================================="); + +#if CONFIG_ENABLE_CHIP_SHELL + chip::LaunchShell(); +#endif + + CHIPDeviceManager & deviceMgr = CHIPDeviceManager::GetInstance(); + + CHIP_ERROR error = deviceMgr.Init(&EchoCallbacks); + if (error != CHIP_NO_ERROR) + { + ESP_LOGE(TAG, "device.Init() failed: %s", ErrorStr(error)); + return; + } + + AppLED.Init(); + + chip::DeviceLayer::PlatformMgr().ScheduleWork(InitServer, reinterpret_cast(nullptr)); +} diff --git a/examples/lighting-app/esp32/partitions.csv b/examples/lighting-app/esp32/partitions.csv new file mode 100644 index 00000000000000..b338ff11a11589 --- /dev/null +++ b/examples/lighting-app/esp32/partitions.csv @@ -0,0 +1,6 @@ +# Name, Type, SubType, Offset, Size, Flags +# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap +nvs, data, nvs, , 0x6000, +phy_init, data, phy, , 0x1000, +# Factory partition size about 1.9MB +factory, app, factory, , 1945K, diff --git a/examples/lighting-app/esp32/sdkconfig.defaults b/examples/lighting-app/esp32/sdkconfig.defaults new file mode 100644 index 00000000000000..85e84a2001e385 --- /dev/null +++ b/examples/lighting-app/esp32/sdkconfig.defaults @@ -0,0 +1,41 @@ +# +# Copyright (c) 2021 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Description: +# Some useful defaults for the demo app configuration. +# + +# Default to 921600 baud when flashing and monitoring device +CONFIG_ESPTOOLPY_BAUD_921600B=y +CONFIG_ESPTOOLPY_BAUD=921600 +CONFIG_ESPTOOLPY_COMPRESSED=y +CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y +CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 + +#enable BT +CONFIG_BT_ENABLED=y +CONFIG_BT_NIMBLE_ENABLED=y + +#enable lwip ipv6 autoconfig +CONFIG_LWIP_IPV6_AUTOCONFIG=y + +# Use a custom partition table +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_FILENAME="partitions.csv" + +#enable lwIP route hooks +CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT=y +CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT=y diff --git a/examples/lighting-app/esp32/third_party/connectedhomeip b/examples/lighting-app/esp32/third_party/connectedhomeip new file mode 120000 index 00000000000000..11a54ed360106c --- /dev/null +++ b/examples/lighting-app/esp32/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../../ \ No newline at end of file diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index e7d87bd84cfca4..34b6eb2218352f 100644 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -217,6 +217,7 @@ def Esp32Targets(): yield devkitc.Extend('all-clusters', app=Esp32App.ALL_CLUSTERS) yield devkitc.Extend('all-clusters-ipv6only', app=Esp32App.ALL_CLUSTERS, enable_ipv4=False) yield devkitc.Extend('shell', app=Esp32App.SHELL) + yield devkitc.Extend('light', app=Esp32App.LIGHT) yield devkitc.Extend('lock', app=Esp32App.LOCK) yield devkitc.Extend('bridge', app=Esp32App.BRIDGE) yield devkitc.Extend('temperature-measurement', app=Esp32App.TEMPERATURE_MEASUREMENT) diff --git a/scripts/build/builders/esp32.py b/scripts/build/builders/esp32.py index e99ab8e291b1b7..0647bea7b7a5a9 100644 --- a/scripts/build/builders/esp32.py +++ b/scripts/build/builders/esp32.py @@ -30,6 +30,7 @@ class Esp32Board(Enum): class Esp32App(Enum): ALL_CLUSTERS = auto() + LIGHT = auto() LOCK = auto() SHELL = auto() BRIDGE = auto() @@ -40,6 +41,8 @@ class Esp32App(Enum): def ExamplePath(self): if self == Esp32App.ALL_CLUSTERS: return 'examples/all-clusters-app' + elif self == Esp32App.LIGHT: + return 'examples/lighting-app' elif self == Esp32App.LOCK: return 'examples/lock-app' elif self == Esp32App.SHELL: @@ -57,6 +60,8 @@ def ExamplePath(self): def AppNamePrefix(self): if self == Esp32App.ALL_CLUSTERS: return 'chip-all-clusters-app' + elif self == Esp32App.LIGHT: + return 'chip-lighting-app' elif self == Esp32App.LOCK: return 'chip-lock-app' elif self == Esp32App.SHELL: diff --git a/scripts/build/testdata/all_targets_except_host.txt b/scripts/build/testdata/all_targets_except_host.txt index 49e67f381a020d..d57be9ffa95dd3 100644 --- a/scripts/build/testdata/all_targets_except_host.txt +++ b/scripts/build/testdata/all_targets_except_host.txt @@ -64,6 +64,7 @@ esp32-c3devkit-all-clusters esp32-devkitc-all-clusters esp32-devkitc-all-clusters-ipv6only esp32-devkitc-bridge +esp32-devkitc-light esp32-devkitc-lock esp32-devkitc-shell esp32-devkitc-temperature-measurement diff --git a/scripts/build/testdata/build_all_except_host.txt b/scripts/build/testdata/build_all_except_host.txt index 349750e4921865..dc2667b3769282 100644 --- a/scripts/build/testdata/build_all_except_host.txt +++ b/scripts/build/testdata/build_all_except_host.txt @@ -332,6 +332,17 @@ bash -c 'source $IDF_PATH/export.sh; source scripts/activate.sh; export SDKCONFIG_DEFAULTS={out}/esp32-devkitc-bridge/sdkconfig.defaults idf.py -C examples/bridge-app/esp32 -B {out}/esp32-devkitc-bridge reconfigure' +# Generating esp32-devkitc-light +mkdir -p {out}/esp32-devkitc-light + +cp examples/lighting-app/esp32/sdkconfig.defaults {out}/esp32-devkitc-light/sdkconfig.defaults + +rm -f examples/lighting-app/esp32/sdkconfig + +bash -c 'source $IDF_PATH/export.sh; source scripts/activate.sh; +export SDKCONFIG_DEFAULTS={out}/esp32-devkitc-light/sdkconfig.defaults +idf.py -C examples/lighting-app/esp32 -B {out}/esp32-devkitc-light reconfigure' + # Generating esp32-devkitc-lock mkdir -p {out}/esp32-devkitc-lock @@ -970,6 +981,13 @@ bash -c 'source $IDF_PATH/export.sh; source scripts/activate.sh; export SDKCONFIG_DEFAULTS={out}/esp32-devkitc-bridge/sdkconfig.defaults idf.py -C examples/bridge-app/esp32 -B {out}/esp32-devkitc-bridge build' +rm -f examples/lighting-app/esp32/sdkconfig + +# Building esp32-devkitc-light +bash -c 'source $IDF_PATH/export.sh; source scripts/activate.sh; +export SDKCONFIG_DEFAULTS={out}/esp32-devkitc-light/sdkconfig.defaults +idf.py -C examples/lighting-app/esp32 -B {out}/esp32-devkitc-light build' + rm -f examples/lock-app/esp32/sdkconfig # Building esp32-devkitc-lock diff --git a/scripts/build/testdata/glob_star_targets_except_host.txt b/scripts/build/testdata/glob_star_targets_except_host.txt index e95ba534e53536..4e35246d9f2abf 100644 --- a/scripts/build/testdata/glob_star_targets_except_host.txt +++ b/scripts/build/testdata/glob_star_targets_except_host.txt @@ -22,6 +22,7 @@ esp32-c3devkit-all-clusters esp32-devkitc-all-clusters esp32-devkitc-all-clusters-ipv6only esp32-devkitc-bridge +esp32-devkitc-light esp32-devkitc-lock esp32-devkitc-shell esp32-devkitc-temperature-measurement From 5d0c314bb04829853b927343a1da7d303fe1de62 Mon Sep 17 00:00:00 2001 From: Victor Morales Date: Fri, 7 Jan 2022 21:39:23 -0800 Subject: [PATCH 07/64] Use zap light docker image (#13390) Signed-off-by: Victor Morales --- .github/workflows/zap_regeneration.yaml | 19 ++++++------------- .github/workflows/zap_templates.yaml | 19 ++++++------------- 2 files changed, 12 insertions(+), 26 deletions(-) diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml index c493df9a57051b..abe02380faf34c 100644 --- a/.github/workflows/zap_regeneration.yaml +++ b/.github/workflows/zap_regeneration.yaml @@ -26,7 +26,12 @@ jobs: name: ZAP Regeneration timeout-minutes: 60 - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 + container: + image: connectedhomeip/chip-build-zap:0.5.42 + defaults: + run: + shell: sh if: github.actor != 'restyled-io[bot]' steps: @@ -34,18 +39,6 @@ jobs: uses: actions/checkout@v2 with: submodules: true - - name: Use Node.js 14.x - uses: actions/setup-node@v1 - with: - node-version: '14.x' - - name: Use Java - uses: actions/setup-java@v2 - with: - distribution: 'zulu' - java-version: '11' - java-package: jre - - run: sudo apt-get update - - run: sudo apt-get install --fix-missing libpixman-1-dev libcairo-dev libsdl-pango-dev libjpeg-dev libgif-dev python-autopep8 - name: Setup ZAP timeout-minutes: 5 run: | diff --git a/.github/workflows/zap_templates.yaml b/.github/workflows/zap_templates.yaml index 66e0890624e8e7..e8ef4e1497897b 100644 --- a/.github/workflows/zap_templates.yaml +++ b/.github/workflows/zap_templates.yaml @@ -27,7 +27,12 @@ jobs: name: ZAP templates generation timeout-minutes: 60 - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 + container: + image: connectedhomeip/chip-build-zap:0.5.42 + defaults: + run: + shell: sh if: github.actor != 'restyled-io[bot]' steps: @@ -35,18 +40,6 @@ jobs: uses: actions/checkout@v2 with: submodules: true - - name: Use Node.js 14.x - uses: actions/setup-node@v1 - with: - node-version: '14.x' - - name: Use Java - uses: actions/setup-java@v2 - with: - distribution: 'zulu' - java-version: '11' - java-package: jre - - run: sudo apt-get update - - run: sudo apt-get install --fix-missing libpixman-1-dev libcairo-dev libsdl-pango-dev libjpeg-dev libgif-dev python-autopep8 - name: Setup ZAP timeout-minutes: 5 run: | From 0ad66c9eea26a4eb9477b983132e8771fb4428a3 Mon Sep 17 00:00:00 2001 From: doru91 Date: Sat, 8 Jan 2022 09:57:28 +0200 Subject: [PATCH 08/64] [K32W0] Enable SHA256 HW acceleration (#13359) * [K32W0] Enable SHA256 HW acceleration Signed-off-by: Doru Gucea * Restyled by clang-format Co-authored-by: Restyled.io --- examples/lighting-app/nxp/k32w/k32w0/main/main.cpp | 2 ++ examples/lock-app/nxp/k32w/k32w0/main/main.cpp | 2 ++ src/platform/nxp/k32w/k32w0/k32w0-chip-mbedtls-config.h | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/lighting-app/nxp/k32w/k32w0/main/main.cpp b/examples/lighting-app/nxp/k32w/k32w0/main/main.cpp index b13e414c671198..bb1322e62cadc5 100644 --- a/examples/lighting-app/nxp/k32w/k32w0/main/main.cpp +++ b/examples/lighting-app/nxp/k32w/k32w0/main/main.cpp @@ -62,6 +62,8 @@ extern "C" void main_task(void const * argument) (*pFunc)(); } + SHA_ClkInit(SHA_INSTANCE); + mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree); /* Used for HW initializations */ diff --git a/examples/lock-app/nxp/k32w/k32w0/main/main.cpp b/examples/lock-app/nxp/k32w/k32w0/main/main.cpp index 6bdc1dd6555595..0552507b285282 100644 --- a/examples/lock-app/nxp/k32w/k32w0/main/main.cpp +++ b/examples/lock-app/nxp/k32w/k32w0/main/main.cpp @@ -96,6 +96,8 @@ extern "C" void main_task(void const * argument) (*pFunc)(); } + SHA_ClkInit(SHA_INSTANCE); + #if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) PWR_Init(); diff --git a/src/platform/nxp/k32w/k32w0/k32w0-chip-mbedtls-config.h b/src/platform/nxp/k32w/k32w0/k32w0-chip-mbedtls-config.h index a2c927285b1e29..1e795ddc8e5d12 100644 --- a/src/platform/nxp/k32w/k32w0/k32w0-chip-mbedtls-config.h +++ b/src/platform/nxp/k32w/k32w0/k32w0-chip-mbedtls-config.h @@ -121,7 +121,7 @@ #if defined(FSL_FEATURE_SOC_SHA_COUNT) && (FSL_FEATURE_SOC_SHA_COUNT > 0) #include "fsl_sha.h" -//#define SHA_INSTANCE SHA0 /* AES base register.*/ +#define SHA_INSTANCE SHA0 /* SHA base register.*/ #define MBEDTLS_FREESCALE_LPC_SHA1 /* Enable use of LPC SHA.*/ //#define MBEDTLS_FREESCALE_LPC_SHA256 /* Enable use of LPC SHA256.*/ @@ -171,7 +171,7 @@ #define MBEDTLS_SHA1_ALT #endif #if defined(MBEDTLS_FREESCALE_LTC_SHA256) || defined(MBEDTLS_FREESCALE_LPC_SHA256) -//#define MBEDTLS_SHA256_ALT +#define MBEDTLS_SHA256_ALT /* * LPC SHA module does not support SHA-224. * From b63df3a106689f4e46cb6b97cd95f9e7efdb0975 Mon Sep 17 00:00:00 2001 From: kowsisoundhar12 <57476670+kowsisoundhar12@users.noreply.github.com> Date: Sat, 8 Jan 2022 13:27:39 +0530 Subject: [PATCH 09/64] Test added jan 7 (#13366) * Updated testscripts based on latest testplan * Added Auto generated files --- examples/chip-tool/templates/tests.js | 6 +- .../suites/certification/Test_TC_BI_1_1.yaml | 3 +- .../suites/certification/Test_TC_BI_2_1.yaml | 23 + .../certification/Test_TC_BOOL_1_1.yaml | 3 +- .../certification/Test_TC_BOOL_2_1.yaml | 2 +- .../suites/certification/Test_TC_CC_1_1.yaml | 6 +- .../suites/certification/Test_TC_CC_2_1.yaml | 49 + .../suites/certification/Test_TC_CC_7_4.yaml | 9 - .../suites/certification/Test_TC_FLW_1_1.yaml | 3 +- .../suites/certification/Test_TC_FLW_2_1.yaml | 19 +- .../suites/certification/Test_TC_FLW_2_2.yaml | 2 +- .../suites/certification/Test_TC_MC_3_1.yaml | 30 +- .../suites/certification/Test_TC_MC_3_10.yaml | 4 +- .../suites/certification/Test_TC_MC_3_11.yaml | 4 +- .../suites/certification/Test_TC_MC_3_2.yaml | 4 +- .../suites/certification/Test_TC_MC_3_3.yaml | 18 +- .../suites/certification/Test_TC_MC_3_4.yaml | 20 +- .../suites/certification/Test_TC_MC_3_6.yaml | 4 +- .../suites/certification/Test_TC_MC_3_7.yaml | 10 +- .../suites/certification/Test_TC_MC_3_9.yaml | 2 +- .../suites/certification/Test_TC_OO_2_1.yaml | 3 - .../suites/certification/Test_TC_PCC_2_1.yaml | 115 +- .../suites/certification/Test_TC_PCC_2_3.yaml | 7 - .../suites/certification/Test_TC_PRS_2_1.yaml | 18 + .../suites/certification/Test_TC_RH_2_1.yaml | 2 + ...IAGSW_1_1.yaml => Test_TC_SWDIAG_1_1.yaml} | 8 +- ...IAGSW_2_1.yaml => Test_TC_SWDIAG_2_1.yaml} | 3 +- ...IAGSW_3_2.yaml => Test_TC_SWDIAG_3_1.yaml} | 6 +- .../suites/certification/Test_TC_TM_2_1.yaml | 1 + .../certification/Test_TC_TSTAT_2_1.yaml | 130 + src/darwin/Framework/CHIP/templates/tests.js | 6 +- .../Framework/CHIPTests/CHIPClustersTests.m | 2088 +++++++++++- .../chip-tool/zap-generated/test/Commands.h | 2943 ++++++++++++++--- 33 files changed, 4834 insertions(+), 717 deletions(-) rename src/app/tests/suites/certification/{Test_TC_DIAGSW_1_1.yaml => Test_TC_SWDIAG_1_1.yaml} (96%) rename src/app/tests/suites/certification/{Test_TC_DIAGSW_2_1.yaml => Test_TC_SWDIAG_2_1.yaml} (91%) rename src/app/tests/suites/certification/{Test_TC_DIAGSW_3_2.yaml => Test_TC_SWDIAG_3_1.yaml} (91%) diff --git a/examples/chip-tool/templates/tests.js b/examples/chip-tool/templates/tests.js index 799c661ca274bc..69f03582b5564d 100644 --- a/examples/chip-tool/templates/tests.js +++ b/examples/chip-tool/templates/tests.js @@ -204,9 +204,9 @@ function getTests() ]; const SoftwareDiagnostics = [ - 'Test_TC_DIAGSW_1_1', - 'Test_TC_DIAGSW_2_1', - 'Test_TC_DIAGSW_3_2', + 'Test_TC_SWDIAG_1_1', + 'Test_TC_SWDIAG_2_1', + 'Test_TC_SWDIAG_3_1', ]; const Subscriptions = [ diff --git a/src/app/tests/suites/certification/Test_TC_BI_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BI_1_1.yaml index dafd409227e00a..a068c690d2b602 100644 --- a/src/app/tests/suites/certification/Test_TC_BI_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BI_1_1.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 12.1.1. [TC-BI-1.1] Global attributes with server as DUT +name: 18.1.1. [TC-BI-1.1] Global attributes with server as DUT config: cluster: "Binary Input (Basic)" @@ -95,6 +95,7 @@ tests: - label: "Read the optional global attribute : FeatureMap" disabled: true + optional: true command: "readAttribute" attribute: "FeatureMap" response: diff --git a/src/app/tests/suites/certification/Test_TC_BI_2_1.yaml b/src/app/tests/suites/certification/Test_TC_BI_2_1.yaml index 0bfd1a5f5e8767..b634927d16000c 100644 --- a/src/app/tests/suites/certification/Test_TC_BI_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BI_2_1.yaml @@ -105,6 +105,7 @@ tests: #Issue #11142 Disabled all optional attribute checks - label: "Read optional non-global attribute: ActiveText" disabled: true + optional: true command: "readAttribute" attribute: "active text" response: @@ -112,6 +113,7 @@ tests: - label: "Read optional non-global attribute constraints: ActiveText" disabled: true + optional: true command: "readAttribute" attribute: "active text" response: @@ -121,6 +123,7 @@ tests: - label: "Write the default values to optional non-global attribute: ActiveText" disabled: true + optional: true command: "writeAttribute" attribute: "active text" arguments: @@ -128,6 +131,7 @@ tests: - label: "Reads back the optional non-global attribute: ActiveText" disabled: true + optional: true command: "readAttribute" attribute: "active text" response: @@ -135,6 +139,7 @@ tests: - label: "Read optional non-global attribute: Description" disabled: true + optional: true command: "readAttribute" attribute: "description" response: @@ -142,6 +147,7 @@ tests: - label: "Read optional non-global attribute constraints: Description" disabled: true + optional: true command: "readAttribute" attribute: "description" response: @@ -152,6 +158,7 @@ tests: "Write the default values to optional non-global attribute: Description" disabled: true + optional: true command: "writeAttribute" attribute: "description" arguments: @@ -159,6 +166,7 @@ tests: - label: "Reads back the optional non-global attribute: Description" disabled: true + optional: true command: "readAttribute" attribute: "description" response: @@ -166,6 +174,7 @@ tests: - label: "Read optional non-global attribute: InactiveText" disabled: true + optional: true command: "readAttribute" attribute: "inactive text" response: @@ -173,6 +182,7 @@ tests: - label: "Read optional non-global attribute constraints: InactiveText" disabled: true + optional: true command: "readAttribute" attribute: "inactive text" response: @@ -183,6 +193,7 @@ tests: "Write the default values to optional non-global attribute: InactiveText" disabled: true + optional: true command: "writeAttribute" attribute: "inactive text" arguments: @@ -190,6 +201,7 @@ tests: - label: "Reads back the optional non-global attribute: InactiveText" disabled: true + optional: true command: "readAttribute" attribute: "inactive text" response: @@ -197,6 +209,7 @@ tests: - label: "Read optional non-global attribute: Polarity" disabled: true + optional: true command: "readAttribute" attribute: "polarity" response: @@ -204,6 +217,7 @@ tests: - label: "Read optional non-global attribute constraints: Polarity" disabled: true + optional: true command: "readAttribute" attribute: "polarity" response: @@ -213,6 +227,7 @@ tests: - label: "Write the default values to optional non-global attribute: Polarity" disabled: true + optional: true command: "writeAttribute" attribute: "polarity" arguments: @@ -222,6 +237,7 @@ tests: - label: "Reads back the optional non-global attribute: Polarity" disabled: true + optional: true command: "readAttribute" attribute: "polarity" response: @@ -229,6 +245,7 @@ tests: - label: "Read optional non-global attribute: Reliability" disabled: true + optional: true command: "readAttribute" attribute: "reliability" response: @@ -236,6 +253,7 @@ tests: - label: "Read optional non-global attribute constraints: Reliability" disabled: true + optional: true command: "readAttribute" attribute: "reliability" response: @@ -246,6 +264,7 @@ tests: "Write the default values to optional non-global attribute: Reliability" disabled: true + optional: true command: "writeAttribute" attribute: "reliability" arguments: @@ -253,6 +272,7 @@ tests: - label: "Reads back the optional non-global attribute: Reliability" disabled: true + optional: true command: "readAttribute" attribute: "reliability" response: @@ -260,6 +280,7 @@ tests: - label: "Read optional non-global attribute constraints: ApplicationType" disabled: true + optional: true command: "readAttribute" attribute: "application type" response: @@ -272,6 +293,7 @@ tests: "Write the default values to optional non-global attribute: ApplicationType" disabled: true + optional: true command: "writeAttribute" attribute: "application type" arguments: @@ -281,6 +303,7 @@ tests: - label: "Reads back the optional non-global attribute: ApplicationType" disabled: true + optional: true command: "readAttribute" attribute: "application type" response: diff --git a/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml index 976f41915bc919..ae2106abcbb752 100644 --- a/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 60.1.1. [TC-BOOL-1.1] Global attributes with server as DUT +name: 68.1.1. [TC-BOOL-1.1] Global attributes with server as DUT config: cluster: "Boolean State" @@ -95,6 +95,7 @@ tests: - label: "Read the optional global attribute : FeatureMap" disabled: true + optional: true command: "readAttribute" attribute: "FeatureMap" response: diff --git a/src/app/tests/suites/certification/Test_TC_BOOL_2_1.yaml b/src/app/tests/suites/certification/Test_TC_BOOL_2_1.yaml index dfd3b6f986d7b4..a37048bb3ba297 100644 --- a/src/app/tests/suites/certification/Test_TC_BOOL_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BOOL_2_1.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 60.2.1. [TC-BOOL-2.1] Attributes with server as DUT +name: 68.2.1. [TC-BOOL-2.1] Attributes with server as DUT config: cluster: "Boolean State" diff --git a/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml index d350ae3990e901..0d74d9f336a7c4 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 21.1.1. [TC-CC-1.1] Global attributes with server as DUT +name: 27.1.1. [TC-CC-1.1] Global attributes with server as DUT config: cluster: "Color Control" @@ -97,6 +97,7 @@ tests: - label: "read the optional global attribute: FeatureMap" disabled: true + optional: true command: "readAttribute" attribute: "FeatureMap" response: @@ -104,6 +105,7 @@ tests: - label: "Read the optional global attribute : FeatureMap" disabled: true + optional: true command: "readAttribute" attribute: "FeatureMap" response: @@ -112,6 +114,7 @@ tests: - label: "write the default values to optional global attribute: FeatureMap" disabled: true + optional: true command: "writeAttribute" attribute: "FeatureMap" arguments: @@ -121,6 +124,7 @@ tests: - label: "reads back optional global attribute: FeatureMap" disabled: true + optional: true command: "readAttribute" attribute: "FeatureMap" response: diff --git a/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml index c90a42b5bb5597..dd361720c8a759 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml @@ -522,6 +522,7 @@ tests: value: 65279 - label: "Read the optional attribute: CoupleColorTempToLevelMinMireds" + optional: true command: "readAttribute" attribute: "couple color temp to level min-mireds" response: @@ -531,6 +532,7 @@ tests: - label: "Write the default values to optional attribute: CoupleColorTempToLevelMinMireds" + optional: true command: "writeAttribute" attribute: "couple color temp to level min-mireds" arguments: @@ -539,12 +541,14 @@ tests: error: UNSUPPORTED_WRITE - label: "Reads back optional attribute: CoupleColorTempToLevelMinMireds" + optional: true command: "readAttribute" attribute: "couple color temp to level min-mireds" response: value: 0 - label: "Read the optional attribute: StartUpColorTemperatureMireds" + optional: true command: "readAttribute" attribute: "start up color temperature mireds" response: @@ -556,24 +560,28 @@ tests: - label: "Write the default values to optional attribute: StartUpColorTemperatureMireds" + optional: true command: "writeAttribute" attribute: "start up color temperature mireds" arguments: value: 0 - label: "Reads back optional attribute: StartUpColorTemperatureMireds" + optional: true command: "readAttribute" attribute: "start up color temperature mireds" response: value: 0 - label: "Read the Optional attribute: RemainingTime" + optional: true command: "readAttribute" attribute: "remaining time" response: value: 0 - label: "Validate constraints of attribute: RemainingTime" + optional: true command: "readAttribute" attribute: "remaining time" response: @@ -583,6 +591,7 @@ tests: maxValue: 254 - label: "Write the default values to optional attribute: RemainingTime" + optional: true command: "writeAttribute" attribute: "remaining time" arguments: @@ -591,12 +600,14 @@ tests: error: UNSUPPORTED_WRITE - label: "Reads back optional attribute: RemainingTime" + optional: true command: "readAttribute" attribute: "remaining time" response: value: 0 - label: "Read the optional attribute: DriftCompensation" + optional: true command: "readAttribute" attribute: "drift compensation" response: @@ -606,6 +617,7 @@ tests: maxValue: 4 - label: "Write the default values to optional attribute: DriftCompensation" + optional: true command: "writeAttribute" attribute: "drift compensation" arguments: @@ -614,12 +626,14 @@ tests: error: UNSUPPORTED_WRITE - label: "Reads back optional attribute: DriftCompensation" + optional: true command: "readAttribute" attribute: "drift compensation" response: value: 0 - label: "Read the optional attribute: CompensationText" + optional: true command: "readAttribute" attribute: "compensation text" response: @@ -629,6 +643,7 @@ tests: - label: "Write the default values to optional attribute: CompensationText" disabled: true + optional: true command: "writeAttribute" attribute: "compensation text" arguments: @@ -638,6 +653,7 @@ tests: - label: "Reads back optional attribute: CompensationText" disabled: true + optional: true command: "readAttribute" attribute: "compensation text" response: @@ -1085,6 +1101,7 @@ tests: #Defined Color Points Settings Attribute Set - label: "Read the optional attribute: WhitePointX" + optional: true command: "readAttribute" attribute: "white point x" response: @@ -1094,18 +1111,21 @@ tests: maxValue: 65279 - label: "Write the default optional attribute: WhitePointX" + optional: true command: "writeAttribute" attribute: "white point x" arguments: value: 0 - label: "Read back the optional attribute: WhitePointX" + optional: true command: "readAttribute" attribute: "white point x" response: value: 0 - label: "Read the optional attribute: WhitePointY" + optional: true command: "readAttribute" attribute: "white point y" response: @@ -1115,18 +1135,21 @@ tests: maxValue: 65279 - label: "Write the default optional attribute: WhitePointY" + optional: true command: "writeAttribute" attribute: "white point y" arguments: value: 0 - label: "Read back the optional attribute: WhitePointY" + optional: true command: "readAttribute" attribute: "white point y" response: value: 0 - label: "Read the optional attribute: ColorPointRX" + optional: true command: "readAttribute" attribute: "color point r x" response: @@ -1136,18 +1159,21 @@ tests: maxValue: 65279 - label: "Write the default optional attribute: ColorPointRX" + optional: true command: "writeAttribute" attribute: "color point r x" arguments: value: 0 - label: "Read back the optional attribute: ColorPointRX" + optional: true command: "readAttribute" attribute: "color point r x" response: value: 0 - label: "Read the optional attribute: ColorPointRY" + optional: true command: "readAttribute" attribute: "color point r y" response: @@ -1157,18 +1183,21 @@ tests: maxValue: 65279 - label: "Write the default optional attribute: ColorPointRY" + optional: true command: "writeAttribute" attribute: "color point r y" arguments: value: 0 - label: "Read back the optional attribute: ColorPointRY" + optional: true command: "readAttribute" attribute: "color point r y" response: value: 0 - label: "Read the optional attribute: ColorPointRIntensity" + optional: true command: "readAttribute" attribute: "color point r intensity" response: @@ -1177,6 +1206,7 @@ tests: - label: "Write the default optional attribute: ColorPointRIntensity" disabled: true + optional: true command: "writeAttribute" attribute: "color point r intensity" arguments: @@ -1184,12 +1214,14 @@ tests: - label: "Read back the optional attribute: ColorPointRIntensity" disabled: true + optional: true command: "readAttribute" attribute: "color point r intensity" response: value: 0 - label: "Read the optional attribute: ColorPointGX" + optional: true command: "readAttribute" attribute: "color point g x" response: @@ -1199,18 +1231,21 @@ tests: maxValue: 65279 - label: "Write the default optional attribute: ColorPointGX" + optional: true command: "writeAttribute" attribute: "color point g x" arguments: value: 0 - label: "Read back the optional attribute: ColorPointGX" + optional: true command: "readAttribute" attribute: "color point g x" response: value: 0 - label: "Read the optional attribute: ColorPointGY" + optional: true command: "readAttribute" attribute: "color point g y" response: @@ -1220,18 +1255,21 @@ tests: maxValue: 65279 - label: "Write the default optional attribute: ColorPointGY" + optional: true command: "writeAttribute" attribute: "color point g y" arguments: value: 0 - label: "Read back the optional attribute: ColorPointGY" + optional: true command: "readAttribute" attribute: "color point g y" response: value: 0 - label: "Read the optional attribute: ColorPointGIntensity" + optional: true command: "readAttribute" attribute: "color point g intensity" response: @@ -1240,6 +1278,7 @@ tests: - label: "Write the default optional attribute: ColorPointGIntensity" disabled: true + optional: true command: "writeAttribute" attribute: "color point g intensity" arguments: @@ -1247,12 +1286,14 @@ tests: - label: "Read back the optional attribute: ColorPointGIntensity" disabled: true + optional: true command: "readAttribute" attribute: "color point g intensity" response: value: 0 - label: "Read the optional attribute: ColorPointBX" + optional: true command: "readAttribute" attribute: "color point b x" response: @@ -1262,18 +1303,21 @@ tests: maxValue: 65279 - label: "Write the default optional attribute: ColorPointBX" + optional: true command: "writeAttribute" attribute: "color point b x" arguments: value: 0 - label: "Read back the optional attribute: ColorPointBX" + optional: true command: "readAttribute" attribute: "color point b x" response: value: 0 - label: "Read the optional attribute: ColorPointBY" + optional: true command: "readAttribute" attribute: "color point b y" response: @@ -1283,18 +1327,21 @@ tests: maxValue: 65279 - label: "Write the default optional attribute: ColorPointBY" + optional: true command: "writeAttribute" attribute: "color point b y" arguments: value: 0 - label: "Read back the optional attribute: ColorPointBY" + optional: true command: "readAttribute" attribute: "color point b y" response: value: 0 - label: "Read the optional attribute: ColorPointBIntensity" + optional: true command: "readAttribute" attribute: "color point b intensity" response: @@ -1303,6 +1350,7 @@ tests: - label: "Write the default optional attribute: ColorPointBIntensity" disabled: true + optional: true command: "writeAttribute" attribute: "color point b intensity" arguments: @@ -1310,6 +1358,7 @@ tests: - label: "Read back the optional attribute: ColorPointBIntensity" disabled: true + optional: true command: "readAttribute" attribute: "color point b intensity" response: diff --git a/src/app/tests/suites/certification/Test_TC_CC_7_4.yaml b/src/app/tests/suites/certification/Test_TC_CC_7_4.yaml index dba044d0d29509..0c1fe78f30b37d 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_7_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_7_4.yaml @@ -69,15 +69,6 @@ tests: response: value: 1200 - - label: - "Check Saturation attribute value matched the value sent by the last - command" - disabled: true - command: "readAttribute" - attribute: "current saturation" - response: - value: 90 - - label: "Turn off light that we turned on" cluster: "On/Off" command: "off" diff --git a/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml b/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml index 0192b71a15239d..f5f6083243f698 100644 --- a/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 27.1.1. [TC-FLW-1.1] Global attributes with server as DUT +name: 33.1.1. [TC-FLW-1.1] Global attributes with server as DUT config: cluster: "Flow Measurement" @@ -98,6 +98,7 @@ tests: - label: "Read the optional global attribute : FeatureMap" disabled: true + optional: true command: "readAttribute" attribute: "FeatureMap" response: diff --git a/src/app/tests/suites/certification/Test_TC_FLW_2_1.yaml b/src/app/tests/suites/certification/Test_TC_FLW_2_1.yaml index b638a49d218745..cca3e02f509e45 100644 --- a/src/app/tests/suites/certification/Test_TC_FLW_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_FLW_2_1.yaml @@ -45,7 +45,6 @@ tests: type: uint16 - label: "write the default value to optional attribute: MeasuredValue" - disabled: true command: "writeAttribute" attribute: "MeasuredValue" arguments: @@ -91,14 +90,14 @@ tests: type: uint16 - label: "read the optional attribute: Tolerance" - disabled: true + optional: true command: "readAttribute" attribute: "Tolerance" response: value: 0 - label: "read the optional attribute: Tolerance" - disabled: true + optional: true command: "readAttribute" attribute: "Tolerance" response: @@ -108,7 +107,7 @@ tests: maxValue: 2048 - label: "write the default value to optional attribute: Tolerance" - disabled: true + optional: true command: "writeAttribute" attribute: "Tolerance" arguments: @@ -117,18 +116,8 @@ tests: error: UNSUPPORTED_WRITE - label: "read the optional attribute: Tolerance" - disabled: true + optional: true command: "readAttribute" attribute: "Tolerance" response: value: 0 - - - label: "read the optional attribute: Tolerance" - disabled: true - command: "readAttribute" - attribute: "Tolerance" - response: - constraints: - type: uint16 - minValue: 0 - maxValue: 2048 diff --git a/src/app/tests/suites/certification/Test_TC_FLW_2_2.yaml b/src/app/tests/suites/certification/Test_TC_FLW_2_2.yaml index 74221a6cb2749f..201f88edf60725 100644 --- a/src/app/tests/suites/certification/Test_TC_FLW_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_FLW_2_2.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 33.2.1. [TC-FLW-2.1] Attributes with server as DUT +name: 33.2.2. [TC-FLW-2.2] Primary functionality with server as DUT config: cluster: "Flow Measurement" diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_1.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_1.yaml index f6d7aea76115b4..1cd7732ae6746e 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_3_1.yaml @@ -25,7 +25,7 @@ tests: - label: "Send Select" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" @@ -33,7 +33,7 @@ tests: - label: "Send Up" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" @@ -41,7 +41,7 @@ tests: - label: "Send Down" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" @@ -49,14 +49,14 @@ tests: - label: "Send Left" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" value: 0x03 - label: "Send Right" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" @@ -64,7 +64,7 @@ tests: - label: "Send RightUp" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" @@ -72,7 +72,7 @@ tests: - label: "Send RightDown" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" @@ -80,7 +80,7 @@ tests: - label: "Send LeftUp" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" @@ -88,7 +88,7 @@ tests: - label: "Send LeftDown" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" @@ -96,7 +96,7 @@ tests: - label: "Send RootMenu" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" @@ -104,7 +104,7 @@ tests: - label: "Send SetupMenu" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" @@ -112,7 +112,7 @@ tests: - label: "Send ContentsMenu" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" @@ -120,7 +120,7 @@ tests: - label: "Send FavoriteMenu" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" @@ -128,7 +128,7 @@ tests: - label: "Send Exit" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" @@ -136,7 +136,7 @@ tests: - label: "Send Invalid" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_10.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_10.yaml index aab6a79e301e0d..d737f095915d7c 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_3_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_3_10.yaml @@ -26,8 +26,8 @@ tests: # TDOD: Enable when SDK supports command - label: "Hide Input Status Command" disabled: true - command: "HideInputStatus" + command: "HideInputStatusRequest" # TDOD: Enable when SDK supports command - label: "Show Input Status Command" disabled: true - command: "ShowInputStatus" + command: "ShowInputStatusRequest" diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_11.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_11.yaml index f4cb57463f895c..728ebc9d86bc50 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_3_11.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_3_11.yaml @@ -26,7 +26,7 @@ tests: # Remove disable flag when SDK supports command. - label: "Rename Input Command" disabled: true - command: "RenameInput" + command: "RenameInputRequest" arguments: values: - name: "index" @@ -36,7 +36,7 @@ tests: # Remove disable flag when SDK supports command. - label: "Rename Input Command" disabled: true - command: "RenameInput" + command: "RenameInputRequest" arguments: values: - name: "index" diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_2.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_2.yaml index bf057bf86aca68..dd17d1de5eb3b3 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_3_2.yaml @@ -25,7 +25,7 @@ tests: - label: "Send RootMenu" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" @@ -33,7 +33,7 @@ tests: - label: "Send SetupMenu" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_3.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_3.yaml index 25c388a72fc14e..8855a3952b12d5 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_3_3.yaml @@ -25,7 +25,7 @@ tests: - label: "Send Numbers1" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" @@ -33,7 +33,7 @@ tests: - label: "Send Numbers2" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" @@ -41,7 +41,7 @@ tests: - label: "Send Numbers3" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" @@ -49,7 +49,7 @@ tests: - label: "Send Numbers4" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" @@ -57,7 +57,7 @@ tests: - label: "Send Numbers5" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" @@ -65,7 +65,7 @@ tests: - label: "Send Numbers6" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" @@ -73,7 +73,7 @@ tests: - label: "Send Numbers7" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" @@ -81,7 +81,7 @@ tests: - label: "Send Numbers8" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" @@ -89,7 +89,7 @@ tests: - label: "Send Numbers9" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_4.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_4.yaml index 44bc6020b027dd..60ea913fee5d95 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_3_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_3_4.yaml @@ -25,7 +25,7 @@ tests: - label: "Send RootMenu" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" @@ -33,7 +33,7 @@ tests: - label: "Send RootMenu" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" @@ -41,7 +41,7 @@ tests: - label: "Send RootMenu" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" @@ -49,7 +49,7 @@ tests: - label: "Send RootMenu" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" @@ -57,7 +57,7 @@ tests: - label: "Send RootMenu" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" @@ -65,7 +65,7 @@ tests: - label: "Send RootMenu" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" @@ -73,7 +73,7 @@ tests: - label: "Send RootMenu" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" @@ -81,7 +81,7 @@ tests: - label: "Send RootMenu" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" @@ -89,7 +89,7 @@ tests: - label: "Send RootMenu" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" @@ -97,7 +97,7 @@ tests: - label: "Send RootMenu" disabled: true - command: "SendKey" + command: "SendKeyRequest" arguments: values: - name: "keyCode" diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_6.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_6.yaml index 6cf5c5dd1ded60..613d1c1f1bc930 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_3_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_3_6.yaml @@ -26,7 +26,7 @@ tests: # TODO: Update the corresponding values when feature is supported - label: "Launch an app with the provided a application ID" disabled: true - command: "LaunchApp" + command: "LaunchAppRequest" arguments: values: - name: "data" @@ -59,7 +59,7 @@ tests: # TODO: Update the corresponding values when feature is supported - label: "Stop an app with the provided application ID" disabled: true - command: "StopApp" + command: "StopAppRequest" arguments: values: - name: "applicationId" diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_7.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_7.yaml index c56d5cbcf43185..25912fda474d82 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_3_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_3_7.yaml @@ -26,7 +26,7 @@ tests: # TODO: Update the corresponding values when feature is supported - label: "Launch an app with the provided a application ID" disabled: true - command: "LaunchApp" + command: "LaunchAppRequest" arguments: values: - name: "data" @@ -39,7 +39,7 @@ tests: # TODO: Update the corresponding values when feature is supported - label: "Stop an app with the provided application ID" disabled: true - command: "StopApp" + command: "StopAppRequest" arguments: values: - name: "applicationId" @@ -48,7 +48,7 @@ tests: # TODO: Update the corresponding values when feature is supported - label: "Launch an app with the provided a application ID" disabled: true - command: "LaunchApp" + command: "LaunchAppRequest" arguments: values: - name: "data" @@ -63,7 +63,7 @@ tests: # TODO: Update the corresponding values when feature is supported - label: "Launch an app with the provided a application ID" disabled: true - command: "LaunchApp" + command: "LaunchAppRequest" arguments: values: - name: "data" @@ -76,7 +76,7 @@ tests: # TODO: Update the corresponding values when feature is supported - label: "Launch an app with the provided a application ID" disabled: true - command: "LaunchApp" + command: "LaunchAppRequest" arguments: values: - name: "data" diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_9.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_9.yaml index 5df5e901966186..c7d80c44c96142 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_3_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_3_9.yaml @@ -26,7 +26,7 @@ tests: # Remove disable flag when SDK supports command. - label: "Select Input Command" disabled: true - command: "SelectInput" + command: "SelectInputRequest" arguments: values: - name: "index" diff --git a/src/app/tests/suites/certification/Test_TC_OO_2_1.yaml b/src/app/tests/suites/certification/Test_TC_OO_2_1.yaml index e45dc96cf1d81e..16591c7c76937d 100644 --- a/src/app/tests/suites/certification/Test_TC_OO_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OO_2_1.yaml @@ -30,7 +30,6 @@ tests: value: 0 - label: "write the default value of mandatory attribute: OnOff" - disabled: true command: "writeAttribute" attribute: "OnOff" arguments: @@ -69,7 +68,6 @@ tests: value: 0 - label: "write the default value to LT attribute: GlobalSceneControl" - disabled: true command: "writeAttribute" attribute: "GlobalSceneControl" arguments: @@ -96,7 +94,6 @@ tests: value: 0 - label: "reads back LT attribute: GlobalSceneControl" - disabled: true command: "readAttribute" attribute: "GlobalSceneControl" response: diff --git a/src/app/tests/suites/certification/Test_TC_PCC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_PCC_2_1.yaml index 3bad8bcb5d569d..fdafc4fa0ee42f 100644 --- a/src/app/tests/suites/certification/Test_TC_PCC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PCC_2_1.yaml @@ -45,7 +45,6 @@ tests: value: null - label: "read the mandatory attribute: MaxSpeed" - disabled: true command: "readAttribute" attribute: "MaxSpeed" response: @@ -60,7 +59,6 @@ tests: value: null - label: "read the mandatory attribute: MaxFlow" - disabled: true command: "readAttribute" attribute: "MaxFlow" response: @@ -185,7 +183,6 @@ tests: value: null - label: "read the mandatory attribute: MaxSpeed" - disabled: true command: "readAttribute" attribute: "MaxSpeed" response: @@ -200,7 +197,6 @@ tests: value: null - label: "read the mandatory attribute: MaxFlow" - disabled: true command: "readAttribute" attribute: "MaxFlow" response: @@ -251,13 +247,14 @@ tests: - label: "read the optional attribute: MinConstPressure" disabled: true + optional: true command: "readAttribute" attribute: "MinConstPressure" response: value: null - label: "read the optional attribute: MinConstPressure" - disabled: true + optional: true command: "readAttribute" attribute: "MinConstPressure" response: @@ -266,13 +263,14 @@ tests: - label: "read the optional attribute: MaxConstPressure" disabled: true + optional: true command: "readAttribute" attribute: "MaxConstPressure" response: value: null - label: "read the optional attribute: MaxConstPressure" - disabled: true + optional: true command: "readAttribute" attribute: "MaxConstPressure" response: @@ -281,13 +279,14 @@ tests: - label: "read the optional attribute: MinCompPressure" disabled: true + optional: true command: "readAttribute" attribute: "MinCompPressure" response: value: null - label: "read the optional attribute: MinCompPressure" - disabled: true + optional: true command: "readAttribute" attribute: "MinCompPressure" response: @@ -296,13 +295,14 @@ tests: - label: "read the optional attribute: MaxCompPressure" disabled: true + optional: true command: "readAttribute" attribute: "MaxCompPressure" response: value: null - label: "read the optional attribute: MaxCompPressure" - disabled: true + optional: true command: "readAttribute" attribute: "MaxCompPressure" response: @@ -311,13 +311,14 @@ tests: - label: "read the optional attribute: MinConstSpeed" disabled: true + optional: true command: "readAttribute" attribute: "MinConstSpeed" response: value: null - label: "read the optional attribute: MinConstSpeed" - disabled: true + optional: true command: "readAttribute" attribute: "MinConstSpeed" response: @@ -326,13 +327,14 @@ tests: - label: "read the optional attribute: MaxConstSpeed" disabled: true + optional: true command: "readAttribute" attribute: "MaxConstSpeed" response: value: null - label: "read the optional attribute: MaxConstSpeed" - disabled: true + optional: true command: "readAttribute" attribute: "MaxConstSpeed" response: @@ -341,13 +343,14 @@ tests: - label: "read the optional attribute: MinConstFlow" disabled: true + optional: true command: "readAttribute" attribute: "MinConstFlow" response: value: null - label: "read the optional attribute: MinConstFlow" - disabled: true + optional: true command: "readAttribute" attribute: "MinConstFlow" response: @@ -356,13 +359,14 @@ tests: - label: "read the optional attribute: MaxConstFlow" disabled: true + optional: true command: "readAttribute" attribute: "MaxConstFlow" response: value: null - label: "read the optional attribute: MaxConstFlow" - disabled: true + optional: true command: "readAttribute" attribute: "MaxConstFlow" response: @@ -371,13 +375,14 @@ tests: - label: "read the optional attribute: MinConstTemp" disabled: true + optional: true command: "readAttribute" attribute: "MinConstTemp" response: value: null - label: "read the optional attribute: MinConstTemp" - disabled: true + optional: true command: "readAttribute" attribute: "MinConstTemp" response: @@ -387,13 +392,14 @@ tests: - label: "read the optional attribute: MaxConstTemp" disabled: true + optional: true command: "readAttribute" attribute: "MaxConstTemp" response: value: null - label: "read the optional attribute: MaxConstTemp" - disabled: true + optional: true command: "readAttribute" attribute: "MaxConstTemp" response: @@ -402,14 +408,14 @@ tests: minValue: -27315 - label: "read the optional attribute: PumpStatus" - disabled: true + optional: true command: "readAttribute" attribute: "PumpStatus" response: value: 0 - label: "read the optional attribute: PumpStatus" - disabled: true + optional: true command: "readAttribute" attribute: "PumpStatus" response: @@ -418,13 +424,14 @@ tests: - label: "read the optional attribute: Speed" disabled: true + optional: true command: "readAttribute" attribute: "Speed" response: value: null - label: "read the optional attribute: Speed" - disabled: true + optional: true command: "readAttribute" attribute: "Speed" response: @@ -432,14 +439,14 @@ tests: type: uint16 - label: "read the optional attribute: LifetimeRunningHours" - disabled: true + optional: true command: "readAttribute" attribute: "LifetimeRunningHours" response: value: 0 - label: "read the optional attribute: LifetimeRunningHours" - disabled: true + optional: true command: "readAttribute" attribute: "LifetimeRunningHours" response: @@ -448,13 +455,14 @@ tests: - label: "read the optional attribute: Power" disabled: true + optional: true command: "readAttribute" attribute: "Power" response: value: null - label: "read the optional attribute: Power" - disabled: true + optional: true command: "readAttribute" attribute: "Power" response: @@ -462,14 +470,14 @@ tests: type: uint24 - label: "read the optional attribute: LifetimeEnergyConsumed" - disabled: true + optional: true command: "readAttribute" attribute: "LifetimeEnergyConsumed" response: value: 0 - label: "read the optional attribute: LifetimeEnergyConsumed" - disabled: true + optional: true command: "readAttribute" attribute: "LifetimeEnergyConsumed" response: @@ -478,6 +486,7 @@ tests: - label: "write to the optional attribute: MinConstPressure" disabled: true + optional: true command: "writeAttribute" attribute: "MinConstPressure" arguments: @@ -487,6 +496,7 @@ tests: - label: "write to the optional attribute: MaxConstPressure" disabled: true + optional: true command: "writeAttribute" attribute: "MaxConstPressure" arguments: @@ -496,6 +506,7 @@ tests: - label: "write to the optional attribute: MinCompPressure" disabled: true + optional: true command: "writeAttribute" attribute: "MinCompPressure" arguments: @@ -505,6 +516,7 @@ tests: - label: "write to the optional attribute: MaxCompPressure" disabled: true + optional: true command: "writeAttribute" attribute: "MaxCompPressure" arguments: @@ -514,6 +526,7 @@ tests: - label: "write to the optional attribute: MinConstSpeed" disabled: true + optional: true command: "writeAttribute" attribute: "MinConstSpeed" arguments: @@ -523,6 +536,7 @@ tests: - label: "write to the optional attribute: MaxConstSpeed" disabled: true + optional: true command: "writeAttribute" attribute: "MaxConstSpeed" arguments: @@ -532,6 +546,7 @@ tests: - label: "write to the optional attribute: MinConstFlow" disabled: true + optional: true command: "writeAttribute" attribute: "MinConstFlow" arguments: @@ -541,6 +556,7 @@ tests: - label: "write to the optional attribute: MaxConstFlow" disabled: true + optional: true command: "writeAttribute" attribute: "MaxConstFlow" arguments: @@ -550,6 +566,7 @@ tests: - label: "write to the optional attribute: MinConstTemp" disabled: true + optional: true command: "writeAttribute" attribute: "MinConstTemp" arguments: @@ -559,6 +576,7 @@ tests: - label: "write to the optional attribute: MaxConstTemp" disabled: true + optional: true command: "writeAttribute" attribute: "MaxConstTemp" arguments: @@ -568,6 +586,7 @@ tests: - label: "write to the optional attribute: PumpStatus" disabled: true + optional: true command: "writeAttribute" attribute: "PumpStatus" arguments: @@ -577,6 +596,7 @@ tests: - label: "write to the optional attribute: Speed" disabled: true + optional: true command: "writeAttribute" attribute: "Speed" arguments: @@ -586,6 +606,7 @@ tests: - label: "write to the optional attribute: LifetimeRunningHours" disabled: true + optional: true command: "writeAttribute" attribute: "LifetimeRunningHours" arguments: @@ -593,6 +614,7 @@ tests: - label: "write to the optional attribute: Power" disabled: true + optional: true command: "writeAttribute" attribute: "Power" arguments: @@ -601,7 +623,7 @@ tests: error: UNSUPPORTED_WRITE - label: "write to the optional attribute: LifetimeEnergyConsumed" - disabled: true + optional: true command: "writeAttribute" attribute: "LifetimeEnergyConsumed" arguments: @@ -609,13 +631,14 @@ tests: - label: "read the optional attribute: MinConstPressure" disabled: true + optional: true command: "readAttribute" attribute: "MinConstPressure" response: value: null - label: "read the optional attribute: MinConstPressure" - disabled: true + optional: true command: "readAttribute" attribute: "MinConstPressure" response: @@ -624,13 +647,14 @@ tests: - label: "read the optional attribute: MaxConstPressure" disabled: true + optional: true command: "readAttribute" attribute: "MaxConstPressure" response: value: null - label: "read the optional attribute: MaxConstPressure" - disabled: true + optional: true command: "readAttribute" attribute: "MaxConstPressure" response: @@ -639,13 +663,14 @@ tests: - label: "read the optional attribute: MinCompPressure" disabled: true + optional: true command: "readAttribute" attribute: "MinCompPressure" response: value: null - label: "read the optional attribute: MinCompPressure" - disabled: true + optional: true command: "readAttribute" attribute: "MinCompPressure" response: @@ -654,13 +679,14 @@ tests: - label: "read the optional attribute: MaxCompPressure" disabled: true + optional: true command: "readAttribute" attribute: "MaxCompPressure" response: value: null - label: "read the optional attribute: MaxCompPressure" - disabled: true + optional: true command: "readAttribute" attribute: "MaxCompPressure" response: @@ -669,13 +695,14 @@ tests: - label: "read the optional attribute: MinConstSpeed" disabled: true + optional: true command: "readAttribute" attribute: "MinConstSpeed" response: value: null - label: "read the optional attribute: MinConstSpeed" - disabled: true + optional: true command: "readAttribute" attribute: "MinConstSpeed" response: @@ -684,13 +711,14 @@ tests: - label: "read the optional attribute: MaxConstSpeed" disabled: true + optional: true command: "readAttribute" attribute: "MaxConstSpeed" response: value: null - label: "read the optional attribute: MaxConstSpeed" - disabled: true + optional: true command: "readAttribute" attribute: "MaxConstSpeed" response: @@ -699,13 +727,14 @@ tests: - label: "read the optional attribute: MinConstFlow" disabled: true + optional: true command: "readAttribute" attribute: "MinConstFlow" response: value: null - label: "read the optional attribute: MinConstFlow" - disabled: true + optional: true command: "readAttribute" attribute: "MinConstFlow" response: @@ -714,13 +743,14 @@ tests: - label: "read the optional attribute: MaxConstFlow" disabled: true + optional: true command: "readAttribute" attribute: "MaxConstFlow" response: value: null - label: "read the optional attribute: MaxConstFlow" - disabled: true + optional: true command: "readAttribute" attribute: "MaxConstFlow" response: @@ -729,13 +759,14 @@ tests: - label: "read the optional attribute: MinConstTemp" disabled: true + optional: true command: "readAttribute" attribute: "MinConstTemp" response: value: null - label: "read the optional attribute: MinConstTemp" - disabled: true + optional: true command: "readAttribute" attribute: "MinConstTemp" response: @@ -745,13 +776,14 @@ tests: - label: "read the optional attribute: MaxConstTemp" disabled: true + optional: true command: "readAttribute" attribute: "MaxConstTemp" response: value: null - label: "read the optional attribute: MaxConstTemp" - disabled: true + optional: true command: "readAttribute" attribute: "MaxConstTemp" response: @@ -760,14 +792,14 @@ tests: minValue: -27315 - label: "read the optional attribute: PumpStatus" - disabled: true + optional: true command: "readAttribute" attribute: "PumpStatus" response: value: 0 - label: "read the optional attribute: PumpStatus" - disabled: true + optional: true command: "readAttribute" attribute: "PumpStatus" response: @@ -776,13 +808,14 @@ tests: - label: "read the optional attribute: Speed" disabled: true + optional: true command: "readAttribute" attribute: "Speed" response: value: null - label: "read the optional attribute: Speed" - disabled: true + optional: true command: "readAttribute" attribute: "Speed" response: @@ -790,14 +823,13 @@ tests: type: uint16 - label: "read the optional attribute: LifetimeRunningHours" - disabled: true command: "readAttribute" attribute: "LifetimeRunningHours" response: value: 0 - label: "read the optional attribute: LifetimeRunningHours" - disabled: true + optional: true command: "readAttribute" attribute: "LifetimeRunningHours" response: @@ -806,13 +838,14 @@ tests: - label: "read the optional attribute: Power" disabled: true + optional: true command: "readAttribute" attribute: "Power" response: value: null - label: "read the optional attribute: Power" - disabled: true + optional: true command: "readAttribute" attribute: "Power" response: @@ -820,14 +853,14 @@ tests: type: uint24 - label: "read the optional attribute: LifetimeEnergyConsumed" - disabled: true + optional: true command: "readAttribute" attribute: "LifetimeEnergyConsumed" response: value: 0 - label: "read the optional attribute: LifetimeEnergyConsumed" - disabled: true + optional: true command: "readAttribute" attribute: "LifetimeEnergyConsumed" response: diff --git a/src/app/tests/suites/certification/Test_TC_PCC_2_3.yaml b/src/app/tests/suites/certification/Test_TC_PCC_2_3.yaml index 02193ff2f428af..de2e95de1f9afe 100644 --- a/src/app/tests/suites/certification/Test_TC_PCC_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_PCC_2_3.yaml @@ -38,7 +38,6 @@ tests: value: 0 - label: "Write 0 to the ControlMode attribute to DUT" - disabled: true command: "writeAttribute" attribute: "ControlMode" PICS: A_CONTROLMODE @@ -46,7 +45,6 @@ tests: value: 0 - label: "Reads the attribute: EffectiveControlMode" - disabled: true command: "readAttribute" attribute: "EffectiveControlMode" PICS: A_EFFECTIVECONTROLMODE @@ -54,7 +52,6 @@ tests: value: 0 - label: "Write 1 to the ControlMode attribute to DUT" - disabled: true command: "writeAttribute" attribute: "ControlMode" PICS: A_CONTROLMODE @@ -70,7 +67,6 @@ tests: value: 1 - label: "Write 2 to the ControlMode attribute to DUT" - disabled: true command: "writeAttribute" attribute: "ControlMode" PICS: A_CONTROLMODE @@ -86,7 +82,6 @@ tests: value: 2 - label: "Write 3 to the ControlMode attribute to DUT" - disabled: true command: "writeAttribute" attribute: "ControlMode" PICS: A_CONTROLMODE @@ -102,7 +97,6 @@ tests: value: 3 - label: "Write 5 to the ControlMode attribute to DUT" - disabled: true command: "writeAttribute" attribute: "ControlMode" PICS: A_CONTROLMODE @@ -118,7 +112,6 @@ tests: value: 5 - label: "Write 7 to the ControlMode attribute to DUT" - disabled: true command: "writeAttribute" attribute: "ControlMode" PICS: A_CONTROLMODE diff --git a/src/app/tests/suites/certification/Test_TC_PRS_2_1.yaml b/src/app/tests/suites/certification/Test_TC_PRS_2_1.yaml index d38d3a4dc2b9f5..8f1704f095b24e 100644 --- a/src/app/tests/suites/certification/Test_TC_PRS_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PRS_2_1.yaml @@ -88,6 +88,7 @@ tests: - label: "Read the optional attribute: Tolerance" disabled: true + optional: true command: "readAttribute" attribute: "Tolerance" response: @@ -95,6 +96,7 @@ tests: - label: "Write the default values to optional attribute: Tolerance" disabled: true + optional: true command: "writeAttribute" attribute: "Tolerance" arguments: @@ -104,6 +106,7 @@ tests: - label: "Reads back optional attribute: Tolerance" disabled: true + optional: true command: "readAttribute" attribute: "Tolerance" response: @@ -112,6 +115,7 @@ tests: #Following attributes are based on the value of the extended feature in the cluster feature map - label: "Read the optional attribute: ScaledValue" disabled: true + optional: true command: "readAttribute" attribute: "ScaledValue" response: @@ -119,6 +123,7 @@ tests: - label: "Write the default values to optional attribute: ScaledValue" disabled: true + optional: true command: "writeAttribute" attribute: "ScaledValue" arguments: @@ -128,6 +133,7 @@ tests: - label: "Reads back optional attribute: ScaledValue" disabled: true + optional: true command: "readAttribute" attribute: "ScaledValue" response: @@ -135,6 +141,7 @@ tests: - label: "Read the optional attribute: MinScaledValue" disabled: true + optional: true command: "readAttribute" attribute: "MinScaledValue" response: @@ -142,6 +149,7 @@ tests: - label: "Write the default values to optional attribute: MinScaledValue" disabled: true + optional: true command: "writeAttribute" attribute: "MinScaledValue" arguments: @@ -151,6 +159,7 @@ tests: - label: "Reads back optional attribute: MinScaledValue" disabled: true + optional: true command: "readAttribute" attribute: "MinScaledValue" response: @@ -158,6 +167,7 @@ tests: - label: "Read the optional attribute: MaxScaledValue" disabled: true + optional: true command: "readAttribute" attribute: "MaxScaledValue" response: @@ -165,6 +175,7 @@ tests: - label: "Write the default values to optional attribute: MaxScaledValue" disabled: true + optional: true command: "writeAttribute" attribute: "MaxScaledValue" arguments: @@ -174,6 +185,7 @@ tests: - label: "Reads back optional attribute: MaxScaledValue" disabled: true + optional: true command: "readAttribute" attribute: "MaxScaledValue" response: @@ -181,6 +193,7 @@ tests: - label: "Read the optional attribute: ScaledTolerance" disabled: true + optional: true command: "readAttribute" attribute: "ScaledTolerance" response: @@ -188,6 +201,7 @@ tests: - label: "Write the default values to optional attribute: ScaledTolerance" disabled: true + optional: true command: "writeAttribute" attribute: "ScaledTolerance" arguments: @@ -197,6 +211,7 @@ tests: - label: "Reads back optional attribute: ScaledTolerance" disabled: true + optional: true command: "readAttribute" attribute: "ScaledTolerance" response: @@ -204,6 +219,7 @@ tests: - label: "Read the optional attribute: Scale" disabled: true + optional: true command: "readAttribute" attribute: "Scale" response: @@ -211,6 +227,7 @@ tests: - label: "Write the default values to optional attribute: Scale" disabled: true + optional: true command: "writeAttribute" attribute: "Scale" arguments: @@ -220,6 +237,7 @@ tests: - label: "Reads back optional attribute: Scale" disabled: true + optional: true command: "readAttribute" attribute: "Scale" response: diff --git a/src/app/tests/suites/certification/Test_TC_RH_2_1.yaml b/src/app/tests/suites/certification/Test_TC_RH_2_1.yaml index 6e3c87b1c8ebff..919f11558a5589 100644 --- a/src/app/tests/suites/certification/Test_TC_RH_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RH_2_1.yaml @@ -72,6 +72,7 @@ tests: - label: "Reads the optional attribute: Tolerance" disabled: true + optional: true command: "readAttribute" attribute: "tolerance" response: @@ -79,6 +80,7 @@ tests: - label: "Reads constraints of attribute: Tolerance" disabled: true + optional: true command: "readAttribute" attribute: "tolerance" response: diff --git a/src/app/tests/suites/certification/Test_TC_DIAGSW_1_1.yaml b/src/app/tests/suites/certification/Test_TC_SWDIAG_1_1.yaml similarity index 96% rename from src/app/tests/suites/certification/Test_TC_DIAGSW_1_1.yaml rename to src/app/tests/suites/certification/Test_TC_SWDIAG_1_1.yaml index c1cfa8b19ac932..5a3b2eb272b2ef 100644 --- a/src/app/tests/suites/certification/Test_TC_DIAGSW_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SWDIAG_1_1.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 48.1.1. [TC-DIAGSW-1.1] Attributes with server as DUT +name: 45.1.1. [TC-SWDIAG-1.1] Attributes with server as DUT config: cluster: "Software Diagnostics" @@ -36,28 +36,28 @@ tests: value: 0 - label: "Reads CurrentHeapFree non-global attribute value from DUT" + optional: true command: "readAttribute" attribute: "CurrentHeapFree" - optional: true response: constraints: type: uint64 - label: "Reads CurrentHeapUsed non-global attribute value from DUT" + optional: true command: "readAttribute" attribute: "CurrentHeapUsed" PICS: A_CURRENTHEAPUSED - optional: true response: constraints: type: uint64 - label: "Reads CurrentHeapHighWaterMark non-global attribute value from DUT" + optional: true command: "readAttribute" attribute: "CurrentHeapHighWatermark" PICS: A_CURRENTHEAPHIGHWATERMARK - optional: true response: constraints: type: uint64 diff --git a/src/app/tests/suites/certification/Test_TC_DIAGSW_2_1.yaml b/src/app/tests/suites/certification/Test_TC_SWDIAG_2_1.yaml similarity index 91% rename from src/app/tests/suites/certification/Test_TC_DIAGSW_2_1.yaml rename to src/app/tests/suites/certification/Test_TC_SWDIAG_2_1.yaml index f8ca71e75f3167..317e07670041c7 100644 --- a/src/app/tests/suites/certification/Test_TC_DIAGSW_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SWDIAG_2_1.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 48.1.3. [TC-DIAGSW-2.1] Event functionality with server as DUT +name: 45.1.3. [TC-SWDIAG-2.1] Event functionality with server as DUT config: cluster: "Software Diagnostics" @@ -22,6 +22,7 @@ tests: #issue #11725 Reading the List is not implemented in YAML framework - label: "Reads a list of SoftwareFault struct from DUT" disabled: true + optional: true command: "readAttribute" attribute: "SoftwareFault" PICS: E_SOFTWAREFAULT diff --git a/src/app/tests/suites/certification/Test_TC_DIAGSW_3_2.yaml b/src/app/tests/suites/certification/Test_TC_SWDIAG_3_1.yaml similarity index 91% rename from src/app/tests/suites/certification/Test_TC_DIAGSW_3_2.yaml rename to src/app/tests/suites/certification/Test_TC_SWDIAG_3_1.yaml index 0681abfe19be2a..c9143709264272 100644 --- a/src/app/tests/suites/certification/Test_TC_DIAGSW_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_SWDIAG_3_1.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 48.1.4. [TC-DIAGSW-3.2] Command received functionality with server as DUT +name: 45.1.4. [TC-SWDIAG-3.1] Command received functionality with server as DUT config: cluster: "Software Diagnostics" @@ -26,11 +26,13 @@ tests: #issue #11578 ResetWatermarks command is Failing - label: "Sends ResetWatermarks to DUT" disabled: true + optional: true command: "ResetWatermarks" PICS: CR_RESETWATERMARKS - label: "Reads a list of ThreadMetrics struct attribute from DUT." disabled: true + optional: true command: "readAttribute" attribute: "ThreadMetrics" PICS: A_THREADMETRICS @@ -39,6 +41,7 @@ tests: - label: "Reads CurrentHeapUsed attribute value from DUT" disabled: true + optional: true command: "readAttribute" attribute: "CurrentHeapUsed" PICS: A_CURRENTHEAPUSED @@ -47,6 +50,7 @@ tests: - label: "Reads CurrentHeapHighWaterMark attribute value from DUT" disabled: true + optional: true command: "readAttribute" attribute: "CurrentHeapHighWatermark" PICS: A_CURRENTHEAPHIGHWATERMARK diff --git a/src/app/tests/suites/certification/Test_TC_TM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_TM_2_1.yaml index 74e41103215c0b..e186215f18b52a 100644 --- a/src/app/tests/suites/certification/Test_TC_TM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TM_2_1.yaml @@ -52,6 +52,7 @@ tests: - label: "read the optional attribute: Tolerance" disabled: true + optional: true command: "readAttribute" attribute: "Tolerance" response: diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml index b169356f25024a..9c57ebebce9efb 100644 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml @@ -568,6 +568,7 @@ tests: - label: "Reads optional attributes from DUT: OutdoorTemperature" disabled: true + optional: true command: "readAttribute" attribute: "OutdoorTemperature" response: @@ -576,6 +577,7 @@ tests: - label: "Reads constraints of optional attributes from DUT: OutdoorTemperature" disabled: true + optional: true command: "readAttribute" attribute: "OutdoorTemperature" response: @@ -586,6 +588,7 @@ tests: "Writes the respective default value to optional attributes to DUT: OutdoorTemperature" disabled: true + optional: true command: "writeAttribute" attribute: "OutdoorTemperature" arguments: @@ -593,6 +596,7 @@ tests: - label: "Read back optional attributes from DUT: OutdoorTemperature" disabled: true + optional: true command: "readAttribute" attribute: "OutdoorTemperature" response: @@ -600,6 +604,7 @@ tests: - label: "Reads optional attributes from DUT: Occupancy" disabled: true + optional: true command: "readAttribute" attribute: "Occupancy" response: @@ -607,6 +612,7 @@ tests: - label: "Reads constraints of optional attributes from DUT: Occupancy" disabled: true + optional: true command: "readAttribute" attribute: "Occupancy" response: @@ -619,6 +625,7 @@ tests: "Writes the respective default value to optional attributes to DUT: Occupancy" disabled: true + optional: true command: "writeAttribute" attribute: "Occupancy" arguments: @@ -626,6 +633,7 @@ tests: - label: "Read back optional attributes from DUT: Occupancy" disabled: true + optional: true command: "readAttribute" attribute: "Occupancy" response: @@ -633,6 +641,7 @@ tests: - label: "Reads optionl attributes from DUT: HVACSystemTypeConfiguration" disabled: true + optional: true command: "readAttribute" attribute: "HVACSystemTypeConfiguration" response: @@ -642,6 +651,7 @@ tests: "Reads constraints of optional attributes from DUT: HVACSystemTypeConfiguration" disabled: true + optional: true command: "readAttribute" attribute: "HVACSystemTypeConfiguration" response: @@ -654,6 +664,7 @@ tests: "Writes the respective default value to optional attributes to DUT: HVACSystemTypeConfiguration" disabled: true + optional: true command: "writeAttribute" attribute: "HVACSystemTypeConfiguration" arguments: @@ -662,6 +673,7 @@ tests: - label: "Read back optional attributes from DUT: HVACSystemTypeConfiguration" disabled: true + optional: true command: "readAttribute" attribute: "HVACSystemTypeConfiguration" response: @@ -669,6 +681,7 @@ tests: - label: "Reads optional attributes from DUT: LocalTemperatureCalibration" disabled: true + optional: true command: "readAttribute" attribute: "LocalTemperatureCalibration" response: @@ -678,6 +691,7 @@ tests: "Reads constraints of optional attributes from DUT: LocalTemperatureCalibration" disabled: true + optional: true command: "readAttribute" attribute: "LocalTemperatureCalibration" response: @@ -690,6 +704,7 @@ tests: "Writes the respective default value to optional attributes to DUT: LocalTemperatureCalibration" disabled: true + optional: true command: "writeAttribute" attribute: "LocalTemperatureCalibration" arguments: @@ -698,12 +713,14 @@ tests: - label: "Read back optional attributes from DUT: LocalTemperatureCalibration" disabled: true + optional: true command: "readAttribute" attribute: "LocalTemperatureCalibration" response: value: 0 - label: "Reads optional attributes from DUT: MinSetpointDeadBand" + optional: true command: "readAttribute" attribute: "min setpoint dead band" response: @@ -712,6 +729,7 @@ tests: - label: "Reads constraints of optional attributes from DUT: MinSetpointDeadBand" + optional: true command: "readAttribute" attribute: "min setpoint dead band" response: @@ -723,12 +741,14 @@ tests: - label: "Writes the respective default value to optional attributes to DUT: MinSetpointDeadBand" + optional: true command: "writeAttribute" attribute: "min setpoint dead band" arguments: value: 25 - label: "Read back optional attributes from DUT: MinSetpointDeadBand" + optional: true command: "readAttribute" attribute: "min setpoint dead band" response: @@ -736,6 +756,7 @@ tests: - label: "Reads optional attributes from DUT: RemoteSensing" disabled: true + optional: true command: "readAttribute" attribute: "RemoteSensing" response: @@ -743,6 +764,7 @@ tests: - label: "Reads constraints of optional attributes from DUT: RemoteSensing" disabled: true + optional: true command: "readAttribute" attribute: "RemoteSensing" response: @@ -753,6 +775,7 @@ tests: "Writes the respective default value to optional attributes to DUT: RemoteSensing" disabled: true + optional: true command: "writeAttribute" attribute: "RemoteSensing" arguments: @@ -760,6 +783,7 @@ tests: - label: "Read back optional attributes from DUT: RemoteSensing" disabled: true + optional: true command: "readAttribute" attribute: "RemoteSensing" response: @@ -767,6 +791,7 @@ tests: - label: "Reads optional attributes from DUT: AlarmMask" disabled: true + optional: true command: "readAttribute" attribute: "AlarmMask" response: @@ -774,6 +799,7 @@ tests: - label: "Reads constraints of optional attributes from DUT: AlarmMask" disabled: true + optional: true command: "readAttribute" attribute: "AlarmMask" response: @@ -786,6 +812,7 @@ tests: "Writes the respective default value to optional attributes to DUT: AlarmMask" disabled: true + optional: true command: "writeAttribute" attribute: "AlarmMask" arguments: @@ -795,6 +822,7 @@ tests: - label: "Read back optional attributes from DUT: AlarmMask" disabled: true + optional: true command: "readAttribute" attribute: "AlarmMask" response: @@ -802,6 +830,7 @@ tests: - label: "Reads optional attributes from DUT: ThermostatRunningMode" disabled: true + optional: true command: "readAttribute" attribute: "ThermostatRunningMode" response: @@ -811,6 +840,7 @@ tests: "Reads constraints of optional attributes from DUT: ThermostatRunningMode" disabled: true + optional: true command: "readAttribute" attribute: "ThermostatRunningMode" response: @@ -823,6 +853,7 @@ tests: "Writes the respective default value to optional attributes to DUT: ThermostatRunningMode" disabled: true + optional: true command: "writeAttribute" attribute: "ThermostatRunningMode" arguments: @@ -832,12 +863,14 @@ tests: - label: "Read back optional attributes from DUT: ThermostatRunningMode" disabled: true + optional: true command: "readAttribute" attribute: "ThermostatRunningMode" response: value: 0 - label: "Reads constraints of optional attributes from DUT: StartOfWeek" + optional: true command: "readAttribute" attribute: "start of week" response: @@ -849,6 +882,7 @@ tests: - label: "Writes the respective default value to optional attributes to DUT: StartOfWeek" + optional: true command: "writeAttribute" attribute: "start of week" arguments: @@ -857,6 +891,7 @@ tests: error: UNSUPPORTED_WRITE - label: "Read back optional attributes from DUT: StartOfWeek" + optional: true command: "readAttribute" attribute: "start of week" response: @@ -865,6 +900,7 @@ tests: #issue #11625 default value is 0 as per spec but expecting 7 - label: "Reads optional attributes from DUT: NumberOfWeeklyTransitions" disabled: true + optional: true command: "readAttribute" attribute: "number of weekly transitions" response: @@ -873,6 +909,7 @@ tests: - label: "Reads constraints of optional attributes from DUT: NumberOfWeeklyTransitions" + optional: true command: "readAttribute" attribute: "number of weekly transitions" response: @@ -882,6 +919,7 @@ tests: - label: "Writes the respective default value to optional attributes to DUT: NumberOfWeeklyTransitions" + optional: true command: "writeAttribute" attribute: "number of weekly transitions" arguments: @@ -891,6 +929,7 @@ tests: - label: "Read back optional attributes from DUT: NumberOfWeeklyTransitions" disabled: true + optional: true command: "readAttribute" attribute: "number of weekly transitions" response: @@ -899,6 +938,7 @@ tests: #issue #11625 default value is 0 as per spec but expecting 4 - label: "Reads optional attributes from DUT: NumberOfDailyTransitions" disabled: true + optional: true command: "readAttribute" attribute: "number of daily transitions" response: @@ -907,6 +947,7 @@ tests: - label: "Reads constraints of optional attributes from DUT: NumberOfDailyTransitions" + optional: true command: "readAttribute" attribute: "number of daily transitions" response: @@ -916,6 +957,7 @@ tests: - label: "Writes the respective default value to optional attributes to DUT: NumberOfDailyTransitions" + optional: true command: "writeAttribute" attribute: "number of daily transitions" arguments: @@ -925,6 +967,7 @@ tests: - label: "Read back optional attributes from DUT: NumberOfDailyTransitions" disabled: true + optional: true command: "readAttribute" attribute: "number of daily transitions" response: @@ -932,6 +975,7 @@ tests: - label: "Reads optional attributes from DUT: TemperatureSetpointHold" disabled: true + optional: true command: "readAttribute" attribute: "TemperatureSetpointHold" response: @@ -941,6 +985,7 @@ tests: "Reads constraints of optional attributes from DUT: TemperatureSetpointHold" disabled: true + optional: true command: "readAttribute" attribute: "TemperatureSetpointHold" response: @@ -953,6 +998,7 @@ tests: "Writes the respective default value to optional attributes to DUT: TemperatureSetpointHold" disabled: true + optional: true command: "writeAttribute" attribute: "TemperatureSetpointHold" arguments: @@ -960,6 +1006,7 @@ tests: - label: "Read back optional attributes from DUT: TemperatureSetpointHold" disabled: true + optional: true command: "readAttribute" attribute: "TemperatureSetpointHold" response: @@ -968,6 +1015,7 @@ tests: - label: "Reads optional attributes from DUT: TemperatureSetpointHoldDuration" disabled: true + optional: true command: "readAttribute" attribute: "TemperatureSetpointHoldDuration" response: @@ -977,6 +1025,7 @@ tests: "Reads constraints of optional attributes from DUT: TemperatureSetpointHoldDuration" disabled: true + optional: true command: "readAttribute" attribute: "TemperatureSetpointHoldDuration" response: @@ -989,6 +1038,7 @@ tests: "Writes the respective default value to optional attributes to DUT: TemperatureSetpointHoldDuration" disabled: true + optional: true command: "writeAttribute" attribute: "TemperatureSetpointHoldDuration" arguments: @@ -998,6 +1048,7 @@ tests: "Read back optional attributes from DUT: TemperatureSetpointHoldDuration" disabled: true + optional: true command: "readAttribute" attribute: "TemperatureSetpointHoldDuration" response: @@ -1007,6 +1058,7 @@ tests: "Reads optional attributes from DUT: ThermostatProgrammingOperationMode" disabled: true + optional: true command: "readAttribute" attribute: "ThermostatProgrammingOperationMode" response: @@ -1016,6 +1068,7 @@ tests: "Reads constraints of optional attributes from DUT: ThermostatProgrammingOperationMode" disabled: true + optional: true command: "readAttribute" attribute: "ThermostatProgrammingOperationMode" response: @@ -1028,6 +1081,7 @@ tests: "Writes the respective default value to optional attributes to DUT: ThermostatProgrammingOperationMode" disabled: true + optional: true command: "writeAttribute" attribute: "ThermostatProgrammingOperationMode" arguments: @@ -1037,6 +1091,7 @@ tests: "Read back optional attributes from DUT: ThermostatProgrammingOperationMode" disabled: true + optional: true command: "readAttribute" attribute: "ThermostatProgrammingOperationMode" response: @@ -1046,6 +1101,7 @@ tests: "Reads constraints of optional attributes from DUT: ThermostatRunningState" disabled: true + optional: true command: "readAttribute" attribute: "ThermostatRunningState" response: @@ -1058,6 +1114,7 @@ tests: "Writes the respective default value to optional attributes to DUT: ThermostatRunningState" disabled: true + optional: true command: "writeAttribute" attribute: "ThermostatRunningState" arguments: @@ -1067,6 +1124,7 @@ tests: - label: "Read back optional attributes from DUT: ThermostatRunningState" disabled: true + optional: true command: "readAttribute" attribute: "ThermostatRunningState" response: @@ -1074,6 +1132,7 @@ tests: - label: "Reads optional attributes from DUT: SetpointChangeSource" disabled: true + optional: true command: "readAttribute" attribute: "SetpointChangeSource" response: @@ -1083,6 +1142,7 @@ tests: "Reads constraints of optional attributes from DUT: SetpointChangeSource" disabled: true + optional: true command: "readAttribute" attribute: "SetpointChangeSource" response: @@ -1095,6 +1155,7 @@ tests: "Writes the respective default value to optional attributes to DUT: SetpointChangeSource" disabled: true + optional: true command: "writeAttribute" attribute: "SetpointChangeSource" arguments: @@ -1104,6 +1165,7 @@ tests: - label: "Read back optional attributes from DUT: SetpointChangeSource" disabled: true + optional: true command: "readAttribute" attribute: "SetpointChangeSource" response: @@ -1111,6 +1173,7 @@ tests: - label: "Reads optional attributes from DUT: SetpointChangeAmount" disabled: true + optional: true command: "readAttribute" attribute: "SetpointChangeAmount" response: @@ -1120,6 +1183,7 @@ tests: "Reads constraints of optional attributes from DUT: SetpointChangeAmount" disabled: true + optional: true command: "readAttribute" attribute: "SetpointChangeAmount" response: @@ -1130,6 +1194,7 @@ tests: "Writes the respective default value to optional attributes to DUT: SetpointChangeAmount" disabled: true + optional: true command: "writeAttribute" attribute: "SetpointChangeAmount" arguments: @@ -1139,6 +1204,7 @@ tests: - label: "Read back optional attributes from DUT: SetpointChangeAmount" disabled: true + optional: true command: "readAttribute" attribute: "SetpointChangeAmount" response: @@ -1146,6 +1212,7 @@ tests: - label: "Reads optional attributes from DUT: SetpointChangeSourceTimestamp" disabled: true + optional: true command: "readAttribute" attribute: "SetpointChangeSourceTimestamp" response: @@ -1155,6 +1222,7 @@ tests: "Reads constraints of optional attributes from DUT: SetpointChangeSourceTimestamp" disabled: true + optional: true command: "readAttribute" attribute: "SetpointChangeSourceTimestamp" response: @@ -1165,6 +1233,7 @@ tests: "Writes the respective default value to optional attributes to DUT: SetpointChangeSourceTimestamp" disabled: true + optional: true command: "writeAttribute" attribute: "SetpointChangeSourceTimestamp" arguments: @@ -1175,6 +1244,7 @@ tests: - label: "Read back optional attributes from DUT: SetpointChangeSourceTimestamp" disabled: true + optional: true command: "readAttribute" attribute: "SetpointChangeSourceTimestamp" response: @@ -1182,6 +1252,7 @@ tests: - label: "Reads optional attributes from DUT: OccupiedSetback" disabled: true + optional: true command: "readAttribute" attribute: "OccupiedSetback" response: @@ -1190,6 +1261,7 @@ tests: - label: "Reads constraints of optional attributes from DUT: OccupiedSetback" disabled: true + optional: true command: "readAttribute" attribute: "OccupiedSetback" response: @@ -1202,6 +1274,7 @@ tests: "Writes the respective default value to optional attributes to DUT: OccupiedSetback" disabled: true + optional: true command: "writeAttribute" attribute: "OccupiedSetback" arguments: @@ -1211,6 +1284,7 @@ tests: - label: "Read back optional attributes from DUT: OccupiedSetback" disabled: true + optional: true command: "readAttribute" attribute: "OccupiedSetback" response: @@ -1218,6 +1292,7 @@ tests: - label: "Reads optional attributes from DUT: OccupiedSetbackMin" disabled: true + optional: true command: "readAttribute" attribute: "OccupiedSetbackMin" response: @@ -1226,6 +1301,7 @@ tests: - label: "Reads constraints of optional attributes from DUT: OccupiedSetbackMin" disabled: true + optional: true command: "readAttribute" attribute: "OccupiedSetbackMin" response: @@ -1238,6 +1314,7 @@ tests: "Writes the respective default value to optional attributes to DUT: OccupiedSetbackMin" disabled: true + optional: true command: "writeAttribute" attribute: "OccupiedSetbackMin" arguments: @@ -1245,6 +1322,7 @@ tests: - label: "Read back optional attributes from DUT: OccupiedSetbackMin" disabled: true + optional: true command: "readAttribute" attribute: "OccupiedSetbackMin" response: @@ -1252,6 +1330,7 @@ tests: - label: "Reads optional attributes from DUT: OccupiedSetbackMax" disabled: true + optional: true command: "readAttribute" attribute: "OccupiedSetbackMax" response: @@ -1260,6 +1339,7 @@ tests: - label: "Reads constraints of optional attributes from DUT: OccupiedSetbackMax" disabled: true + optional: true command: "readAttribute" attribute: "OccupiedSetbackMax" response: @@ -1272,6 +1352,7 @@ tests: "Writes the respective default value to optional attributes to DUT: OccupiedSetbackMax" disabled: true + optional: true command: "writeAttribute" attribute: "OccupiedSetbackMax" arguments: @@ -1279,6 +1360,7 @@ tests: - label: "Read back optional attributes from DUT: OccupiedSetbackMax" disabled: true + optional: true command: "readAttribute" attribute: "OccupiedSetbackMax" response: @@ -1286,6 +1368,7 @@ tests: - label: "Reads optional attributes from DUT: UnoccupiedSetback" disabled: true + optional: true command: "readAttribute" attribute: "UnoccupiedSetback" response: @@ -1294,6 +1377,7 @@ tests: - label: "Reads constraints of optional attributes from DUT: UnoccupiedSetback" disabled: true + optional: true command: "readAttribute" attribute: "UnoccupiedSetback" response: @@ -1306,6 +1390,7 @@ tests: "Writes the respective default value to optional attributes to DUT: UnoccupiedSetback" disabled: true + optional: true command: "writeAttribute" attribute: "UnoccupiedSetback" arguments: @@ -1315,6 +1400,7 @@ tests: - label: "Read back optional attributes from DUT: UnoccupiedSetback" disabled: true + optional: true command: "readAttribute" attribute: "UnoccupiedSetback" response: @@ -1322,6 +1408,7 @@ tests: - label: "Reads optional attributes from DUT: UnoccupiedSetbackMin" disabled: true + optional: true command: "readAttribute" attribute: "UnoccupiedSetbackMin" response: @@ -1331,6 +1418,7 @@ tests: "Reads constraints of optional attributes from DUT: UnoccupiedSetbackMin" disabled: true + optional: true command: "readAttribute" attribute: "UnoccupiedSetbackMin" response: @@ -1343,6 +1431,7 @@ tests: "Writes the respective default value to optional attributes to DUT: UnoccupiedSetbackMin" disabled: true + optional: true command: "writeAttribute" attribute: "UnoccupiedSetbackMin" arguments: @@ -1350,6 +1439,7 @@ tests: - label: "Read back optional attributes from DUT: UnoccupiedSetbackMin" disabled: true + optional: true command: "readAttribute" attribute: "UnoccupiedSetbackMin" response: @@ -1357,6 +1447,7 @@ tests: - label: "Reads optional attributes from DUT: UnoccupiedSetbackMax" disabled: true + optional: true command: "readAttribute" attribute: "UnoccupiedSetbackMax" response: @@ -1366,6 +1457,7 @@ tests: "Reads constraints of optional attributes from DUT: UnoccupiedSetbackMax" disabled: true + optional: true command: "readAttribute" attribute: "UnoccupiedSetbackMax" response: @@ -1378,6 +1470,7 @@ tests: "Writes the respective default value to optional attributes to DUT: UnoccupiedSetbackMax" disabled: true + optional: true command: "writeAttribute" attribute: "UnoccupiedSetbackMax" arguments: @@ -1385,6 +1478,7 @@ tests: - label: "Read back optional attributes from DUT: UnoccupiedSetbackMax" disabled: true + optional: true command: "readAttribute" attribute: "UnoccupiedSetbackMax" response: @@ -1392,6 +1486,7 @@ tests: - label: "Reads optional attributes from DUT: EmergencyHeatDelta" disabled: true + optional: true command: "readAttribute" attribute: "EmergencyHeatDelta" response: @@ -1400,6 +1495,7 @@ tests: - label: "Reads constraints of optional attributes from DUT: EmergencyHeatDelta" disabled: true + optional: true command: "readAttribute" attribute: "EmergencyHeatDelta" response: @@ -1410,6 +1506,7 @@ tests: "Writes the respective default value to optional attributes to DUT: EmergencyHeatDelta" disabled: true + optional: true command: "writeAttribute" attribute: "EmergencyHeatDelta" arguments: @@ -1417,6 +1514,7 @@ tests: - label: "Read back optional attributes from DUT: EmergencyHeatDelta" disabled: true + optional: true command: "readAttribute" attribute: "EmergencyHeatDelta" response: @@ -1424,6 +1522,7 @@ tests: - label: "Reads optional attributes from DUT: ACType" disabled: true + optional: true command: "readAttribute" attribute: "ACType" response: @@ -1431,6 +1530,7 @@ tests: - label: "Reads constraints of optional attributes from DUT: ACType" disabled: true + optional: true command: "readAttribute" attribute: "ACType" response: @@ -1443,6 +1543,7 @@ tests: "Writes the respective default value to optional attributes to DUT: ACType" disabled: true + optional: true command: "writeAttribute" attribute: "ACType" arguments: @@ -1450,6 +1551,7 @@ tests: - label: "Read back optional attributes from DUT: ACType" disabled: true + optional: true command: "readAttribute" attribute: "ACType" response: @@ -1457,6 +1559,7 @@ tests: - label: "Reads optional attributes from DUT: ACCapacity" disabled: true + optional: true command: "readAttribute" attribute: "ACCapacity" response: @@ -1464,6 +1567,7 @@ tests: - label: "Reads constraints of optional attributes from DUT: ACCapacity" disabled: true + optional: true command: "readAttribute" attribute: "ACCapacity" response: @@ -1474,6 +1578,7 @@ tests: "Writes the respective default value to optional attributes to DUT: ACCapacity" disabled: true + optional: true command: "writeAttribute" attribute: "ACCapacity" arguments: @@ -1481,6 +1586,7 @@ tests: - label: "Read back optional attributes from DUT: ACCapacity" disabled: true + optional: true command: "readAttribute" attribute: "ACCapacity" response: @@ -1488,6 +1594,7 @@ tests: - label: "Reads optional attributes from DUT: ACRefrigerantType" disabled: true + optional: true command: "readAttribute" attribute: "ACRefrigerantType" response: @@ -1496,6 +1603,7 @@ tests: - label: "Reads constraints of optional attributes from DUT: ACRefrigerantType" disabled: true + optional: true command: "readAttribute" attribute: "ACRefrigerantType" response: @@ -1508,6 +1616,7 @@ tests: "Writes the respective default value to optional attributes to DUT: ACRefrigerantType" disabled: true + optional: true command: "writeAttribute" attribute: "ACRefrigerantType" arguments: @@ -1515,6 +1624,7 @@ tests: - label: "Read back optional attributes from DUT: ACRefrigerantType" disabled: true + optional: true command: "readAttribute" attribute: "ACRefrigerantType" response: @@ -1522,6 +1632,7 @@ tests: - label: "Reads optional attributes from DUT: ACCompressorType" disabled: true + optional: true command: "readAttribute" attribute: "ACCompressorType" response: @@ -1530,6 +1641,7 @@ tests: - label: "Reads constraints of optional attributes from DUT: ACCompressorType" disabled: true + optional: true command: "readAttribute" attribute: "ACCompressorType" response: @@ -1542,6 +1654,7 @@ tests: "Writes the respective default value to optional attributes to DUT: ACCompressorType" disabled: true + optional: true command: "writeAttribute" attribute: "ACCompressorType" arguments: @@ -1549,6 +1662,7 @@ tests: - label: "Read back optional attributes from DUT: ACCompressorType" disabled: true + optional: true command: "readAttribute" attribute: "ACCompressorType" response: @@ -1556,6 +1670,7 @@ tests: - label: "Reads optional attributes from DUT: ACErrorCode" disabled: true + optional: true command: "readAttribute" attribute: "ACErrorCode" response: @@ -1563,6 +1678,7 @@ tests: - label: "Reads constraints of optional attributes from DUT: ACErrorCode" disabled: true + optional: true command: "readAttribute" attribute: "ACErrorCode" response: @@ -1573,6 +1689,7 @@ tests: "Writes the respective default value to optional attributes to DUT: ACErrorCode" disabled: true + optional: true command: "writeAttribute" attribute: "ACErrorCode" arguments: @@ -1580,6 +1697,7 @@ tests: - label: "Read back optional attributes from DUT: ACErrorCode" disabled: true + optional: true command: "readAttribute" attribute: "ACErrorCode" response: @@ -1587,6 +1705,7 @@ tests: - label: "Reads optional attributes from DUT: ACLouverPosition" disabled: true + optional: true command: "readAttribute" attribute: "ACLouverPosition" response: @@ -1595,6 +1714,7 @@ tests: - label: "Reads constraints of optional attributes from DUT: ACLouverPosition" disabled: true + optional: true command: "readAttribute" attribute: "ACLouverPosition" response: @@ -1607,6 +1727,7 @@ tests: "Writes the respective default value to optional attributes to DUT: ACLouverPosition" disabled: true + optional: true command: "writeAttribute" attribute: "ACLouverPosition" arguments: @@ -1614,6 +1735,7 @@ tests: - label: "Read back optional attributes from DUT: ACLouverPosition" disabled: true + optional: true command: "readAttribute" attribute: "ACLouverPosition" response: @@ -1621,6 +1743,7 @@ tests: - label: "Reads optional attributes from DUT: ACCoilTemperature" disabled: true + optional: true command: "readAttribute" attribute: "ACCoilTemperature" response: @@ -1629,6 +1752,7 @@ tests: - label: "Reads constraints of optional attributes from DUT: ACCoilTemperature" disabled: true + optional: true command: "readAttribute" attribute: "ACCoilTemperature" response: @@ -1639,6 +1763,7 @@ tests: "Writes the respective default value to optional attributes to DUT: ACCoilTemperature" disabled: true + optional: true command: "writeAttribute" attribute: "ACCoilTemperature" arguments: @@ -1648,6 +1773,7 @@ tests: - label: "Read back optional attributes from DUT: ACCoilTemperature" disabled: true + optional: true command: "readAttribute" attribute: "ACCoilTemperature" response: @@ -1655,6 +1781,7 @@ tests: - label: "Reads optional attributes from DUT: ACCapacityFormat" disabled: true + optional: true command: "readAttribute" attribute: "ACCapacityFormat" response: @@ -1663,6 +1790,7 @@ tests: - label: "Reads constraints of optional attributes from DUT: ACCapacityFormat" disabled: true + optional: true command: "readAttribute" attribute: "ACCapacityFormat" response: @@ -1673,6 +1801,7 @@ tests: "Writes the respective default value to optional attributes to DUT: ACCapacityFormat" disabled: true + optional: true command: "writeAttribute" attribute: "ACCapacityFormat" arguments: @@ -1680,6 +1809,7 @@ tests: - label: "Read back optional attributes from DUT: ACCapacityFormat" disabled: true + optional: true command: "readAttribute" attribute: "ACCapacityFormat" response: diff --git a/src/darwin/Framework/CHIP/templates/tests.js b/src/darwin/Framework/CHIP/templates/tests.js index 0f317e229a7d4d..e99a4d93413578 100644 --- a/src/darwin/Framework/CHIP/templates/tests.js +++ b/src/darwin/Framework/CHIP/templates/tests.js @@ -185,9 +185,9 @@ function getTests() ]; const SoftwareDiagnostics = [ - 'Test_TC_DIAGSW_1_1', - 'Test_TC_DIAGSW_2_1', - 'Test_TC_DIAGSW_3_2', + 'Test_TC_SWDIAG_1_1', + 'Test_TC_SWDIAG_2_1', + 'Test_TC_SWDIAG_3_1', ]; const Subscriptions = [ diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index 4442e45957d4ca..bf489b2ad33a5f 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -2457,6 +2457,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000060_ReadAttribute readAttributeCoupleColorTempToLevelMinMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: CoupleColorTempToLevelMinMireds Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -2482,6 +2487,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000061_WriteAttribute @"CoupleColorTempToLevelMinMireds Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; @@ -2503,6 +2513,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000062_ReadAttribute readAttributeCoupleColorTempToLevelMinMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads back optional attribute: CoupleColorTempToLevelMinMireds Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -2529,6 +2544,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000063_ReadAttribute readAttributeStartUpColorTemperatureMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: StartUpColorTemperatureMireds Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -2561,6 +2581,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000064_WriteAttribute @"StartUpColorTemperatureMireds Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -2582,6 +2607,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000065_ReadAttribute readAttributeStartUpColorTemperatureMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads back optional attribute: StartUpColorTemperatureMireds Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -2606,6 +2636,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000066_ReadAttribute [cluster readAttributeRemainingTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the Optional attribute: RemainingTime Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -2630,6 +2665,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000067_ReadAttribute [cluster readAttributeRemainingTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Validate constraints of attribute: RemainingTime Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -2661,6 +2701,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000068_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default values to optional attribute: RemainingTime Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -2679,6 +2724,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000069_ReadAttribute [cluster readAttributeRemainingTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads back optional attribute: RemainingTime Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -2703,6 +2753,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000070_ReadAttribute [cluster readAttributeDriftCompensationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: DriftCompensation Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -2734,6 +2789,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000071_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default values to optional attribute: DriftCompensation Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -2752,6 +2812,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000072_ReadAttribute [cluster readAttributeDriftCompensationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads back optional attribute: DriftCompensation Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -2776,6 +2841,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000073_ReadAttribute [cluster readAttributeCompensationTextWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: CompensationText Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -3838,6 +3908,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000119_ReadAttribute [cluster readAttributeWhitePointXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: WhitePointX Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -3867,6 +3942,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000120_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default optional attribute: WhitePointX Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -3886,6 +3966,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000121_ReadAttribute [cluster readAttributeWhitePointXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back the optional attribute: WhitePointX Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -3910,6 +3995,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000122_ReadAttribute [cluster readAttributeWhitePointYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: WhitePointY Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -3939,6 +4029,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000123_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default optional attribute: WhitePointY Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -3958,6 +4053,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000124_ReadAttribute [cluster readAttributeWhitePointYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back the optional attribute: WhitePointY Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -3982,6 +4082,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000125_ReadAttribute [cluster readAttributeColorPointRXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: ColorPointRX Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -4011,6 +4116,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000126_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default optional attribute: ColorPointRX Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -4030,6 +4140,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000127_ReadAttribute [cluster readAttributeColorPointRXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back the optional attribute: ColorPointRX Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -4054,6 +4169,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000128_ReadAttribute [cluster readAttributeColorPointRYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: ColorPointRY Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -4083,6 +4203,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000129_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default optional attribute: ColorPointRY Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -4102,6 +4227,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000130_ReadAttribute [cluster readAttributeColorPointRYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back the optional attribute: ColorPointRY Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -4126,6 +4256,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000131_ReadAttribute [cluster readAttributeColorPointRIntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: ColorPointRIntensity Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -4145,6 +4280,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000132_ReadAttribute [cluster readAttributeColorPointGXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: ColorPointGX Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -4174,6 +4314,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000133_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default optional attribute: ColorPointGX Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -4193,6 +4338,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000134_ReadAttribute [cluster readAttributeColorPointGXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back the optional attribute: ColorPointGX Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -4217,6 +4367,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000135_ReadAttribute [cluster readAttributeColorPointGYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: ColorPointGY Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -4246,6 +4401,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000136_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default optional attribute: ColorPointGY Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -4265,6 +4425,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000137_ReadAttribute [cluster readAttributeColorPointGYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back the optional attribute: ColorPointGY Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -4289,6 +4454,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000138_ReadAttribute [cluster readAttributeColorPointGIntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: ColorPointGIntensity Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -4308,6 +4478,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000139_ReadAttribute [cluster readAttributeColorPointBXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: ColorPointBX Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -4337,6 +4512,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000140_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default optional attribute: ColorPointBX Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -4356,6 +4536,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000141_ReadAttribute [cluster readAttributeColorPointBXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back the optional attribute: ColorPointBX Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -4380,6 +4565,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000142_ReadAttribute [cluster readAttributeColorPointBYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: ColorPointBY Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -4409,6 +4599,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000143_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default optional attribute: ColorPointBY Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -4428,6 +4623,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000144_ReadAttribute [cluster readAttributeColorPointBYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back the optional attribute: ColorPointBY Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -4452,6 +4652,11 @@ - (void)testSendClusterTest_TC_CC_2_1_000145_ReadAttribute [cluster readAttributeColorPointBIntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: ColorPointBIntensity Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -9897,6 +10102,29 @@ - (void)testSendClusterTest_TC_FLW_2_1_000003_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - (void)testSendClusterTest_TC_FLW_2_1_000004_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"write the default value to optional attribute: MeasuredValue"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id measuredValueArgument; + measuredValueArgument = [NSNumber numberWithShort:0]; + [cluster + writeAttributeMeasuredValueWithValue:measuredValueArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"write the default value to optional attribute: MeasuredValue Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_FLW_2_1_000005_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"write the default value to optional attribute: MinMeasuredValue"]; @@ -9919,7 +10147,7 @@ - (void)testSendClusterTest_TC_FLW_2_1_000004_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_FLW_2_1_000005_WriteAttribute +- (void)testSendClusterTest_TC_FLW_2_1_000006_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"write the default value to optional attribute: MaxMeasuredValue"]; @@ -9942,7 +10170,7 @@ - (void)testSendClusterTest_TC_FLW_2_1_000005_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_FLW_2_1_000006_ReadAttribute +- (void)testSendClusterTest_TC_FLW_2_1_000007_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: MeasuredValue"]; @@ -9961,7 +10189,7 @@ - (void)testSendClusterTest_TC_FLW_2_1_000006_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_FLW_2_1_000007_ReadAttribute +- (void)testSendClusterTest_TC_FLW_2_1_000008_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: MinMeasuredValue"]; @@ -9980,7 +10208,7 @@ - (void)testSendClusterTest_TC_FLW_2_1_000007_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_FLW_2_1_000008_ReadAttribute +- (void)testSendClusterTest_TC_FLW_2_1_000009_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: MaxMeasuredValue"]; @@ -9999,6 +10227,121 @@ - (void)testSendClusterTest_TC_FLW_2_1_000008_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterTest_TC_FLW_2_1_000010_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: Tolerance"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: Tolerance Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_FLW_2_1_000011_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: Tolerance"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: Tolerance Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue unsignedShortValue], 2048U); + } + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_FLW_2_1_000012_WriteAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"write the default value to optional attribute: Tolerance"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id toleranceArgument; + toleranceArgument = [NSNumber numberWithUnsignedShort:0U]; + [cluster writeAttributeToleranceWithValue:toleranceArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"write the default value to optional attribute: Tolerance Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_FLW_2_1_000013_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: Tolerance"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: Tolerance Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} - (void)testSendClusterTest_TC_FLW_2_2_000000_WaitForCommissionee { @@ -11926,7 +12269,28 @@ - (void)testSendClusterTest_TC_OO_2_1_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_OO_2_1_000002_ReadAttribute +- (void)testSendClusterTest_TC_OO_2_1_000002_WriteAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"write the default value of mandatory attribute: OnOff"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id onOffArgument; + onOffArgument = [NSNumber numberWithBool:0]; + [cluster writeAttributeOnOffWithValue:onOffArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"write the default value of mandatory attribute: OnOff Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_OO_2_1_000003_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"reads back mandatory attribute: OnOff"]; @@ -11950,7 +12314,7 @@ - (void)testSendClusterTest_TC_OO_2_1_000002_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_OO_2_1_000003_ReadAttribute +- (void)testSendClusterTest_TC_OO_2_1_000004_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"read LT attribute: GlobalSceneControl"]; @@ -11974,7 +12338,7 @@ - (void)testSendClusterTest_TC_OO_2_1_000003_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_OO_2_1_000004_ReadAttribute +- (void)testSendClusterTest_TC_OO_2_1_000005_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"read LT attribute: OnTime"]; @@ -11998,7 +12362,7 @@ - (void)testSendClusterTest_TC_OO_2_1_000004_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_OO_2_1_000005_ReadAttribute +- (void)testSendClusterTest_TC_OO_2_1_000006_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"read LT attribute: OffWaitTime"]; @@ -12022,7 +12386,7 @@ - (void)testSendClusterTest_TC_OO_2_1_000005_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_OO_2_1_000006_ReadAttribute +- (void)testSendClusterTest_TC_OO_2_1_000007_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"read LT attribute: StartUpOnOff"]; @@ -12046,7 +12410,30 @@ - (void)testSendClusterTest_TC_OO_2_1_000006_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_OO_2_1_000007_WriteAttribute +- (void)testSendClusterTest_TC_OO_2_1_000008_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"write the default value to LT attribute: GlobalSceneControl"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id globalSceneControlArgument; + globalSceneControlArgument = [NSNumber numberWithBool:0]; + [cluster writeAttributeGlobalSceneControlWithValue:globalSceneControlArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"write the default value to LT attribute: GlobalSceneControl Error: %@", err); + + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_OO_2_1_000009_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"write the default value to LT attribute: OnTime"]; @@ -12068,7 +12455,7 @@ - (void)testSendClusterTest_TC_OO_2_1_000007_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_OO_2_1_000008_WriteAttribute +- (void)testSendClusterTest_TC_OO_2_1_000010_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"write the default value to LT attribute: OffWaitTime"]; @@ -12090,7 +12477,7 @@ - (void)testSendClusterTest_TC_OO_2_1_000008_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_OO_2_1_000009_WriteAttribute +- (void)testSendClusterTest_TC_OO_2_1_000011_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"write the default value to LT attribute: StartUpOnOff"]; @@ -12112,7 +12499,31 @@ - (void)testSendClusterTest_TC_OO_2_1_000009_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_OO_2_1_000010_ReadAttribute +- (void)testSendClusterTest_TC_OO_2_1_000012_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"reads back LT attribute: GlobalSceneControl"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeGlobalSceneControlWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"reads back LT attribute: GlobalSceneControl Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue boolValue], 1); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_OO_2_1_000013_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"reads back LT attribute: OnTime"]; @@ -12136,7 +12547,7 @@ - (void)testSendClusterTest_TC_OO_2_1_000010_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_OO_2_1_000011_ReadAttribute +- (void)testSendClusterTest_TC_OO_2_1_000014_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"reads back LT attribute: OffWaitTime"]; @@ -12160,7 +12571,7 @@ - (void)testSendClusterTest_TC_OO_2_1_000011_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_OO_2_1_000012_ReadAttribute +- (void)testSendClusterTest_TC_OO_2_1_000015_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"reads back LT attribute: StartUpOnOff"]; @@ -13580,8 +13991,1025 @@ - (void)testSendClusterTest_TC_PRS_2_1_000001_ReadAttribute CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the mandatory attribute constraints: MeasuredValue Error: %@", err); + [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the mandatory attribute constraints: MeasuredValue Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PRS_2_1_000002_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write the default values to mandatory attribute: MeasuredValue"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id measuredValueArgument; + measuredValueArgument = [NSNumber numberWithShort:0]; + [cluster + writeAttributeMeasuredValueWithValue:measuredValueArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write the default values to mandatory attribute: MeasuredValue Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PRS_2_1_000003_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Reads back mandatory attribute: MeasuredValue"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads back mandatory attribute: MeasuredValue Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue shortValue], 0); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PRS_2_1_000004_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Read the mandatory attribute constraints: MinMeasuredValue"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the mandatory attribute constraints: MinMeasuredValue Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PRS_2_1_000005_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write the default values to mandatory attribute: MinMeasuredValue"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id minMeasuredValueArgument; + minMeasuredValueArgument = [NSNumber numberWithShort:0]; + [cluster + writeAttributeMinMeasuredValueWithValue:minMeasuredValueArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write the default values to mandatory attribute: MinMeasuredValue Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PRS_2_1_000006_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Reads back mandatory attribute: MinMeasuredValue"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads back mandatory attribute: MinMeasuredValue Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue shortValue], 0); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PRS_2_1_000007_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Read the mandatory attribute constraints: MaxMeasuredValue"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the mandatory attribute constraints: MaxMeasuredValue Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PRS_2_1_000008_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write the default values to mandatory attribute: MaxMeasuredValue"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id maxMeasuredValueArgument; + maxMeasuredValueArgument = [NSNumber numberWithShort:0]; + [cluster + writeAttributeMaxMeasuredValueWithValue:maxMeasuredValueArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write the default values to mandatory attribute: MaxMeasuredValue Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PRS_2_1_000009_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Reads back mandatory attribute: MaxMeasuredValue"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads back mandatory attribute: MaxMeasuredValue Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue shortValue], 0); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterTest_TC_PCC_1_1_000000_WaitForCommissionee +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + WaitForCommissionee(expectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_1_1_000001_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute constraints: ClusterRevision"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute constraints: ClusterRevision Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_1_1_000002_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + id clusterRevisionArgument; + clusterRevisionArgument = [NSNumber numberWithUnsignedShort:3U]; + [cluster + writeAttributeClusterRevisionWithValue:clusterRevisionArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_1_1_000003_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional global attribute: FeatureMap"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional global attribute: FeatureMap Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterTest_TC_PCC_2_1_000000_WaitForCommissionee +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + WaitForCommissionee(expectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000001_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: MaxPressure"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMaxPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: MaxPressure Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000002_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: MaxSpeed"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMaxSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: MaxSpeed Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000003_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: MaxFlow"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMaxFlowWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: MaxFlow Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000004_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: EffectiveOperationMode"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeEffectiveOperationModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: EffectiveOperationMode Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000005_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: EffectiveControlMode"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeEffectiveControlModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: EffectiveControlMode Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000006_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: Capacity"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeCapacityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: Capacity Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000007_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: MaxPressure"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMaxPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: MaxPressure Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000008_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: MaxSpeed"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMaxSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: MaxSpeed Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000009_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: MaxFlow"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMaxFlowWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: MaxFlow Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000010_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: EffectiveOperationMode"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeEffectiveOperationModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: EffectiveOperationMode Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000011_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: EffectiveControlMode"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeEffectiveControlModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: EffectiveControlMode Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000012_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: Capacity"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeCapacityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: Capacity Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000013_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: MinConstPressure"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMinConstPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: MinConstPressure Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000014_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: MaxConstPressure"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMaxConstPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: MaxConstPressure Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000015_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: MinCompPressure"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMinCompPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: MinCompPressure Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000016_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: MaxCompPressure"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMaxCompPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: MaxCompPressure Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000017_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: MinConstSpeed"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMinConstSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: MinConstSpeed Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000018_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: MaxConstSpeed"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMaxConstSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: MaxConstSpeed Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000019_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: MinConstFlow"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMinConstFlowWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: MinConstFlow Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000020_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: MaxConstFlow"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMaxConstFlowWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: MaxConstFlow Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000021_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: MinConstTemp"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMinConstTempWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: MinConstTemp Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue shortValue], -27315); + } + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000022_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: MaxConstTemp"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMaxConstTempWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: MaxConstTemp Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue shortValue], -27315); + } + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000023_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: PumpStatus"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributePumpStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: PumpStatus Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000024_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: PumpStatus"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributePumpStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: PumpStatus Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000025_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: Speed"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: Speed Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000026_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: LifetimeRunningHours"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeLifetimeRunningHoursWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: LifetimeRunningHours Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertFalse(actualValue == nil); + XCTAssertEqual([actualValue unsignedIntValue], 0UL); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000027_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: LifetimeRunningHours"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeLifetimeRunningHoursWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: LifetimeRunningHours Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000028_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: Power"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributePowerWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: Power Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000029_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: LifetimeEnergyConsumed"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeLifetimeEnergyConsumedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: LifetimeEnergyConsumed Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertFalse(actualValue == nil); + XCTAssertEqual([actualValue unsignedIntValue], 0UL); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000030_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: LifetimeEnergyConsumed"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeLifetimeEnergyConsumedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: LifetimeEnergyConsumed Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -13590,65 +15018,79 @@ - (void)testSendClusterTest_TC_PRS_2_1_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_PRS_2_1_000002_WriteAttribute +- (void)testSendClusterTest_TC_PCC_2_1_000031_WriteAttribute { - XCTestExpectation * expectation = - [self expectationWithDescription:@"Write the default values to mandatory attribute: MeasuredValue"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"write to the optional attribute: LifetimeEnergyConsumed"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; XCTAssertNotNil(cluster); - id measuredValueArgument; - measuredValueArgument = [NSNumber numberWithShort:0]; - [cluster - writeAttributeMeasuredValueWithValue:measuredValueArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write the default values to mandatory attribute: MeasuredValue Error: %@", err); + id lifetimeEnergyConsumedArgument; + lifetimeEnergyConsumedArgument = [NSNumber numberWithUnsignedInt:0UL]; + [cluster writeAttributeLifetimeEnergyConsumedWithValue:lifetimeEnergyConsumedArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"write to the optional attribute: LifetimeEnergyConsumed Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_PRS_2_1_000003_ReadAttribute +- (void)testSendClusterTest_TC_PCC_2_1_000032_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Reads back mandatory attribute: MeasuredValue"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: MinConstPressure"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back mandatory attribute: MeasuredValue Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + [cluster readAttributeMinConstPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: MinConstPressure Error: %@", err); - { - id actualValue = value; - XCTAssertEqual([actualValue shortValue], 0); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_PRS_2_1_000004_ReadAttribute +- (void)testSendClusterTest_TC_PCC_2_1_000033_ReadAttribute { - XCTestExpectation * expectation = - [self expectationWithDescription:@"Read the mandatory attribute constraints: MinMeasuredValue"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: MaxConstPressure"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the mandatory attribute constraints: MinMeasuredValue Error: %@", err); + [cluster readAttributeMaxConstPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: MaxConstPressure Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -13657,65 +15099,76 @@ - (void)testSendClusterTest_TC_PRS_2_1_000004_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_PRS_2_1_000005_WriteAttribute +- (void)testSendClusterTest_TC_PCC_2_1_000034_ReadAttribute { - XCTestExpectation * expectation = - [self expectationWithDescription:@"Write the default values to mandatory attribute: MinMeasuredValue"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: MinCompPressure"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; XCTAssertNotNil(cluster); - id minMeasuredValueArgument; - minMeasuredValueArgument = [NSNumber numberWithShort:0]; - [cluster - writeAttributeMinMeasuredValueWithValue:minMeasuredValueArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write the default values to mandatory attribute: MinMeasuredValue Error: %@", err); + [cluster readAttributeMinCompPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: MinCompPressure Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_PRS_2_1_000006_ReadAttribute +- (void)testSendClusterTest_TC_PCC_2_1_000035_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Reads back mandatory attribute: MinMeasuredValue"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: MaxCompPressure"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back mandatory attribute: MinMeasuredValue Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + [cluster readAttributeMaxCompPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: MaxCompPressure Error: %@", err); - { - id actualValue = value; - XCTAssertEqual([actualValue shortValue], 0); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_PRS_2_1_000007_ReadAttribute +- (void)testSendClusterTest_TC_PCC_2_1_000036_ReadAttribute { - XCTestExpectation * expectation = - [self expectationWithDescription:@"Read the mandatory attribute constraints: MaxMeasuredValue"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: MinConstSpeed"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the mandatory attribute constraints: MaxMeasuredValue Error: %@", err); + [cluster readAttributeMinConstSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: MinConstSpeed Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -13724,65 +15177,61 @@ - (void)testSendClusterTest_TC_PRS_2_1_000007_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_PRS_2_1_000008_WriteAttribute +- (void)testSendClusterTest_TC_PCC_2_1_000037_ReadAttribute { - XCTestExpectation * expectation = - [self expectationWithDescription:@"Write the default values to mandatory attribute: MaxMeasuredValue"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: MaxConstSpeed"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; XCTAssertNotNil(cluster); - id maxMeasuredValueArgument; - maxMeasuredValueArgument = [NSNumber numberWithShort:0]; - [cluster - writeAttributeMaxMeasuredValueWithValue:maxMeasuredValueArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write the default values to mandatory attribute: MaxMeasuredValue Error: %@", err); + [cluster readAttributeMaxConstSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: MaxConstSpeed Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_PRS_2_1_000009_ReadAttribute +- (void)testSendClusterTest_TC_PCC_2_1_000038_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Reads back mandatory attribute: MaxMeasuredValue"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: MinConstFlow"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back mandatory attribute: MaxMeasuredValue Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + [cluster readAttributeMinConstFlowWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: MinConstFlow Error: %@", err); - { - id actualValue = value; - XCTAssertEqual([actualValue shortValue], 0); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterTest_TC_PCC_1_1_000000_WaitForCommissionee -{ - XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - - dispatch_queue_t queue = dispatch_get_main_queue(); - WaitForCommissionee(expectation, queue); - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_PCC_1_1_000001_ReadAttribute +- (void)testSendClusterTest_TC_PCC_2_1_000039_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute constraints: ClusterRevision"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: MaxConstFlow"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -13791,8 +15240,13 @@ - (void)testSendClusterTest_TC_PCC_1_1_000001_ReadAttribute queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute constraints: ClusterRevision Error: %@", err); + [cluster readAttributeMaxConstFlowWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: MaxConstFlow Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -13801,10 +15255,9 @@ - (void)testSendClusterTest_TC_PCC_1_1_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_PCC_1_1_000002_WriteAttribute +- (void)testSendClusterTest_TC_PCC_2_1_000040_ReadAttribute { - XCTestExpectation * expectation = - [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: MinConstTemp"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -13813,22 +15266,31 @@ - (void)testSendClusterTest_TC_PCC_1_1_000002_WriteAttribute queue:queue]; XCTAssertNotNil(cluster); - id clusterRevisionArgument; - clusterRevisionArgument = [NSNumber numberWithUnsignedShort:3U]; - [cluster - writeAttributeClusterRevisionWithValue:clusterRevisionArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeMinConstTempWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: MinConstTemp Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue shortValue], -27315); + } + } + + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_PCC_1_1_000003_ReadAttribute +- (void)testSendClusterTest_TC_PCC_2_1_000041_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional global attribute: FeatureMap"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: MaxConstTemp"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -13837,28 +15299,31 @@ - (void)testSendClusterTest_TC_PCC_1_1_000003_ReadAttribute queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the optional global attribute: FeatureMap Error: %@", err); + [cluster readAttributeMaxConstTempWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: MaxConstTemp Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue shortValue], -27315); + } + } + [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterTest_TC_PCC_2_1_000000_WaitForCommissionee -{ - XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - - dispatch_queue_t queue = dispatch_get_main_queue(); - WaitForCommissionee(expectation, queue); - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_PCC_2_1_000001_ReadAttribute +- (void)testSendClusterTest_TC_PCC_2_1_000042_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: MaxPressure"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: PumpStatus"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -13867,19 +15332,29 @@ - (void)testSendClusterTest_TC_PCC_2_1_000001_ReadAttribute queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeMaxPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: MaxPressure Error: %@", err); + [cluster readAttributePumpStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: PumpStatus Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } + [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_PCC_2_1_000002_ReadAttribute +- (void)testSendClusterTest_TC_PCC_2_1_000043_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: EffectiveOperationMode"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: PumpStatus"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -13888,8 +15363,13 @@ - (void)testSendClusterTest_TC_PCC_2_1_000002_ReadAttribute queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeEffectiveOperationModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: EffectiveOperationMode Error: %@", err); + [cluster readAttributePumpStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: PumpStatus Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -13898,9 +15378,9 @@ - (void)testSendClusterTest_TC_PCC_2_1_000002_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_PCC_2_1_000003_ReadAttribute +- (void)testSendClusterTest_TC_PCC_2_1_000044_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: EffectiveControlMode"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: Speed"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -13909,8 +15389,13 @@ - (void)testSendClusterTest_TC_PCC_2_1_000003_ReadAttribute queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeEffectiveControlModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: EffectiveControlMode Error: %@", err); + [cluster readAttributeSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: Speed Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -13919,9 +15404,9 @@ - (void)testSendClusterTest_TC_PCC_2_1_000003_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_PCC_2_1_000004_ReadAttribute +- (void)testSendClusterTest_TC_PCC_2_1_000045_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: Capacity"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: LifetimeRunningHours"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -13930,19 +15415,25 @@ - (void)testSendClusterTest_TC_PCC_2_1_000004_ReadAttribute queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeCapacityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: Capacity Error: %@", err); + [cluster readAttributeLifetimeRunningHoursWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: LifetimeRunningHours Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + XCTAssertFalse(actualValue == nil); + XCTAssertEqual([actualValue unsignedIntValue], 0UL); + } + [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_PCC_2_1_000005_ReadAttribute +- (void)testSendClusterTest_TC_PCC_2_1_000046_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: MaxPressure"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: LifetimeRunningHours"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -13951,8 +15442,13 @@ - (void)testSendClusterTest_TC_PCC_2_1_000005_ReadAttribute queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeMaxPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: MaxPressure Error: %@", err); + [cluster readAttributeLifetimeRunningHoursWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: LifetimeRunningHours Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -13961,9 +15457,9 @@ - (void)testSendClusterTest_TC_PCC_2_1_000005_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_PCC_2_1_000006_ReadAttribute +- (void)testSendClusterTest_TC_PCC_2_1_000047_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: EffectiveOperationMode"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: Power"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -13972,8 +15468,13 @@ - (void)testSendClusterTest_TC_PCC_2_1_000006_ReadAttribute queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeEffectiveOperationModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: EffectiveOperationMode Error: %@", err); + [cluster readAttributePowerWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: Power Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -13982,9 +15483,9 @@ - (void)testSendClusterTest_TC_PCC_2_1_000006_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_PCC_2_1_000007_ReadAttribute +- (void)testSendClusterTest_TC_PCC_2_1_000048_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: EffectiveControlMode"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: LifetimeEnergyConsumed"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -13993,19 +15494,30 @@ - (void)testSendClusterTest_TC_PCC_2_1_000007_ReadAttribute queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeEffectiveControlModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: EffectiveControlMode Error: %@", err); + [cluster readAttributeLifetimeEnergyConsumedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: LifetimeEnergyConsumed Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + XCTAssertFalse(actualValue == nil); + XCTAssertEqual([actualValue unsignedIntValue], 0UL); + } + [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_PCC_2_1_000008_ReadAttribute +- (void)testSendClusterTest_TC_PCC_2_1_000049_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: Capacity"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: LifetimeEnergyConsumed"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -14014,8 +15526,13 @@ - (void)testSendClusterTest_TC_PCC_2_1_000008_ReadAttribute queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeCapacityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: Capacity Error: %@", err); + [cluster readAttributeLifetimeEnergyConsumedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: LifetimeEnergyConsumed Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -14167,6 +15684,176 @@ - (void)testSendClusterTest_TC_PCC_2_3_000002_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterTest_TC_PCC_2_3_000003_WriteAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Write 0 to the ControlMode attribute to DUT"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + id controlModeArgument; + controlModeArgument = [NSNumber numberWithUnsignedChar:0]; + [cluster writeAttributeControlModeWithValue:controlModeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write 0 to the ControlMode attribute to DUT Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_3_000004_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the attribute: EffectiveControlMode"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeEffectiveControlModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the attribute: EffectiveControlMode Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_3_000005_WriteAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Write 1 to the ControlMode attribute to DUT"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + id controlModeArgument; + controlModeArgument = [NSNumber numberWithUnsignedChar:1]; + [cluster writeAttributeControlModeWithValue:controlModeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write 1 to the ControlMode attribute to DUT Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_3_000006_WriteAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Write 2 to the ControlMode attribute to DUT"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + id controlModeArgument; + controlModeArgument = [NSNumber numberWithUnsignedChar:2]; + [cluster writeAttributeControlModeWithValue:controlModeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write 2 to the ControlMode attribute to DUT Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_3_000007_WriteAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Write 3 to the ControlMode attribute to DUT"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + id controlModeArgument; + controlModeArgument = [NSNumber numberWithUnsignedChar:3]; + [cluster writeAttributeControlModeWithValue:controlModeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write 3 to the ControlMode attribute to DUT Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_3_000008_WriteAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Write 5 to the ControlMode attribute to DUT"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + id controlModeArgument; + controlModeArgument = [NSNumber numberWithUnsignedChar:5]; + [cluster writeAttributeControlModeWithValue:controlModeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write 5 to the ControlMode attribute to DUT Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_3_000009_WriteAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Write 7 to the ControlMode attribute to DUT"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + id controlModeArgument; + controlModeArgument = [NSNumber numberWithUnsignedChar:7]; + [cluster writeAttributeControlModeWithValue:controlModeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write 7 to the ControlMode attribute to DUT Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} - (void)testSendClusterTest_TC_RH_1_1_000000_WaitForCommissionee { @@ -15913,6 +17600,11 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000050_ReadAttribute [cluster readAttributeMinSetpointDeadBandWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads optional attributes from DUT: MinSetpointDeadBand Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -15938,6 +17630,11 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000051_ReadAttribute [cluster readAttributeMinSetpointDeadBandWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads constraints of optional attributes from DUT: MinSetpointDeadBand Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -15970,6 +17667,11 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000052_WriteAttribute @"MinSetpointDeadBand Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -15990,6 +17692,11 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000053_ReadAttribute [cluster readAttributeMinSetpointDeadBandWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back optional attributes from DUT: MinSetpointDeadBand Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -16015,6 +17722,11 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000054_ReadAttribute [cluster readAttributeStartOfWeekWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads constraints of optional attributes from DUT: StartOfWeek Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -16046,6 +17758,11 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000055_WriteAttribute NSLog(@"Writes the respective default value to optional attributes to DUT: StartOfWeek Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -16064,6 +17781,11 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000056_ReadAttribute [cluster readAttributeStartOfWeekWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back optional attributes from DUT: StartOfWeek Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -16089,6 +17811,11 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000057_ReadAttribute [cluster readAttributeNumberOfWeeklyTransitionsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads constraints of optional attributes from DUT: NumberOfWeeklyTransitions Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -16114,6 +17841,11 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000058_WriteAttribute @"NumberOfWeeklyTransitions Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; @@ -16134,6 +17866,11 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000059_ReadAttribute [cluster readAttributeNumberOfDailyTransitionsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads constraints of optional attributes from DUT: NumberOfDailyTransitions Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -16159,6 +17896,11 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000060_WriteAttribute @"NumberOfDailyTransitions Error: %@", err); + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; @@ -35840,7 +37582,7 @@ - (void)testSendClusterTestModeSelectCluster_000008_ChangeToMode [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_DIAGSW_1_1_000000_WaitForCommissionee +- (void)testSendClusterTest_TC_SWDIAG_1_1_000000_WaitForCommissionee { XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; @@ -35848,7 +37590,7 @@ - (void)testSendClusterTest_TC_DIAGSW_1_1_000000_WaitForCommissionee WaitForCommissionee(expectation, queue); [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_DIAGSW_1_1_000001_ReadAttribute +- (void)testSendClusterTest_TC_SWDIAG_1_1_000001_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads CurrentHeapFree non-global attribute value from DUT"]; @@ -35873,7 +37615,7 @@ - (void)testSendClusterTest_TC_DIAGSW_1_1_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_DIAGSW_1_1_000002_ReadAttribute +- (void)testSendClusterTest_TC_SWDIAG_1_1_000002_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads CurrentHeapUsed non-global attribute value from DUT"]; @@ -35898,7 +37640,7 @@ - (void)testSendClusterTest_TC_DIAGSW_1_1_000002_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_DIAGSW_1_1_000003_ReadAttribute +- (void)testSendClusterTest_TC_SWDIAG_1_1_000003_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads CurrentHeapHighWaterMark non-global attribute value from DUT"]; @@ -35924,7 +37666,7 @@ - (void)testSendClusterTest_TC_DIAGSW_1_1_000003_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_DIAGSW_3_2_000000_WaitForCommissionee +- (void)testSendClusterTest_TC_SWDIAG_3_1_000000_WaitForCommissionee { XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 1be643f85855ec..d2f112ac45f91b 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -152,9 +152,9 @@ class TestList : public Command printf("TestOperationalCredentialsCluster\n"); printf("TestModeSelectCluster\n"); printf("TestGroupMessaging\n"); - printf("Test_TC_DIAGSW_1_1\n"); - printf("Test_TC_DIAGSW_2_1\n"); - printf("Test_TC_DIAGSW_3_2\n"); + printf("Test_TC_SWDIAG_1_1\n"); + printf("Test_TC_SWDIAG_2_1\n"); + printf("Test_TC_SWDIAG_3_1\n"); printf("TestSubscribe_OnOff\n"); return CHIP_NO_ERROR; @@ -4861,7 +4861,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_60(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_60(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_60(uint16_t coupleColorTempToLevelMinMireds) { @@ -4904,7 +4907,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_62(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_62(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_62(uint16_t coupleColorTempToLevelMinMireds) { @@ -4925,7 +4931,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_63(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_63(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_63(uint16_t startUpColorTemperatureMireds) { @@ -4949,7 +4958,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_64(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_64(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_64() { NextTest(); } @@ -4965,7 +4977,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_65(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_65(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_65(uint16_t startUpColorTemperatureMireds) { @@ -4985,7 +5000,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_66(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_66(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_66(uint16_t remainingTime) { @@ -5005,7 +5023,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_67(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_67(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_67(uint16_t remainingTime) { @@ -5047,7 +5068,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_69(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_69(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_69(uint16_t remainingTime) { @@ -5067,7 +5091,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_70(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_70(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_70(uint8_t driftCompensation) { @@ -5109,7 +5136,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_72(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_72(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_72(uint8_t driftCompensation) { @@ -5129,7 +5159,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_73(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_73(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_73(chip::CharSpan compensationText) { @@ -6069,7 +6102,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_119(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_119(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_119(uint16_t whitePointX) { @@ -6092,7 +6128,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_120(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_120(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_120() { NextTest(); } @@ -6107,7 +6146,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_121(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_121(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_121(uint16_t whitePointX) { @@ -6127,7 +6169,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_122(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_122(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_122(uint16_t whitePointY) { @@ -6150,7 +6195,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_123(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_123(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_123() { NextTest(); } @@ -6165,7 +6213,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_124(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_124(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_124(uint16_t whitePointY) { @@ -6185,7 +6236,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_125(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_125(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_125(uint16_t colorPointRX) { @@ -6208,7 +6262,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_126(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_126(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_126() { NextTest(); } @@ -6223,7 +6280,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_127(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_127(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_127(uint16_t colorPointRX) { @@ -6243,7 +6303,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_128(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_128(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_128(uint16_t colorPointRY) { @@ -6266,7 +6329,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_129(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_129(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_129() { NextTest(); } @@ -6281,7 +6347,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_130(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_130(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_130(uint16_t colorPointRY) { @@ -6301,7 +6370,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_131(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_131(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_131(uint8_t colorPointRIntensity) { @@ -6320,7 +6392,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_132(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_132(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_132(uint16_t colorPointGX) { @@ -6343,7 +6418,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_133(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_133(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_133() { NextTest(); } @@ -6358,7 +6436,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_134(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_134(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_134(uint16_t colorPointGX) { @@ -6378,7 +6459,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_135(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_135(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_135(uint16_t colorPointGY) { @@ -6401,7 +6485,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_136(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_136(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_136() { NextTest(); } @@ -6416,7 +6503,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_137(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_137(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_137(uint16_t colorPointGY) { @@ -6436,7 +6526,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_138(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_138(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_138(uint8_t colorPointGIntensity) { @@ -6455,7 +6548,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_139(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_139(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_139(uint16_t colorPointBX) { @@ -6478,7 +6574,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_140(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_140(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_140() { NextTest(); } @@ -6493,7 +6592,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_141(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_141(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_141(uint16_t colorPointBX) { @@ -6513,7 +6615,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_142(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_142(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_142(uint16_t colorPointBY) { @@ -6536,7 +6641,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_143(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_143(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_143() { NextTest(); } @@ -6551,7 +6659,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_144(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_144(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_144(uint16_t colorPointBY) { @@ -6571,7 +6682,10 @@ class Test_TC_CC_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_145(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_145(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_145(uint8_t colorPointBIntensity) { @@ -15690,24 +15804,44 @@ class Test_TC_FLW_2_1 : public TestCommand err = TestReadTheMandatoryAttributeMaxMeasuredValue_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : write the default value to optional attribute: MinMeasuredValue\n"); - err = TestWriteTheDefaultValueToOptionalAttributeMinMeasuredValue_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : write the default value to optional attribute: MeasuredValue\n"); + err = TestWriteTheDefaultValueToOptionalAttributeMeasuredValue_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : write the default value to optional attribute: MaxMeasuredValue\n"); - err = TestWriteTheDefaultValueToOptionalAttributeMaxMeasuredValue_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : write the default value to optional attribute: MinMeasuredValue\n"); + err = TestWriteTheDefaultValueToOptionalAttributeMinMeasuredValue_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : read the mandatory attribute: MeasuredValue\n"); - err = TestReadTheMandatoryAttributeMeasuredValue_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : write the default value to optional attribute: MaxMeasuredValue\n"); + err = TestWriteTheDefaultValueToOptionalAttributeMaxMeasuredValue_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : read the mandatory attribute: MinMeasuredValue\n"); - err = TestReadTheMandatoryAttributeMinMeasuredValue_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : read the mandatory attribute: MeasuredValue\n"); + err = TestReadTheMandatoryAttributeMeasuredValue_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : read the mandatory attribute: MaxMeasuredValue\n"); - err = TestReadTheMandatoryAttributeMaxMeasuredValue_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : read the mandatory attribute: MinMeasuredValue\n"); + err = TestReadTheMandatoryAttributeMinMeasuredValue_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : read the mandatory attribute: MaxMeasuredValue\n"); + err = TestReadTheMandatoryAttributeMaxMeasuredValue_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : read the optional attribute: Tolerance\n"); + err = TestReadTheOptionalAttributeTolerance_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : read the optional attribute: Tolerance\n"); + err = TestReadTheOptionalAttributeTolerance_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : write the default value to optional attribute: Tolerance\n"); + err = TestWriteTheDefaultValueToOptionalAttributeTolerance_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : read the optional attribute: Tolerance\n"); + err = TestReadTheOptionalAttributeTolerance_13(); break; } @@ -15720,7 +15854,7 @@ class Test_TC_FLW_2_1 : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; + const uint16_t mTestCount = 14; chip::Optional mCluster; chip::Optional mEndpoint; @@ -15774,19 +15908,16 @@ class Test_TC_FLW_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, int16_t measuredValue) - { - (static_cast(context))->OnSuccessResponse_6(measuredValue); - } + static void OnSuccessCallback_6(void * context) { (static_cast(context))->OnSuccessResponse_6(); } static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context, int16_t minMeasuredValue) + static void OnSuccessCallback_7(void * context, int16_t measuredValue) { - (static_cast(context))->OnSuccessResponse_7(minMeasuredValue); + (static_cast(context))->OnSuccessResponse_7(measuredValue); } static void OnFailureCallback_8(void * context, EmberAfStatus status) @@ -15794,9 +15925,56 @@ class Test_TC_FLW_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context, int16_t maxMeasuredValue) + static void OnSuccessCallback_8(void * context, int16_t minMeasuredValue) + { + (static_cast(context))->OnSuccessResponse_8(minMeasuredValue); + } + + static void OnFailureCallback_9(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_9(status); + } + + static void OnSuccessCallback_9(void * context, int16_t maxMeasuredValue) + { + (static_cast(context))->OnSuccessResponse_9(maxMeasuredValue); + } + + static void OnFailureCallback_10(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_10(status); + } + + static void OnSuccessCallback_10(void * context, uint16_t tolerance) + { + (static_cast(context))->OnSuccessResponse_10(tolerance); + } + + static void OnFailureCallback_11(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_11(status); + } + + static void OnSuccessCallback_11(void * context, uint16_t tolerance) + { + (static_cast(context))->OnSuccessResponse_11(tolerance); + } + + static void OnFailureCallback_12(void * context, EmberAfStatus status) { - (static_cast(context))->OnSuccessResponse_8(maxMeasuredValue); + (static_cast(context))->OnFailureResponse_12(status); + } + + static void OnSuccessCallback_12(void * context) { (static_cast(context))->OnSuccessResponse_12(); } + + static void OnFailureCallback_13(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_13(status); + } + + static void OnSuccessCallback_13(void * context, uint16_t tolerance) + { + (static_cast(context))->OnSuccessResponse_13(tolerance); } // @@ -15866,7 +16044,29 @@ class Test_TC_FLW_2_1 : public TestCommand NextTest(); } - CHIP_ERROR TestWriteTheDefaultValueToOptionalAttributeMinMeasuredValue_4() + CHIP_ERROR TestWriteTheDefaultValueToOptionalAttributeMeasuredValue_4() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::FlowMeasurementClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + int16_t measuredValueArgument; + measuredValueArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + measuredValueArgument, this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_4(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + } + + void OnSuccessResponse_4() { ThrowSuccessResponse(); } + + CHIP_ERROR TestWriteTheDefaultValueToOptionalAttributeMinMeasuredValue_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::FlowMeasurementClusterTest cluster; @@ -15876,19 +16076,19 @@ class Test_TC_FLW_2_1 : public TestCommand minMeasuredValueArgument = 0; ReturnErrorOnFailure(cluster.WriteAttribute( - minMeasuredValueArgument, this, OnSuccessCallback_4, OnFailureCallback_4)); + minMeasuredValueArgument, this, OnSuccessCallback_5, OnFailureCallback_5)); return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) + void OnFailureResponse_5(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_4() { ThrowSuccessResponse(); } + void OnSuccessResponse_5() { ThrowSuccessResponse(); } - CHIP_ERROR TestWriteTheDefaultValueToOptionalAttributeMaxMeasuredValue_5() + CHIP_ERROR TestWriteTheDefaultValueToOptionalAttributeMaxMeasuredValue_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::FlowMeasurementClusterTest cluster; @@ -15898,74 +16098,165 @@ class Test_TC_FLW_2_1 : public TestCommand maxMeasuredValueArgument = 0; ReturnErrorOnFailure(cluster.WriteAttribute( - maxMeasuredValueArgument, this, OnSuccessCallback_5, OnFailureCallback_5)); + maxMeasuredValueArgument, this, OnSuccessCallback_6, OnFailureCallback_6)); return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) + void OnFailureResponse_6(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_5() { ThrowSuccessResponse(); } + void OnSuccessResponse_6() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_6() + CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::FlowMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_6, OnFailureCallback_6)); + this, OnSuccessCallback_7, OnFailureCallback_7)); return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6(int16_t measuredValue) + void OnSuccessResponse_7(int16_t measuredValue) { VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributeMinMeasuredValue_7() + CHIP_ERROR TestReadTheMandatoryAttributeMinMeasuredValue_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::FlowMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_7, OnFailureCallback_7)); + this, OnSuccessCallback_8, OnFailureCallback_8)); return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7(int16_t minMeasuredValue) + void OnSuccessResponse_8(int16_t minMeasuredValue) { VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "uint16")); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributeMaxMeasuredValue_8() + CHIP_ERROR TestReadTheMandatoryAttributeMaxMeasuredValue_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::FlowMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_8, OnFailureCallback_8)); + this, OnSuccessCallback_9, OnFailureCallback_9)); return CHIP_NO_ERROR; } - void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_8(int16_t maxMeasuredValue) + void OnSuccessResponse_9(int16_t maxMeasuredValue) { VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "", "uint16")); NextTest(); } + + CHIP_ERROR TestReadTheOptionalAttributeTolerance_10() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::FlowMeasurementClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_10, OnFailureCallback_10)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_10(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_10(uint16_t tolerance) + { + VerifyOrReturn(CheckValue("tolerance", tolerance, 0U)); + + NextTest(); + } + + CHIP_ERROR TestReadTheOptionalAttributeTolerance_11() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::FlowMeasurementClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_11, OnFailureCallback_11)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_11(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_11(uint16_t tolerance) + { + VerifyOrReturn(CheckConstraintType("tolerance", "", "uint16")); + VerifyOrReturn(CheckConstraintMaxValue("tolerance", tolerance, 2048U)); + NextTest(); + } + + CHIP_ERROR TestWriteTheDefaultValueToOptionalAttributeTolerance_12() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::FlowMeasurementClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + uint16_t toleranceArgument; + toleranceArgument = 0U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + toleranceArgument, this, OnSuccessCallback_12, OnFailureCallback_12)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_12(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + } + + void OnSuccessResponse_12() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadTheOptionalAttributeTolerance_13() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::FlowMeasurementClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_13, OnFailureCallback_13)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_13(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_13(uint16_t tolerance) + { + VerifyOrReturn(CheckValue("tolerance", tolerance, 0U)); + + NextTest(); + } }; class Test_TC_FLW_2_2 : public TestCommand @@ -19912,48 +20203,60 @@ class Test_TC_OO_2_1 : public TestCommand err = TestReadTheMandatoryAttributeOnOff_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : reads back mandatory attribute: OnOff\n"); - err = TestReadsBackMandatoryAttributeOnOff_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : write the default value of mandatory attribute: OnOff\n"); + err = TestWriteTheDefaultValueOfMandatoryAttributeOnOff_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : read LT attribute: GlobalSceneControl\n"); - err = TestReadLtAttributeGlobalSceneControl_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : reads back mandatory attribute: OnOff\n"); + err = TestReadsBackMandatoryAttributeOnOff_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : read LT attribute: OnTime\n"); - err = TestReadLtAttributeOnTime_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : read LT attribute: GlobalSceneControl\n"); + err = TestReadLtAttributeGlobalSceneControl_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : read LT attribute: OffWaitTime\n"); - err = TestReadLtAttributeOffWaitTime_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : read LT attribute: OnTime\n"); + err = TestReadLtAttributeOnTime_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : read LT attribute: StartUpOnOff\n"); - err = TestReadLtAttributeStartUpOnOff_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : read LT attribute: OffWaitTime\n"); + err = TestReadLtAttributeOffWaitTime_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : write the default value to LT attribute: OnTime\n"); - err = TestWriteTheDefaultValueToLtAttributeOnTime_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : read LT attribute: StartUpOnOff\n"); + err = TestReadLtAttributeStartUpOnOff_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : write the default value to LT attribute: OffWaitTime\n"); - err = TestWriteTheDefaultValueToLtAttributeOffWaitTime_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : write the default value to LT attribute: GlobalSceneControl\n"); + err = TestWriteTheDefaultValueToLtAttributeGlobalSceneControl_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : write the default value to LT attribute: StartUpOnOff\n"); - err = TestWriteTheDefaultValueToLtAttributeStartUpOnOff_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : write the default value to LT attribute: OnTime\n"); + err = TestWriteTheDefaultValueToLtAttributeOnTime_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : reads back LT attribute: OnTime\n"); - err = TestReadsBackLtAttributeOnTime_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : write the default value to LT attribute: OffWaitTime\n"); + err = TestWriteTheDefaultValueToLtAttributeOffWaitTime_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : reads back LT attribute: OffWaitTime\n"); - err = TestReadsBackLtAttributeOffWaitTime_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : write the default value to LT attribute: StartUpOnOff\n"); + err = TestWriteTheDefaultValueToLtAttributeStartUpOnOff_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : reads back LT attribute: StartUpOnOff\n"); - err = TestReadsBackLtAttributeStartUpOnOff_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : reads back LT attribute: GlobalSceneControl\n"); + err = TestReadsBackLtAttributeGlobalSceneControl_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : reads back LT attribute: OnTime\n"); + err = TestReadsBackLtAttributeOnTime_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : reads back LT attribute: OffWaitTime\n"); + err = TestReadsBackLtAttributeOffWaitTime_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : reads back LT attribute: StartUpOnOff\n"); + err = TestReadsBackLtAttributeStartUpOnOff_15(); break; } @@ -19966,7 +20269,7 @@ class Test_TC_OO_2_1 : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 13; + const uint16_t mTestCount = 16; chip::Optional mCluster; chip::Optional mEndpoint; @@ -19986,19 +20289,16 @@ class Test_TC_OO_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, bool onOff) - { - (static_cast(context))->OnSuccessResponse_2(onOff); - } + static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, bool globalSceneControl) + static void OnSuccessCallback_3(void * context, bool onOff) { - (static_cast(context))->OnSuccessResponse_3(globalSceneControl); + (static_cast(context))->OnSuccessResponse_3(onOff); } static void OnFailureCallback_4(void * context, EmberAfStatus status) @@ -20006,9 +20306,9 @@ class Test_TC_OO_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, uint16_t onTime) + static void OnSuccessCallback_4(void * context, bool globalSceneControl) { - (static_cast(context))->OnSuccessResponse_4(onTime); + (static_cast(context))->OnSuccessResponse_4(globalSceneControl); } static void OnFailureCallback_5(void * context, EmberAfStatus status) @@ -20016,9 +20316,9 @@ class Test_TC_OO_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context, uint16_t offWaitTime) + static void OnSuccessCallback_5(void * context, uint16_t onTime) { - (static_cast(context))->OnSuccessResponse_5(offWaitTime); + (static_cast(context))->OnSuccessResponse_5(onTime); } static void OnFailureCallback_6(void * context, EmberAfStatus status) @@ -20026,9 +20326,9 @@ class Test_TC_OO_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, uint8_t startUpOnOff) + static void OnSuccessCallback_6(void * context, uint16_t offWaitTime) { - (static_cast(context))->OnSuccessResponse_6(startUpOnOff); + (static_cast(context))->OnSuccessResponse_6(offWaitTime); } static void OnFailureCallback_7(void * context, EmberAfStatus status) @@ -20036,7 +20336,10 @@ class Test_TC_OO_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context) { (static_cast(context))->OnSuccessResponse_7(); } + static void OnSuccessCallback_7(void * context, uint8_t startUpOnOff) + { + (static_cast(context))->OnSuccessResponse_7(startUpOnOff); + } static void OnFailureCallback_8(void * context, EmberAfStatus status) { @@ -20057,29 +20360,53 @@ class Test_TC_OO_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_10(status); } - static void OnSuccessCallback_10(void * context, uint16_t onTime) - { - (static_cast(context))->OnSuccessResponse_10(onTime); - } + static void OnSuccessCallback_10(void * context) { (static_cast(context))->OnSuccessResponse_10(); } static void OnFailureCallback_11(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_11(status); } - static void OnSuccessCallback_11(void * context, uint16_t offWaitTime) - { - (static_cast(context))->OnSuccessResponse_11(offWaitTime); - } + static void OnSuccessCallback_11(void * context) { (static_cast(context))->OnSuccessResponse_11(); } static void OnFailureCallback_12(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_12(status); } - static void OnSuccessCallback_12(void * context, uint8_t startUpOnOff) + static void OnSuccessCallback_12(void * context, bool globalSceneControl) + { + (static_cast(context))->OnSuccessResponse_12(globalSceneControl); + } + + static void OnFailureCallback_13(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_13(status); + } + + static void OnSuccessCallback_13(void * context, uint16_t onTime) + { + (static_cast(context))->OnSuccessResponse_13(onTime); + } + + static void OnFailureCallback_14(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_14(status); + } + + static void OnSuccessCallback_14(void * context, uint16_t offWaitTime) + { + (static_cast(context))->OnSuccessResponse_14(offWaitTime); + } + + static void OnFailureCallback_15(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_15(status); + } + + static void OnSuccessCallback_15(void * context, uint8_t startUpOnOff) { - (static_cast(context))->OnSuccessResponse_12(startUpOnOff); + (static_cast(context))->OnSuccessResponse_15(startUpOnOff); } // @@ -20112,107 +20439,151 @@ class Test_TC_OO_2_1 : public TestCommand NextTest(); } - CHIP_ERROR TestReadsBackMandatoryAttributeOnOff_2() + CHIP_ERROR TestWriteTheDefaultValueOfMandatoryAttributeOnOff_2() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::OnOffClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + bool onOffArgument; + onOffArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + onOffArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_2(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + } + + void OnSuccessResponse_2() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadsBackMandatoryAttributeOnOff_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_2, OnFailureCallback_2)); + this, OnSuccessCallback_3, OnFailureCallback_3)); return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2(bool onOff) + void OnSuccessResponse_3(bool onOff) { VerifyOrReturn(CheckValue("onOff", onOff, 0)); NextTest(); } - CHIP_ERROR TestReadLtAttributeGlobalSceneControl_3() + CHIP_ERROR TestReadLtAttributeGlobalSceneControl_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_3, OnFailureCallback_3)); + this, OnSuccessCallback_4, OnFailureCallback_4)); return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3(bool globalSceneControl) + void OnSuccessResponse_4(bool globalSceneControl) { VerifyOrReturn(CheckValue("globalSceneControl", globalSceneControl, 1)); NextTest(); } - CHIP_ERROR TestReadLtAttributeOnTime_4() + CHIP_ERROR TestReadLtAttributeOnTime_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_4, OnFailureCallback_4)); + this, OnSuccessCallback_5, OnFailureCallback_5)); return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4(uint16_t onTime) + void OnSuccessResponse_5(uint16_t onTime) { VerifyOrReturn(CheckValue("onTime", onTime, 0U)); NextTest(); } - CHIP_ERROR TestReadLtAttributeOffWaitTime_5() + CHIP_ERROR TestReadLtAttributeOffWaitTime_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_5, OnFailureCallback_5)); + this, OnSuccessCallback_6, OnFailureCallback_6)); return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5(uint16_t offWaitTime) + void OnSuccessResponse_6(uint16_t offWaitTime) { VerifyOrReturn(CheckValue("offWaitTime", offWaitTime, 0U)); NextTest(); } - CHIP_ERROR TestReadLtAttributeStartUpOnOff_6() + CHIP_ERROR TestReadLtAttributeStartUpOnOff_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_6, OnFailureCallback_6)); + this, OnSuccessCallback_7, OnFailureCallback_7)); return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6(uint8_t startUpOnOff) + void OnSuccessResponse_7(uint8_t startUpOnOff) { VerifyOrReturn(CheckValue("startUpOnOff", startUpOnOff, 0)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultValueToLtAttributeOnTime_7() + CHIP_ERROR TestWriteTheDefaultValueToLtAttributeGlobalSceneControl_8() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::OnOffClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + bool globalSceneControlArgument; + globalSceneControlArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + globalSceneControlArgument, this, OnSuccessCallback_8, OnFailureCallback_8)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_8(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + } + + void OnSuccessResponse_8() { ThrowSuccessResponse(); } + + CHIP_ERROR TestWriteTheDefaultValueToLtAttributeOnTime_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; @@ -20222,15 +20593,15 @@ class Test_TC_OO_2_1 : public TestCommand onTimeArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - onTimeArgument, this, OnSuccessCallback_7, OnFailureCallback_7)); + onTimeArgument, this, OnSuccessCallback_9, OnFailureCallback_9)); return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7() { NextTest(); } + void OnSuccessResponse_9() { NextTest(); } - CHIP_ERROR TestWriteTheDefaultValueToLtAttributeOffWaitTime_8() + CHIP_ERROR TestWriteTheDefaultValueToLtAttributeOffWaitTime_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; @@ -20240,15 +20611,15 @@ class Test_TC_OO_2_1 : public TestCommand offWaitTimeArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - offWaitTimeArgument, this, OnSuccessCallback_8, OnFailureCallback_8)); + offWaitTimeArgument, this, OnSuccessCallback_10, OnFailureCallback_10)); return CHIP_NO_ERROR; } - void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_8() { NextTest(); } + void OnSuccessResponse_10() { NextTest(); } - CHIP_ERROR TestWriteTheDefaultValueToLtAttributeStartUpOnOff_9() + CHIP_ERROR TestWriteTheDefaultValueToLtAttributeStartUpOnOff_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; @@ -20258,68 +20629,88 @@ class Test_TC_OO_2_1 : public TestCommand startUpOnOffArgument = 0; ReturnErrorOnFailure(cluster.WriteAttribute( - startUpOnOffArgument, this, OnSuccessCallback_9, OnFailureCallback_9)); + startUpOnOffArgument, this, OnSuccessCallback_11, OnFailureCallback_11)); return CHIP_NO_ERROR; } - void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_9() { NextTest(); } + void OnSuccessResponse_11() { NextTest(); } + + CHIP_ERROR TestReadsBackLtAttributeGlobalSceneControl_12() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::OnOffClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_12, OnFailureCallback_12)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_12(bool globalSceneControl) + { + VerifyOrReturn(CheckValue("globalSceneControl", globalSceneControl, 1)); + + NextTest(); + } - CHIP_ERROR TestReadsBackLtAttributeOnTime_10() + CHIP_ERROR TestReadsBackLtAttributeOnTime_13() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_10, OnFailureCallback_10)); + this, OnSuccessCallback_13, OnFailureCallback_13)); return CHIP_NO_ERROR; } - void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_13(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_10(uint16_t onTime) + void OnSuccessResponse_13(uint16_t onTime) { VerifyOrReturn(CheckValue("onTime", onTime, 0U)); NextTest(); } - CHIP_ERROR TestReadsBackLtAttributeOffWaitTime_11() + CHIP_ERROR TestReadsBackLtAttributeOffWaitTime_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_11, OnFailureCallback_11)); + this, OnSuccessCallback_14, OnFailureCallback_14)); return CHIP_NO_ERROR; } - void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_11(uint16_t offWaitTime) + void OnSuccessResponse_14(uint16_t offWaitTime) { VerifyOrReturn(CheckValue("offWaitTime", offWaitTime, 0U)); NextTest(); } - CHIP_ERROR TestReadsBackLtAttributeStartUpOnOff_12() + CHIP_ERROR TestReadsBackLtAttributeStartUpOnOff_15() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_12, OnFailureCallback_12)); + this, OnSuccessCallback_15, OnFailureCallback_15)); return CHIP_NO_ERROR; } - void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_15(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_12(uint8_t startUpOnOff) + void OnSuccessResponse_15(uint8_t startUpOnOff) { VerifyOrReturn(CheckValue("startUpOnOff", startUpOnOff, 0)); @@ -22877,440 +23268,1947 @@ class Test_TC_PCC_1_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; - static void OnFailureCallback_1(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_1(status); + static void OnFailureCallback_1(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_1(status); + } + + static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) + { + (static_cast(context))->OnSuccessResponse_1(clusterRevision); + } + + static void OnFailureCallback_2(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_2(status); + } + + static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } + + static void OnFailureCallback_3(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_3(status); + } + + static void OnSuccessCallback_3(void * context, uint32_t featureMap) + { + (static_cast(context))->OnSuccessResponse_3(featureMap); + } + + // + // Tests methods + // + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + SetIdentity(kIdentityAlpha); + return WaitForCommissionee(); + } + + CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_1() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_1(uint16_t clusterRevision) + { + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + NextTest(); + } + + CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + uint16_t clusterRevisionArgument; + clusterRevisionArgument = 3U; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + clusterRevisionArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_2(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + } + + void OnSuccessResponse_2() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_3() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_3(uint32_t featureMap) + { + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + NextTest(); + } +}; + +class Test_TC_PCC_2_1 : public TestCommand +{ +public: + Test_TC_PCC_2_1() : TestCommand("Test_TC_PCC_2_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_PCC_2_1\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PCC_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : read the mandatory attribute: MaxPressure\n"); + err = TestReadTheMandatoryAttributeMaxPressure_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : read the mandatory attribute: MaxSpeed\n"); + err = TestReadTheMandatoryAttributeMaxSpeed_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : read the mandatory attribute: MaxFlow\n"); + err = TestReadTheMandatoryAttributeMaxFlow_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : read the mandatory attribute: EffectiveOperationMode\n"); + err = TestReadTheMandatoryAttributeEffectiveOperationMode_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : read the mandatory attribute: EffectiveControlMode\n"); + err = TestReadTheMandatoryAttributeEffectiveControlMode_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : read the mandatory attribute: Capacity\n"); + err = TestReadTheMandatoryAttributeCapacity_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : read the mandatory attribute: MaxPressure\n"); + err = TestReadTheMandatoryAttributeMaxPressure_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : read the mandatory attribute: MaxSpeed\n"); + err = TestReadTheMandatoryAttributeMaxSpeed_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : read the mandatory attribute: MaxFlow\n"); + err = TestReadTheMandatoryAttributeMaxFlow_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : read the mandatory attribute: EffectiveOperationMode\n"); + err = TestReadTheMandatoryAttributeEffectiveOperationMode_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : read the mandatory attribute: EffectiveControlMode\n"); + err = TestReadTheMandatoryAttributeEffectiveControlMode_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : read the mandatory attribute: Capacity\n"); + err = TestReadTheMandatoryAttributeCapacity_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : read the optional attribute: MinConstPressure\n"); + err = TestReadTheOptionalAttributeMinConstPressure_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : read the optional attribute: MaxConstPressure\n"); + err = TestReadTheOptionalAttributeMaxConstPressure_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : read the optional attribute: MinCompPressure\n"); + err = TestReadTheOptionalAttributeMinCompPressure_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : read the optional attribute: MaxCompPressure\n"); + err = TestReadTheOptionalAttributeMaxCompPressure_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : read the optional attribute: MinConstSpeed\n"); + err = TestReadTheOptionalAttributeMinConstSpeed_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : read the optional attribute: MaxConstSpeed\n"); + err = TestReadTheOptionalAttributeMaxConstSpeed_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : read the optional attribute: MinConstFlow\n"); + err = TestReadTheOptionalAttributeMinConstFlow_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : read the optional attribute: MaxConstFlow\n"); + err = TestReadTheOptionalAttributeMaxConstFlow_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : read the optional attribute: MinConstTemp\n"); + err = TestReadTheOptionalAttributeMinConstTemp_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : read the optional attribute: MaxConstTemp\n"); + err = TestReadTheOptionalAttributeMaxConstTemp_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : read the optional attribute: PumpStatus\n"); + err = TestReadTheOptionalAttributePumpStatus_23(); + break; + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : read the optional attribute: PumpStatus\n"); + err = TestReadTheOptionalAttributePumpStatus_24(); + break; + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : read the optional attribute: Speed\n"); + err = TestReadTheOptionalAttributeSpeed_25(); + break; + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : read the optional attribute: LifetimeRunningHours\n"); + err = TestReadTheOptionalAttributeLifetimeRunningHours_26(); + break; + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : read the optional attribute: LifetimeRunningHours\n"); + err = TestReadTheOptionalAttributeLifetimeRunningHours_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : read the optional attribute: Power\n"); + err = TestReadTheOptionalAttributePower_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : read the optional attribute: LifetimeEnergyConsumed\n"); + err = TestReadTheOptionalAttributeLifetimeEnergyConsumed_29(); + break; + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : read the optional attribute: LifetimeEnergyConsumed\n"); + err = TestReadTheOptionalAttributeLifetimeEnergyConsumed_30(); + break; + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : write to the optional attribute: LifetimeEnergyConsumed\n"); + err = TestWriteToTheOptionalAttributeLifetimeEnergyConsumed_31(); + break; + case 32: + ChipLogProgress(chipTool, " ***** Test Step 32 : read the optional attribute: MinConstPressure\n"); + err = TestReadTheOptionalAttributeMinConstPressure_32(); + break; + case 33: + ChipLogProgress(chipTool, " ***** Test Step 33 : read the optional attribute: MaxConstPressure\n"); + err = TestReadTheOptionalAttributeMaxConstPressure_33(); + break; + case 34: + ChipLogProgress(chipTool, " ***** Test Step 34 : read the optional attribute: MinCompPressure\n"); + err = TestReadTheOptionalAttributeMinCompPressure_34(); + break; + case 35: + ChipLogProgress(chipTool, " ***** Test Step 35 : read the optional attribute: MaxCompPressure\n"); + err = TestReadTheOptionalAttributeMaxCompPressure_35(); + break; + case 36: + ChipLogProgress(chipTool, " ***** Test Step 36 : read the optional attribute: MinConstSpeed\n"); + err = TestReadTheOptionalAttributeMinConstSpeed_36(); + break; + case 37: + ChipLogProgress(chipTool, " ***** Test Step 37 : read the optional attribute: MaxConstSpeed\n"); + err = TestReadTheOptionalAttributeMaxConstSpeed_37(); + break; + case 38: + ChipLogProgress(chipTool, " ***** Test Step 38 : read the optional attribute: MinConstFlow\n"); + err = TestReadTheOptionalAttributeMinConstFlow_38(); + break; + case 39: + ChipLogProgress(chipTool, " ***** Test Step 39 : read the optional attribute: MaxConstFlow\n"); + err = TestReadTheOptionalAttributeMaxConstFlow_39(); + break; + case 40: + ChipLogProgress(chipTool, " ***** Test Step 40 : read the optional attribute: MinConstTemp\n"); + err = TestReadTheOptionalAttributeMinConstTemp_40(); + break; + case 41: + ChipLogProgress(chipTool, " ***** Test Step 41 : read the optional attribute: MaxConstTemp\n"); + err = TestReadTheOptionalAttributeMaxConstTemp_41(); + break; + case 42: + ChipLogProgress(chipTool, " ***** Test Step 42 : read the optional attribute: PumpStatus\n"); + err = TestReadTheOptionalAttributePumpStatus_42(); + break; + case 43: + ChipLogProgress(chipTool, " ***** Test Step 43 : read the optional attribute: PumpStatus\n"); + err = TestReadTheOptionalAttributePumpStatus_43(); + break; + case 44: + ChipLogProgress(chipTool, " ***** Test Step 44 : read the optional attribute: Speed\n"); + err = TestReadTheOptionalAttributeSpeed_44(); + break; + case 45: + ChipLogProgress(chipTool, " ***** Test Step 45 : read the optional attribute: LifetimeRunningHours\n"); + err = TestReadTheOptionalAttributeLifetimeRunningHours_45(); + break; + case 46: + ChipLogProgress(chipTool, " ***** Test Step 46 : read the optional attribute: LifetimeRunningHours\n"); + err = TestReadTheOptionalAttributeLifetimeRunningHours_46(); + break; + case 47: + ChipLogProgress(chipTool, " ***** Test Step 47 : read the optional attribute: Power\n"); + err = TestReadTheOptionalAttributePower_47(); + break; + case 48: + ChipLogProgress(chipTool, " ***** Test Step 48 : read the optional attribute: LifetimeEnergyConsumed\n"); + err = TestReadTheOptionalAttributeLifetimeEnergyConsumed_48(); + break; + case 49: + ChipLogProgress(chipTool, " ***** Test Step 49 : read the optional attribute: LifetimeEnergyConsumed\n"); + err = TestReadTheOptionalAttributeLifetimeEnergyConsumed_49(); + 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 = 50; + + chip::Optional mCluster; + chip::Optional mEndpoint; + + static void OnFailureCallback_1(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_1(status); + } + + static void OnSuccessCallback_1(void * context, int16_t maxPressure) + { + (static_cast(context))->OnSuccessResponse_1(maxPressure); + } + + static void OnFailureCallback_2(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_2(status); + } + + static void OnSuccessCallback_2(void * context, uint16_t maxSpeed) + { + (static_cast(context))->OnSuccessResponse_2(maxSpeed); + } + + static void OnFailureCallback_3(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_3(status); + } + + static void OnSuccessCallback_3(void * context, uint16_t maxFlow) + { + (static_cast(context))->OnSuccessResponse_3(maxFlow); + } + + static void OnFailureCallback_4(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_4(status); + } + + static void OnSuccessCallback_4(void * context, uint8_t effectiveOperationMode) + { + (static_cast(context))->OnSuccessResponse_4(effectiveOperationMode); + } + + static void OnFailureCallback_5(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_5(status); + } + + static void OnSuccessCallback_5(void * context, uint8_t effectiveControlMode) + { + (static_cast(context))->OnSuccessResponse_5(effectiveControlMode); + } + + static void OnFailureCallback_6(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_6(status); + } + + static void OnSuccessCallback_6(void * context, int16_t capacity) + { + (static_cast(context))->OnSuccessResponse_6(capacity); + } + + static void OnFailureCallback_7(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_7(status); + } + + static void OnSuccessCallback_7(void * context, int16_t maxPressure) + { + (static_cast(context))->OnSuccessResponse_7(maxPressure); + } + + static void OnFailureCallback_8(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_8(status); + } + + static void OnSuccessCallback_8(void * context, uint16_t maxSpeed) + { + (static_cast(context))->OnSuccessResponse_8(maxSpeed); + } + + static void OnFailureCallback_9(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_9(status); + } + + static void OnSuccessCallback_9(void * context, uint16_t maxFlow) + { + (static_cast(context))->OnSuccessResponse_9(maxFlow); + } + + static void OnFailureCallback_10(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_10(status); + } + + static void OnSuccessCallback_10(void * context, uint8_t effectiveOperationMode) + { + (static_cast(context))->OnSuccessResponse_10(effectiveOperationMode); + } + + static void OnFailureCallback_11(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_11(status); + } + + static void OnSuccessCallback_11(void * context, uint8_t effectiveControlMode) + { + (static_cast(context))->OnSuccessResponse_11(effectiveControlMode); + } + + static void OnFailureCallback_12(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_12(status); + } + + static void OnSuccessCallback_12(void * context, int16_t capacity) + { + (static_cast(context))->OnSuccessResponse_12(capacity); + } + + static void OnFailureCallback_13(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_13(status); + } + + static void OnSuccessCallback_13(void * context, int16_t minConstPressure) + { + (static_cast(context))->OnSuccessResponse_13(minConstPressure); + } + + static void OnFailureCallback_14(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_14(status); + } + + static void OnSuccessCallback_14(void * context, int16_t maxConstPressure) + { + (static_cast(context))->OnSuccessResponse_14(maxConstPressure); + } + + static void OnFailureCallback_15(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_15(status); + } + + static void OnSuccessCallback_15(void * context, int16_t minCompPressure) + { + (static_cast(context))->OnSuccessResponse_15(minCompPressure); + } + + static void OnFailureCallback_16(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_16(status); + } + + static void OnSuccessCallback_16(void * context, int16_t maxCompPressure) + { + (static_cast(context))->OnSuccessResponse_16(maxCompPressure); + } + + static void OnFailureCallback_17(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_17(status); + } + + static void OnSuccessCallback_17(void * context, uint16_t minConstSpeed) + { + (static_cast(context))->OnSuccessResponse_17(minConstSpeed); + } + + static void OnFailureCallback_18(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_18(status); + } + + static void OnSuccessCallback_18(void * context, uint16_t maxConstSpeed) + { + (static_cast(context))->OnSuccessResponse_18(maxConstSpeed); + } + + static void OnFailureCallback_19(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_19(status); + } + + static void OnSuccessCallback_19(void * context, uint16_t minConstFlow) + { + (static_cast(context))->OnSuccessResponse_19(minConstFlow); + } + + static void OnFailureCallback_20(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_20(status); + } + + static void OnSuccessCallback_20(void * context, uint16_t maxConstFlow) + { + (static_cast(context))->OnSuccessResponse_20(maxConstFlow); + } + + static void OnFailureCallback_21(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_21(status); + } + + static void OnSuccessCallback_21(void * context, int16_t minConstTemp) + { + (static_cast(context))->OnSuccessResponse_21(minConstTemp); + } + + static void OnFailureCallback_22(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_22(status); + } + + static void OnSuccessCallback_22(void * context, int16_t maxConstTemp) + { + (static_cast(context))->OnSuccessResponse_22(maxConstTemp); + } + + static void OnFailureCallback_23(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_23(status); + } + + static void OnSuccessCallback_23(void * context, uint16_t pumpStatus) + { + (static_cast(context))->OnSuccessResponse_23(pumpStatus); + } + + static void OnFailureCallback_24(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_24(status); + } + + static void OnSuccessCallback_24(void * context, uint16_t pumpStatus) + { + (static_cast(context))->OnSuccessResponse_24(pumpStatus); + } + + static void OnFailureCallback_25(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_25(status); + } + + static void OnSuccessCallback_25(void * context, uint16_t speed) + { + (static_cast(context))->OnSuccessResponse_25(speed); + } + + static void OnFailureCallback_26(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_26(status); + } + + static void OnSuccessCallback_26(void * context, const chip::app::DataModel::Nullable & lifetimeRunningHours) + { + (static_cast(context))->OnSuccessResponse_26(lifetimeRunningHours); + } + + static void OnFailureCallback_27(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_27(status); + } + + static void OnSuccessCallback_27(void * context, const chip::app::DataModel::Nullable & lifetimeRunningHours) + { + (static_cast(context))->OnSuccessResponse_27(lifetimeRunningHours); + } + + static void OnFailureCallback_28(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_28(status); + } + + static void OnSuccessCallback_28(void * context, uint32_t power) + { + (static_cast(context))->OnSuccessResponse_28(power); + } + + static void OnFailureCallback_29(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_29(status); + } + + static void OnSuccessCallback_29(void * context, const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) + { + (static_cast(context))->OnSuccessResponse_29(lifetimeEnergyConsumed); + } + + static void OnFailureCallback_30(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_30(status); + } + + static void OnSuccessCallback_30(void * context, const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) + { + (static_cast(context))->OnSuccessResponse_30(lifetimeEnergyConsumed); + } + + static void OnFailureCallback_31(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_31(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(status); + } + + static void OnSuccessCallback_32(void * context, int16_t minConstPressure) + { + (static_cast(context))->OnSuccessResponse_32(minConstPressure); + } + + static void OnFailureCallback_33(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_33(status); + } + + static void OnSuccessCallback_33(void * context, int16_t maxConstPressure) + { + (static_cast(context))->OnSuccessResponse_33(maxConstPressure); + } + + static void OnFailureCallback_34(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_34(status); + } + + static void OnSuccessCallback_34(void * context, int16_t minCompPressure) + { + (static_cast(context))->OnSuccessResponse_34(minCompPressure); + } + + static void OnFailureCallback_35(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_35(status); + } + + static void OnSuccessCallback_35(void * context, int16_t maxCompPressure) + { + (static_cast(context))->OnSuccessResponse_35(maxCompPressure); + } + + static void OnFailureCallback_36(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_36(status); + } + + static void OnSuccessCallback_36(void * context, uint16_t minConstSpeed) + { + (static_cast(context))->OnSuccessResponse_36(minConstSpeed); + } + + static void OnFailureCallback_37(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_37(status); + } + + static void OnSuccessCallback_37(void * context, uint16_t maxConstSpeed) + { + (static_cast(context))->OnSuccessResponse_37(maxConstSpeed); + } + + static void OnFailureCallback_38(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_38(status); + } + + static void OnSuccessCallback_38(void * context, uint16_t minConstFlow) + { + (static_cast(context))->OnSuccessResponse_38(minConstFlow); + } + + static void OnFailureCallback_39(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_39(status); + } + + static void OnSuccessCallback_39(void * context, uint16_t maxConstFlow) + { + (static_cast(context))->OnSuccessResponse_39(maxConstFlow); + } + + static void OnFailureCallback_40(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_40(status); + } + + static void OnSuccessCallback_40(void * context, int16_t minConstTemp) + { + (static_cast(context))->OnSuccessResponse_40(minConstTemp); + } + + static void OnFailureCallback_41(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_41(status); + } + + static void OnSuccessCallback_41(void * context, int16_t maxConstTemp) + { + (static_cast(context))->OnSuccessResponse_41(maxConstTemp); + } + + static void OnFailureCallback_42(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_42(status); + } + + static void OnSuccessCallback_42(void * context, uint16_t pumpStatus) + { + (static_cast(context))->OnSuccessResponse_42(pumpStatus); + } + + static void OnFailureCallback_43(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_43(status); + } + + static void OnSuccessCallback_43(void * context, uint16_t pumpStatus) + { + (static_cast(context))->OnSuccessResponse_43(pumpStatus); + } + + static void OnFailureCallback_44(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_44(status); + } + + static void OnSuccessCallback_44(void * context, uint16_t speed) + { + (static_cast(context))->OnSuccessResponse_44(speed); + } + + static void OnFailureCallback_45(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_45(status); + } + + static void OnSuccessCallback_45(void * context, const chip::app::DataModel::Nullable & lifetimeRunningHours) + { + (static_cast(context))->OnSuccessResponse_45(lifetimeRunningHours); + } + + static void OnFailureCallback_46(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_46(status); + } + + static void OnSuccessCallback_46(void * context, const chip::app::DataModel::Nullable & lifetimeRunningHours) + { + (static_cast(context))->OnSuccessResponse_46(lifetimeRunningHours); + } + + static void OnFailureCallback_47(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_47(status); + } + + static void OnSuccessCallback_47(void * context, uint32_t power) + { + (static_cast(context))->OnSuccessResponse_47(power); + } + + static void OnFailureCallback_48(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_48(status); + } + + static void OnSuccessCallback_48(void * context, const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) + { + (static_cast(context))->OnSuccessResponse_48(lifetimeEnergyConsumed); + } + + static void OnFailureCallback_49(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_49(status); + } + + static void OnSuccessCallback_49(void * context, const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) + { + (static_cast(context))->OnSuccessResponse_49(lifetimeEnergyConsumed); + } + + // + // Tests methods + // + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + SetIdentity(kIdentityAlpha); + return WaitForCommissionee(); + } + + CHIP_ERROR TestReadTheMandatoryAttributeMaxPressure_1() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_1(int16_t maxPressure) + { + VerifyOrReturn(CheckConstraintType("maxPressure", "", "int16")); + NextTest(); + } + + CHIP_ERROR TestReadTheMandatoryAttributeMaxSpeed_2() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_2(uint16_t maxSpeed) + { + VerifyOrReturn(CheckConstraintType("maxSpeed", "", "uint16")); + NextTest(); + } + + CHIP_ERROR TestReadTheMandatoryAttributeMaxFlow_3() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_3(uint16_t maxFlow) + { + VerifyOrReturn(CheckConstraintType("maxFlow", "", "uint16")); + NextTest(); + } + + CHIP_ERROR TestReadTheMandatoryAttributeEffectiveOperationMode_4() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_4(uint8_t effectiveOperationMode) + { + VerifyOrReturn(CheckConstraintType("effectiveOperationMode", "", "enum8")); + NextTest(); + } + + CHIP_ERROR TestReadTheMandatoryAttributeEffectiveControlMode_5() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_5(uint8_t effectiveControlMode) + { + VerifyOrReturn(CheckConstraintType("effectiveControlMode", "", "enum8")); + NextTest(); + } + + CHIP_ERROR TestReadTheMandatoryAttributeCapacity_6() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_6(int16_t capacity) + { + VerifyOrReturn(CheckConstraintType("capacity", "", "int16")); + NextTest(); + } + + CHIP_ERROR TestReadTheMandatoryAttributeMaxPressure_7() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_7(int16_t maxPressure) + { + VerifyOrReturn(CheckConstraintType("maxPressure", "", "int16")); + NextTest(); + } + + CHIP_ERROR TestReadTheMandatoryAttributeMaxSpeed_8() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_8, OnFailureCallback_8)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_8(uint16_t maxSpeed) + { + VerifyOrReturn(CheckConstraintType("maxSpeed", "", "uint16")); + NextTest(); + } + + CHIP_ERROR TestReadTheMandatoryAttributeMaxFlow_9() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_9, OnFailureCallback_9)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_9(uint16_t maxFlow) + { + VerifyOrReturn(CheckConstraintType("maxFlow", "", "uint16")); + NextTest(); + } + + CHIP_ERROR TestReadTheMandatoryAttributeEffectiveOperationMode_10() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_10, OnFailureCallback_10)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_10(uint8_t effectiveOperationMode) + { + VerifyOrReturn(CheckConstraintType("effectiveOperationMode", "", "enum8")); + NextTest(); + } + + CHIP_ERROR TestReadTheMandatoryAttributeEffectiveControlMode_11() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_11, OnFailureCallback_11)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_11(uint8_t effectiveControlMode) + { + VerifyOrReturn(CheckConstraintType("effectiveControlMode", "", "enum8")); + NextTest(); + } + + CHIP_ERROR TestReadTheMandatoryAttributeCapacity_12() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_12, OnFailureCallback_12)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_12(int16_t capacity) + { + VerifyOrReturn(CheckConstraintType("capacity", "", "int16")); + NextTest(); + } + + CHIP_ERROR TestReadTheOptionalAttributeMinConstPressure_13() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_13, OnFailureCallback_13)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_13(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_13(int16_t minConstPressure) + { + VerifyOrReturn(CheckConstraintType("minConstPressure", "", "int16")); + NextTest(); + } + + CHIP_ERROR TestReadTheOptionalAttributeMaxConstPressure_14() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_14, OnFailureCallback_14)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_14(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_14(int16_t maxConstPressure) + { + VerifyOrReturn(CheckConstraintType("maxConstPressure", "", "int16")); + NextTest(); + } + + CHIP_ERROR TestReadTheOptionalAttributeMinCompPressure_15() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_15, OnFailureCallback_15)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_15(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_15(int16_t minCompPressure) + { + VerifyOrReturn(CheckConstraintType("minCompPressure", "", "int16")); + NextTest(); + } + + CHIP_ERROR TestReadTheOptionalAttributeMaxCompPressure_16() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_16, OnFailureCallback_16)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_16(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_16(int16_t maxCompPressure) + { + VerifyOrReturn(CheckConstraintType("maxCompPressure", "", "int16")); + NextTest(); + } + + CHIP_ERROR TestReadTheOptionalAttributeMinConstSpeed_17() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_17, OnFailureCallback_17)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_17(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_17(uint16_t minConstSpeed) + { + VerifyOrReturn(CheckConstraintType("minConstSpeed", "", "uint16")); + NextTest(); + } + + CHIP_ERROR TestReadTheOptionalAttributeMaxConstSpeed_18() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_18, OnFailureCallback_18)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_18(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_18(uint16_t maxConstSpeed) + { + VerifyOrReturn(CheckConstraintType("maxConstSpeed", "", "uint16")); + NextTest(); + } + + CHIP_ERROR TestReadTheOptionalAttributeMinConstFlow_19() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_19, OnFailureCallback_19)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_19(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_19(uint16_t minConstFlow) + { + VerifyOrReturn(CheckConstraintType("minConstFlow", "", "uint16")); + NextTest(); + } + + CHIP_ERROR TestReadTheOptionalAttributeMaxConstFlow_20() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_20, OnFailureCallback_20)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_20(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_20(uint16_t maxConstFlow) + { + VerifyOrReturn(CheckConstraintType("maxConstFlow", "", "uint16")); + NextTest(); + } + + CHIP_ERROR TestReadTheOptionalAttributeMinConstTemp_21() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_21, OnFailureCallback_21)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_21(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_21(int16_t minConstTemp) + { + VerifyOrReturn(CheckConstraintType("minConstTemp", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("minConstTemp", minConstTemp, -27315)); + NextTest(); + } + + CHIP_ERROR TestReadTheOptionalAttributeMaxConstTemp_22() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_22, OnFailureCallback_22)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_22(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_22(int16_t maxConstTemp) + { + VerifyOrReturn(CheckConstraintType("maxConstTemp", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("maxConstTemp", maxConstTemp, -27315)); + NextTest(); + } + + CHIP_ERROR TestReadTheOptionalAttributePumpStatus_23() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_23, OnFailureCallback_23)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_23(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_23(uint16_t pumpStatus) + { + VerifyOrReturn(CheckValue("pumpStatus", pumpStatus, 0U)); + + NextTest(); + } + + CHIP_ERROR TestReadTheOptionalAttributePumpStatus_24() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_24, OnFailureCallback_24)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_24(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_24(uint16_t pumpStatus) + { + VerifyOrReturn(CheckConstraintType("pumpStatus", "", "map16")); + NextTest(); + } + + CHIP_ERROR TestReadTheOptionalAttributeSpeed_25() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_25, OnFailureCallback_25)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_25(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_25(uint16_t speed) + { + VerifyOrReturn(CheckConstraintType("speed", "", "uint16")); + NextTest(); + } + + CHIP_ERROR TestReadTheOptionalAttributeLifetimeRunningHours_26() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_26, OnFailureCallback_26)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_26(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_26(const chip::app::DataModel::Nullable & lifetimeRunningHours) + { + VerifyOrReturn(CheckValueNonNull("lifetimeRunningHours", lifetimeRunningHours)); + VerifyOrReturn(CheckValue("lifetimeRunningHours.Value()", lifetimeRunningHours.Value(), 0UL)); + + NextTest(); + } + + CHIP_ERROR TestReadTheOptionalAttributeLifetimeRunningHours_27() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_27, OnFailureCallback_27)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_27(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_27(const chip::app::DataModel::Nullable & lifetimeRunningHours) + { + VerifyOrReturn(CheckConstraintType("lifetimeRunningHours", "", "uint24")); + NextTest(); + } + + CHIP_ERROR TestReadTheOptionalAttributePower_28() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_28, OnFailureCallback_28)); + return CHIP_NO_ERROR; } - static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) + void OnFailureResponse_28(EmberAfStatus status) { - (static_cast(context))->OnSuccessResponse_1(clusterRevision); + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - static void OnFailureCallback_2(void * context, EmberAfStatus status) + void OnSuccessResponse_28(uint32_t power) { - (static_cast(context))->OnFailureResponse_2(status); + VerifyOrReturn(CheckConstraintType("power", "", "uint24")); + NextTest(); } - static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } - - static void OnFailureCallback_3(void * context, EmberAfStatus status) + CHIP_ERROR TestReadTheOptionalAttributeLifetimeEnergyConsumed_29() { - (static_cast(context))->OnFailureResponse_3(status); + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_29, OnFailureCallback_29)); + return CHIP_NO_ERROR; } - static void OnSuccessCallback_3(void * context, uint32_t featureMap) + void OnFailureResponse_29(EmberAfStatus status) { - (static_cast(context))->OnSuccessResponse_3(featureMap); + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - // - // Tests methods - // - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + void OnSuccessResponse_29(const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) { - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(); + VerifyOrReturn(CheckValueNonNull("lifetimeEnergyConsumed", lifetimeEnergyConsumed)); + VerifyOrReturn(CheckValue("lifetimeEnergyConsumed.Value()", lifetimeEnergyConsumed.Value(), 0UL)); + + NextTest(); } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_1() + CHIP_ERROR TestReadTheOptionalAttributeLifetimeEnergyConsumed_30() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_1, OnFailureCallback_1)); + cluster.ReadAttribute( + this, OnSuccessCallback_30, OnFailureCallback_30)); return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_30(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_1(uint16_t clusterRevision) + void OnSuccessResponse_30(const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) { - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("lifetimeEnergyConsumed", "", "uint32")); NextTest(); } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() + CHIP_ERROR TestWriteToTheOptionalAttributeLifetimeEnergyConsumed_31() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint16_t clusterRevisionArgument; - clusterRevisionArgument = 3U; + chip::app::DataModel::Nullable lifetimeEnergyConsumedArgument; + lifetimeEnergyConsumedArgument.SetNonNull(); + lifetimeEnergyConsumedArgument.Value() = 0UL; ReturnErrorOnFailure( - cluster.WriteAttribute( - clusterRevisionArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); + cluster.WriteAttribute( + lifetimeEnergyConsumedArgument, this, OnSuccessCallback_31, OnFailureCallback_31)); return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) + void OnFailureResponse_31(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_2() { ThrowSuccessResponse(); } + void OnSuccessResponse_31() { NextTest(); } - CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_3() + CHIP_ERROR TestReadTheOptionalAttributeMinConstPressure_32() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_3, OnFailureCallback_3)); + cluster.ReadAttribute( + this, OnSuccessCallback_32, OnFailureCallback_32)); return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_32(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_3(uint32_t featureMap) + void OnSuccessResponse_32(int16_t minConstPressure) { - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("minConstPressure", "", "int16")); NextTest(); } -}; -class Test_TC_PCC_2_1 : public TestCommand -{ -public: - Test_TC_PCC_2_1() : TestCommand("Test_TC_PCC_2_1"), mTestIndex(0) + CHIP_ERROR TestReadTheOptionalAttributeMaxConstPressure_33() { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_33, OnFailureCallback_33)); + return CHIP_NO_ERROR; } - /////////// TestCommand Interface ///////// - void NextTest() override + void OnFailureResponse_33(EmberAfStatus status) { - CHIP_ERROR err = CHIP_NO_ERROR; + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_PCC_2_1\n"); - } + void OnSuccessResponse_33(int16_t maxConstPressure) + { + VerifyOrReturn(CheckConstraintType("maxConstPressure", "", "int16")); + NextTest(); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PCC_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + CHIP_ERROR TestReadTheOptionalAttributeMinCompPressure_34() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - Wait(); + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_34, OnFailureCallback_34)); + return CHIP_NO_ERROR; + } - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) - { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the mandatory attribute: MaxPressure\n"); - err = TestReadTheMandatoryAttributeMaxPressure_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : read the mandatory attribute: EffectiveOperationMode\n"); - err = TestReadTheMandatoryAttributeEffectiveOperationMode_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : read the mandatory attribute: EffectiveControlMode\n"); - err = TestReadTheMandatoryAttributeEffectiveControlMode_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : read the mandatory attribute: Capacity\n"); - err = TestReadTheMandatoryAttributeCapacity_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : read the mandatory attribute: MaxPressure\n"); - err = TestReadTheMandatoryAttributeMaxPressure_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : read the mandatory attribute: EffectiveOperationMode\n"); - err = TestReadTheMandatoryAttributeEffectiveOperationMode_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : read the mandatory attribute: EffectiveControlMode\n"); - err = TestReadTheMandatoryAttributeEffectiveControlMode_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : read the mandatory attribute: Capacity\n"); - err = TestReadTheMandatoryAttributeCapacity_8(); - break; - } + void OnFailureResponse_34(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + void OnSuccessResponse_34(int16_t minCompPressure) + { + VerifyOrReturn(CheckConstraintType("minCompPressure", "", "int16")); + NextTest(); } -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; + CHIP_ERROR TestReadTheOptionalAttributeMaxCompPressure_35() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::Optional mCluster; - chip::Optional mEndpoint; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_35, OnFailureCallback_35)); + return CHIP_NO_ERROR; + } - static void OnFailureCallback_1(void * context, EmberAfStatus status) + void OnFailureResponse_35(EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_1(status); + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - static void OnSuccessCallback_1(void * context, int16_t maxPressure) + void OnSuccessResponse_35(int16_t maxCompPressure) { - (static_cast(context))->OnSuccessResponse_1(maxPressure); + VerifyOrReturn(CheckConstraintType("maxCompPressure", "", "int16")); + NextTest(); } - static void OnFailureCallback_2(void * context, EmberAfStatus status) + CHIP_ERROR TestReadTheOptionalAttributeMinConstSpeed_36() { - (static_cast(context))->OnFailureResponse_2(status); + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_36, OnFailureCallback_36)); + return CHIP_NO_ERROR; } - static void OnSuccessCallback_2(void * context, uint8_t effectiveOperationMode) + void OnFailureResponse_36(EmberAfStatus status) { - (static_cast(context))->OnSuccessResponse_2(effectiveOperationMode); + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - static void OnFailureCallback_3(void * context, EmberAfStatus status) + void OnSuccessResponse_36(uint16_t minConstSpeed) { - (static_cast(context))->OnFailureResponse_3(status); + VerifyOrReturn(CheckConstraintType("minConstSpeed", "", "uint16")); + NextTest(); } - static void OnSuccessCallback_3(void * context, uint8_t effectiveControlMode) + CHIP_ERROR TestReadTheOptionalAttributeMaxConstSpeed_37() { - (static_cast(context))->OnSuccessResponse_3(effectiveControlMode); + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_37, OnFailureCallback_37)); + return CHIP_NO_ERROR; } - static void OnFailureCallback_4(void * context, EmberAfStatus status) + void OnFailureResponse_37(EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_4(status); + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - static void OnSuccessCallback_4(void * context, int16_t capacity) + void OnSuccessResponse_37(uint16_t maxConstSpeed) { - (static_cast(context))->OnSuccessResponse_4(capacity); + VerifyOrReturn(CheckConstraintType("maxConstSpeed", "", "uint16")); + NextTest(); } - static void OnFailureCallback_5(void * context, EmberAfStatus status) + CHIP_ERROR TestReadTheOptionalAttributeMinConstFlow_38() { - (static_cast(context))->OnFailureResponse_5(status); + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_38, OnFailureCallback_38)); + return CHIP_NO_ERROR; } - static void OnSuccessCallback_5(void * context, int16_t maxPressure) + void OnFailureResponse_38(EmberAfStatus status) { - (static_cast(context))->OnSuccessResponse_5(maxPressure); + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - static void OnFailureCallback_6(void * context, EmberAfStatus status) + void OnSuccessResponse_38(uint16_t minConstFlow) { - (static_cast(context))->OnFailureResponse_6(status); + VerifyOrReturn(CheckConstraintType("minConstFlow", "", "uint16")); + NextTest(); } - static void OnSuccessCallback_6(void * context, uint8_t effectiveOperationMode) + CHIP_ERROR TestReadTheOptionalAttributeMaxConstFlow_39() { - (static_cast(context))->OnSuccessResponse_6(effectiveOperationMode); + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_39, OnFailureCallback_39)); + return CHIP_NO_ERROR; } - static void OnFailureCallback_7(void * context, EmberAfStatus status) + void OnFailureResponse_39(EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_7(status); + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - static void OnSuccessCallback_7(void * context, uint8_t effectiveControlMode) + void OnSuccessResponse_39(uint16_t maxConstFlow) { - (static_cast(context))->OnSuccessResponse_7(effectiveControlMode); + VerifyOrReturn(CheckConstraintType("maxConstFlow", "", "uint16")); + NextTest(); } - static void OnFailureCallback_8(void * context, EmberAfStatus status) + CHIP_ERROR TestReadTheOptionalAttributeMinConstTemp_40() { - (static_cast(context))->OnFailureResponse_8(status); + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_40, OnFailureCallback_40)); + return CHIP_NO_ERROR; } - static void OnSuccessCallback_8(void * context, int16_t capacity) + void OnFailureResponse_40(EmberAfStatus status) { - (static_cast(context))->OnSuccessResponse_8(capacity); + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - // - // Tests methods - // - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + void OnSuccessResponse_40(int16_t minConstTemp) { - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(); + VerifyOrReturn(CheckConstraintType("minConstTemp", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("minConstTemp", minConstTemp, -27315)); + NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributeMaxPressure_1() + CHIP_ERROR TestReadTheOptionalAttributeMaxConstTemp_41() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_1, OnFailureCallback_1)); + cluster.ReadAttribute( + this, OnSuccessCallback_41, OnFailureCallback_41)); return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_41(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_1(int16_t maxPressure) + void OnSuccessResponse_41(int16_t maxConstTemp) { - VerifyOrReturn(CheckConstraintType("maxPressure", "", "int16")); + VerifyOrReturn(CheckConstraintType("maxConstTemp", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("maxConstTemp", maxConstTemp, -27315)); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributeEffectiveOperationMode_2() + CHIP_ERROR TestReadTheOptionalAttributePumpStatus_42() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_2, OnFailureCallback_2)); + cluster.ReadAttribute( + this, OnSuccessCallback_42, OnFailureCallback_42)); return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_42(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_2(uint8_t effectiveOperationMode) + void OnSuccessResponse_42(uint16_t pumpStatus) { - VerifyOrReturn(CheckConstraintType("effectiveOperationMode", "", "enum8")); + VerifyOrReturn(CheckValue("pumpStatus", pumpStatus, 0U)); + NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributeEffectiveControlMode_3() + CHIP_ERROR TestReadTheOptionalAttributePumpStatus_43() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_3, OnFailureCallback_3)); + cluster.ReadAttribute( + this, OnSuccessCallback_43, OnFailureCallback_43)); return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_43(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_3(uint8_t effectiveControlMode) + void OnSuccessResponse_43(uint16_t pumpStatus) { - VerifyOrReturn(CheckConstraintType("effectiveControlMode", "", "enum8")); + VerifyOrReturn(CheckConstraintType("pumpStatus", "", "map16")); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributeCapacity_4() + CHIP_ERROR TestReadTheOptionalAttributeSpeed_44() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_4, OnFailureCallback_4)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_44, OnFailureCallback_44)); return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_44(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_4(int16_t capacity) + void OnSuccessResponse_44(uint16_t speed) { - VerifyOrReturn(CheckConstraintType("capacity", "", "int16")); + VerifyOrReturn(CheckConstraintType("speed", "", "uint16")); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributeMaxPressure_5() + CHIP_ERROR TestReadTheOptionalAttributeLifetimeRunningHours_45() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_5, OnFailureCallback_5)); + cluster.ReadAttribute( + this, OnSuccessCallback_45, OnFailureCallback_45)); return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_45(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5(int16_t maxPressure) + void OnSuccessResponse_45(const chip::app::DataModel::Nullable & lifetimeRunningHours) { - VerifyOrReturn(CheckConstraintType("maxPressure", "", "int16")); + VerifyOrReturn(CheckValueNonNull("lifetimeRunningHours", lifetimeRunningHours)); + VerifyOrReturn(CheckValue("lifetimeRunningHours.Value()", lifetimeRunningHours.Value(), 0UL)); + NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributeEffectiveOperationMode_6() + CHIP_ERROR TestReadTheOptionalAttributeLifetimeRunningHours_46() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_6, OnFailureCallback_6)); + cluster.ReadAttribute( + this, OnSuccessCallback_46, OnFailureCallback_46)); return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_46(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_6(uint8_t effectiveOperationMode) + void OnSuccessResponse_46(const chip::app::DataModel::Nullable & lifetimeRunningHours) { - VerifyOrReturn(CheckConstraintType("effectiveOperationMode", "", "enum8")); + VerifyOrReturn(CheckConstraintType("lifetimeRunningHours", "", "uint24")); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributeEffectiveControlMode_7() + CHIP_ERROR TestReadTheOptionalAttributePower_47() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_47, OnFailureCallback_47)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_47(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_47(uint32_t power) + { + VerifyOrReturn(CheckConstraintType("power", "", "uint24")); + NextTest(); + } + + CHIP_ERROR TestReadTheOptionalAttributeLifetimeEnergyConsumed_48() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_7, OnFailureCallback_7)); + cluster.ReadAttribute( + this, OnSuccessCallback_48, OnFailureCallback_48)); return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_48(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_7(uint8_t effectiveControlMode) + void OnSuccessResponse_48(const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) { - VerifyOrReturn(CheckConstraintType("effectiveControlMode", "", "enum8")); + VerifyOrReturn(CheckValueNonNull("lifetimeEnergyConsumed", lifetimeEnergyConsumed)); + VerifyOrReturn(CheckValue("lifetimeEnergyConsumed.Value()", lifetimeEnergyConsumed.Value(), 0UL)); + NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributeCapacity_8() + CHIP_ERROR TestReadTheOptionalAttributeLifetimeEnergyConsumed_49() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_8, OnFailureCallback_8)); + cluster.ReadAttribute( + this, OnSuccessCallback_49, OnFailureCallback_49)); return CHIP_NO_ERROR; } - void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_49(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_8(int16_t capacity) + void OnSuccessResponse_49(const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) { - VerifyOrReturn(CheckConstraintType("capacity", "", "int16")); + VerifyOrReturn(CheckConstraintType("lifetimeEnergyConsumed", "", "uint32")); NextTest(); } }; @@ -23516,6 +25414,34 @@ class Test_TC_PCC_2_3 : public TestCommand ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the attribute: EffectiveOperationMode\n"); err = ShouldSkip("A_EFFECTIVEOPERATIONMODE") ? CHIP_NO_ERROR : TestReadsTheAttributeEffectiveOperationMode_2(); break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Write 0 to the ControlMode attribute to DUT\n"); + err = ShouldSkip("A_CONTROLMODE") ? CHIP_NO_ERROR : TestWrite0ToTheControlModeAttributeToDut_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the attribute: EffectiveControlMode\n"); + err = ShouldSkip("A_EFFECTIVECONTROLMODE") ? CHIP_NO_ERROR : TestReadsTheAttributeEffectiveControlMode_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Write 1 to the ControlMode attribute to DUT\n"); + err = ShouldSkip("A_CONTROLMODE") ? CHIP_NO_ERROR : TestWrite1ToTheControlModeAttributeToDut_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Write 2 to the ControlMode attribute to DUT\n"); + err = ShouldSkip("A_CONTROLMODE") ? CHIP_NO_ERROR : TestWrite2ToTheControlModeAttributeToDut_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Write 3 to the ControlMode attribute to DUT\n"); + err = ShouldSkip("A_CONTROLMODE") ? CHIP_NO_ERROR : TestWrite3ToTheControlModeAttributeToDut_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Write 5 to the ControlMode attribute to DUT\n"); + err = ShouldSkip("A_CONTROLMODE") ? CHIP_NO_ERROR : TestWrite5ToTheControlModeAttributeToDut_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Write 7 to the ControlMode attribute to DUT\n"); + err = ShouldSkip("A_CONTROLMODE") ? CHIP_NO_ERROR : TestWrite7ToTheControlModeAttributeToDut_9(); + break; } if (CHIP_NO_ERROR != err) @@ -23527,7 +25453,7 @@ class Test_TC_PCC_2_3 : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + const uint16_t mTestCount = 10; chip::Optional mCluster; chip::Optional mEndpoint; @@ -23549,6 +25475,58 @@ class Test_TC_PCC_2_3 : public TestCommand (static_cast(context))->OnSuccessResponse_2(effectiveOperationMode); } + static void OnFailureCallback_3(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_3(status); + } + + static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } + + static void OnFailureCallback_4(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_4(status); + } + + static void OnSuccessCallback_4(void * context, uint8_t effectiveControlMode) + { + (static_cast(context))->OnSuccessResponse_4(effectiveControlMode); + } + + static void OnFailureCallback_5(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_5(status); + } + + static void OnSuccessCallback_5(void * context) { (static_cast(context))->OnSuccessResponse_5(); } + + static void OnFailureCallback_6(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_6(status); + } + + static void OnSuccessCallback_6(void * context) { (static_cast(context))->OnSuccessResponse_6(); } + + static void OnFailureCallback_7(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_7(status); + } + + static void OnSuccessCallback_7(void * context) { (static_cast(context))->OnSuccessResponse_7(); } + + static void OnFailureCallback_8(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_8(status); + } + + static void OnSuccessCallback_8(void * context) { (static_cast(context))->OnSuccessResponse_8(); } + + static void OnFailureCallback_9(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_9(status); + } + + static void OnSuccessCallback_9(void * context) { (static_cast(context))->OnSuccessResponse_9(); } + // // Tests methods // @@ -23598,6 +25576,141 @@ class Test_TC_PCC_2_3 : public TestCommand NextTest(); } + + CHIP_ERROR TestWrite0ToTheControlModeAttributeToDut_3() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + uint8_t controlModeArgument; + controlModeArgument = 0; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + controlModeArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_3() { NextTest(); } + + CHIP_ERROR TestReadsTheAttributeEffectiveControlMode_4() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_4(uint8_t effectiveControlMode) + { + VerifyOrReturn(CheckValue("effectiveControlMode", effectiveControlMode, 0)); + + NextTest(); + } + + CHIP_ERROR TestWrite1ToTheControlModeAttributeToDut_5() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + uint8_t controlModeArgument; + controlModeArgument = 1; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + controlModeArgument, this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_5() { NextTest(); } + + CHIP_ERROR TestWrite2ToTheControlModeAttributeToDut_6() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + uint8_t controlModeArgument; + controlModeArgument = 2; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + controlModeArgument, this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_6() { NextTest(); } + + CHIP_ERROR TestWrite3ToTheControlModeAttributeToDut_7() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + uint8_t controlModeArgument; + controlModeArgument = 3; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + controlModeArgument, this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_7() { NextTest(); } + + CHIP_ERROR TestWrite5ToTheControlModeAttributeToDut_8() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + uint8_t controlModeArgument; + controlModeArgument = 5; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + controlModeArgument, this, OnSuccessCallback_8, OnFailureCallback_8)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_8() { NextTest(); } + + CHIP_ERROR TestWrite7ToTheControlModeAttributeToDut_9() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + uint8_t controlModeArgument; + controlModeArgument = 7; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + controlModeArgument, this, OnSuccessCallback_9, OnFailureCallback_9)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_9() { NextTest(); } }; class Test_TC_RH_1_1 : public TestCommand @@ -26500,7 +28613,10 @@ class Test_TC_TSTAT_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_50(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_50(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_50(int8_t minSetpointDeadBand) { @@ -26520,7 +28636,10 @@ class Test_TC_TSTAT_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_51(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_51(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_51(int8_t minSetpointDeadBand) { @@ -26543,7 +28662,10 @@ class Test_TC_TSTAT_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_52(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_52(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_52() { NextTest(); } @@ -26558,7 +28680,10 @@ class Test_TC_TSTAT_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_53(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_53(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_53(int8_t minSetpointDeadBand) { @@ -26578,7 +28703,10 @@ class Test_TC_TSTAT_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_54(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_54(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_54(uint8_t startOfWeek) { @@ -26620,7 +28748,10 @@ class Test_TC_TSTAT_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_56(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_56(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_56(uint8_t startOfWeek) { @@ -26641,7 +28772,10 @@ class Test_TC_TSTAT_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_57(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_57(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_57(uint8_t numberOfWeeklyTransitions) { @@ -26683,7 +28817,10 @@ class Test_TC_TSTAT_2_1 : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_59(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_59(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } void OnSuccessResponse_59(uint8_t numberOfDailyTransitions) { @@ -58282,10 +60419,10 @@ class TestGroupMessaging : public TestCommand void OnDoneResponse_2() { NextTest(); } }; -class Test_TC_DIAGSW_1_1 : public TestCommand +class Test_TC_SWDIAG_1_1 : public TestCommand { public: - Test_TC_DIAGSW_1_1() : TestCommand("Test_TC_DIAGSW_1_1"), mTestIndex(0) + Test_TC_SWDIAG_1_1() : TestCommand("Test_TC_SWDIAG_1_1"), mTestIndex(0) { AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); @@ -58298,12 +60435,12 @@ class Test_TC_DIAGSW_1_1 : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DIAGSW_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SWDIAG_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DIAGSW_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SWDIAG_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -58351,32 +60488,32 @@ class Test_TC_DIAGSW_1_1 : public TestCommand static void OnFailureCallback_1(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_1(status); + (static_cast(context))->OnFailureResponse_1(status); } static void OnSuccessCallback_1(void * context, uint64_t currentHeapFree) { - (static_cast(context))->OnSuccessResponse_1(currentHeapFree); + (static_cast(context))->OnSuccessResponse_1(currentHeapFree); } static void OnFailureCallback_2(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_2(status); + (static_cast(context))->OnFailureResponse_2(status); } static void OnSuccessCallback_2(void * context, uint64_t currentHeapUsed) { - (static_cast(context))->OnSuccessResponse_2(currentHeapUsed); + (static_cast(context))->OnSuccessResponse_2(currentHeapUsed); } static void OnFailureCallback_3(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_3(status); + (static_cast(context))->OnFailureResponse_3(status); } static void OnSuccessCallback_3(void * context, uint64_t currentHeapHighWatermark) { - (static_cast(context))->OnSuccessResponse_3(currentHeapHighWatermark); + (static_cast(context))->OnSuccessResponse_3(currentHeapHighWatermark); } // @@ -58457,10 +60594,10 @@ class Test_TC_DIAGSW_1_1 : public TestCommand } }; -class Test_TC_DIAGSW_2_1 : public TestCommand +class Test_TC_SWDIAG_2_1 : public TestCommand { public: - Test_TC_DIAGSW_2_1() : TestCommand("Test_TC_DIAGSW_2_1"), mTestIndex(0) + Test_TC_SWDIAG_2_1() : TestCommand("Test_TC_SWDIAG_2_1"), mTestIndex(0) { AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); @@ -58473,12 +60610,12 @@ class Test_TC_DIAGSW_2_1 : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DIAGSW_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SWDIAG_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DIAGSW_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SWDIAG_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -58512,10 +60649,10 @@ class Test_TC_DIAGSW_2_1 : public TestCommand // }; -class Test_TC_DIAGSW_3_2 : public TestCommand +class Test_TC_SWDIAG_3_1 : public TestCommand { public: - Test_TC_DIAGSW_3_2() : TestCommand("Test_TC_DIAGSW_3_2"), mTestIndex(0) + Test_TC_SWDIAG_3_1() : TestCommand("Test_TC_SWDIAG_3_1"), mTestIndex(0) { AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); @@ -58528,12 +60665,12 @@ class Test_TC_DIAGSW_3_2 : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DIAGSW_3_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SWDIAG_3_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DIAGSW_3_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SWDIAG_3_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -59014,9 +61151,9 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), - make_unique(), - make_unique(), + make_unique(), + make_unique(), + make_unique(), make_unique(), }; From b7ff37e8c8e3fbc0128173042e40edc7ba9f4ff4 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Sat, 8 Jan 2022 09:31:48 -0500 Subject: [PATCH 10/64] Make "contains" take a const argument in intrusive list (#13348) --- src/lib/support/IntrusiveList.h | 8 +++-- src/lib/support/tests/TestIntrusiveList.cpp | 40 ++++++++++++++++++++- 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/src/lib/support/IntrusiveList.h b/src/lib/support/IntrusiveList.h index 4d9bc3e3b6ceae..7555b1659aa873 100644 --- a/src/lib/support/IntrusiveList.h +++ b/src/lib/support/IntrusiveList.h @@ -202,7 +202,7 @@ class IntrusiveListBase void InsertAfter(IteratorBase pos, IntrusiveListNodeBase * node) { pos.mCurrent->Append(node); } void Remove(IntrusiveListNodeBase * node) { node->Remove(); } - bool Contains(IntrusiveListNodeBase * node) const + bool Contains(const IntrusiveListNodeBase * node) const { for (auto & iter : *this) { @@ -225,8 +225,12 @@ class IntrusiveListBaseHook { public: static_assert(std::is_base_of::value, "T must be derived from IntrusiveListNodeBase"); + static T * ToObject(IntrusiveListNodeBase * node) { return static_cast(node); } + static const T * ToObject(const IntrusiveListNodeBase * node) { return static_cast(node); } + static IntrusiveListNodeBase * ToNode(T * object) { return static_cast(object); } + static const IntrusiveListNodeBase * ToNode(const T * object) { return static_cast(object); } }; /// A double-linked list where the data is stored together with the previous/next pointers for cache efficiency / and compactness. @@ -289,7 +293,7 @@ class IntrusiveList : public IntrusiveListBase void InsertBefore(Iterator pos, T * value) { IntrusiveListBase::InsertBefore(pos, Hook::ToNode(value)); } void InsertAfter(Iterator pos, T * value) { IntrusiveListBase::InsertAfter(pos, Hook::ToNode(value)); } void Remove(T * value) { IntrusiveListBase::Remove(Hook::ToNode(value)); } - bool Contains(T * value) const { return IntrusiveListBase::Contains(Hook::ToNode(value)); } + bool Contains(const T * value) const { return IntrusiveListBase::Contains(Hook::ToNode(value)); } }; } // namespace chip diff --git a/src/lib/support/tests/TestIntrusiveList.cpp b/src/lib/support/tests/TestIntrusiveList.cpp index 7e9bbb73051903..f65eb8557ba94a 100644 --- a/src/lib/support/tests/TestIntrusiveList.cpp +++ b/src/lib/support/tests/TestIntrusiveList.cpp @@ -97,6 +97,40 @@ void TestIntrusiveListRandom(nlTestSuite * inSuite, void * inContext) } } +void TestContains(nlTestSuite * inSuite, void * inContext) +{ + ListNode a, b, c; + IntrusiveList list; + + NL_TEST_ASSERT(inSuite, !list.Contains(&a)); + NL_TEST_ASSERT(inSuite, !list.Contains(&b)); + NL_TEST_ASSERT(inSuite, !list.Contains(&c)); + + list.PushBack(&a); + list.PushFront(&c); + + NL_TEST_ASSERT(inSuite, list.Contains(&a)); + NL_TEST_ASSERT(inSuite, !list.Contains(&b)); + NL_TEST_ASSERT(inSuite, list.Contains(&c)); + + list.PushBack(&b); + + NL_TEST_ASSERT(inSuite, list.Contains(&a)); + NL_TEST_ASSERT(inSuite, list.Contains(&b)); + NL_TEST_ASSERT(inSuite, list.Contains(&c)); + + list.Remove(&a); + list.Remove(&c); + + NL_TEST_ASSERT(inSuite, !list.Contains(&a)); + NL_TEST_ASSERT(inSuite, list.Contains(&b)); + NL_TEST_ASSERT(inSuite, !list.Contains(&c)); + + // all nodes have to be removed from the list on destruction. Lists do NOT do + // this automatically + list.Remove(&b); +} + int Setup(void * inContext) { return SUCCESS; @@ -113,7 +147,11 @@ int Teardown(void * inContext) /** * Test Suite. It lists all the test functions. */ -static const nlTest sTests[] = { NL_TEST_DEF_FN(TestIntrusiveListRandom), NL_TEST_SENTINEL() }; +static const nlTest sTests[] = { + NL_TEST_DEF_FN(TestIntrusiveListRandom), // + NL_TEST_DEF_FN(TestContains), // + NL_TEST_SENTINEL(), // +}; int TestIntrusiveList() { From 466ee9073eacd3e86cfac4877efe0b5a23770229 Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Mon, 10 Jan 2022 15:59:54 +0530 Subject: [PATCH 11/64] [ESP32] Fix ota-provider-app build failure (#13394) --- .../esp32/main/BdxOtaSender.cpp | 2 +- .../{ => ota-provider-common}/BdxOtaSender.h | 3 ++ examples/ota-provider-app/esp32/main/main.cpp | 43 +++++++------------ 3 files changed, 20 insertions(+), 28 deletions(-) rename examples/ota-provider-app/esp32/main/include/{ => ota-provider-common}/BdxOtaSender.h (96%) diff --git a/examples/ota-provider-app/esp32/main/BdxOtaSender.cpp b/examples/ota-provider-app/esp32/main/BdxOtaSender.cpp index 34677c17c00496..d4ca1a3de1ce79 100644 --- a/examples/ota-provider-app/esp32/main/BdxOtaSender.cpp +++ b/examples/ota-provider-app/esp32/main/BdxOtaSender.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ -#include +#include #include #include diff --git a/examples/ota-provider-app/esp32/main/include/BdxOtaSender.h b/examples/ota-provider-app/esp32/main/include/ota-provider-common/BdxOtaSender.h similarity index 96% rename from examples/ota-provider-app/esp32/main/include/BdxOtaSender.h rename to examples/ota-provider-app/esp32/main/include/ota-provider-common/BdxOtaSender.h index 4940d676dedd58..70a90a0aaa21df 100644 --- a/examples/ota-provider-app/esp32/main/include/BdxOtaSender.h +++ b/examples/ota-provider-app/esp32/main/include/ota-provider-common/BdxOtaSender.h @@ -89,6 +89,9 @@ class BdxOtaSender : public chip::bdx::Responder */ uint64_t GetTransferLength(void); + /* ota-provider-common/OTAProviderExample.cpp requires this */ + void SetFilepath(const char * path) {} + private: // Inherited from bdx::TransferFacilitator void HandleTransferSessionOutput(chip::bdx::TransferSession::OutputEvent & event) override; diff --git a/examples/ota-provider-app/esp32/main/main.cpp b/examples/ota-provider-app/esp32/main/main.cpp index 3f5c8deae79636..bd64837a3eb710 100644 --- a/examples/ota-provider-app/esp32/main/main.cpp +++ b/examples/ota-provider-app/esp32/main/main.cpp @@ -41,15 +41,11 @@ #include -#include #include +#include #include -using chip::BitFlags; -using chip::app::Clusters::OTAProviderDelegate; -using chip::bdx::TransferControlFlags; using chip::Callback::Callback; -using chip::Messaging::ExchangeManager; using namespace ::chip; using namespace ::chip::System; using namespace ::chip::Credentials; @@ -64,17 +60,13 @@ namespace { const char * TAG = "ota-provider-app"; const uint8_t kMaxImagePathlen = 35; static DeviceCallbacks EchoCallbacks; -BdxOtaSender bdxServer; // TODO: this should probably be done dynamically -constexpr chip::EndpointId kOtaProviderEndpoint = 0; -constexpr uint32_t kMaxBdxBlockSize = 1024; -constexpr chip::System::Clock::Timeout kBdxTimeout = chip::System::Clock::Seconds16(5 * 60); // Specification mandates >= 5 minutes -constexpr chip::System::Clock::Timeout kBdxPollFreq = chip::System::Clock::Milliseconds32(500); -const char * otaFilename = CONFIG_OTA_IMAGE_NAME; -FILE * otaImageFile = NULL; -uint32_t otaImageLen = 0; -uint32_t otaTransferInProgress = false; +constexpr chip::EndpointId kOtaProviderEndpoint = 0; +const char * otaFilename = CONFIG_OTA_IMAGE_NAME; +FILE * otaImageFile = NULL; +uint32_t otaImageLen = 0; +uint32_t otaTransferInProgress = false; static OTAProviderExample otaProvider; chip::Callback::Callback onBlockQueryCallback(OnBlockQuery, nullptr); @@ -93,8 +85,12 @@ CHIP_ERROR OnBlockQuery(void * context, chip::System::PacketBufferHandle & block } otaTransferInProgress = true; } + + BdxOtaSender * bdxOtaSender = otaProvider.GetBdxOtaSender(); + VerifyOrReturnError(bdxOtaSender != nullptr, CHIP_ERROR_INCORRECT_STATE); + uint16_t blockBufAvailableLength = blockBuf->AvailableDataLength(); - uint16_t transferBlockSize = bdxServer.GetTransferBlockSize(); + uint16_t transferBlockSize = bdxOtaSender->GetTransferBlockSize(); size = (blockBufAvailableLength < transferBlockSize) ? blockBufAvailableLength : transferBlockSize; if (offset + size >= otaImageLen) @@ -167,9 +163,12 @@ extern "C" void app_main() // Initialize device attestation config SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); + BdxOtaSender * bdxOtaSender = otaProvider.GetBdxOtaSender(); + VerifyOrReturn(bdxOtaSender != nullptr, ESP_LOGE(TAG, "bdxOtaSender is nullptr")); + // Register handler to handle bdx messages error = chip::Server::GetInstance().GetExchangeManager().RegisterUnsolicitedMessageHandlerForProtocol(chip::Protocols::BDX::Id, - &bdxServer); + bdxOtaSender); if (error != CHIP_NO_ERROR) { ESP_LOGE(TAG, "RegisterUnsolicitedMessageHandler failed: %s", chip::ErrorStr(error)); @@ -180,7 +179,7 @@ extern "C" void app_main() callbacks.onBlockQuery = &onBlockQueryCallback; callbacks.onTransferComplete = &onTransferCompleteCallback; callbacks.onTransferFailed = &onTransferFailedCallback; - bdxServer.SetCallbacks(callbacks); + bdxOtaSender->SetCallbacks(callbacks); esp_vfs_spiffs_conf_t spiffs_conf = { .base_path = "/spiffs", @@ -217,14 +216,4 @@ extern "C" void app_main() } chip::app::Clusters::OTAProvider::SetDelegate(kOtaProviderEndpoint, &otaProvider); - - BitFlags bdxFlags; - bdxFlags.Set(TransferControlFlags::kReceiverDrive); - error = bdxServer.PrepareForTransfer(&chip::DeviceLayer::SystemLayer(), chip::bdx::TransferRole::kSender, bdxFlags, - kMaxBdxBlockSize, kBdxTimeout, kBdxPollFreq); - if (error != CHIP_NO_ERROR) - { - ChipLogError(BDX, "Failed to init BDX server: %s", chip::ErrorStr(error)); - return; - } } From 2488114002c5777d218032c3ab3302da4fee39f9 Mon Sep 17 00:00:00 2001 From: Kamil Kasperczyk <66371704+kkasperczyk-no@users.noreply.github.com> Date: Mon, 10 Jan 2022 12:22:15 +0100 Subject: [PATCH 12/64] [ble] Fixed controller not being able to commission device after first attempt failure (#13287) Sometimes it happens that if in specific moment of device commissioning over Bluetooth LE the connection will be closed (e.g. by turning off HCI adapter to simulate hardware problems) the controller is not able to commission the device on the second attempt due to incorrect state. * Added setting BLE state to kInitialized if BLE connection establishment failed. * Added cleaning rendezvous data if some PASE establisment error appeared. --- src/controller/CHIPDeviceController.cpp | 18 +----------------- src/transport/raw/BLE.cpp | 2 +- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index babcc42f6ae51e..1cda177019ed19 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -752,7 +752,6 @@ CHIP_ERROR DeviceCommissioner::PairDevice(NodeId remoteDeviceId, RendezvousParam CHIP_ERROR DeviceCommissioner::EstablishPASEConnection(NodeId remoteDeviceId, RendezvousParameters & params) { - CHIP_ERROR err = CHIP_NO_ERROR; CommissioneeDeviceProxy * device = nullptr; Transport::PeerAddress peerAddress = Transport::PeerAddress::UDP(Inet::IPAddress::Any); @@ -845,16 +844,7 @@ CHIP_ERROR DeviceCommissioner::EstablishPASEConnection(NodeId remoteDeviceId, Re exit: if (err != CHIP_NO_ERROR) { - // Delete the current rendezvous session only if a device is not currently being paired. - if (mDeviceBeingCommissioned == nullptr) - { - FreeRendezvousSession(); - } - - if (device != nullptr) - { - ReleaseCommissioneeDevice(device); - } + RendezvousCleanup(err); } return err; @@ -974,12 +964,6 @@ void DeviceCommissioner::OnSessionEstablishmentError(CHIP_ERROR err) } RendezvousCleanup(err); - - if (mDeviceBeingCommissioned != nullptr) - { - ReleaseCommissioneeDevice(mDeviceBeingCommissioned); - mDeviceBeingCommissioned = nullptr; - } } void DeviceCommissioner::OnSessionEstablished() diff --git a/src/transport/raw/BLE.cpp b/src/transport/raw/BLE.cpp index d54d1fa3b6d387..f41a01b07e236a 100644 --- a/src/transport/raw/BLE.cpp +++ b/src/transport/raw/BLE.cpp @@ -163,7 +163,7 @@ void BLEBase::OnEndPointConnectComplete(BLEEndPoint * endPoint, CHIP_ERROR err) if (err != CHIP_NO_ERROR) { ChipLogError(Inet, "Failed to establish BLE connection: %s", ErrorStr(err)); - ClearPendingPackets(); + OnEndPointConnectionClosed(endPoint, err); return; } From 21fbe32f26f9bfe6a8d816d6b17b60e45271051f Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Mon, 10 Jan 2022 19:05:37 +0530 Subject: [PATCH 13/64] [ESP32] Add ESP32 OTA provider and requestor app to CI builds (#13212) * Add ESP32 OTA provider and requestor app to CI builds * Rename ESP32 OTA requestor project * Increase the timeout to 95 minutes * Split examples-esp32 workflow in two jobs --- .github/workflows/examples-esp32.yaml | 59 ++++++++++++++++--- .../ota-requestor-app/esp32/CMakeLists.txt | 2 +- 2 files changed, 52 insertions(+), 9 deletions(-) diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index decbb6af143bb3..00d86f2cdb7aca 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -26,7 +26,7 @@ jobs: # TODO ESP32 https://github.com/project-chip/connectedhomeip/issues/1510 esp32: name: ESP32 - timeout-minutes: 105 + timeout-minutes: 70 runs-on: ubuntu-latest if: github.actor != 'restyled-io[bot]' @@ -49,7 +49,7 @@ jobs: run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - name: Bootstrap - timeout-minutes: 25 + timeout-minutes: 10 run: scripts/build/gn_bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v2 @@ -99,22 +99,65 @@ jobs: - name: Build example Bridge App timeout-minutes: 10 run: scripts/examples/esp_example.sh bridge-app + + - name: Uploading Size Reports + uses: actions/upload-artifact@v2 + if: ${{ !env.ACT }} + with: + name: Size,ESP32-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} + path: /tmp/bloat_reports/ + + esp32_1: + name: ESP32_1 + timeout-minutes: 60 + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: connectedhomeip/chip-build-esp32:0.5.40 + volumes: + - "/tmp/bloat_reports:/tmp/bloat_reports" + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: true + + - name: Bootstrap + timeout-minutes: 10 + run: scripts/build/gn_bootstrap.sh + + - name: Uploading bootstrap logs + uses: actions/upload-artifact@v2 + if: ${{ always() }} && ${{ !env.ACT }} + with: + name: bootstrap-logs + path: | + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log + - name: Build example Persistent Storage App timeout-minutes: 10 run: scripts/examples/esp_example.sh persistent-storage sdkconfig.defaults + - name: Build example Shell App timeout-minutes: 10 run: scripts/examples/esp_example.sh shell sdkconfig.defaults + - name: Build example Temperature Measurement App timeout-minutes: 10 run: scripts/examples/esp_example.sh temperature-measurement-app sdkconfig.optimize.defaults + - name: Build example IPv6 Only App timeout-minutes: 10 run: scripts/examples/esp_example.sh ipv6only-app sdkconfig.defaults - - name: Uploading Size Reports - uses: actions/upload-artifact@v2 - if: ${{ !env.ACT }} - with: - name: Size,ESP32-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: /tmp/bloat_reports/ + - name: Build example OTA Requestor App + run: scripts/examples/esp_example.sh ota-requestor-app sdkconfig.defaults + timeout-minutes: 10 + + - name: Build example OTA Provider App + run: scripts/examples/esp_example.sh ota-provider-app sdkconfig.defaults + timeout-minutes: 10 diff --git a/examples/ota-requestor-app/esp32/CMakeLists.txt b/examples/ota-requestor-app/esp32/CMakeLists.txt index 2e98c02cef57b8..03408d904ae03a 100644 --- a/examples/ota-requestor-app/esp32/CMakeLists.txt +++ b/examples/ota-requestor-app/esp32/CMakeLists.txt @@ -26,7 +26,7 @@ set(EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/../../common/QRCode" ) -project(chip-ota-requester-app) +project(chip-ota-requestor-app) idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++14;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os;-DLWIP_IPV6_SCOPES=0" APPEND) From a4978902cf82bb36a63027e958e2443c250ced8e Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 10 Jan 2022 08:42:30 -0500 Subject: [PATCH 14/64] Use GetAccessingFabricIndex in a few more places. (#13395) People keep copy/pasting the GetExchangeContext()->GetSessionHandle()->AsSecureSession()->GetFabricIndex() when they really don't need it.... --- .../OTAProviderExample.cpp | 2 +- .../clusters/ota-requestor/OTARequestor.cpp | 2 +- src/app/clusters/scenes/scenes.cpp | 21 +++++++------------ 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/examples/ota-provider-app/ota-provider-common/OTAProviderExample.cpp b/examples/ota-provider-app/ota-provider-common/OTAProviderExample.cpp index 43a9d06efc75ed..b6a026c47078a7 100644 --- a/examples/ota-provider-app/ota-provider-common/OTAProviderExample.cpp +++ b/examples/ota-provider-app/ota-provider-common/OTAProviderExample.cpp @@ -114,7 +114,7 @@ EmberAfStatus OTAProviderExample::HandleQueryImage(chip::app::CommandHandler * c { // TODO: This uses the current node as the provider to supply the OTA image. This can be configurable such that the provider // supplying the response is not the provider supplying the OTA image. - FabricIndex fabricIndex = commandObj->GetExchangeContext()->GetSessionHandle()->AsSecureSession()->GetFabricIndex(); + FabricIndex fabricIndex = commandObj->GetAccessingFabricIndex(); FabricInfo * fabricInfo = Server::GetInstance().GetFabricTable().FindFabricWithIndex(fabricIndex); NodeId nodeId = fabricInfo->GetPeerId().GetNodeId(); diff --git a/src/app/clusters/ota-requestor/OTARequestor.cpp b/src/app/clusters/ota-requestor/OTARequestor.cpp index d114e4f60665e5..d8e4033d9057ae 100644 --- a/src/app/clusters/ota-requestor/OTARequestor.cpp +++ b/src/app/clusters/ota-requestor/OTARequestor.cpp @@ -200,7 +200,7 @@ EmberAfStatus OTARequestor::HandleAnnounceOTAProvider(app::CommandHandler * comm } mProviderNodeId = providerNodeId; - mProviderFabricIndex = commandObj->GetExchangeContext()->GetSessionHandle()->AsSecureSession()->GetFabricIndex(); + mProviderFabricIndex = commandObj->GetAccessingFabricIndex(); mProviderEndpointId = providerEndpoint; ChipLogProgress(SoftwareUpdate, "OTA Requestor received AnnounceOTAProvider"); diff --git a/src/app/clusters/scenes/scenes.cpp b/src/app/clusters/scenes/scenes.cpp index c2de7e8e1e6862..75dd1f91cf67f5 100644 --- a/src/app/clusters/scenes/scenes.cpp +++ b/src/app/clusters/scenes/scenes.cpp @@ -65,13 +65,6 @@ uint8_t emberAfPluginScenesServerEntriesInUse = 0; EmberAfSceneTableEntry emberAfPluginScenesServerSceneTable[EMBER_AF_PLUGIN_SCENES_TABLE_SIZE]; #endif -static FabricIndex GetFabricIndex(app::CommandHandler * commandObj) -{ - VerifyOrReturnError(nullptr != commandObj, 0); - VerifyOrReturnError(nullptr != commandObj->GetExchangeContext(), 0); - return commandObj->GetExchangeContext()->GetSessionHandle()->AsSecureSession()->GetFabricIndex(); -} - static bool readServerAttribute(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, const char * name, uint8_t * data, uint8_t size) { @@ -252,7 +245,7 @@ bool emberAfScenesClusterViewSceneCallback(app::CommandHandler * commandObj, con bool emberAfScenesClusterRemoveSceneCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::RemoveScene::DecodableType & commandData) { - auto fabricIndex = GetFabricIndex(commandObj); + auto fabricIndex = commandObj->GetAccessingFabricIndex(); auto & groupId = commandData.groupId; auto & sceneId = commandData.sceneId; @@ -311,7 +304,7 @@ bool emberAfScenesClusterRemoveSceneCallback(app::CommandHandler * commandObj, c bool emberAfScenesClusterRemoveAllScenesCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::RemoveAllScenes::DecodableType & commandData) { - auto fabricIndex = GetFabricIndex(commandObj); + auto fabricIndex = commandObj->GetAccessingFabricIndex(); auto & groupId = commandData.groupId; EmberAfStatus status = EMBER_ZCL_STATUS_INVALID_FIELD; @@ -363,7 +356,7 @@ bool emberAfScenesClusterRemoveAllScenesCallback(app::CommandHandler * commandOb bool emberAfScenesClusterStoreSceneCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::StoreScene::DecodableType & commandData) { - auto fabricIndex = GetFabricIndex(commandObj); + auto fabricIndex = commandObj->GetAccessingFabricIndex(); auto & groupId = commandData.groupId; auto & sceneId = commandData.sceneId; @@ -399,7 +392,7 @@ bool emberAfScenesClusterStoreSceneCallback(app::CommandHandler * commandObj, co bool emberAfScenesClusterRecallSceneCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::RecallScene::DecodableType & commandData) { - auto fabricIndex = GetFabricIndex(commandObj); + auto fabricIndex = commandObj->GetAccessingFabricIndex(); auto & groupId = commandData.groupId; auto & sceneId = commandData.sceneId; @@ -437,7 +430,7 @@ bool emberAfScenesClusterRecallSceneCallback(app::CommandHandler * commandObj, c bool emberAfScenesClusterGetSceneMembershipCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::GetSceneMembership::DecodableType & commandData) { - auto fabricIndex = GetFabricIndex(commandObj); + auto fabricIndex = commandObj->GetAccessingFabricIndex(); auto & groupId = commandData.groupId; CHIP_ERROR err = CHIP_NO_ERROR; @@ -768,7 +761,7 @@ bool emberAfPluginScenesServerParseAddScene( EmberAfSceneTableEntry entry; EmberAfStatus status; bool enhanced = (cmd->commandId == ZCL_ENHANCED_ADD_SCENE_COMMAND_ID); - auto fabricIndex = GetFabricIndex(commandObj); + auto fabricIndex = commandObj->GetAccessingFabricIndex(); EndpointId endpoint = cmd->apsFrame->destinationEndpoint; uint8_t i, index = EMBER_AF_SCENE_TABLE_NULL_INDEX; @@ -1105,7 +1098,7 @@ bool emberAfPluginScenesServerParseViewScene(app::CommandHandler * commandObj, c EmberAfSceneTableEntry entry = {}; EmberAfStatus status = EMBER_ZCL_STATUS_NOT_FOUND; bool enhanced = (cmd->commandId == ZCL_ENHANCED_VIEW_SCENE_COMMAND_ID); - FabricIndex fabricIndex = GetFabricIndex(commandObj); + FabricIndex fabricIndex = commandObj->GetAccessingFabricIndex(); EndpointId endpoint = cmd->apsFrame->destinationEndpoint; emberAfScenesClusterPrintln("RX: %pViewScene 0x%2x, 0x%x", (enhanced ? "Enhanced" : ""), groupId, sceneId); From c396dfa9128e87db3153ba724e2886562315d7ae Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Mon, 10 Jan 2022 05:44:10 -0800 Subject: [PATCH 15/64] [NXP]: Fix CHIP Counter keys configuration with correct namespace. (#13401) --- src/platform/nxp/k32w/k32w0/K32W0Config.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/platform/nxp/k32w/k32w0/K32W0Config.h b/src/platform/nxp/k32w/k32w0/K32W0Config.h index 7f1aeb4534902a..aad0489c1f512d 100644 --- a/src/platform/nxp/k32w/k32w0/K32W0Config.h +++ b/src/platform/nxp/k32w/k32w0/K32W0Config.h @@ -66,7 +66,7 @@ class K32WConfig using Key = uint32_t; // Key definitions for well-known configuration values. - // Factory config keys + // Factory Config Keys static constexpr Key kConfigKey_SerialNum = K32WConfigKey(kPDMId_ChipFactory, 0x00); static constexpr Key kConfigKey_MfrDeviceId = K32WConfigKey(kPDMId_ChipFactory, 0x01); static constexpr Key kConfigKey_MfrDeviceCert = K32WConfigKey(kPDMId_ChipFactory, 0x02); @@ -76,6 +76,7 @@ class K32WConfig static constexpr Key kConfigKey_MfrDeviceICACerts = K32WConfigKey(kPDMId_ChipFactory, 0x06); static constexpr Key kConfigKey_HardwareVersion = K32WConfigKey(kPDMId_ChipFactory, 0x07); static constexpr Key kConfigKey_SetupDiscriminator = K32WConfigKey(kPDMId_ChipFactory, 0x08); + // CHIP Config Keys static constexpr Key kConfigKey_FabricId = K32WConfigKey(kPDMId_ChipConfig, 0x00); static constexpr Key kConfigKey_ServiceConfig = K32WConfigKey(kPDMId_ChipConfig, 0x01); @@ -89,10 +90,10 @@ class K32WConfig static constexpr Key kConfigKey_Breadcrumb = K32WConfigKey(kPDMId_ChipConfig, 0x09); // CHIP Counter Keys - static constexpr Key kCounterKey_RebootCount = K32WConfigKey(kPDMId_ChipConfig, 0x0A); - static constexpr Key kCounterKey_UpTime = K32WConfigKey(kPDMId_ChipConfig, 0x0B); - static constexpr Key kCounterKey_TotalOperationalHours = K32WConfigKey(kPDMId_ChipConfig, 0x0C); - static constexpr Key kCounterKey_BootReason = K32WConfigKey(kPDMId_ChipConfig, 0x0D); + static constexpr Key kCounterKey_RebootCount = K32WConfigKey(kPDMId_ChipCounter, 0x00); + static constexpr Key kCounterKey_UpTime = K32WConfigKey(kPDMId_ChipCounter, 0x01); + static constexpr Key kCounterKey_TotalOperationalHours = K32WConfigKey(kPDMId_ChipCounter, 0x02); + static constexpr Key kCounterKey_BootReason = K32WConfigKey(kPDMId_ChipCounter, 0x03); // Set key id limits for each group. static constexpr Key kMinConfigKey_ChipFactory = K32WConfigKey(kPDMId_ChipFactory, 0x00); From 6500f0f11dedb9b0dc4c55ec20cac06d80e47277 Mon Sep 17 00:00:00 2001 From: pankore <86098180+pankore@users.noreply.github.com> Date: Mon, 10 Jan 2022 22:07:49 +0800 Subject: [PATCH 16/64] [Ameba] Revise dockerfile for toolchain update (#13406) --- integrations/docker/images/chip-build-ameba/Dockerfile | 6 +++--- integrations/docker/images/chip-build/version | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/integrations/docker/images/chip-build-ameba/Dockerfile b/integrations/docker/images/chip-build-ameba/Dockerfile index 245d21102915d2..93501e305e3363 100644 --- a/integrations/docker/images/chip-build-ameba/Dockerfile +++ b/integrations/docker/images/chip-build-ameba/Dockerfile @@ -9,11 +9,11 @@ RUN set -x \ && cd ${AMEBA_DIR} \ && git clone --progress -b cmake_build https://github.com/pankore/ambd_sdk_with_chip_non_NDA.git \ && cd ambd_sdk_with_chip_non_NDA \ - && git reset --hard a7eac08 \ + && git reset --hard f8c7b9e \ && git submodule update --depth 1 --init --progress \ && cd project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/toolchain \ - && cat asdk/asdk-9.3.0-linux-newlib-build-3483-x86_64.tar.bz2.part* > asdk/asdk-9.3.0-linux-newlib-build-3483-x86_64.tar.bz2 \ - && mkdir -p linux && tar -jxvf asdk/asdk-9.3.0-linux-newlib-build-3483-x86_64.tar.bz2 -C linux/ \ + && cat asdk/asdk-10.3.0-linux-newlib-build-3638-x86_64.tar.bz2.part* > asdk/asdk-10.3.0-linux-newlib-build-3638-x86_64.tar.bz2 \ + && mkdir -p linux && tar -jxvf asdk/asdk-10.3.0-linux-newlib-build-3638-x86_64.tar.bz2 -C linux/ \ && : # last line ENV AMEBA_PATH=${AMEBA_DIR}/ambd_sdk_with_chip_non_NDA diff --git a/integrations/docker/images/chip-build/version b/integrations/docker/images/chip-build/version index 0710299211e3be..c95fda3804f0c9 100644 --- a/integrations/docker/images/chip-build/version +++ b/integrations/docker/images/chip-build/version @@ -1 +1 @@ -0.5.42 Version bump reason: [Ameba] SDK update & Add otar otap options +0.5.43 Version bump reason: [Ameba] Update toolchain to asdk-10.3.0 From f2c2650c826f6a4814456b85716c26d7fbba9f97 Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Mon, 10 Jan 2022 19:55:35 +0530 Subject: [PATCH 17/64] [ESP32] Init OTA requestor in all-clusters-app (#13246) Also, enabled OTA_PROVIDER_CLIENT. Removed the weak function definitions from OTA command handlers. --- .../all-clusters-common/all-clusters-app.zap | 10 +- .../esp32/main/CMakeLists.txt | 1 + examples/all-clusters-app/esp32/main/main.cpp | 31 +++- .../tests/suites/TestDescriptorCluster.yaml | 4 +- .../Framework/CHIPTests/CHIPClustersTests.m | 3 +- src/lib/shell/commands/Ota.cpp | 10 -- .../zap-generated/CHIPClientCallbacks.cpp | 129 +++++++++++++ .../zap-generated/CHIPClientCallbacks.h | 21 +++ .../zap-generated/CHIPClusters.cpp | 170 ++++++++++++++++++ .../zap-generated/CHIPClusters.h | 33 ++++ .../zap-generated/IMClusterCommandHandler.cpp | 114 ++++++++++-- .../PluginApplicationCallbacks.h | 1 + .../zap-generated/endpoint_config.h | 148 +++++++-------- .../zap-generated/gen_config.h | 5 + .../chip-tool/zap-generated/test/Commands.h | 4 +- 15 files changed, 582 insertions(+), 102 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 4c425d54ebba90..151d3c92463b45 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 @@ -1357,14 +1357,14 @@ "mfgCode": null, "define": "OTA_PROVIDER_CLUSTER", "side": "client", - "enabled": 0, + "enabled": 1, "commands": [ { "name": "QueryImage", "code": 0, "mfgCode": null, "source": "client", - "incoming": 1, + "incoming": 0, "outgoing": 1 }, { @@ -1372,7 +1372,7 @@ "code": 2, "mfgCode": null, "source": "client", - "incoming": 1, + "incoming": 0, "outgoing": 1 }, { @@ -1380,8 +1380,8 @@ "code": 4, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "incoming": 0, + "outgoing": 1 } ], "attributes": [ diff --git a/examples/all-clusters-app/esp32/main/CMakeLists.txt b/examples/all-clusters-app/esp32/main/CMakeLists.txt index f35386484bc48d..904178d23f1fb4 100644 --- a/examples/all-clusters-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/main/CMakeLists.txt @@ -58,6 +58,7 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/low-power-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/keypad-input-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/media-playback-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ota-requestor" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ota-provider" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/target-navigator-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thermostat-server" diff --git a/examples/all-clusters-app/esp32/main/main.cpp b/examples/all-clusters-app/esp32/main/main.cpp index c1ac76f8c57818..a408493372edb3 100644 --- a/examples/all-clusters-app/esp32/main/main.cpp +++ b/examples/all-clusters-app/esp32/main/main.cpp @@ -50,6 +50,10 @@ #include #include #include +#include +#include +#include +#include #include #include #include @@ -62,12 +66,11 @@ #include #include #include +#include +#include #include #include -#include -#include - #if CONFIG_ENABLE_PW_RPC #include "Rpc.h" #endif @@ -122,6 +125,13 @@ std::vector button_gpios = { BUTTON_1_GPIO_NUM, BUTTON_2_GPIO_NUM, B #endif +#if CONFIG_ENABLE_OTA_REQUESTOR +OTARequestor gRequestorCore; +GenericOTARequestorDriver gRequestorUser; +BDXDownloader gDownloader; +OTAImageProcessorImpl gImageProcessor; +#endif + // Pretend these are devices with endpoints with clusters with attributes typedef std::tuple Attribute; typedef std::vector Attributes; @@ -517,6 +527,19 @@ static void InitServer(intptr_t context) SetupPretendDevices(); } +static void InitOTARequestor(void) +{ +#if CONFIG_ENABLE_OTA_REQUESTOR + SetRequestorInstance(&gRequestorCore); + gRequestorCore.SetServerInstance(&Server::GetInstance()); + gRequestorCore.SetOtaRequestorDriver(&gRequestorUser); + gImageProcessor.SetOTADownloader(&gDownloader); + gDownloader.SetImageProcessorDelegate(&gImageProcessor); + gRequestorUser.Init(&gRequestorCore, &gImageProcessor); + gRequestorCore.SetBDXDownloader(&gDownloader); +#endif +} + extern "C" void app_main() { ESP_LOGI(TAG, "All Clusters Demo!"); @@ -575,6 +598,8 @@ extern "C" void app_main() // Print QR Code URL PrintOnboardingCodes(chip::RendezvousInformationFlags(CONFIG_RENDEZVOUS_MODE)); + InitOTARequestor(); + #if CONFIG_HAVE_DISPLAY std::string qrCodeText; diff --git a/src/app/tests/suites/TestDescriptorCluster.yaml b/src/app/tests/suites/TestDescriptorCluster.yaml index bdf73fc21717cc..7f5745480d45f5 100644 --- a/src/app/tests/suites/TestDescriptorCluster.yaml +++ b/src/app/tests/suites/TestDescriptorCluster.yaml @@ -63,7 +63,9 @@ tests: command: "readAttribute" attribute: "Client List" response: - value: [] + value: [ + 0x0029, # OTA Software Update Provider + ] - label: "Read attribute Parts list" command: "readAttribute" diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index bf489b2ad33a5f..8fbd9503867479 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -36447,7 +36447,8 @@ - (void)testSendClusterTestDescriptorCluster_000003_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue count], 0); + XCTAssertEqual([actualValue count], 1); + XCTAssertEqual([actualValue[0] unsignedIntValue], 41UL); } [expectation fulfill]; diff --git a/src/lib/shell/commands/Ota.cpp b/src/lib/shell/commands/Ota.cpp index 93dee547918bc9..3f2067f44e860c 100644 --- a/src/lib/shell/commands/Ota.cpp +++ b/src/lib/shell/commands/Ota.cpp @@ -26,16 +26,6 @@ using namespace chip::DeviceLayer; namespace chip { - -// TODO: Remove weak functions when ESP32 all-clusters-app includes code from src/app/clusters/ota-requestor -// The code requires OTA Provider client cluster which interferes with OTA Provider server cluster, -// already enabled in the all-clusters-app. -__attribute__((weak)) void SetRequestorInstance(OTARequestorInterface * instance) {} -__attribute__((weak)) OTARequestorInterface * GetRequestorInstance() -{ - return nullptr; -} - namespace Shell { namespace { diff --git a/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.cpp index 759d13c5028d26..ee7d4c3d655502 100644 --- a/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.cpp @@ -16,3 +16,132 @@ */ // THIS FILE IS GENERATED BY ZAP + +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace ::chip; +using namespace ::chip::app::DataModel; + +namespace { +[[maybe_unused]] constexpr uint16_t kByteSpanSizeLengthInBytes = 2; +} // namespace + +#define CHECK_STATUS_WITH_RETVAL(error, retval) \ + if (CHIP_NO_ERROR != error) \ + { \ + ChipLogError(Zcl, "CHECK_STATUS %s", ErrorStr(error)); \ + if (onFailureCallback != nullptr) \ + { \ + Callback::Callback * cb = \ + Callback::Callback::FromCancelable(onFailureCallback); \ + cb->mCall(cb->mContext, static_cast(EMBER_ZCL_STATUS_INVALID_VALUE)); \ + } \ + return retval; \ + } + +#define CHECK_STATUS(error) CHECK_STATUS_WITH_RETVAL(error, true) +#define CHECK_STATUS_VOID(error) CHECK_STATUS_WITH_RETVAL(error, ) + +#define CHECK_MESSAGE_LENGTH_WITH_RETVAL(value, retval) \ + if (!CanCastTo(value)) \ + { \ + ChipLogError(Zcl, "CHECK_MESSAGE_LENGTH expects a uint16_t value, got: %d", value); \ + if (onFailureCallback != nullptr) \ + { \ + Callback::Callback * cb = \ + Callback::Callback::FromCancelable(onFailureCallback); \ + cb->mCall(cb->mContext, static_cast(EMBER_ZCL_STATUS_INVALID_VALUE)); \ + } \ + return retval; \ + } \ + \ + if (messageLen < value) \ + { \ + ChipLogError(Zcl, "Unexpected response length: %d", messageLen); \ + if (onFailureCallback != nullptr) \ + { \ + Callback::Callback * cb = \ + Callback::Callback::FromCancelable(onFailureCallback); \ + cb->mCall(cb->mContext, static_cast(EMBER_ZCL_STATUS_INVALID_VALUE)); \ + } \ + return retval; \ + } \ + \ + messageLen = static_cast(messageLen - static_cast(value)); + +#define CHECK_MESSAGE_LENGTH(value) CHECK_MESSAGE_LENGTH_WITH_RETVAL(value, true) +#define CHECK_MESSAGE_LENGTH_VOID(value) CHECK_MESSAGE_LENGTH_WITH_RETVAL(value, ) + +#define GET_RESPONSE_CALLBACKS(name) \ + Callback::Cancelable * onSuccessCallback = nullptr; \ + Callback::Cancelable * onFailureCallback = nullptr; \ + NodeId sourceId = emberAfCurrentCommand()->SourceNodeId(); \ + uint8_t sequenceNumber = emberAfCurrentCommand()->seqNum; \ + CHIP_ERROR err = gCallbacks.GetResponseCallback(sourceId, sequenceNumber, &onSuccessCallback, &onFailureCallback); \ + \ + if (CHIP_NO_ERROR != err) \ + { \ + if (onSuccessCallback == nullptr) \ + { \ + ChipLogDetail(Zcl, "%s: Missing success callback", name); \ + } \ + \ + if (onFailureCallback == nullptr) \ + { \ + ChipLogDetail(Zcl, "%s: Missing failure callback", name); \ + } \ + \ + return true; \ + } + +#define GET_CLUSTER_RESPONSE_CALLBACKS(name) \ + Callback::Cancelable * onSuccessCallback = nullptr; \ + Callback::Cancelable * onFailureCallback = nullptr; \ + NodeId sourceIdentifier = reinterpret_cast(commandObj); \ + /* #6559: Currently, we only have one commands for the IMInvokeCommands and to a device, so the seqNum is always set to 0. */ \ + CHIP_ERROR err = gCallbacks.GetResponseCallback(sourceIdentifier, 0, &onSuccessCallback, &onFailureCallback); \ + \ + if (CHIP_NO_ERROR != err) \ + { \ + if (onSuccessCallback == nullptr) \ + { \ + ChipLogDetail(Zcl, "%s: Missing success callback", name); \ + } \ + \ + if (onFailureCallback == nullptr) \ + { \ + ChipLogDetail(Zcl, "%s: Missing failure callback", name); \ + } \ + \ + return true; \ + } + +// Singleton instance of the callbacks manager +app::CHIPDeviceCallbacksMgr & gCallbacks = app::CHIPDeviceCallbacksMgr::GetInstance(); + +bool emberAfOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback(EndpointId endpoint, app::CommandSender * commandObj, + uint8_t action, uint32_t delayedActionTime) +{ + ChipLogProgress(Zcl, "ApplyUpdateResponse:"); + ChipLogProgress(Zcl, " action: %" PRIu8 "", action); + ChipLogProgress(Zcl, " delayedActionTime: %" PRIu32 "", delayedActionTime); + + GET_CLUSTER_RESPONSE_CALLBACKS("OtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback"); + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, action, delayedActionTime); + return true; +} diff --git a/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.h index 302d36ce5d8076..506fde03a1e3d4 100644 --- a/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.h @@ -17,4 +17,25 @@ // THIS FILE IS GENERATED BY ZAP +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Note: The IMDefaultResponseCallback is a bridge to the old CallbackMgr before IM is landed, so it still accepts EmberAfStatus +// instead of IM status code. +// #6308 should handle IM error code on the application side, either modify this function or remove this. + +// Cluster Specific Response Callbacks +typedef void (*OtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback)(void * context, uint8_t action, + uint32_t delayedActionTime); + // List specific responses diff --git a/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.cpp b/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.cpp index 759d13c5028d26..610435b71adc00 100644 --- a/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.cpp @@ -16,3 +16,173 @@ */ // THIS FILE IS GENERATED BY ZAP + +#include "CHIPClusters.h" + +#include +#include + +namespace chip { + +using namespace app::Clusters; +using namespace System; +using namespace Encoding::LittleEndian; + +namespace Controller { + +// TODO(#4502): onCompletion is not used by IM for now. +// TODO(#4503): length should be passed to commands when byte string is in argument list. +// TODO(#4503): Commands should take group id as an argument. + +// OtaSoftwareUpdateProvider Cluster Commands +CHIP_ERROR OtaSoftwareUpdateProviderCluster::ApplyUpdateRequest(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan updateToken, uint32_t newVersion) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // updateToken: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), updateToken)); + // newVersion: int32u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), newVersion)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + +CHIP_ERROR OtaSoftwareUpdateProviderCluster::NotifyUpdateApplied(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan updateToken, uint32_t softwareVersion) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // updateToken: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), updateToken)); + // softwareVersion: int32u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), softwareVersion)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + +CHIP_ERROR OtaSoftwareUpdateProviderCluster::QueryImage(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::VendorId vendorId, + uint16_t productId, uint32_t softwareVersion, uint8_t protocolsSupported, + uint16_t hardwareVersion, chip::CharSpan location, bool requestorCanConsent, + chip::ByteSpan metadataForProvider) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + OtaSoftwareUpdateProvider::Commands::QueryImage::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // vendorId: vendorId + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), vendorId)); + // productId: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), productId)); + // softwareVersion: int32u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), softwareVersion)); + // protocolsSupported: OTADownloadProtocol + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), protocolsSupported)); + // hardwareVersion: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), hardwareVersion)); + // location: charString + SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), location)); + // requestorCanConsent: boolean + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), requestorCanConsent)); + // metadataForProvider: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), metadataForProvider)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + +} // namespace Controller +} // namespace chip diff --git a/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.h b/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.h index 759d13c5028d26..908506defd13e0 100644 --- a/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.h @@ -16,3 +16,36 @@ */ // THIS FILE IS GENERATED BY ZAP + +// Prevent multiple inclusion +#pragma once + +#include +#include + +#include +#include +#include + +namespace chip { +namespace Controller { + +class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase +{ +public: + OtaSoftwareUpdateProviderCluster() : ClusterBase(app::Clusters::OtaSoftwareUpdateProvider::Id) {} + ~OtaSoftwareUpdateProviderCluster() {} + + // Cluster Commands + CHIP_ERROR ApplyUpdateRequest(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan updateToken, uint32_t newVersion); + CHIP_ERROR NotifyUpdateApplied(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan updateToken, uint32_t softwareVersion); + CHIP_ERROR QueryImage(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::VendorId vendorId, uint16_t productId, uint32_t softwareVersion, uint8_t protocolsSupported, + uint16_t hardwareVersion, chip::CharSpan location, bool requestorCanConsent, + chip::ByteSpan metadataForProvider); +}; + +} // namespace Controller +} // namespace chip diff --git a/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp index d38955ee000f25..d38a6c8f3883f0 100644 --- a/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp @@ -1194,6 +1194,107 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP namespace OtaSoftwareUpdateProvider { +void DispatchClientCommand(CommandSender * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV + // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. + // Any error value TLVUnpackError means we have received an illegal value. + // The following variables are used for all commands to save code size. + CHIP_ERROR TLVError = CHIP_NO_ERROR; + CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; + uint32_t validArgumentCount = 0; + uint32_t expectArgumentCount = 0; + uint32_t currentDecodeTagId = 0; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::ApplyUpdateResponse::Id: { + expectArgumentCount = 2; + uint8_t action; + uint32_t delayedActionTime; + bool argExists[2]; + + memset(argExists, 0, sizeof argExists); + + while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) + { + // Since call to aDataTlv.Next() is CHIP_NO_ERROR, the read head always points to an element. + // Skip this element if it is not a ContextTag, not consider it as an error if other values are valid. + if (!TLV::IsContextTag(aDataTlv.GetTag())) + { + continue; + } + currentDecodeTagId = TLV::TagNumFromTag(aDataTlv.GetTag()); + if (currentDecodeTagId < 2) + { + if (argExists[currentDecodeTagId]) + { + ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); + TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; + break; + } + else + { + argExists[currentDecodeTagId] = true; + validArgumentCount++; + } + } + switch (currentDecodeTagId) + { + case 0: + TLVUnpackError = aDataTlv.Get(action); + break; + case 1: + TLVUnpackError = aDataTlv.Get(delayedActionTime); + break; + default: + // Unsupported tag, ignore it. + ChipLogProgress(Zcl, "Unknown TLV tag during processing."); + break; + } + if (CHIP_NO_ERROR != TLVUnpackError) + { + break; + } + } + + if (CHIP_END_OF_TLV == TLVError) + { + // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. + TLVError = CHIP_NO_ERROR; + } + + if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount) + { + wasHandled = emberAfOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback( + aCommandPath.mEndpointId, apCommandObj, action, delayedActionTime); + } + break; + } + default: { + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || CHIP_NO_ERROR != TLVUnpackError || expectArgumentCount != validArgumentCount || !wasHandled) + { + ChipLogProgress(Zcl, + "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT + ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32, + validArgumentCount, expectArgumentCount, TLVError.Format(), TLVUnpackError.Format(), currentDecodeTagId); + // A command with no arguments would never write currentDecodeTagId. If + // progress logging is also disabled, it would look unused. Silence that + // warning. + UNUSED_VAR(currentDecodeTagId); + } +} + +} // namespace OtaSoftwareUpdateProvider + +namespace OtaSoftwareUpdateProvider { + void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) { // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV @@ -1215,16 +1316,6 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } break; } - case Commands::NotifyUpdateApplied::Id: { - Commands::NotifyUpdateApplied::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = - emberAfOtaSoftwareUpdateProviderClusterNotifyUpdateAppliedCallback(apCommandObj, aCommandPath, commandData); - } - break; - } case Commands::QueryImage::Id: { Commands::QueryImage::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); @@ -2077,6 +2168,9 @@ void DispatchSingleClusterResponseCommand(const ConcreteCommandPath & aCommandPa SuccessOrExit(aReader.EnterContainer(dataTlvType)); switch (aCommandPath.mClusterId) { + case Clusters::OtaSoftwareUpdateProvider::Id: + Clusters::OtaSoftwareUpdateProvider::DispatchClientCommand(apCommandObj, aCommandPath, aReader); + break; default: ChipLogError(Zcl, "Unknown cluster " ChipLogFormatMEI, ChipLogValueMEI(aCommandPath.mClusterId)); break; diff --git a/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h index d940c9b06bfcad..651dec8dd7888f 100644 --- a/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h @@ -59,6 +59,7 @@ MatterMediaPlaybackPluginServerInitCallback(); \ MatterModeSelectPluginServerInitCallback(); \ MatterNetworkCommissioningPluginServerInitCallback(); \ + MatterOtaSoftwareUpdateProviderPluginClientInitCallback(); \ MatterOtaSoftwareUpdateProviderPluginServerInitCallback(); \ MatterOtaSoftwareUpdateRequestorPluginServerInitCallback(); \ MatterOccupancySensingPluginServerInitCallback(); \ 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 0b495aa2050eac..6d90ca619b4af5 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -1426,7 +1426,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 601 +#define GENERATED_ATTRIBUTE_COUNT 602 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1484,6 +1484,9 @@ { 0x0012, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* UniqueID */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: OTA Software Update Provider (client) */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + \ /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ @@ -2342,7 +2345,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 73 +#define GENERATED_CLUSTER_COUNT 74 #define GENERATED_CLUSTERS \ { \ { 0x0003, \ @@ -2373,253 +2376,256 @@ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ { \ - 0x0029, ZAP_ATTRIBUTE_INDEX(34), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0029, ZAP_ATTRIBUTE_INDEX(34), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + }, /* Endpoint: 0, Cluster: OTA Software Update Provider (client) */ \ + { \ + 0x0029, ZAP_ATTRIBUTE_INDEX(35), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ { \ - 0x002A, ZAP_ATTRIBUTE_INDEX(35), 5, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002A, ZAP_ATTRIBUTE_INDEX(36), 5, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { \ - 0x002E, ZAP_ATTRIBUTE_INDEX(40), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002E, ZAP_ATTRIBUTE_INDEX(41), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Power Source Configuration (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(42), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0030, ZAP_ATTRIBUTE_INDEX(43), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(48), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(49), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(58), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0032, ZAP_ATTRIBUTE_INDEX(59), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(58), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(59), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(67), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(68), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(73), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(74), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(138), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0036, ZAP_ATTRIBUTE_INDEX(139), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(153), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(154), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(164), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(165), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(168), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(169), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x003F, ZAP_ATTRIBUTE_INDEX(174), 5, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003F, ZAP_ATTRIBUTE_INDEX(175), 5, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Group Key Management (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(179), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(180), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(181), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(182), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(183), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0405, ZAP_ATTRIBUTE_INDEX(184), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Relative Humidity Measurement (server) */ \ { 0x0003, \ - ZAP_ATTRIBUTE_INDEX(187), \ + ZAP_ATTRIBUTE_INDEX(188), \ 3, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayIdentifyServer }, /* Endpoint: 1, Cluster: Identify (server) */ \ { 0x0004, \ - ZAP_ATTRIBUTE_INDEX(190), \ + ZAP_ATTRIBUTE_INDEX(191), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 1, Cluster: Groups (server) */ \ { 0x0005, \ - ZAP_ATTRIBUTE_INDEX(192), \ + ZAP_ATTRIBUTE_INDEX(193), \ 6, \ 8, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayScenesServer }, /* Endpoint: 1, Cluster: Scenes (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(198), \ + ZAP_ATTRIBUTE_INDEX(199), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { \ - 0x0007, ZAP_ATTRIBUTE_INDEX(205), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0007, ZAP_ATTRIBUTE_INDEX(206), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ { 0x0008, \ - ZAP_ATTRIBUTE_INDEX(208), \ + ZAP_ATTRIBUTE_INDEX(209), \ 15, \ 23, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x000F, ZAP_ATTRIBUTE_INDEX(223), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x000F, ZAP_ATTRIBUTE_INDEX(224), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(227), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(228), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x001E, ZAP_ATTRIBUTE_INDEX(232), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001E, ZAP_ATTRIBUTE_INDEX(233), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binding (server) */ \ { \ - 0x0025, ZAP_ATTRIBUTE_INDEX(233), 4, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0025, ZAP_ATTRIBUTE_INDEX(234), 4, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Actions (server) */ \ { \ - 0x002F, ZAP_ATTRIBUTE_INDEX(237), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002F, ZAP_ATTRIBUTE_INDEX(238), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Power Source (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(248), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(249), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Network Commissioning (server) */ \ { \ - 0x0039, ZAP_ATTRIBUTE_INDEX(258), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0039, ZAP_ATTRIBUTE_INDEX(259), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ { \ - 0x003B, ZAP_ATTRIBUTE_INDEX(259), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003B, ZAP_ATTRIBUTE_INDEX(260), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(264), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(265), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(266), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(267), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: User Label (server) */ \ { \ - 0x0045, ZAP_ATTRIBUTE_INDEX(268), 2, 3, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0045, ZAP_ATTRIBUTE_INDEX(269), 2, 3, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Boolean State (server) */ \ { \ - 0x0050, ZAP_ATTRIBUTE_INDEX(270), 6, 38, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0050, ZAP_ATTRIBUTE_INDEX(271), 6, 38, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Mode Select (server) */ \ { 0x0101, \ - ZAP_ATTRIBUTE_INDEX(276), \ + ZAP_ATTRIBUTE_INDEX(277), \ 19, \ 29, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | \ ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayDoorLockServer }, /* Endpoint: 1, Cluster: Door Lock (server) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(295), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0102, ZAP_ATTRIBUTE_INDEX(296), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (server) */ \ { \ - 0x0103, ZAP_ATTRIBUTE_INDEX(315), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0103, ZAP_ATTRIBUTE_INDEX(316), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Barrier Control (server) */ \ { \ 0x0200, \ - ZAP_ATTRIBUTE_INDEX(320), \ + ZAP_ATTRIBUTE_INDEX(321), \ 26, \ 54, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayPumpConfigurationAndControlServer \ }, /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ { 0x0201, \ - ZAP_ATTRIBUTE_INDEX(346), \ + ZAP_ATTRIBUTE_INDEX(347), \ 19, \ 34, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayThermostatServer }, /* Endpoint: 1, Cluster: Thermostat (server) */ \ { \ 0x0204, \ - ZAP_ATTRIBUTE_INDEX(365), \ + ZAP_ATTRIBUTE_INDEX(366), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayThermostatUserInterfaceConfigurationServer \ }, /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ { 0x0300, \ - ZAP_ATTRIBUTE_INDEX(369), \ + ZAP_ATTRIBUTE_INDEX(370), \ 53, \ 341, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { \ - 0x0400, ZAP_ATTRIBUTE_INDEX(422), 6, 11, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0400, ZAP_ATTRIBUTE_INDEX(423), 6, 11, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Illuminance Measurement (server) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(428), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0402, ZAP_ATTRIBUTE_INDEX(429), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ { \ - 0x0403, ZAP_ATTRIBUTE_INDEX(433), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0403, ZAP_ATTRIBUTE_INDEX(434), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ { \ - 0x0404, ZAP_ATTRIBUTE_INDEX(437), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0404, ZAP_ATTRIBUTE_INDEX(438), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(442), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0405, ZAP_ATTRIBUTE_INDEX(443), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(447), \ + ZAP_ATTRIBUTE_INDEX(448), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOccupancySensingServer }, /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ { 0x0500, \ - ZAP_ATTRIBUTE_INDEX(451), \ + ZAP_ATTRIBUTE_INDEX(452), \ 6, \ 16, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION) | \ ZAP_CLUSTER_MASK(MESSAGE_SENT_FUNCTION), \ chipFuncArrayIasZoneServer }, /* Endpoint: 1, Cluster: IAS Zone (server) */ \ { \ - 0x0503, ZAP_ATTRIBUTE_INDEX(457), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0503, ZAP_ATTRIBUTE_INDEX(458), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(459), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0504, ZAP_ATTRIBUTE_INDEX(460), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Channel (server) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(461), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0505, ZAP_ATTRIBUTE_INDEX(462), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(464), 7, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(465), 7, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (server) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(471), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0507, ZAP_ATTRIBUTE_INDEX(472), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Input (server) */ \ { \ - 0x0508, ZAP_ATTRIBUTE_INDEX(474), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0508, ZAP_ATTRIBUTE_INDEX(475), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Low Power (server) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(475), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0509, ZAP_ATTRIBUTE_INDEX(476), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(476), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(477), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (server) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(479), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(480), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (server) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(482), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050C, ZAP_ATTRIBUTE_INDEX(483), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(484), 8, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(485), 8, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (server) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(492), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(493), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Account Login (server) */ \ { \ - 0x050F, ZAP_ATTRIBUTE_INDEX(493), 78, 3285, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050F, ZAP_ATTRIBUTE_INDEX(494), 78, 3285, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (server) */ \ { \ - 0x0B04, ZAP_ATTRIBUTE_INDEX(571), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0B04, ZAP_ATTRIBUTE_INDEX(572), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ { 0x0004, \ - ZAP_ATTRIBUTE_INDEX(583), \ + ZAP_ATTRIBUTE_INDEX(584), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 2, Cluster: Groups (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(585), \ + ZAP_ATTRIBUTE_INDEX(586), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(592), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(593), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(597), \ + ZAP_ATTRIBUTE_INDEX(598), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2631,7 +2637,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 23, 1465 }, { ZAP_CLUSTER_INDEX(23), 46, 6170 }, { ZAP_CLUSTER_INDEX(69), 4, 21 }, \ + { ZAP_CLUSTER_INDEX(0), 24, 1467 }, { ZAP_CLUSTER_INDEX(24), 46, 6170 }, { ZAP_CLUSTER_INDEX(70), 4, 21 }, \ } // Largest attribute size is needed for various buffers @@ -2641,7 +2647,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (689) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (7656) +#define ATTRIBUTE_MAX_SIZE (7658) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) diff --git a/zzz_generated/all-clusters-app/zap-generated/gen_config.h b/zzz_generated/all-clusters-app/zap-generated/gen_config.h index 0484734aa48c82..74f55052a98ae0 100644 --- a/zzz_generated/all-clusters-app/zap-generated/gen_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/gen_config.h @@ -66,6 +66,7 @@ #define EMBER_AF_MEDIA_PLAYBACK_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_MODE_SELECT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (2) +#define EMBER_AF_OTA_PROVIDER_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_OTA_PROVIDER_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OTA_REQUESTOR_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OCCUPANCY_SENSING_CLUSTER_SERVER_ENDPOINT_COUNT (2) @@ -288,6 +289,10 @@ #define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING_SERVER #define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING +// Use this macro to check if the client side of the OTA Software Update Provider cluster is included +#define ZCL_USING_OTA_PROVIDER_CLUSTER_CLIENT +#define EMBER_AF_PLUGIN_OTA_SOFTWARE_UPDATE_PROVIDER_CLIENT + // Use this macro to check if the server side of the OTA Software Update Provider cluster is included #define ZCL_USING_OTA_PROVIDER_CLUSTER_SERVER #define EMBER_AF_PLUGIN_OTA_SOFTWARE_UPDATE_PROVIDER_SERVER diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index d2f112ac45f91b..61c9cb76bb5d95 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -58583,7 +58583,9 @@ class TestDescriptorCluster : public TestCommand { { auto iter_0 = clientList.begin(); - VerifyOrReturn(CheckNoMoreListItems("clientList", iter_0, 0)); + VerifyOrReturn(CheckNextListItemDecodes("clientList", iter_0, 0)); + VerifyOrReturn(CheckValue("clientList[0]", iter_0.GetValue(), 41UL)); + VerifyOrReturn(CheckNoMoreListItems("clientList", iter_0, 1)); } NextTest(); From 08753ba817df23ddafe672fbdb22881f7a9e08e5 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 10 Jan 2022 11:28:22 -0500 Subject: [PATCH 18/64] Stop using GroupId for the type of a PAKE key id. (#13391) A PAKE key id is a uint16_t, or maybe we should have a specific type name for it, but it's not a GroupId. --- src/lib/core/NodeId.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/core/NodeId.h b/src/lib/core/NodeId.h index 6dc6b923e069e4..ea2024266b76dd 100644 --- a/src/lib/core/NodeId.h +++ b/src/lib/core/NodeId.h @@ -78,7 +78,7 @@ constexpr NodeId NodeIdFromGroupId(GroupId aGroupId) return kMinGroupNodeId | aGroupId; } -constexpr NodeId NodeIdFromPAKEKeyId(GroupId aPAKEKeyId) +constexpr NodeId NodeIdFromPAKEKeyId(uint16_t aPAKEKeyId) { return kMinPAKEKeyId | aPAKEKeyId; } From 8281d591389e4bfa2c91e3ff3b2e3f4cd8519ec3 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Mon, 10 Jan 2022 09:20:56 -0800 Subject: [PATCH 19/64] Add support for ActiveLocale in ConfigurationMgr (#13403) --- src/include/platform/ConfigurationManager.h | 5 ++++- .../GenericConfigurationManagerImpl.cpp | 12 ++++++++++++ .../GenericConfigurationManagerImpl.h | 2 ++ src/platform/Ameba/AmebaConfig.cpp | 1 + src/platform/Ameba/AmebaConfig.h | 1 + src/platform/Darwin/PosixConfig.cpp | 1 + src/platform/Darwin/PosixConfig.h | 1 + src/platform/EFR32/EFR32Config.h | 1 + src/platform/ESP32/ESP32Config.cpp | 1 + src/platform/ESP32/ESP32Config.h | 1 + src/platform/Linux/PosixConfig.cpp | 1 + src/platform/Linux/PosixConfig.h | 1 + src/platform/P6/P6Config.cpp | 1 + src/platform/P6/P6Config.h | 1 + src/platform/Tizen/PosixConfig.cpp | 1 + src/platform/Tizen/PosixConfig.h | 1 + src/platform/Zephyr/ZephyrConfig.cpp | 3 ++- src/platform/Zephyr/ZephyrConfig.h | 1 + src/platform/android/AndroidConfig.cpp | 1 + src/platform/android/AndroidConfig.h | 1 + .../chip/platform/ConfigurationManager.java | 1 + .../cc13x2_26x2/CC13X2_26X2Config.cpp | 6 ++++-- src/platform/cc13x2_26x2/CC13X2_26X2Config.h | 1 + src/platform/fake/ConfigurationManagerImpl.h | 2 ++ src/platform/mbed/MbedConfig.cpp | 1 + src/platform/mbed/MbedConfig.h | 1 + src/platform/nxp/k32w/k32w0/K32W0Config.h | 1 + src/platform/qpg/qpgConfig.h | 5 +++-- src/platform/tests/TestConfigurationMgr.cpp | 19 +++++++++++++++++++ 29 files changed, 69 insertions(+), 6 deletions(-) diff --git a/src/include/platform/ConfigurationManager.h b/src/include/platform/ConfigurationManager.h index 5103f6b8e4cdb6..4488fdc4cc88d8 100644 --- a/src/include/platform/ConfigurationManager.h +++ b/src/include/platform/ConfigurationManager.h @@ -77,7 +77,8 @@ class ConfigurationManager #else kPrimaryMACAddressLength = 6, #endif - kMaxMACAddressLength = 8, + kMaxMACAddressLength = 8, + kMaxLanguageTagLength = 5 // ISO 639-1 standard language codes }; virtual CHIP_ERROR GetVendorName(char * buf, size_t bufSize) = 0; @@ -99,6 +100,7 @@ class ConfigurationManager virtual CHIP_ERROR GetLifetimeCounter(uint16_t & lifetimeCounter) = 0; virtual CHIP_ERROR GetRegulatoryLocation(uint8_t & location) = 0; virtual CHIP_ERROR GetCountryCode(char * buf, size_t bufSize, size_t & codeLen) = 0; + virtual CHIP_ERROR GetActiveLocale(char * buf, size_t bufSize, size_t & codeLen) = 0; virtual CHIP_ERROR GetBreadcrumb(uint64_t & breadcrumb) = 0; virtual CHIP_ERROR StoreSerialNumber(const char * serialNum, size_t serialNumLen) = 0; virtual CHIP_ERROR StorePrimaryWiFiMACAddress(const uint8_t * buf) = 0; @@ -109,6 +111,7 @@ class ConfigurationManager virtual CHIP_ERROR StoreSetupDiscriminator(uint16_t setupDiscriminator) = 0; virtual CHIP_ERROR StoreRegulatoryLocation(uint8_t location) = 0; virtual CHIP_ERROR StoreCountryCode(const char * code, size_t codeLen) = 0; + virtual CHIP_ERROR StoreActiveLocale(const char * code, size_t codeLen) = 0; virtual CHIP_ERROR StoreBreadcrumb(uint64_t breadcrumb) = 0; virtual CHIP_ERROR GetRebootCount(uint32_t & rebootCount) = 0; virtual CHIP_ERROR StoreRebootCount(uint32_t rebootCount) = 0; diff --git a/src/include/platform/internal/GenericConfigurationManagerImpl.cpp b/src/include/platform/internal/GenericConfigurationManagerImpl.cpp index dc1fe8fb799b27..141c9bffead4f4 100644 --- a/src/include/platform/internal/GenericConfigurationManagerImpl.cpp +++ b/src/include/platform/internal/GenericConfigurationManagerImpl.cpp @@ -327,12 +327,24 @@ CHIP_ERROR GenericConfigurationManagerImpl::GetCountryCode(char * b return ReadConfigValueStr(ConfigClass::kConfigKey_CountryCode, buf, bufSize, codeLen); } +template +CHIP_ERROR GenericConfigurationManagerImpl::GetActiveLocale(char * buf, size_t bufSize, size_t & codeLen) +{ + return ReadConfigValueStr(ConfigClass::kConfigKey_ActiveLocale, buf, bufSize, codeLen); +} + template CHIP_ERROR GenericConfigurationManagerImpl::StoreCountryCode(const char * code, size_t codeLen) { return WriteConfigValueStr(ConfigClass::kConfigKey_CountryCode, code, codeLen); } +template +CHIP_ERROR GenericConfigurationManagerImpl::StoreActiveLocale(const char * code, size_t codeLen) +{ + return WriteConfigValueStr(ConfigClass::kConfigKey_ActiveLocale, code, codeLen); +} + template CHIP_ERROR GenericConfigurationManagerImpl::GetBreadcrumb(uint64_t & breadcrumb) { diff --git a/src/include/platform/internal/GenericConfigurationManagerImpl.h b/src/include/platform/internal/GenericConfigurationManagerImpl.h index 8e750651ab5253..247a2ef1360826 100644 --- a/src/include/platform/internal/GenericConfigurationManagerImpl.h +++ b/src/include/platform/internal/GenericConfigurationManagerImpl.h @@ -91,7 +91,9 @@ class GenericConfigurationManagerImpl : public ConfigurationManager CHIP_ERROR GetRegulatoryLocation(uint8_t & location) override; CHIP_ERROR StoreRegulatoryLocation(uint8_t location) override; CHIP_ERROR GetCountryCode(char * buf, size_t bufSize, size_t & codeLen) override; + CHIP_ERROR GetActiveLocale(char * buf, size_t bufSize, size_t & codeLen) override; CHIP_ERROR StoreCountryCode(const char * code, size_t codeLen) override; + CHIP_ERROR StoreActiveLocale(const char * code, size_t codeLen) override; CHIP_ERROR GetBreadcrumb(uint64_t & breadcrumb) override; CHIP_ERROR StoreBreadcrumb(uint64_t breadcrumb) override; CHIP_ERROR GetRebootCount(uint32_t & rebootCount) override; diff --git a/src/platform/Ameba/AmebaConfig.cpp b/src/platform/Ameba/AmebaConfig.cpp index 02d0580ca82c4c..56de35a1e38b9b 100644 --- a/src/platform/Ameba/AmebaConfig.cpp +++ b/src/platform/Ameba/AmebaConfig.cpp @@ -72,6 +72,7 @@ const AmebaConfig::Key AmebaConfig::kConfigKey_OperationalDeviceICACerts = { k const AmebaConfig::Key AmebaConfig::kConfigKey_OperationalDevicePrivateKey = { kConfigNamespace_ChipConfig, "op-device-key" }; const AmebaConfig::Key AmebaConfig::kConfigKey_RegulatoryLocation = { kConfigNamespace_ChipConfig, "regulatory-location" }; const AmebaConfig::Key AmebaConfig::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; +const AmebaConfig::Key AmebaConfig::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; const AmebaConfig::Key AmebaConfig::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; // Keys stored in the Chip-counters namespace diff --git a/src/platform/Ameba/AmebaConfig.h b/src/platform/Ameba/AmebaConfig.h index eb046e16a412d6..af49048f9ace14 100755 --- a/src/platform/Ameba/AmebaConfig.h +++ b/src/platform/Ameba/AmebaConfig.h @@ -66,6 +66,7 @@ class AmebaConfig static const Key kConfigKey_SetupDiscriminator; static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; + static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; static const Key kCounterKey_RebootCount; static const Key kCounterKey_UpTime; diff --git a/src/platform/Darwin/PosixConfig.cpp b/src/platform/Darwin/PosixConfig.cpp index 5215d7bbf997da..5ee3104038b4d4 100644 --- a/src/platform/Darwin/PosixConfig.cpp +++ b/src/platform/Darwin/PosixConfig.cpp @@ -65,6 +65,7 @@ const PosixConfig::Key PosixConfig::kConfigKey_FailSafeArmed = { kConfigNam const PosixConfig::Key PosixConfig::kConfigKey_WiFiStationSecType = { kConfigNamespace_ChipConfig, "sta-sec-type" }; const PosixConfig::Key PosixConfig::kConfigKey_RegulatoryLocation = { kConfigNamespace_ChipConfig, "regulatory-location" }; const PosixConfig::Key PosixConfig::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; +const PosixConfig::Key PosixConfig::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; const PosixConfig::Key PosixConfig::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; // Prefix used for NVS keys that contain Chip group encryption keys. diff --git a/src/platform/Darwin/PosixConfig.h b/src/platform/Darwin/PosixConfig.h index f45026905d6edd..009433a91d4a5a 100644 --- a/src/platform/Darwin/PosixConfig.h +++ b/src/platform/Darwin/PosixConfig.h @@ -72,6 +72,7 @@ class PosixConfig static const Key kConfigKey_SetupDiscriminator; static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; + static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; static const char kGroupKeyNamePrefix[]; diff --git a/src/platform/EFR32/EFR32Config.h b/src/platform/EFR32/EFR32Config.h index ec0715e231f745..9879aeba72a374 100644 --- a/src/platform/EFR32/EFR32Config.h +++ b/src/platform/EFR32/EFR32Config.h @@ -95,6 +95,7 @@ class EFR32Config static constexpr Key kConfigKey_CountryCode = EFR32ConfigKey(kChipConfig_KeyBase, 0x0A); static constexpr Key kConfigKey_Breadcrumb = EFR32ConfigKey(kChipConfig_KeyBase, 0x0B); static constexpr Key kConfigKey_GroupKeyBase = EFR32ConfigKey(kChipConfig_KeyBase, 0x0C); + static constexpr Key kConfigKey_ActiveLocale = EFR32ConfigKey(kChipConfig_KeyBase, 0x0D); static constexpr Key kConfigKey_GroupKeyMax = EFR32ConfigKey(kChipConfig_KeyBase, 0x1B); // Allows 16 Group Keys to be created. // CHIP Counter Keys diff --git a/src/platform/ESP32/ESP32Config.cpp b/src/platform/ESP32/ESP32Config.cpp index 62fbddfc51ee71..5b2d6ea2f3073e 100644 --- a/src/platform/ESP32/ESP32Config.cpp +++ b/src/platform/ESP32/ESP32Config.cpp @@ -71,6 +71,7 @@ const ESP32Config::Key ESP32Config::kConfigKey_FailSafeArmed = { kConfigNam const ESP32Config::Key ESP32Config::kConfigKey_WiFiStationSecType = { kConfigNamespace_ChipConfig, "sta-sec-type" }; const ESP32Config::Key ESP32Config::kConfigKey_RegulatoryLocation = { kConfigNamespace_ChipConfig, "regulatory-location" }; const ESP32Config::Key ESP32Config::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; +const ESP32Config::Key ESP32Config::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; const ESP32Config::Key ESP32Config::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; // Keys stored in the Chip-counters namespace diff --git a/src/platform/ESP32/ESP32Config.h b/src/platform/ESP32/ESP32Config.h index cfaa4d35a2fcd7..dfd6f9a4151359 100644 --- a/src/platform/ESP32/ESP32Config.h +++ b/src/platform/ESP32/ESP32Config.h @@ -73,6 +73,7 @@ class ESP32Config static const Key kConfigKey_SetupDiscriminator; static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; + static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; static const Key kCounterKey_RebootCount; static const Key kCounterKey_UpTime; diff --git a/src/platform/Linux/PosixConfig.cpp b/src/platform/Linux/PosixConfig.cpp index 69242ae05189e8..3c09fa7b7a7808 100644 --- a/src/platform/Linux/PosixConfig.cpp +++ b/src/platform/Linux/PosixConfig.cpp @@ -70,6 +70,7 @@ const PosixConfig::Key PosixConfig::kConfigKey_FailSafeArmed = { kConfigNam const PosixConfig::Key PosixConfig::kConfigKey_WiFiStationSecType = { kConfigNamespace_ChipConfig, "sta-sec-type" }; const PosixConfig::Key PosixConfig::kConfigKey_RegulatoryLocation = { kConfigNamespace_ChipConfig, "regulatory-location" }; const PosixConfig::Key PosixConfig::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; +const PosixConfig::Key PosixConfig::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; const PosixConfig::Key PosixConfig::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; const PosixConfig::Key PosixConfig::kConfigKey_LocationCapability = { kConfigNamespace_ChipConfig, "location-capability" }; diff --git a/src/platform/Linux/PosixConfig.h b/src/platform/Linux/PosixConfig.h index 97ab64b80a5d12..e4361af27e216e 100644 --- a/src/platform/Linux/PosixConfig.h +++ b/src/platform/Linux/PosixConfig.h @@ -74,6 +74,7 @@ class PosixConfig static const Key kConfigKey_SetupDiscriminator; static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; + static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; static const Key kConfigKey_LocationCapability; diff --git a/src/platform/P6/P6Config.cpp b/src/platform/P6/P6Config.cpp index 71194b6ac4011f..ee28b6718ba6f5 100644 --- a/src/platform/P6/P6Config.cpp +++ b/src/platform/P6/P6Config.cpp @@ -59,6 +59,7 @@ const P6Config::Key P6Config::kConfigKey_SetupPinCode = { kConfigNamespac const P6Config::Key P6Config::kConfigKey_SetupDiscriminator = { kConfigNamespace_ChipFactory, "discriminator" }; const P6Config::Key P6Config::kConfigKey_RegulatoryLocation = { kConfigNamespace_ChipConfig, "regulatory-location" }; const P6Config::Key P6Config::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; +const P6Config::Key P6Config::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; const P6Config::Key P6Config::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; // Keys stored in the chip-config namespace diff --git a/src/platform/P6/P6Config.h b/src/platform/P6/P6Config.h index 7acfb5e13a5f07..071f031de48f9a 100644 --- a/src/platform/P6/P6Config.h +++ b/src/platform/P6/P6Config.h @@ -74,6 +74,7 @@ class P6Config static const Key kConfigKey_SetupDiscriminator; static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; + static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; static const Key kCounterKey_RebootCount; static const Key kCounterKey_UpTime; diff --git a/src/platform/Tizen/PosixConfig.cpp b/src/platform/Tizen/PosixConfig.cpp index 61acb6720d83fc..92d0009356d685 100644 --- a/src/platform/Tizen/PosixConfig.cpp +++ b/src/platform/Tizen/PosixConfig.cpp @@ -67,6 +67,7 @@ const PosixConfig::Key PosixConfig::kConfigKey_WiFiStationSecType = { kConfigNam const PosixConfig::Key PosixConfig::kConfigKey_RegulatoryLocation = { kConfigNamespace_ChipConfig, "regulatory-location" }; const PosixConfig::Key PosixConfig::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; const PosixConfig::Key PosixConfig::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; +const PosixConfig::Key PosixConfig::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; // Prefix used for NVS keys that contain Chip group encryption keys. const char PosixConfig::kGroupKeyNamePrefix[] = "gk-"; diff --git a/src/platform/Tizen/PosixConfig.h b/src/platform/Tizen/PosixConfig.h index 6a2c9c5e2f842a..e4beca4391b5b7 100644 --- a/src/platform/Tizen/PosixConfig.h +++ b/src/platform/Tizen/PosixConfig.h @@ -73,6 +73,7 @@ class PosixConfig static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; static const Key kConfigKey_Breadcrumb; + static const Key kConfigKey_ActiveLocale; static const char kGroupKeyNamePrefix[]; diff --git a/src/platform/Zephyr/ZephyrConfig.cpp b/src/platform/Zephyr/ZephyrConfig.cpp index 395d6374921740..9f95a2fd9b0cc8 100644 --- a/src/platform/Zephyr/ZephyrConfig.cpp +++ b/src/platform/Zephyr/ZephyrConfig.cpp @@ -70,6 +70,7 @@ const ZephyrConfig::Key ZephyrConfig::kConfigKey_LastUsedEpochKeyId = CONFIG_KEY const ZephyrConfig::Key ZephyrConfig::kConfigKey_FailSafeArmed = CONFIG_KEY(NAMESPACE_CONFIG "fail-safe-armed"); const ZephyrConfig::Key ZephyrConfig::kConfigKey_RegulatoryLocation = CONFIG_KEY(NAMESPACE_CONFIG "regulatory-location"); const ZephyrConfig::Key ZephyrConfig::kConfigKey_CountryCode = CONFIG_KEY(NAMESPACE_CONFIG "country-code"); +const ZephyrConfig::Key ZephyrConfig::kConfigKey_ActiveLocale = CONFIG_KEY(NAMESPACE_CONFIG "active-locale"); const ZephyrConfig::Key ZephyrConfig::kConfigKey_Breadcrumb = CONFIG_KEY(NAMESPACE_CONFIG "breadcrumb"); // Keys stored in the counters namespace @@ -85,7 +86,7 @@ constexpr const char * sAllResettableConfigKeys[] = { ZephyrConfig::kConfigKey_FabricSecret, ZephyrConfig::kConfigKey_GroupKeyIndex, ZephyrConfig::kConfigKey_LastUsedEpochKeyId, ZephyrConfig::kConfigKey_FailSafeArmed, ZephyrConfig::kConfigKey_RegulatoryLocation, ZephyrConfig::kConfigKey_CountryCode, - ZephyrConfig::kConfigKey_Breadcrumb + ZephyrConfig::kConfigKey_ActiveLocale, ZephyrConfig::kConfigKey_Breadcrumb }; // Data structure to be passed as a parameter of Zephyr's settings_load_subtree_direct() function diff --git a/src/platform/Zephyr/ZephyrConfig.h b/src/platform/Zephyr/ZephyrConfig.h index f6a1b23ed921bd..288addd657a0a6 100644 --- a/src/platform/Zephyr/ZephyrConfig.h +++ b/src/platform/Zephyr/ZephyrConfig.h @@ -62,6 +62,7 @@ class ZephyrConfig static const Key kConfigKey_FailSafeArmed; static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; + static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; static const Key kCounterKey_RebootCount; static const Key kCounterKey_BootReason; diff --git a/src/platform/android/AndroidConfig.cpp b/src/platform/android/AndroidConfig.cpp index d02fe792653ef7..cf6f4d506a9f8b 100644 --- a/src/platform/android/AndroidConfig.cpp +++ b/src/platform/android/AndroidConfig.cpp @@ -91,6 +91,7 @@ const AndroidConfig::Key AndroidConfig::kConfigKey_FailSafeArmed = { kConfi const AndroidConfig::Key AndroidConfig::kConfigKey_WiFiStationSecType = { kConfigNamespace_ChipConfig, "sta-sec-type" }; const AndroidConfig::Key AndroidConfig::kConfigKey_RegulatoryLocation = { kConfigNamespace_ChipConfig, "regulatory-location" }; const AndroidConfig::Key AndroidConfig::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; +const AndroidConfig::Key AndroidConfig::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; const AndroidConfig::Key AndroidConfig::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; // Prefix used for NVS keys that contain Chip group encryption keys. diff --git a/src/platform/android/AndroidConfig.h b/src/platform/android/AndroidConfig.h index 66f61930eb89ee..82687bb47e3240 100644 --- a/src/platform/android/AndroidConfig.h +++ b/src/platform/android/AndroidConfig.h @@ -74,6 +74,7 @@ class AndroidConfig static const Key kConfigKey_SetupDiscriminator; static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; + static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; static const Key kConfigKey_ProductId; static const Key kConfigKey_ProductName; diff --git a/src/platform/android/java/chip/platform/ConfigurationManager.java b/src/platform/android/java/chip/platform/ConfigurationManager.java index 4751974356cbae..a3aed3df257ecf 100644 --- a/src/platform/android/java/chip/platform/ConfigurationManager.java +++ b/src/platform/android/java/chip/platform/ConfigurationManager.java @@ -59,6 +59,7 @@ public interface ConfigurationManager { String kConfigKey_WiFiStationSecType = "sta-sec-type"; String kConfigKey_RegulatoryLocation = "regulatory-location"; String kConfigKey_CountryCode = "country-code"; + String kConfigKey_ActiveLocale = "active-locale"; String kConfigKey_Breadcrumb = "breadcrumb"; // Prefix used for NVS keys that contain Chip group encryption keys. diff --git a/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp b/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp index 68c219597b2c46..e39d73babc381e 100644 --- a/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp +++ b/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp @@ -87,12 +87,14 @@ const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_CountryCode = .itemID = 0x001b } }; const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_Breadcrumb = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, .itemID = 0x001c } }; +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_ActiveLocale = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, + .itemID = 0x001d } }; /* Internal for the KVS interface. */ const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_KVS_key = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, - .itemID = 0x001d } }; + .itemID = 0x001e } }; const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_KVS_value = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, - .itemID = 0x001e } }; + .itemID = 0x001f } }; /* Static local variables */ static NVINTF_nvFuncts_t sNvoctpFps = { 0 }; diff --git a/src/platform/cc13x2_26x2/CC13X2_26X2Config.h b/src/platform/cc13x2_26x2/CC13X2_26X2Config.h index 6e3a0f6ca64803..034a067906fc43 100644 --- a/src/platform/cc13x2_26x2/CC13X2_26X2Config.h +++ b/src/platform/cc13x2_26x2/CC13X2_26X2Config.h @@ -65,6 +65,7 @@ class CC13X2_26X2Config static const Key kConfigKey_WiFiStationSecType; static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; + static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; static const Key kConfigKey_KVS_key; // special key for KVS system, key storage static const Key kConfigKey_KVS_value; // special key for KVS system, value storage diff --git a/src/platform/fake/ConfigurationManagerImpl.h b/src/platform/fake/ConfigurationManagerImpl.h index a6121a720c9b71..18afa5923604b4 100644 --- a/src/platform/fake/ConfigurationManagerImpl.h +++ b/src/platform/fake/ConfigurationManagerImpl.h @@ -78,7 +78,9 @@ class ConfigurationManagerImpl : public ConfigurationManager CHIP_ERROR GetRegulatoryLocation(uint8_t & location) override { return CHIP_ERROR_NOT_IMPLEMENTED; } CHIP_ERROR StoreRegulatoryLocation(uint8_t location) override { return CHIP_ERROR_NOT_IMPLEMENTED; } CHIP_ERROR GetCountryCode(char * buf, size_t bufSize, size_t & codeLen) override { return CHIP_ERROR_NOT_IMPLEMENTED; } + CHIP_ERROR GetActiveLocale(char * buf, size_t bufSize, size_t & codeLen) override { return CHIP_ERROR_NOT_IMPLEMENTED; } CHIP_ERROR StoreCountryCode(const char * code, size_t codeLen) override { return CHIP_ERROR_NOT_IMPLEMENTED; } + CHIP_ERROR StoreActiveLocale(const char * code, size_t codeLen) override { return CHIP_ERROR_NOT_IMPLEMENTED; } CHIP_ERROR GetBreadcrumb(uint64_t & breadcrumb) override { return CHIP_ERROR_NOT_IMPLEMENTED; } CHIP_ERROR StoreBreadcrumb(uint64_t breadcrumb) override { return CHIP_ERROR_NOT_IMPLEMENTED; } CHIP_ERROR GetRebootCount(uint32_t & rebootCount) override { return CHIP_ERROR_NOT_IMPLEMENTED; } diff --git a/src/platform/mbed/MbedConfig.cpp b/src/platform/mbed/MbedConfig.cpp index ac5e8f43168b62..608d732ce61425 100644 --- a/src/platform/mbed/MbedConfig.cpp +++ b/src/platform/mbed/MbedConfig.cpp @@ -80,6 +80,7 @@ const MbedConfig::Key MbedConfig::kConfigKey_FailSafeArmed = { CONFIG_KEY(" const MbedConfig::Key MbedConfig::kConfigKey_WiFiStationSecType = { CONFIG_KEY("sta-sec-type") }; const MbedConfig::Key MbedConfig::kConfigKey_RegulatoryLocation = { CONFIG_KEY("regulatory-location") }; const MbedConfig::Key MbedConfig::kConfigKey_CountryCode = { CONFIG_KEY("country-code") }; +const MbedConfig::Key MbedConfig::kConfigKey_ActiveLocale = { CONFIG_KEY("active-locale") }; const MbedConfig::Key MbedConfig::kConfigKey_Breadcrumb = { CONFIG_KEY("breadcrumb") }; CHIP_ERROR MbedConfig::ReadConfigValue(Key key, bool & val) diff --git a/src/platform/mbed/MbedConfig.h b/src/platform/mbed/MbedConfig.h index aeb57463930cbf..21d33df304e140 100644 --- a/src/platform/mbed/MbedConfig.h +++ b/src/platform/mbed/MbedConfig.h @@ -71,6 +71,7 @@ class MbedConfig static const Key kConfigKey_SetupDiscriminator; static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; + static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; // Config value accessors. diff --git a/src/platform/nxp/k32w/k32w0/K32W0Config.h b/src/platform/nxp/k32w/k32w0/K32W0Config.h index aad0489c1f512d..b5cf3c6e23c0c4 100644 --- a/src/platform/nxp/k32w/k32w0/K32W0Config.h +++ b/src/platform/nxp/k32w/k32w0/K32W0Config.h @@ -88,6 +88,7 @@ class K32WConfig static constexpr Key kConfigKey_RegulatoryLocation = K32WConfigKey(kPDMId_ChipConfig, 0x07); static constexpr Key kConfigKey_CountryCode = K32WConfigKey(kPDMId_ChipConfig, 0x08); static constexpr Key kConfigKey_Breadcrumb = K32WConfigKey(kPDMId_ChipConfig, 0x09); + static constexpr Key kConfigKey_ActiveLocale = K32WConfigKey(kPDMId_ChipConfig, 0x0A); // CHIP Counter Keys static constexpr Key kCounterKey_RebootCount = K32WConfigKey(kPDMId_ChipCounter, 0x00); diff --git a/src/platform/qpg/qpgConfig.h b/src/platform/qpg/qpgConfig.h index 731b157e8e963f..426fb431203590 100644 --- a/src/platform/qpg/qpgConfig.h +++ b/src/platform/qpg/qpgConfig.h @@ -85,9 +85,10 @@ class QPGConfig static constexpr Key kConfigKey_RegulatoryLocation = QorvoConfigKey(kFileId_ChipConfig, 0x09); static constexpr Key kConfigKey_CountryCode = QorvoConfigKey(kFileId_ChipConfig, 0x0A); static constexpr Key kConfigKey_Breadcrumb = QorvoConfigKey(kFileId_ChipConfig, 0x0B); + static constexpr Key kConfigKey_ActiveLocale = QorvoConfigKey(kFileId_ChipConfig, 0x0C); - static constexpr Key kConfigKey_GroupKeyBase = QorvoConfigKey(kFileId_ChipConfig, 0x0C); - static constexpr Key kConfigKey_GroupKeyMax = QorvoConfigKey(kFileId_ChipConfig, 0x1B); // Allows 16 Group Keys to be created. + static constexpr Key kConfigKey_GroupKeyBase = QorvoConfigKey(kFileId_ChipConfig, 0x0D); + static constexpr Key kConfigKey_GroupKeyMax = QorvoConfigKey(kFileId_ChipConfig, 0x1C); // Allows 16 Group Keys to be created. static constexpr Key kConfigKey_CounterKeyBase = QorvoConfigKey(kFileId_ChipCounter, 0x00); static constexpr Key kConfigKey_CounterKeyMax = diff --git a/src/platform/tests/TestConfigurationMgr.cpp b/src/platform/tests/TestConfigurationMgr.cpp index 9e05f33b16d589..04d8998271627b 100644 --- a/src/platform/tests/TestConfigurationMgr.cpp +++ b/src/platform/tests/TestConfigurationMgr.cpp @@ -227,6 +227,24 @@ static void TestConfigurationMgr_GetPrimaryMACAddress(nlTestSuite * inSuite, voi } } +static void TestConfigurationMgr_ActiveLocale(nlTestSuite * inSuite, void * inContext) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + char buf[8]; + size_t activeLocaleLen = 0; + const char * activeLocale = "en-US"; + + err = ConfigurationMgr().StoreActiveLocale(activeLocale, strlen(activeLocale)); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + err = ConfigurationMgr().GetActiveLocale(buf, 8, activeLocaleLen); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + NL_TEST_ASSERT(inSuite, activeLocaleLen == strlen(activeLocale)); + NL_TEST_ASSERT(inSuite, strcmp(buf, activeLocale) == 0); +} + /** * Test Suite. It lists all the test functions. */ @@ -244,6 +262,7 @@ static const nlTest sTests[] = { NL_TEST_DEF("Test ConfigurationMgr::CountryCode", TestConfigurationMgr_CountryCode), NL_TEST_DEF("Test ConfigurationMgr::Breadcrumb", TestConfigurationMgr_Breadcrumb), NL_TEST_DEF("Test ConfigurationMgr::GetPrimaryMACAddress", TestConfigurationMgr_GetPrimaryMACAddress), + NL_TEST_DEF("Test ConfigurationMgr::ActiveLocale", TestConfigurationMgr_ActiveLocale), NL_TEST_SENTINEL() }; From 0307df397ec13e61e98a88af277074507895ad93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Kr=C3=B3lik?= <66667989+Damian-Nordic@users.noreply.github.com> Date: Mon, 10 Jan 2022 18:27:06 +0100 Subject: [PATCH 20/64] [mrp] Fix MRP after a recent refactoring (#13413) PR 11988 has broken StartTimer call in ReliableMessageMgr by passing a timestamp instead of a delay. Consequently, retransmissions stopped working. Also, it was not caught because unit tests call the timeout function explicitly instead of relying on the system layer. Fix the issue and enhance unit tests. Additionally, fix a crash on access to AsSecureSession() if a retransmission occurs during PASE or CASE. --- src/controller/CHIPDeviceController.cpp | 1 + src/messaging/ReliableMessageMgr.cpp | 7 +- src/messaging/tests/MessagingContext.h | 2 + .../tests/TestReliableMessageProtocol.cpp | 66 +++++++++---------- .../raw/tests/NetworkTestHelpers.cpp | 4 +- 5 files changed, 43 insertions(+), 37 deletions(-) diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 1cda177019ed19..6ca2ba0719d2bd 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -272,6 +272,7 @@ void DeviceController::OnFirstMessageDeliveryFailed(const SessionHandle & sessio { VerifyOrReturn(mState == State::Initialized, ChipLogError(Controller, "OnFirstMessageDeliveryFailed was called in incorrect state")); + VerifyOrReturn(session->GetSessionType() == Transport::Session::SessionType::kSecure); UpdateDevice(session->AsSecureSession()->GetPeerNodeId()); } diff --git a/src/messaging/ReliableMessageMgr.cpp b/src/messaging/ReliableMessageMgr.cpp index 4c696e891d7cd1..4869be51e4dbc9 100644 --- a/src/messaging/ReliableMessageMgr.cpp +++ b/src/messaging/ReliableMessageMgr.cpp @@ -35,6 +35,8 @@ #include #include +using namespace chip::System::Clock::Literals; + namespace chip { namespace Messaging { @@ -308,7 +310,10 @@ void ReliableMessageMgr::StartTimer() #endif StopTimer(); - VerifyOrDie(mSystemLayer->StartTimer(nextWakeTime, Timeout, this) == CHIP_NO_ERROR); + + const System::Clock::Timestamp now = System::SystemClock().GetMonotonicTimestamp(); + const auto nextWakeDelay = (nextWakeTime > now) ? nextWakeTime - now : 0_ms; + VerifyOrDie(mSystemLayer->StartTimer(nextWakeDelay, Timeout, this) == CHIP_NO_ERROR); } else { diff --git a/src/messaging/tests/MessagingContext.h b/src/messaging/tests/MessagingContext.h index be14c0a3f172fc..768fde0abb26f5 100644 --- a/src/messaging/tests/MessagingContext.h +++ b/src/messaging/tests/MessagingContext.h @@ -185,6 +185,8 @@ class LoopbackMessagingContext : public MessagingContext TransportMgrBase & GetTransportMgr() { return mTransportManager; } + IOContext & GetIOContext() { return mIOContext; } + /* * For unit-tests that simulate end-to-end transmission and reception of messages in loopback mode, * this mode better replicates a real-functioning stack that correctly handles the processing diff --git a/src/messaging/tests/TestReliableMessageProtocol.cpp b/src/messaging/tests/TestReliableMessageProtocol.cpp index 981c019880ed72..4eaa0f6f5c9d77 100644 --- a/src/messaging/tests/TestReliableMessageProtocol.cpp +++ b/src/messaging/tests/TestReliableMessageProtocol.cpp @@ -227,9 +227,8 @@ void CheckResendApplicationMessage(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, gLoopback.mDroppedMessageCount == 1); NL_TEST_ASSERT(inSuite, rm->TestGetCountRetransTable() == 1); - // sleep 65 ms to trigger first re-transmit - chip::test_utils::SleepMillis(65); - ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm); + // Wait for the first re-transmit (should take 64ms) + ctx.GetIOContext().DriveIOUntil(1000_ms32, [] { return gLoopback.mSentMessageCount >= 2; }); ctx.DrainAndServiceIO(); // Ensure the retransmit message was dropped, and is still there in the retransmit table @@ -238,9 +237,8 @@ void CheckResendApplicationMessage(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, gLoopback.mDroppedMessageCount == 2); NL_TEST_ASSERT(inSuite, rm->TestGetCountRetransTable() == 1); - // sleep another 65 ms to trigger second re-transmit - chip::test_utils::SleepMillis(65); - ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm); + // Wait for the second re-transmit (should take 64ms) + ctx.GetIOContext().DriveIOUntil(1000_ms32, [] { return gLoopback.mSentMessageCount >= 3; }); ctx.DrainAndServiceIO(); // Ensure the retransmit message was NOT dropped, and the retransmit table is empty, as we should have gotten an ack @@ -290,9 +288,8 @@ void CheckCloseExchangeAndResendApplicationMessage(nlTestSuite * inSuite, void * NL_TEST_ASSERT(inSuite, gLoopback.mDroppedMessageCount == 1); NL_TEST_ASSERT(inSuite, rm->TestGetCountRetransTable() == 1); - // sleep 65 ms to trigger first re-transmit - chip::test_utils::SleepMillis(65); - ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm); + // Wait for the first re-transmit (should take 64ms) + ctx.GetIOContext().DriveIOUntil(1000_ms32, [] { return gLoopback.mSentMessageCount >= 2; }); ctx.DrainAndServiceIO(); // Ensure the retransmit message was dropped, and is still there in the retransmit table @@ -301,9 +298,8 @@ void CheckCloseExchangeAndResendApplicationMessage(nlTestSuite * inSuite, void * NL_TEST_ASSERT(inSuite, gLoopback.mDroppedMessageCount == 2); NL_TEST_ASSERT(inSuite, rm->TestGetCountRetransTable() == 1); - // sleep another 65 ms to trigger second re-transmit - chip::test_utils::SleepMillis(65); - ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm); + // Wait for the second re-transmit (should take 64ms) + ctx.GetIOContext().DriveIOUntil(1000_ms32, [] { return gLoopback.mSentMessageCount >= 3; }); ctx.DrainAndServiceIO(); // Ensure the retransmit message was NOT dropped, and the retransmit table is empty, as we should have gotten an ack @@ -349,9 +345,8 @@ void CheckFailedMessageRetainOnSend(nlTestSuite * inSuite, void * inContext) // Ensure the message was dropped NL_TEST_ASSERT(inSuite, gLoopback.mDroppedMessageCount == 1); - // sleep 65 ms to trigger first re-transmit - chip::test_utils::SleepMillis(65); - ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm); + // Wait for the first re-transmit (should take 64ms) + ctx.GetIOContext().DriveIOUntil(1000_ms32, [] { return gLoopback.mSentMessageCount >= 2; }); ctx.DrainAndServiceIO(); // Ensure the retransmit table is empty, as we did not provide a message to retain @@ -441,9 +436,8 @@ void CheckResendApplicationMessageWithPeerExchange(nlTestSuite * inSuite, void * NL_TEST_ASSERT(inSuite, rm->TestGetCountRetransTable() == 1); NL_TEST_ASSERT(inSuite, !mockReceiver.IsOnMessageReceivedCalled); - // sleep 65 ms to trigger first re-transmit - chip::test_utils::SleepMillis(65); - ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm); + // Wait for the first re-transmit (should take 64ms) + ctx.GetIOContext().DriveIOUntil(1000_ms32, [] { return gLoopback.mSentMessageCount >= 2; }); ctx.DrainAndServiceIO(); // Ensure the retransmit message was not dropped, and is no longer in the retransmit table @@ -513,9 +507,8 @@ void CheckDuplicateMessageClosedExchange(nlTestSuite * inSuite, void * inContext err = ctx.GetExchangeManager().UnregisterUnsolicitedMessageHandlerForType(Echo::MsgType::EchoRequest); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); - // sleep 65 ms to trigger first re-transmit - chip::test_utils::SleepMillis(65); - ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm); + // Wait for the first re-transmit and ack (should take 64ms) + ctx.GetIOContext().DriveIOUntil(1000_ms32, [] { return gLoopback.mSentMessageCount >= 3; }); ctx.DrainAndServiceIO(); // Ensure the retransmit message was sent and the ack was sent @@ -574,9 +567,8 @@ void CheckResendSessionEstablishmentMessageWithPeerExchange(nlTestSuite * inSuit NL_TEST_ASSERT(inSuite, rm->TestGetCountRetransTable() == 1); NL_TEST_ASSERT(inSuite, !mockReceiver.IsOnMessageReceivedCalled); - // sleep 65 ms to trigger first re-transmit - chip::test_utils::SleepMillis(65); - ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm); + // Wait for the first re-transmit (should take 64ms) + inctx.GetIOContext().DriveIOUntil(1000_ms32, [] { return gLoopback.mSentMessageCount >= 2; }); inctx.DrainAndServiceIO(); // Ensure the retransmit message was not dropped, and is no longer in the retransmit table @@ -649,9 +641,8 @@ void CheckDuplicateMessage(nlTestSuite * inSuite, void * inContext) mockReceiver.mDropAckResponse = false; mockReceiver.mRetainExchange = false; - // sleep 65 ms to trigger first re-transmit - chip::test_utils::SleepMillis(65); - ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm); + // Wait for the first re-transmit and ack (should take 64ms) + ctx.GetIOContext().DriveIOUntil(1000_ms32, [] { return gLoopback.mSentMessageCount >= 3; }); ctx.DrainAndServiceIO(); // Ensure the retransmit message was sent and the ack was sent @@ -1186,9 +1177,8 @@ void CheckLostResponseWithPiggyback(nlTestSuite * inSuite, void * inContext) mockSender.IsOnMessageReceivedCalled = false; mockSender.mReceivedPiggybackAck = false; - // sleep 65 ms to trigger re-transmit from sender - chip::test_utils::SleepMillis(65); - ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm); + // Wait for re-transmit from sender and ack (should take 64ms) + ctx.GetIOContext().DriveIOUntil(1000_ms32, [] { return gLoopback.mSentMessageCount >= 4; }); ctx.DrainAndServiceIO(); // We resent our first message, which did not make it to the app-level @@ -1216,9 +1206,8 @@ void CheckLostResponseWithPiggyback(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, rm->TestGetCountRetransTable() == 0); } - // sleep 65*3 ms to trigger re-transmit from receiver - chip::test_utils::SleepMillis(65 * 3); - ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm); + // Wait for re-transmit from receiver (should take 256ms) + ctx.GetIOContext().DriveIOUntil(1000_ms32, [] { return gLoopback.mSentMessageCount >= 6; }); ctx.DrainAndServiceIO(); // And now we've definitely resent our response message, which should show @@ -1355,6 +1344,14 @@ void CheckLostStandaloneAck(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, rm->TestGetCountRetransTable() == 0); } +int InitializeTestCase(void * inContext) +{ + TestContext & ctx = *static_cast(inContext); + ctx.GetSessionAliceToBob()->AsSecureSession()->SetMRPConfig(gDefaultMRPConfig); + ctx.GetSessionBobToAlice()->AsSecureSession()->SetMRPConfig(gDefaultMRPConfig); + return SUCCESS; +} + /** * TODO: A test that we should have but can't write with the existing * infrastructure we have: @@ -1403,7 +1400,8 @@ nlTestSuite sSuite = "Test-CHIP-ReliableMessageProtocol", &sTests[0], TestContext::InitializeAsync, - TestContext::Finalize + TestContext::Finalize, + InitializeTestCase, }; // clang-format on diff --git a/src/transport/raw/tests/NetworkTestHelpers.cpp b/src/transport/raw/tests/NetworkTestHelpers.cpp index 02c08a7df72fe1..b29c33bc85de25 100644 --- a/src/transport/raw/tests/NetworkTestHelpers.cpp +++ b/src/transport/raw/tests/NetworkTestHelpers.cpp @@ -57,8 +57,8 @@ CHIP_ERROR IOContext::Shutdown() void IOContext::DriveIO() { - // Set the select timeout to 100ms - constexpr uint32_t kSleepTimeMilliseconds = 100; + // Set the select timeout to 10ms + constexpr uint32_t kSleepTimeMilliseconds = 10; ServiceEvents(kSleepTimeMilliseconds); } From 5053f2058e860ddea4ffc649494f54c5f8149fd0 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Mon, 10 Jan 2022 12:57:50 -0500 Subject: [PATCH 21/64] Regen zap (#13417) --- .../zap-generated/IMClusterCommandHandler.cpp | 46 ++----------------- 1 file changed, 3 insertions(+), 43 deletions(-) diff --git a/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp index d38a6c8f3883f0..55728b9df88554 100644 --- a/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp @@ -1297,49 +1297,9 @@ namespace OtaSoftwareUpdateProvider { void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - // The following variables are used for all commands to save code size. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - bool wasHandled = false; - { - switch (aCommandPath.mCommandId) - { - case Commands::ApplyUpdateRequest::Id: { - Commands::ApplyUpdateRequest::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = - emberAfOtaSoftwareUpdateProviderClusterApplyUpdateRequestCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::QueryImage::Id: { - Commands::QueryImage::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = emberAfOtaSoftwareUpdateProviderClusterQueryImageCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - default: { - // Unrecognized command ID, error status will apply. - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, - ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); - return; - } - } - } - - if (CHIP_NO_ERROR != TLVError || !wasHandled) - { - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); - ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); - } + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); } } // namespace OtaSoftwareUpdateProvider From 46cd8db3ec12e058e49db9d8accd9d873cb76b4d Mon Sep 17 00:00:00 2001 From: xBill Date: Tue, 11 Jan 2022 04:46:47 +0900 Subject: [PATCH 22/64] Fix lighting-app build error for nrf52840dongle (#13285) * Update for building nrf52840dongle with zephyr 2.7 * Fix example script not loading the board overlays * restyle update * Use array for params avoid empty string in param * fix style * update to support nrf52840 dongle * fix for restyle * limit dongle to lighting-app target; update test data * avoid empty args; fix root path * fix CMakeList.txt isntead of fixing the scripts --- .github/workflows/examples-nrfconnect.yaml | 8 ++ .../lighting-app/nrfconnect/CMakeLists.txt | 2 +- .../boards/nrf52840dongle_nrf52840.conf | 4 +- .../boards/nrf52840dongle_nrf52840.overlay | 28 +++++ .../lighting-app/nrfconnect/main/main.cpp | 4 +- examples/lock-app/nrfconnect/CMakeLists.txt | 2 +- .../pigweed-app/nrfconnect/CMakeLists.txt | 4 + examples/pump-app/nrfconnect/CMakeLists.txt | 2 +- .../nrfconnect/CMakeLists.txt | 2 +- examples/shell/nrfconnect/CMakeLists.txt | 4 + scripts/build/build/targets.py | 9 +- scripts/build/builders/nrf.py | 23 ++-- .../testdata/all_targets_except_host.txt | 25 +++-- .../build/testdata/build_all_except_host.txt | 104 ++++++++++-------- .../glob_star_targets_except_host.txt | 23 ++-- 15 files changed, 153 insertions(+), 91 deletions(-) create mode 100644 examples/lighting-app/nrfconnect/boards/nrf52840dongle_nrf52840.overlay diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml index 3ef75f5f7173da..02f49360b8ef12 100644 --- a/.github/workflows/examples-nrfconnect.yaml +++ b/.github/workflows/examples-nrfconnect.yaml @@ -80,6 +80,14 @@ jobs: nrfconnect nrf52840dk_nrf52840 lighting-app \ examples/lighting-app/nrfconnect/build/nrf52840dk_nrf52840/zephyr/zephyr.elf \ /tmp/bloat_reports/ + - name: Build example nRF Connect SDK Lighting App on nRF52840 Dongle + timeout-minutes: 10 + run: | + scripts/examples/nrfconnect_example.sh lighting-app nrf52840dongle_nrf52840 + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + nrfconnect nrf52840dongle_nrf52840 lighting-app \ + examples/lighting-app/nrfconnect/build/nrf52840dongle_nrf52840/zephyr/zephyr.elf \ + /tmp/bloat_reports/ - name: Build example nRF Connect SDK Lighting App on nRF52840 DK with RPC timeout-minutes: 10 run: | diff --git a/examples/lighting-app/nrfconnect/CMakeLists.txt b/examples/lighting-app/nrfconnect/CMakeLists.txt index 718ed198c3d727..ce3632847361a9 100644 --- a/examples/lighting-app/nrfconnect/CMakeLists.txt +++ b/examples/lighting-app/nrfconnect/CMakeLists.txt @@ -26,7 +26,7 @@ include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake) # Load NCS/Zephyr build system set(CONF_FILE ${CHIP_ROOT}/config/nrfconnect/app/sample-defaults.conf prj.conf) -if (EXISTS boards/${BOARD}.conf) +if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/boards/${BOARD}.conf) list(APPEND CONF_FILE boards/${BOARD}.conf) endif() diff --git a/examples/lighting-app/nrfconnect/boards/nrf52840dongle_nrf52840.conf b/examples/lighting-app/nrfconnect/boards/nrf52840dongle_nrf52840.conf index bd8daf3a18feac..eedaf10f20db02 100644 --- a/examples/lighting-app/nrfconnect/boards/nrf52840dongle_nrf52840.conf +++ b/examples/lighting-app/nrfconnect/boards/nrf52840dongle_nrf52840.conf @@ -19,11 +19,9 @@ CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y # Configure shell and logging over USB -CONFIG_USB=y -CONFIG_USB_UART_CONSOLE=y +CONFIG_USB_DEVICE_STACK=y CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_UART_LINE_CTRL=y -CONFIG_UART_SHELL_ON_DEV_NAME="CDC_ACM_0" CONFIG_SHELL_BACKEND_SERIAL_INIT_PRIORITY=51 # The minimal logging mode does not work properly with the USB CDC device, so use the deferred mode diff --git a/examples/lighting-app/nrfconnect/boards/nrf52840dongle_nrf52840.overlay b/examples/lighting-app/nrfconnect/boards/nrf52840dongle_nrf52840.overlay new file mode 100644 index 00000000000000..5ccdd5561121ca --- /dev/null +++ b/examples/lighting-app/nrfconnect/boards/nrf52840dongle_nrf52840.overlay @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/ { + chosen { + zephyr,shell-uart = &cdc_acm_uart0; + }; +}; + +&zephyr_udc0 { + cdc_acm_uart0: cdc_acm_uart0 { + compatible = "zephyr,cdc-acm-uart"; + label = "CDC_ACM_0"; + }; +}; diff --git a/examples/lighting-app/nrfconnect/main/main.cpp b/examples/lighting-app/nrfconnect/main/main.cpp index 1d2ae1530b813d..2ec7a58ff062a0 100644 --- a/examples/lighting-app/nrfconnect/main/main.cpp +++ b/examples/lighting-app/nrfconnect/main/main.cpp @@ -28,7 +28,7 @@ #include "Rpc.h" #endif -#ifdef CONFIG_USB +#ifdef CONFIG_USB_DEVICE_STACK #include #endif @@ -47,7 +47,7 @@ int main(void) int ret = 0; CHIP_ERROR err = CHIP_NO_ERROR; -#ifdef CONFIG_USB +#ifdef CONFIG_USB_DEVICE_STACK ret = usb_enable(nullptr); if (ret) { diff --git a/examples/lock-app/nrfconnect/CMakeLists.txt b/examples/lock-app/nrfconnect/CMakeLists.txt index b2a9f7de892e5a..0e72c2478f052a 100644 --- a/examples/lock-app/nrfconnect/CMakeLists.txt +++ b/examples/lock-app/nrfconnect/CMakeLists.txt @@ -25,7 +25,7 @@ include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake) # Load NCS/Zephyr build system set(CONF_FILE ${CHIP_ROOT}/config/nrfconnect/app/sample-defaults.conf prj.conf) -if (EXISTS boards/${BOARD}.conf) +if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/boards/${BOARD}.conf) list(APPEND CONF_FILE boards/${BOARD}.conf) endif() diff --git a/examples/pigweed-app/nrfconnect/CMakeLists.txt b/examples/pigweed-app/nrfconnect/CMakeLists.txt index 361ecc1b09aaca..596336d4886eb8 100644 --- a/examples/pigweed-app/nrfconnect/CMakeLists.txt +++ b/examples/pigweed-app/nrfconnect/CMakeLists.txt @@ -29,6 +29,10 @@ endif() list(APPEND ZEPHYR_EXTRA_MODULES ${CHIP_ROOT}/config/nrfconnect/chip-module) find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) +if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/boards/${BOARD}.conf) + list(APPEND CONF_FILE boards/${BOARD}.conf) +endif() + project(chip-nrf52840-pigweed-example) include(${CHIP_ROOT}/config/nrfconnect/app/enable-gnu-std.cmake) diff --git a/examples/pump-app/nrfconnect/CMakeLists.txt b/examples/pump-app/nrfconnect/CMakeLists.txt index 2fb43b984c0ec3..0b720f209c1eab 100644 --- a/examples/pump-app/nrfconnect/CMakeLists.txt +++ b/examples/pump-app/nrfconnect/CMakeLists.txt @@ -25,7 +25,7 @@ include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake) # Load NCS/Zephyr build system set(CONF_FILE ${CHIP_ROOT}/config/nrfconnect/app/sample-defaults.conf prj.conf) -if (EXISTS boards/${BOARD}.conf) +if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/boards/${BOARD}.conf) list(APPEND CONF_FILE boards/${BOARD}.conf) endif() diff --git a/examples/pump-controller-app/nrfconnect/CMakeLists.txt b/examples/pump-controller-app/nrfconnect/CMakeLists.txt index ca973b463c1fe7..cbae1f77e94f4f 100644 --- a/examples/pump-controller-app/nrfconnect/CMakeLists.txt +++ b/examples/pump-controller-app/nrfconnect/CMakeLists.txt @@ -25,7 +25,7 @@ include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake) # Load NCS/Zephyr build system set(CONF_FILE ${CHIP_ROOT}/config/nrfconnect/app/sample-defaults.conf prj.conf) -if (EXISTS boards/${BOARD}.conf) +if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/boards/${BOARD}.conf) list(APPEND CONF_FILE boards/${BOARD}.conf) endif() diff --git a/examples/shell/nrfconnect/CMakeLists.txt b/examples/shell/nrfconnect/CMakeLists.txt index c4da56a1880efe..9940b0973bd046 100644 --- a/examples/shell/nrfconnect/CMakeLists.txt +++ b/examples/shell/nrfconnect/CMakeLists.txt @@ -25,6 +25,10 @@ set(CONF_FILE ${CHIP_ROOT}/config/nrfconnect/app/sample-defaults.conf prj.conf) list(APPEND ZEPHYR_EXTRA_MODULES ${CHIP_ROOT}/config/nrfconnect/chip-module) find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) +if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/boards/${BOARD}.conf) + list(APPEND CONF_FILE boards/${BOARD}.conf) +endif() + project(chip-nrfconnect-shell-example) include(${CHIP_ROOT}/config/nrfconnect/app/enable-gnu-std.cmake) diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index 34b6eb2218352f..2ea91ae749ff8b 100644 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -266,10 +266,13 @@ def NrfTargets(): yield target.Extend('native-posix-64-tests', board=NrfBoard.NATIVE_POSIX_64, app=NrfApp.UNIT_TESTS) targets = [ - target.Extend('nrf5340', board=NrfBoard.NRF5340), - target.Extend('nrf52840', board=NrfBoard.NRF52840), + target.Extend('nrf5340dk', board=NrfBoard.NRF5340DK), + target.Extend('nrf52840dk', board=NrfBoard.NRF52840DK), ] + # Enable nrf52840dongle for lighting app only + yield target.Extend('nrf52840dongle-light', board=NrfBoard.NRF52840DONGLE, app=NrfApp.LIGHT) + for target in targets: yield target.Extend('lock', app=NrfApp.LOCK) yield target.Extend('light', app=NrfApp.LIGHT) @@ -279,7 +282,7 @@ def NrfTargets(): rpc = target.Extend('light-rpc', app=NrfApp.LIGHT, enable_rpcs=True) - if '-nrf5340-' in rpc.name: + if '-nrf5340dk-' in rpc.name: rpc = rpc.GlobBlacklist( 'Compile failure due to pw_build args not forwarded to proto compiler. https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/66760') diff --git a/scripts/build/builders/nrf.py b/scripts/build/builders/nrf.py index 24fcf9f7624853..a83d5fe5c98012 100644 --- a/scripts/build/builders/nrf.py +++ b/scripts/build/builders/nrf.py @@ -84,14 +84,17 @@ def FlashBundleName(self): class NrfBoard(Enum): - NRF52840 = auto() - NRF5340 = auto() + NRF52840DK = auto() + NRF52840DONGLE = auto() + NRF5340DK = auto() NATIVE_POSIX_64 = auto() def GnArgName(self): - if self == NrfBoard.NRF52840: + if self == NrfBoard.NRF52840DK: return 'nrf52840dk_nrf52840' - elif self == NrfBoard.NRF5340: + elif self == NrfBoard.NRF52840DONGLE: + return 'nrf52840dongle_nrf52840' + elif self == NrfBoard.NRF5340DK: return 'nrf5340dk_nrf5340_cpuapp' elif self == NrfBoard.NATIVE_POSIX_64: return 'native_posix_64' @@ -105,7 +108,7 @@ def __init__(self, root, runner, app: NrfApp = NrfApp.LIGHT, - board: NrfBoard = NrfBoard.NRF52840, + board: NrfBoard = NrfBoard.NRF52840DK, enable_rpcs: bool = False): super(NrfConnectBuilder, self).__init__(root, runner) self.app = app @@ -139,18 +142,22 @@ def generate(self): raise Exception('ZEPHYR_BASE validation failed') + overlays = [] + if self.enable_rpcs: + overlays.append("-DOVERLAY_CONFIG=rpc.overlay") + cmd = ''' source "$ZEPHYR_BASE/zephyr-env.sh"; export GNUARMEMB_TOOLCHAIN_PATH="$PW_PIGWEED_CIPD_INSTALL_DIR"; -west build --cmake-only -d {outdir} -b {board} {sourcedir}{rpcs} +west build --cmake-only -d {outdir} -b {board} {sourcedir}{overlayflags} '''.format( outdir=shlex.quote(self.output_dir), board=self.board.GnArgName(), sourcedir=shlex.quote(os.path.join( self.root, self.app.AppPath(), 'nrfconnect')), - rpcs=" -- -DOVERLAY_CONFIG=rpc.overlay" if self.enable_rpcs else "" + overlayflags=" -- " + + " ".join(overlays) if len(overlays) > 0 else "" ).strip() - self._Execute(['bash', '-c', cmd], title='Generating ' + self.identifier) diff --git a/scripts/build/testdata/all_targets_except_host.txt b/scripts/build/testdata/all_targets_except_host.txt index d57be9ffa95dd3..93bc704496e25c 100644 --- a/scripts/build/testdata/all_targets_except_host.txt +++ b/scripts/build/testdata/all_targets_except_host.txt @@ -97,18 +97,19 @@ mbed-CY8CPROTO_062_4343W-shell-debug (NOGLOB: Compile only for debugging purpose mbed-CY8CPROTO_062_4343W-shell-develop (NOGLOB: Compile only for debugging purpose - https://os.mbed.com/docs/mbed-os/latest/program-setup/build-profiles-and-rules.html) mbed-CY8CPROTO_062_4343W-shell-release nrf-native-posix-64-tests -nrf-nrf52840-light -nrf-nrf52840-light-rpc -nrf-nrf52840-lock -nrf-nrf52840-pump -nrf-nrf52840-pump-controller -nrf-nrf52840-shell -nrf-nrf5340-light -nrf-nrf5340-light-rpc (NOGLOB: Compile failure due to pw_build args not forwarded to proto compiler. https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/66760) -nrf-nrf5340-lock -nrf-nrf5340-pump -nrf-nrf5340-pump-controller -nrf-nrf5340-shell +nrf-nrf52840dk-light +nrf-nrf52840dk-light-rpc +nrf-nrf52840dk-lock +nrf-nrf52840dk-pump +nrf-nrf52840dk-pump-controller +nrf-nrf52840dk-shell +nrf-nrf52840dongle-light +nrf-nrf5340dk-light +nrf-nrf5340dk-light-rpc (NOGLOB: Compile failure due to pw_build args not forwarded to proto compiler. https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/66760) +nrf-nrf5340dk-lock +nrf-nrf5340dk-pump +nrf-nrf5340dk-pump-controller +nrf-nrf5340dk-shell qpg-qpg6100-lock telink-tlsr9518adk80d-light tizen-arm-light diff --git a/scripts/build/testdata/build_all_except_host.txt b/scripts/build/testdata/build_all_except_host.txt index dc2667b3769282..39a3d2a9eb69e8 100644 --- a/scripts/build/testdata/build_all_except_host.txt +++ b/scripts/build/testdata/build_all_except_host.txt @@ -564,65 +564,70 @@ bash -c 'source "$ZEPHYR_BASE/zephyr-env.sh"; export GNUARMEMB_TOOLCHAIN_PATH="$PW_PIGWEED_CIPD_INSTALL_DIR"; west build --cmake-only -d {out}/nrf-native-posix-64-tests -b native_posix_64 {root}/src/test_driver/nrfconnect' -# Generating nrf-nrf52840-light +# Generating nrf-nrf52840dk-light bash -c 'source "$ZEPHYR_BASE/zephyr-env.sh"; export GNUARMEMB_TOOLCHAIN_PATH="$PW_PIGWEED_CIPD_INSTALL_DIR"; -west build --cmake-only -d {out}/nrf-nrf52840-light -b nrf52840dk_nrf52840 {root}/examples/lighting-app/nrfconnect' +west build --cmake-only -d {out}/nrf-nrf52840dk-light -b nrf52840dk_nrf52840 {root}/examples/lighting-app/nrfconnect' -# Generating nrf-nrf52840-light-rpc +# Generating nrf-nrf52840dk-light-rpc bash -c 'source "$ZEPHYR_BASE/zephyr-env.sh"; export GNUARMEMB_TOOLCHAIN_PATH="$PW_PIGWEED_CIPD_INSTALL_DIR"; -west build --cmake-only -d {out}/nrf-nrf52840-light-rpc -b nrf52840dk_nrf52840 {root}/examples/lighting-app/nrfconnect -- -DOVERLAY_CONFIG=rpc.overlay' +west build --cmake-only -d {out}/nrf-nrf52840dk-light-rpc -b nrf52840dk_nrf52840 {root}/examples/lighting-app/nrfconnect -- -DOVERLAY_CONFIG=rpc.overlay' -# Generating nrf-nrf52840-lock +# Generating nrf-nrf52840dk-lock bash -c 'source "$ZEPHYR_BASE/zephyr-env.sh"; export GNUARMEMB_TOOLCHAIN_PATH="$PW_PIGWEED_CIPD_INSTALL_DIR"; -west build --cmake-only -d {out}/nrf-nrf52840-lock -b nrf52840dk_nrf52840 {root}/examples/lock-app/nrfconnect' +west build --cmake-only -d {out}/nrf-nrf52840dk-lock -b nrf52840dk_nrf52840 {root}/examples/lock-app/nrfconnect' -# Generating nrf-nrf52840-pump +# Generating nrf-nrf52840dk-pump bash -c 'source "$ZEPHYR_BASE/zephyr-env.sh"; export GNUARMEMB_TOOLCHAIN_PATH="$PW_PIGWEED_CIPD_INSTALL_DIR"; -west build --cmake-only -d {out}/nrf-nrf52840-pump -b nrf52840dk_nrf52840 {root}/examples/pump-app/nrfconnect' +west build --cmake-only -d {out}/nrf-nrf52840dk-pump -b nrf52840dk_nrf52840 {root}/examples/pump-app/nrfconnect' -# Generating nrf-nrf52840-pump-controller +# Generating nrf-nrf52840dk-pump-controller bash -c 'source "$ZEPHYR_BASE/zephyr-env.sh"; export GNUARMEMB_TOOLCHAIN_PATH="$PW_PIGWEED_CIPD_INSTALL_DIR"; -west build --cmake-only -d {out}/nrf-nrf52840-pump-controller -b nrf52840dk_nrf52840 {root}/examples/pump-controller-app/nrfconnect' +west build --cmake-only -d {out}/nrf-nrf52840dk-pump-controller -b nrf52840dk_nrf52840 {root}/examples/pump-controller-app/nrfconnect' -# Generating nrf-nrf52840-shell +# Generating nrf-nrf52840dk-shell bash -c 'source "$ZEPHYR_BASE/zephyr-env.sh"; export GNUARMEMB_TOOLCHAIN_PATH="$PW_PIGWEED_CIPD_INSTALL_DIR"; -west build --cmake-only -d {out}/nrf-nrf52840-shell -b nrf52840dk_nrf52840 {root}/examples/shell/nrfconnect' +west build --cmake-only -d {out}/nrf-nrf52840dk-shell -b nrf52840dk_nrf52840 {root}/examples/shell/nrfconnect' -# Generating nrf-nrf5340-light +# Generating nrf-nrf52840dongle-light bash -c 'source "$ZEPHYR_BASE/zephyr-env.sh"; export GNUARMEMB_TOOLCHAIN_PATH="$PW_PIGWEED_CIPD_INSTALL_DIR"; -west build --cmake-only -d {out}/nrf-nrf5340-light -b nrf5340dk_nrf5340_cpuapp {root}/examples/lighting-app/nrfconnect' +west build --cmake-only -d {out}/nrf-nrf52840dongle-light -b nrf52840dongle_nrf52840 {root}/examples/lighting-app/nrfconnect' -# Generating nrf-nrf5340-light-rpc +# Generating nrf-nrf5340dk-light bash -c 'source "$ZEPHYR_BASE/zephyr-env.sh"; export GNUARMEMB_TOOLCHAIN_PATH="$PW_PIGWEED_CIPD_INSTALL_DIR"; -west build --cmake-only -d {out}/nrf-nrf5340-light-rpc -b nrf5340dk_nrf5340_cpuapp {root}/examples/lighting-app/nrfconnect -- -DOVERLAY_CONFIG=rpc.overlay' +west build --cmake-only -d {out}/nrf-nrf5340dk-light -b nrf5340dk_nrf5340_cpuapp {root}/examples/lighting-app/nrfconnect' -# Generating nrf-nrf5340-lock +# Generating nrf-nrf5340dk-light-rpc bash -c 'source "$ZEPHYR_BASE/zephyr-env.sh"; export GNUARMEMB_TOOLCHAIN_PATH="$PW_PIGWEED_CIPD_INSTALL_DIR"; -west build --cmake-only -d {out}/nrf-nrf5340-lock -b nrf5340dk_nrf5340_cpuapp {root}/examples/lock-app/nrfconnect' +west build --cmake-only -d {out}/nrf-nrf5340dk-light-rpc -b nrf5340dk_nrf5340_cpuapp {root}/examples/lighting-app/nrfconnect -- -DOVERLAY_CONFIG=rpc.overlay' -# Generating nrf-nrf5340-pump +# Generating nrf-nrf5340dk-lock bash -c 'source "$ZEPHYR_BASE/zephyr-env.sh"; export GNUARMEMB_TOOLCHAIN_PATH="$PW_PIGWEED_CIPD_INSTALL_DIR"; -west build --cmake-only -d {out}/nrf-nrf5340-pump -b nrf5340dk_nrf5340_cpuapp {root}/examples/pump-app/nrfconnect' +west build --cmake-only -d {out}/nrf-nrf5340dk-lock -b nrf5340dk_nrf5340_cpuapp {root}/examples/lock-app/nrfconnect' -# Generating nrf-nrf5340-pump-controller +# Generating nrf-nrf5340dk-pump bash -c 'source "$ZEPHYR_BASE/zephyr-env.sh"; export GNUARMEMB_TOOLCHAIN_PATH="$PW_PIGWEED_CIPD_INSTALL_DIR"; -west build --cmake-only -d {out}/nrf-nrf5340-pump-controller -b nrf5340dk_nrf5340_cpuapp {root}/examples/pump-controller-app/nrfconnect' +west build --cmake-only -d {out}/nrf-nrf5340dk-pump -b nrf5340dk_nrf5340_cpuapp {root}/examples/pump-app/nrfconnect' -# Generating nrf-nrf5340-shell +# Generating nrf-nrf5340dk-pump-controller bash -c 'source "$ZEPHYR_BASE/zephyr-env.sh"; export GNUARMEMB_TOOLCHAIN_PATH="$PW_PIGWEED_CIPD_INSTALL_DIR"; -west build --cmake-only -d {out}/nrf-nrf5340-shell -b nrf5340dk_nrf5340_cpuapp {root}/examples/shell/nrfconnect' +west build --cmake-only -d {out}/nrf-nrf5340dk-pump-controller -b nrf5340dk_nrf5340_cpuapp {root}/examples/pump-controller-app/nrfconnect' + +# Generating nrf-nrf5340dk-shell +bash -c 'source "$ZEPHYR_BASE/zephyr-env.sh"; +export GNUARMEMB_TOOLCHAIN_PATH="$PW_PIGWEED_CIPD_INSTALL_DIR"; +west build --cmake-only -d {out}/nrf-nrf5340dk-shell -b nrf5340dk_nrf5340_cpuapp {root}/examples/shell/nrfconnect' # Generating qpg-qpg6100-lock gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lock-app/qpg {out}/qpg-qpg6100-lock @@ -1164,41 +1169,44 @@ ninja -C {out}/nrf-native-posix-64-tests # Run Tests nrf-native-posix-64-tests ctest --build-nocmake -V --output-on-failure --test-dir {out}/nrf-native-posix-64-tests -# Building nrf-nrf52840-light -ninja -C {out}/nrf-nrf52840-light +# Building nrf-nrf52840dk-light +ninja -C {out}/nrf-nrf52840dk-light + +# Building nrf-nrf52840dk-light-rpc +ninja -C {out}/nrf-nrf52840dk-light-rpc -# Building nrf-nrf52840-light-rpc -ninja -C {out}/nrf-nrf52840-light-rpc +# Building nrf-nrf52840dk-lock +ninja -C {out}/nrf-nrf52840dk-lock -# Building nrf-nrf52840-lock -ninja -C {out}/nrf-nrf52840-lock +# Building nrf-nrf52840dk-pump +ninja -C {out}/nrf-nrf52840dk-pump -# Building nrf-nrf52840-pump -ninja -C {out}/nrf-nrf52840-pump +# Building nrf-nrf52840dk-pump-controller +ninja -C {out}/nrf-nrf52840dk-pump-controller -# Building nrf-nrf52840-pump-controller -ninja -C {out}/nrf-nrf52840-pump-controller +# Building nrf-nrf52840dk-shell +ninja -C {out}/nrf-nrf52840dk-shell -# Building nrf-nrf52840-shell -ninja -C {out}/nrf-nrf52840-shell +# Building nrf-nrf52840dongle-light +ninja -C {out}/nrf-nrf52840dongle-light -# Building nrf-nrf5340-light -ninja -C {out}/nrf-nrf5340-light +# Building nrf-nrf5340dk-light +ninja -C {out}/nrf-nrf5340dk-light -# Building nrf-nrf5340-light-rpc -ninja -C {out}/nrf-nrf5340-light-rpc +# Building nrf-nrf5340dk-light-rpc +ninja -C {out}/nrf-nrf5340dk-light-rpc -# Building nrf-nrf5340-lock -ninja -C {out}/nrf-nrf5340-lock +# Building nrf-nrf5340dk-lock +ninja -C {out}/nrf-nrf5340dk-lock -# Building nrf-nrf5340-pump -ninja -C {out}/nrf-nrf5340-pump +# Building nrf-nrf5340dk-pump +ninja -C {out}/nrf-nrf5340dk-pump -# Building nrf-nrf5340-pump-controller -ninja -C {out}/nrf-nrf5340-pump-controller +# Building nrf-nrf5340dk-pump-controller +ninja -C {out}/nrf-nrf5340dk-pump-controller -# Building nrf-nrf5340-shell -ninja -C {out}/nrf-nrf5340-shell +# Building nrf-nrf5340dk-shell +ninja -C {out}/nrf-nrf5340dk-shell # Building qpg-qpg6100-lock ninja -C {out}/qpg-qpg6100-lock diff --git a/scripts/build/testdata/glob_star_targets_except_host.txt b/scripts/build/testdata/glob_star_targets_except_host.txt index 4e35246d9f2abf..72e609ffe3ee2a 100644 --- a/scripts/build/testdata/glob_star_targets_except_host.txt +++ b/scripts/build/testdata/glob_star_targets_except_host.txt @@ -43,17 +43,18 @@ mbed-CY8CPROTO_062_4343W-lock-release mbed-CY8CPROTO_062_4343W-pigweed-release mbed-CY8CPROTO_062_4343W-shell-release nrf-native-posix-64-tests -nrf-nrf52840-light -nrf-nrf52840-light-rpc -nrf-nrf52840-lock -nrf-nrf52840-pump -nrf-nrf52840-pump-controller -nrf-nrf52840-shell -nrf-nrf5340-light -nrf-nrf5340-lock -nrf-nrf5340-pump -nrf-nrf5340-pump-controller -nrf-nrf5340-shell +nrf-nrf52840dk-light +nrf-nrf52840dk-light-rpc +nrf-nrf52840dk-lock +nrf-nrf52840dk-pump +nrf-nrf52840dk-pump-controller +nrf-nrf52840dk-shell +nrf-nrf52840dongle-light +nrf-nrf5340dk-light +nrf-nrf5340dk-lock +nrf-nrf5340dk-pump +nrf-nrf5340dk-pump-controller +nrf-nrf5340dk-shell qpg-qpg6100-lock telink-tlsr9518adk80d-light tizen-arm-light From 416b98e2811a59e07a6967531f2b951c07479121 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Mon, 10 Jan 2022 15:42:26 -0500 Subject: [PATCH 23/64] Roll pigweed forward (was rolled back by #13382) (#13424) --- third_party/pigweed/repo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/pigweed/repo b/third_party/pigweed/repo index 444f6d0df8a002..f30bce8bf2513e 160000 --- a/third_party/pigweed/repo +++ b/third_party/pigweed/repo @@ -1 +1 @@ -Subproject commit 444f6d0df8a002a7c577066dcb1eca939c0a6b13 +Subproject commit f30bce8bf2513e924f461da6f2e7d1f2620a89f3 From 4a1f48152cec81ed12aaf83ff5c4a785c7582dc6 Mon Sep 17 00:00:00 2001 From: kowsisoundhar12 <57476670+kowsisoundhar12@users.noreply.github.com> Date: Tue, 11 Jan 2022 02:14:41 +0530 Subject: [PATCH 24/64] Test added jan 10 (#13421) * Removed disabled tag * Added auto generated files --- .../suites/certification/Test_TC_CC_2_1.yaml | 8 - .../suites/certification/Test_TC_PCC_2_1.yaml | 1 + .../suites/certification/Test_TC_RH_2_1.yaml | 2 - .../certification/Test_TC_SWDIAG_3_1.yaml | 2 - .../suites/certification/Test_TC_TM_2_1.yaml | 1 - .../Framework/CHIPTests/CHIPClustersTests.m | 527 +++++- .../chip-tool/zap-generated/test/Commands.h | 1592 +++++++++++------ 7 files changed, 1485 insertions(+), 648 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml index dd361720c8a759..0cca35681ba801 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml @@ -642,7 +642,6 @@ tests: maxLength: 254 - label: "Write the default values to optional attribute: CompensationText" - disabled: true optional: true command: "writeAttribute" attribute: "compensation text" @@ -652,7 +651,6 @@ tests: error: UNSUPPORTED_WRITE - label: "Reads back optional attribute: CompensationText" - disabled: true optional: true command: "readAttribute" attribute: "compensation text" @@ -1205,7 +1203,6 @@ tests: type: uint8 - label: "Write the default optional attribute: ColorPointRIntensity" - disabled: true optional: true command: "writeAttribute" attribute: "color point r intensity" @@ -1213,7 +1210,6 @@ tests: value: 0 - label: "Read back the optional attribute: ColorPointRIntensity" - disabled: true optional: true command: "readAttribute" attribute: "color point r intensity" @@ -1277,7 +1273,6 @@ tests: type: uint8 - label: "Write the default optional attribute: ColorPointGIntensity" - disabled: true optional: true command: "writeAttribute" attribute: "color point g intensity" @@ -1285,7 +1280,6 @@ tests: value: 0 - label: "Read back the optional attribute: ColorPointGIntensity" - disabled: true optional: true command: "readAttribute" attribute: "color point g intensity" @@ -1349,7 +1343,6 @@ tests: type: uint8 - label: "Write the default optional attribute: ColorPointBIntensity" - disabled: true optional: true command: "writeAttribute" attribute: "color point b intensity" @@ -1357,7 +1350,6 @@ tests: value: 0 - label: "Read back the optional attribute: ColorPointBIntensity" - disabled: true optional: true command: "readAttribute" attribute: "color point b intensity" diff --git a/src/app/tests/suites/certification/Test_TC_PCC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_PCC_2_1.yaml index fdafc4fa0ee42f..d91a0f0cb347af 100644 --- a/src/app/tests/suites/certification/Test_TC_PCC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PCC_2_1.yaml @@ -245,6 +245,7 @@ tests: constraints: type: int16 + #issue #11670 Null check is not implemented in YAML framework. - label: "read the optional attribute: MinConstPressure" disabled: true optional: true diff --git a/src/app/tests/suites/certification/Test_TC_RH_2_1.yaml b/src/app/tests/suites/certification/Test_TC_RH_2_1.yaml index 919f11558a5589..63b676924a2bd2 100644 --- a/src/app/tests/suites/certification/Test_TC_RH_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RH_2_1.yaml @@ -71,7 +71,6 @@ tests: maxValue: 10000 - label: "Reads the optional attribute: Tolerance" - disabled: true optional: true command: "readAttribute" attribute: "tolerance" @@ -79,7 +78,6 @@ tests: value: 0 - label: "Reads constraints of attribute: Tolerance" - disabled: true optional: true command: "readAttribute" attribute: "tolerance" diff --git a/src/app/tests/suites/certification/Test_TC_SWDIAG_3_1.yaml b/src/app/tests/suites/certification/Test_TC_SWDIAG_3_1.yaml index c9143709264272..4a850969f8000f 100644 --- a/src/app/tests/suites/certification/Test_TC_SWDIAG_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SWDIAG_3_1.yaml @@ -40,7 +40,6 @@ tests: value: 0 - label: "Reads CurrentHeapUsed attribute value from DUT" - disabled: true optional: true command: "readAttribute" attribute: "CurrentHeapUsed" @@ -49,7 +48,6 @@ tests: value: 0 - label: "Reads CurrentHeapHighWaterMark attribute value from DUT" - disabled: true optional: true command: "readAttribute" attribute: "CurrentHeapHighWatermark" diff --git a/src/app/tests/suites/certification/Test_TC_TM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_TM_2_1.yaml index e186215f18b52a..46a9e8fa7d0bdb 100644 --- a/src/app/tests/suites/certification/Test_TC_TM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TM_2_1.yaml @@ -51,7 +51,6 @@ tests: maxValue: 32767 - label: "read the optional attribute: Tolerance" - disabled: true optional: true command: "readAttribute" attribute: "Tolerance" diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index 8fbd9503867479..2bfaa3eff9c4fd 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -2858,7 +2858,64 @@ - (void)testSendClusterTest_TC_CC_2_1_000073_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000074_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000074_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write the default values to optional attribute: CompensationText"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id compensationTextArgument; + compensationTextArgument = @""; + [cluster + writeAttributeCompensationTextWithValue:compensationTextArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write the default values to optional attribute: CompensationText Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_2_1_000075_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Reads back optional attribute: CompensationText"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeCompensationTextWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads back optional attribute: CompensationText Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertTrue([actualValue isEqualToString:@""]); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_2_1_000076_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: NumberOfPrimaries"]; @@ -2884,7 +2941,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000074_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000075_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000077_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default mandatory attribute: NumberOfPrimaries"]; @@ -2906,7 +2963,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000075_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000076_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000078_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the mandatory attribute: NumberOfPrimaries"]; @@ -2930,7 +2987,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000076_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000077_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000079_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary1X"]; @@ -2956,7 +3013,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000077_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000078_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000080_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default mandatory attribute: Primary1X"]; @@ -2977,7 +3034,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000078_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000079_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000081_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the mandatory attribute: Primary1X"]; @@ -3001,7 +3058,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000079_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000080_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000082_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary1Y"]; @@ -3027,7 +3084,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000080_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000081_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000083_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default mandatory attribute: Primary1Y"]; @@ -3048,7 +3105,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000081_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000082_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000084_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the mandatory attribute: Primary1Y"]; @@ -3072,7 +3129,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000082_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000083_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000085_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary1Intensity"]; @@ -3091,7 +3148,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000083_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000084_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000086_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary2X"]; @@ -3117,7 +3174,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000084_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000085_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000087_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default mandatory attribute: Primary2X"]; @@ -3138,7 +3195,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000085_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000086_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000088_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the mandatory attribute: Primary2X"]; @@ -3162,7 +3219,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000086_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000087_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000089_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary2Y"]; @@ -3188,7 +3245,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000087_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000088_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000090_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default mandatory attribute: Primary2Y"]; @@ -3209,7 +3266,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000088_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000089_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000091_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the mandatory attribute: Primary2Y"]; @@ -3233,7 +3290,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000089_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000090_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000092_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Validate constraints of attribute: Primary2Intensity"]; @@ -3252,7 +3309,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000090_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000091_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000093_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary3X"]; @@ -3278,7 +3335,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000091_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000092_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000094_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default mandatory attribute: Primary3X"]; @@ -3299,7 +3356,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000092_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000093_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000095_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the mandatory attribute: Primary3X"]; @@ -3323,7 +3380,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000093_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000094_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000096_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary3Y"]; @@ -3349,7 +3406,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000094_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000095_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000097_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default mandatory attribute: Primary3Y"]; @@ -3370,7 +3427,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000095_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000096_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000098_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the mandatory attribute: Primary3Y"]; @@ -3394,7 +3451,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000096_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000097_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000099_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary3Intensity"]; @@ -3413,7 +3470,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000097_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000098_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000100_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary4X"]; @@ -3439,7 +3496,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000098_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000099_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000101_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default mandatory attribute: Primary4X"]; @@ -3460,7 +3517,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000099_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000100_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000102_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the mandatory attribute: Primary4X"]; @@ -3484,7 +3541,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000100_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000101_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000103_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary4Y"]; @@ -3510,7 +3567,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000101_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000102_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000104_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default mandatory attribute: Primary4Y"]; @@ -3531,7 +3588,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000102_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000103_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000105_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the mandatory attribute: Primary4Y"]; @@ -3555,7 +3612,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000103_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000104_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000106_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary4Intensity"]; @@ -3574,7 +3631,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000104_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000105_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000107_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary5X"]; @@ -3600,7 +3657,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000105_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000106_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000108_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default mandatory attribute: Primary5X"]; @@ -3621,7 +3678,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000106_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000107_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000109_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the mandatory attribute: Primary5X"]; @@ -3645,7 +3702,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000107_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000108_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000110_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary5Y"]; @@ -3671,7 +3728,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000108_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000109_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000111_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default mandatory attribute: Primary5Y"]; @@ -3692,7 +3749,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000109_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000110_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000112_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the mandatory attribute: Primary5Y"]; @@ -3716,7 +3773,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000110_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000111_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000113_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary5Intensity"]; @@ -3735,7 +3792,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000111_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000112_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000114_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary6X"]; @@ -3761,7 +3818,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000112_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000113_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000115_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default mandatory attribute: Primary6X"]; @@ -3782,7 +3839,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000113_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000114_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000116_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the mandatory attribute: Primary6X"]; @@ -3806,7 +3863,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000114_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000115_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000117_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary6Y"]; @@ -3832,7 +3889,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000115_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000116_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000118_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default mandatory attribute: Primary6Y"]; @@ -3853,7 +3910,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000116_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000117_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000119_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the mandatory attribute: Primary6Y"]; @@ -3877,7 +3934,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000117_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000118_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000120_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: Primary6Intensity"]; @@ -3896,7 +3953,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000118_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000119_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000121_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the optional attribute: WhitePointX"]; @@ -3927,7 +3984,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000119_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000120_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000122_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default optional attribute: WhitePointX"]; @@ -3954,7 +4011,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000120_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000121_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000123_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the optional attribute: WhitePointX"]; @@ -3983,7 +4040,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000121_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000122_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000124_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the optional attribute: WhitePointY"]; @@ -4014,7 +4071,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000122_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000123_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000125_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default optional attribute: WhitePointY"]; @@ -4041,7 +4098,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000123_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000124_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000126_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the optional attribute: WhitePointY"]; @@ -4070,7 +4127,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000124_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000125_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000127_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the optional attribute: ColorPointRX"]; @@ -4101,7 +4158,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000125_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000126_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000128_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default optional attribute: ColorPointRX"]; @@ -4128,7 +4185,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000126_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000127_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000129_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the optional attribute: ColorPointRX"]; @@ -4157,7 +4214,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000127_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000128_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000130_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the optional attribute: ColorPointRY"]; @@ -4188,7 +4245,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000128_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000129_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000131_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default optional attribute: ColorPointRY"]; @@ -4215,7 +4272,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000129_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000130_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000132_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the optional attribute: ColorPointRY"]; @@ -4244,7 +4301,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000130_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000131_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000133_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the optional attribute: ColorPointRIntensity"]; @@ -4268,7 +4325,64 @@ - (void)testSendClusterTest_TC_CC_2_1_000131_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000132_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000134_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write the default optional attribute: ColorPointRIntensity"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id colorPointRIntensityArgument; + colorPointRIntensityArgument = [NSNumber numberWithUnsignedChar:0]; + [cluster writeAttributeColorPointRIntensityWithValue:colorPointRIntensityArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write the default optional attribute: ColorPointRIntensity Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_2_1_000135_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the optional attribute: ColorPointRIntensity"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeColorPointRIntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read back the optional attribute: ColorPointRIntensity Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_2_1_000136_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the optional attribute: ColorPointGX"]; @@ -4299,7 +4413,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000132_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000133_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000137_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default optional attribute: ColorPointGX"]; @@ -4326,7 +4440,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000133_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000134_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000138_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the optional attribute: ColorPointGX"]; @@ -4355,7 +4469,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000134_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000135_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000139_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the optional attribute: ColorPointGY"]; @@ -4386,7 +4500,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000135_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000136_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000140_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default optional attribute: ColorPointGY"]; @@ -4413,7 +4527,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000136_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000137_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000141_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the optional attribute: ColorPointGY"]; @@ -4442,7 +4556,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000137_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000138_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000142_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the optional attribute: ColorPointGIntensity"]; @@ -4466,7 +4580,64 @@ - (void)testSendClusterTest_TC_CC_2_1_000138_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000139_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000143_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write the default optional attribute: ColorPointGIntensity"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id colorPointGIntensityArgument; + colorPointGIntensityArgument = [NSNumber numberWithUnsignedChar:0]; + [cluster writeAttributeColorPointGIntensityWithValue:colorPointGIntensityArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write the default optional attribute: ColorPointGIntensity Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_2_1_000144_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the optional attribute: ColorPointGIntensity"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeColorPointGIntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read back the optional attribute: ColorPointGIntensity Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_2_1_000145_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the optional attribute: ColorPointBX"]; @@ -4497,7 +4668,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000139_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000140_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000146_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default optional attribute: ColorPointBX"]; @@ -4524,7 +4695,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000140_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000141_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000147_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the optional attribute: ColorPointBX"]; @@ -4553,7 +4724,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000141_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000142_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000148_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the optional attribute: ColorPointBY"]; @@ -4584,7 +4755,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000142_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000143_WriteAttribute +- (void)testSendClusterTest_TC_CC_2_1_000149_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write the default optional attribute: ColorPointBY"]; @@ -4611,7 +4782,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000143_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000144_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000150_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the optional attribute: ColorPointBY"]; @@ -4640,7 +4811,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000144_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_2_1_000145_ReadAttribute +- (void)testSendClusterTest_TC_CC_2_1_000151_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the optional attribute: ColorPointBIntensity"]; @@ -4664,6 +4835,63 @@ - (void)testSendClusterTest_TC_CC_2_1_000145_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterTest_TC_CC_2_1_000152_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write the default optional attribute: ColorPointBIntensity"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id colorPointBIntensityArgument; + colorPointBIntensityArgument = [NSNumber numberWithUnsignedChar:0]; + [cluster writeAttributeColorPointBIntensityWithValue:colorPointBIntensityArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write the default optional attribute: ColorPointBIntensity Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_2_1_000153_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read back the optional attribute: ColorPointBIntensity"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeColorPointBIntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read back the optional attribute: ColorPointBIntensity Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} - (void)testSendClusterTest_TC_CC_3_1_000000_WaitForCommissionee { @@ -15967,6 +16195,70 @@ - (void)testSendClusterTest_TC_RH_2_1_000002_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterTest_TC_RH_2_1_000003_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the optional attribute: Tolerance"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestRelativeHumidityMeasurement * cluster = [[CHIPTestRelativeHumidityMeasurement alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the optional attribute: Tolerance Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_RH_2_1_000004_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Reads constraints of attribute: Tolerance"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestRelativeHumidityMeasurement * cluster = [[CHIPTestRelativeHumidityMeasurement alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads constraints of attribute: Tolerance Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue unsignedShortValue], 2048U); + } + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} - (void)testSendClusterTest_TC_RH_2_2_000000_WaitForCommissionee { @@ -16155,6 +16447,39 @@ - (void)testSendClusterTest_TC_TM_2_1_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterTest_TC_TM_2_1_000002_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: Tolerance"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional attribute: Tolerance Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue unsignedShortValue], 2048U); + } + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} - (void)testSendClusterTest_TC_TM_2_2_000000_WaitForCommissionee { @@ -37675,6 +38000,64 @@ - (void)testSendClusterTest_TC_SWDIAG_3_1_000000_WaitForCommissionee WaitForCommissionee(expectation, queue); [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterTest_TC_SWDIAG_3_1_000001_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Reads CurrentHeapUsed attribute value from DUT"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestSoftwareDiagnostics * cluster = [[CHIPTestSoftwareDiagnostics alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeCurrentHeapUsedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads CurrentHeapUsed attribute value from DUT Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedLongLongValue], 0ULL); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWDIAG_3_1_000002_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Reads CurrentHeapHighWaterMark attribute value from DUT"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestSoftwareDiagnostics * cluster = [[CHIPTestSoftwareDiagnostics alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeCurrentHeapHighWatermarkWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads CurrentHeapHighWaterMark attribute value from DUT Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedLongLongValue], 0ULL); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} - (void)testSendClusterTestSubscribe_OnOff_000000_WaitForCommissionee { diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 61c9cb76bb5d95..231836632c25c0 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -1999,292 +1999,324 @@ class Test_TC_CC_2_1 : public TestCommand err = TestReadTheOptionalAttributeCompensationText_73(); break; case 74: - ChipLogProgress(chipTool, " ***** Test Step 74 : Read the mandatory attribute: NumberOfPrimaries\n"); - err = TestReadTheMandatoryAttributeNumberOfPrimaries_74(); + ChipLogProgress(chipTool, " ***** Test Step 74 : Write the default values to optional attribute: CompensationText\n"); + err = TestWriteTheDefaultValuesToOptionalAttributeCompensationText_74(); break; case 75: - ChipLogProgress(chipTool, " ***** Test Step 75 : Write the default mandatory attribute: NumberOfPrimaries\n"); - err = TestWriteTheDefaultMandatoryAttributeNumberOfPrimaries_75(); + ChipLogProgress(chipTool, " ***** Test Step 75 : Reads back optional attribute: CompensationText\n"); + err = TestReadsBackOptionalAttributeCompensationText_75(); break; case 76: - ChipLogProgress(chipTool, " ***** Test Step 76 : Read back the mandatory attribute: NumberOfPrimaries\n"); - err = TestReadBackTheMandatoryAttributeNumberOfPrimaries_76(); + ChipLogProgress(chipTool, " ***** Test Step 76 : Read the mandatory attribute: NumberOfPrimaries\n"); + err = TestReadTheMandatoryAttributeNumberOfPrimaries_76(); break; case 77: - ChipLogProgress(chipTool, " ***** Test Step 77 : Read the mandatory attribute: Primary1X\n"); - err = TestReadTheMandatoryAttributePrimary1X_77(); + ChipLogProgress(chipTool, " ***** Test Step 77 : Write the default mandatory attribute: NumberOfPrimaries\n"); + err = TestWriteTheDefaultMandatoryAttributeNumberOfPrimaries_77(); break; case 78: - ChipLogProgress(chipTool, " ***** Test Step 78 : Write the default mandatory attribute: Primary1X\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary1X_78(); + ChipLogProgress(chipTool, " ***** Test Step 78 : Read back the mandatory attribute: NumberOfPrimaries\n"); + err = TestReadBackTheMandatoryAttributeNumberOfPrimaries_78(); break; case 79: - ChipLogProgress(chipTool, " ***** Test Step 79 : Read back the mandatory attribute: Primary1X\n"); - err = TestReadBackTheMandatoryAttributePrimary1X_79(); + ChipLogProgress(chipTool, " ***** Test Step 79 : Read the mandatory attribute: Primary1X\n"); + err = TestReadTheMandatoryAttributePrimary1X_79(); break; case 80: - ChipLogProgress(chipTool, " ***** Test Step 80 : Read the mandatory attribute: Primary1Y\n"); - err = TestReadTheMandatoryAttributePrimary1Y_80(); + ChipLogProgress(chipTool, " ***** Test Step 80 : Write the default mandatory attribute: Primary1X\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary1X_80(); break; case 81: - ChipLogProgress(chipTool, " ***** Test Step 81 : Write the default mandatory attribute: Primary1Y\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary1Y_81(); + ChipLogProgress(chipTool, " ***** Test Step 81 : Read back the mandatory attribute: Primary1X\n"); + err = TestReadBackTheMandatoryAttributePrimary1X_81(); break; case 82: - ChipLogProgress(chipTool, " ***** Test Step 82 : Read back the mandatory attribute: Primary1Y\n"); - err = TestReadBackTheMandatoryAttributePrimary1Y_82(); + ChipLogProgress(chipTool, " ***** Test Step 82 : Read the mandatory attribute: Primary1Y\n"); + err = TestReadTheMandatoryAttributePrimary1Y_82(); break; case 83: - ChipLogProgress(chipTool, " ***** Test Step 83 : Read the mandatory attribute: Primary1Intensity\n"); - err = TestReadTheMandatoryAttributePrimary1Intensity_83(); + ChipLogProgress(chipTool, " ***** Test Step 83 : Write the default mandatory attribute: Primary1Y\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary1Y_83(); break; case 84: - ChipLogProgress(chipTool, " ***** Test Step 84 : Read the mandatory attribute: Primary2X\n"); - err = TestReadTheMandatoryAttributePrimary2X_84(); + ChipLogProgress(chipTool, " ***** Test Step 84 : Read back the mandatory attribute: Primary1Y\n"); + err = TestReadBackTheMandatoryAttributePrimary1Y_84(); break; case 85: - ChipLogProgress(chipTool, " ***** Test Step 85 : Write the default mandatory attribute: Primary2X\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary2X_85(); + ChipLogProgress(chipTool, " ***** Test Step 85 : Read the mandatory attribute: Primary1Intensity\n"); + err = TestReadTheMandatoryAttributePrimary1Intensity_85(); break; case 86: - ChipLogProgress(chipTool, " ***** Test Step 86 : Read back the mandatory attribute: Primary2X\n"); - err = TestReadBackTheMandatoryAttributePrimary2X_86(); + ChipLogProgress(chipTool, " ***** Test Step 86 : Read the mandatory attribute: Primary2X\n"); + err = TestReadTheMandatoryAttributePrimary2X_86(); break; case 87: - ChipLogProgress(chipTool, " ***** Test Step 87 : Read the mandatory attribute: Primary2Y\n"); - err = TestReadTheMandatoryAttributePrimary2Y_87(); + ChipLogProgress(chipTool, " ***** Test Step 87 : Write the default mandatory attribute: Primary2X\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary2X_87(); break; case 88: - ChipLogProgress(chipTool, " ***** Test Step 88 : Write the default mandatory attribute: Primary2Y\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary2Y_88(); + ChipLogProgress(chipTool, " ***** Test Step 88 : Read back the mandatory attribute: Primary2X\n"); + err = TestReadBackTheMandatoryAttributePrimary2X_88(); break; case 89: - ChipLogProgress(chipTool, " ***** Test Step 89 : Read back the mandatory attribute: Primary2Y\n"); - err = TestReadBackTheMandatoryAttributePrimary2Y_89(); + ChipLogProgress(chipTool, " ***** Test Step 89 : Read the mandatory attribute: Primary2Y\n"); + err = TestReadTheMandatoryAttributePrimary2Y_89(); break; case 90: - ChipLogProgress(chipTool, " ***** Test Step 90 : Validate constraints of attribute: Primary2Intensity\n"); - err = TestValidateConstraintsOfAttributePrimary2Intensity_90(); + ChipLogProgress(chipTool, " ***** Test Step 90 : Write the default mandatory attribute: Primary2Y\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary2Y_90(); break; case 91: - ChipLogProgress(chipTool, " ***** Test Step 91 : Read the mandatory attribute: Primary3X\n"); - err = TestReadTheMandatoryAttributePrimary3X_91(); + ChipLogProgress(chipTool, " ***** Test Step 91 : Read back the mandatory attribute: Primary2Y\n"); + err = TestReadBackTheMandatoryAttributePrimary2Y_91(); break; case 92: - ChipLogProgress(chipTool, " ***** Test Step 92 : Write the default mandatory attribute: Primary3X\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary3X_92(); + ChipLogProgress(chipTool, " ***** Test Step 92 : Validate constraints of attribute: Primary2Intensity\n"); + err = TestValidateConstraintsOfAttributePrimary2Intensity_92(); break; case 93: - ChipLogProgress(chipTool, " ***** Test Step 93 : Read back the mandatory attribute: Primary3X\n"); - err = TestReadBackTheMandatoryAttributePrimary3X_93(); + ChipLogProgress(chipTool, " ***** Test Step 93 : Read the mandatory attribute: Primary3X\n"); + err = TestReadTheMandatoryAttributePrimary3X_93(); break; case 94: - ChipLogProgress(chipTool, " ***** Test Step 94 : Read the mandatory attribute: Primary3Y\n"); - err = TestReadTheMandatoryAttributePrimary3Y_94(); + ChipLogProgress(chipTool, " ***** Test Step 94 : Write the default mandatory attribute: Primary3X\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary3X_94(); break; case 95: - ChipLogProgress(chipTool, " ***** Test Step 95 : Write the default mandatory attribute: Primary3Y\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary3Y_95(); + ChipLogProgress(chipTool, " ***** Test Step 95 : Read back the mandatory attribute: Primary3X\n"); + err = TestReadBackTheMandatoryAttributePrimary3X_95(); break; case 96: - ChipLogProgress(chipTool, " ***** Test Step 96 : Read back the mandatory attribute: Primary3Y\n"); - err = TestReadBackTheMandatoryAttributePrimary3Y_96(); + ChipLogProgress(chipTool, " ***** Test Step 96 : Read the mandatory attribute: Primary3Y\n"); + err = TestReadTheMandatoryAttributePrimary3Y_96(); break; case 97: - ChipLogProgress(chipTool, " ***** Test Step 97 : Read the mandatory attribute: Primary3Intensity\n"); - err = TestReadTheMandatoryAttributePrimary3Intensity_97(); + ChipLogProgress(chipTool, " ***** Test Step 97 : Write the default mandatory attribute: Primary3Y\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary3Y_97(); break; case 98: - ChipLogProgress(chipTool, " ***** Test Step 98 : Read the mandatory attribute: Primary4X\n"); - err = TestReadTheMandatoryAttributePrimary4X_98(); + ChipLogProgress(chipTool, " ***** Test Step 98 : Read back the mandatory attribute: Primary3Y\n"); + err = TestReadBackTheMandatoryAttributePrimary3Y_98(); break; case 99: - ChipLogProgress(chipTool, " ***** Test Step 99 : Write the default mandatory attribute: Primary4X\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary4X_99(); + ChipLogProgress(chipTool, " ***** Test Step 99 : Read the mandatory attribute: Primary3Intensity\n"); + err = TestReadTheMandatoryAttributePrimary3Intensity_99(); break; case 100: - ChipLogProgress(chipTool, " ***** Test Step 100 : Read back the mandatory attribute: Primary4X\n"); - err = TestReadBackTheMandatoryAttributePrimary4X_100(); + ChipLogProgress(chipTool, " ***** Test Step 100 : Read the mandatory attribute: Primary4X\n"); + err = TestReadTheMandatoryAttributePrimary4X_100(); break; case 101: - ChipLogProgress(chipTool, " ***** Test Step 101 : Read the mandatory attribute: Primary4Y\n"); - err = TestReadTheMandatoryAttributePrimary4Y_101(); + ChipLogProgress(chipTool, " ***** Test Step 101 : Write the default mandatory attribute: Primary4X\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary4X_101(); break; case 102: - ChipLogProgress(chipTool, " ***** Test Step 102 : Write the default mandatory attribute: Primary4Y\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary4Y_102(); + ChipLogProgress(chipTool, " ***** Test Step 102 : Read back the mandatory attribute: Primary4X\n"); + err = TestReadBackTheMandatoryAttributePrimary4X_102(); break; case 103: - ChipLogProgress(chipTool, " ***** Test Step 103 : Read back the mandatory attribute: Primary4Y\n"); - err = TestReadBackTheMandatoryAttributePrimary4Y_103(); + ChipLogProgress(chipTool, " ***** Test Step 103 : Read the mandatory attribute: Primary4Y\n"); + err = TestReadTheMandatoryAttributePrimary4Y_103(); break; case 104: - ChipLogProgress(chipTool, " ***** Test Step 104 : Read the mandatory attribute: Primary4Intensity\n"); - err = TestReadTheMandatoryAttributePrimary4Intensity_104(); + ChipLogProgress(chipTool, " ***** Test Step 104 : Write the default mandatory attribute: Primary4Y\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary4Y_104(); break; case 105: - ChipLogProgress(chipTool, " ***** Test Step 105 : Read the mandatory attribute: Primary5X\n"); - err = TestReadTheMandatoryAttributePrimary5X_105(); + ChipLogProgress(chipTool, " ***** Test Step 105 : Read back the mandatory attribute: Primary4Y\n"); + err = TestReadBackTheMandatoryAttributePrimary4Y_105(); break; case 106: - ChipLogProgress(chipTool, " ***** Test Step 106 : Write the default mandatory attribute: Primary5X\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary5X_106(); + ChipLogProgress(chipTool, " ***** Test Step 106 : Read the mandatory attribute: Primary4Intensity\n"); + err = TestReadTheMandatoryAttributePrimary4Intensity_106(); break; case 107: - ChipLogProgress(chipTool, " ***** Test Step 107 : Read back the mandatory attribute: Primary5X\n"); - err = TestReadBackTheMandatoryAttributePrimary5X_107(); + ChipLogProgress(chipTool, " ***** Test Step 107 : Read the mandatory attribute: Primary5X\n"); + err = TestReadTheMandatoryAttributePrimary5X_107(); break; case 108: - ChipLogProgress(chipTool, " ***** Test Step 108 : Read the mandatory attribute: Primary5Y\n"); - err = TestReadTheMandatoryAttributePrimary5Y_108(); + ChipLogProgress(chipTool, " ***** Test Step 108 : Write the default mandatory attribute: Primary5X\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary5X_108(); break; case 109: - ChipLogProgress(chipTool, " ***** Test Step 109 : Write the default mandatory attribute: Primary5Y\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary5Y_109(); + ChipLogProgress(chipTool, " ***** Test Step 109 : Read back the mandatory attribute: Primary5X\n"); + err = TestReadBackTheMandatoryAttributePrimary5X_109(); break; case 110: - ChipLogProgress(chipTool, " ***** Test Step 110 : Read back the mandatory attribute: Primary5Y\n"); - err = TestReadBackTheMandatoryAttributePrimary5Y_110(); + ChipLogProgress(chipTool, " ***** Test Step 110 : Read the mandatory attribute: Primary5Y\n"); + err = TestReadTheMandatoryAttributePrimary5Y_110(); break; case 111: - ChipLogProgress(chipTool, " ***** Test Step 111 : Read the mandatory attribute: Primary5Intensity\n"); - err = TestReadTheMandatoryAttributePrimary5Intensity_111(); + ChipLogProgress(chipTool, " ***** Test Step 111 : Write the default mandatory attribute: Primary5Y\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary5Y_111(); break; case 112: - ChipLogProgress(chipTool, " ***** Test Step 112 : Read the mandatory attribute: Primary6X\n"); - err = TestReadTheMandatoryAttributePrimary6X_112(); + ChipLogProgress(chipTool, " ***** Test Step 112 : Read back the mandatory attribute: Primary5Y\n"); + err = TestReadBackTheMandatoryAttributePrimary5Y_112(); break; case 113: - ChipLogProgress(chipTool, " ***** Test Step 113 : Write the default mandatory attribute: Primary6X\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary6X_113(); + ChipLogProgress(chipTool, " ***** Test Step 113 : Read the mandatory attribute: Primary5Intensity\n"); + err = TestReadTheMandatoryAttributePrimary5Intensity_113(); break; case 114: - ChipLogProgress(chipTool, " ***** Test Step 114 : Read back the mandatory attribute: Primary6X\n"); - err = TestReadBackTheMandatoryAttributePrimary6X_114(); + ChipLogProgress(chipTool, " ***** Test Step 114 : Read the mandatory attribute: Primary6X\n"); + err = TestReadTheMandatoryAttributePrimary6X_114(); break; case 115: - ChipLogProgress(chipTool, " ***** Test Step 115 : Read the mandatory attribute: Primary6Y\n"); - err = TestReadTheMandatoryAttributePrimary6Y_115(); + ChipLogProgress(chipTool, " ***** Test Step 115 : Write the default mandatory attribute: Primary6X\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary6X_115(); break; case 116: - ChipLogProgress(chipTool, " ***** Test Step 116 : Write the default mandatory attribute: Primary6Y\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary6Y_116(); + ChipLogProgress(chipTool, " ***** Test Step 116 : Read back the mandatory attribute: Primary6X\n"); + err = TestReadBackTheMandatoryAttributePrimary6X_116(); break; case 117: - ChipLogProgress(chipTool, " ***** Test Step 117 : Read back the mandatory attribute: Primary6Y\n"); - err = TestReadBackTheMandatoryAttributePrimary6Y_117(); + ChipLogProgress(chipTool, " ***** Test Step 117 : Read the mandatory attribute: Primary6Y\n"); + err = TestReadTheMandatoryAttributePrimary6Y_117(); break; case 118: - ChipLogProgress(chipTool, " ***** Test Step 118 : Read the mandatory attribute: Primary6Intensity\n"); - err = TestReadTheMandatoryAttributePrimary6Intensity_118(); + ChipLogProgress(chipTool, " ***** Test Step 118 : Write the default mandatory attribute: Primary6Y\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary6Y_118(); break; case 119: - ChipLogProgress(chipTool, " ***** Test Step 119 : Read the optional attribute: WhitePointX\n"); - err = TestReadTheOptionalAttributeWhitePointX_119(); + ChipLogProgress(chipTool, " ***** Test Step 119 : Read back the mandatory attribute: Primary6Y\n"); + err = TestReadBackTheMandatoryAttributePrimary6Y_119(); break; case 120: - ChipLogProgress(chipTool, " ***** Test Step 120 : Write the default optional attribute: WhitePointX\n"); - err = TestWriteTheDefaultOptionalAttributeWhitePointX_120(); + ChipLogProgress(chipTool, " ***** Test Step 120 : Read the mandatory attribute: Primary6Intensity\n"); + err = TestReadTheMandatoryAttributePrimary6Intensity_120(); break; case 121: - ChipLogProgress(chipTool, " ***** Test Step 121 : Read back the optional attribute: WhitePointX\n"); - err = TestReadBackTheOptionalAttributeWhitePointX_121(); + ChipLogProgress(chipTool, " ***** Test Step 121 : Read the optional attribute: WhitePointX\n"); + err = TestReadTheOptionalAttributeWhitePointX_121(); break; case 122: - ChipLogProgress(chipTool, " ***** Test Step 122 : Read the optional attribute: WhitePointY\n"); - err = TestReadTheOptionalAttributeWhitePointY_122(); + ChipLogProgress(chipTool, " ***** Test Step 122 : Write the default optional attribute: WhitePointX\n"); + err = TestWriteTheDefaultOptionalAttributeWhitePointX_122(); break; case 123: - ChipLogProgress(chipTool, " ***** Test Step 123 : Write the default optional attribute: WhitePointY\n"); - err = TestWriteTheDefaultOptionalAttributeWhitePointY_123(); + ChipLogProgress(chipTool, " ***** Test Step 123 : Read back the optional attribute: WhitePointX\n"); + err = TestReadBackTheOptionalAttributeWhitePointX_123(); break; case 124: - ChipLogProgress(chipTool, " ***** Test Step 124 : Read back the optional attribute: WhitePointY\n"); - err = TestReadBackTheOptionalAttributeWhitePointY_124(); + ChipLogProgress(chipTool, " ***** Test Step 124 : Read the optional attribute: WhitePointY\n"); + err = TestReadTheOptionalAttributeWhitePointY_124(); break; case 125: - ChipLogProgress(chipTool, " ***** Test Step 125 : Read the optional attribute: ColorPointRX\n"); - err = TestReadTheOptionalAttributeColorPointRX_125(); + ChipLogProgress(chipTool, " ***** Test Step 125 : Write the default optional attribute: WhitePointY\n"); + err = TestWriteTheDefaultOptionalAttributeWhitePointY_125(); break; case 126: - ChipLogProgress(chipTool, " ***** Test Step 126 : Write the default optional attribute: ColorPointRX\n"); - err = TestWriteTheDefaultOptionalAttributeColorPointRX_126(); + ChipLogProgress(chipTool, " ***** Test Step 126 : Read back the optional attribute: WhitePointY\n"); + err = TestReadBackTheOptionalAttributeWhitePointY_126(); break; case 127: - ChipLogProgress(chipTool, " ***** Test Step 127 : Read back the optional attribute: ColorPointRX\n"); - err = TestReadBackTheOptionalAttributeColorPointRX_127(); + ChipLogProgress(chipTool, " ***** Test Step 127 : Read the optional attribute: ColorPointRX\n"); + err = TestReadTheOptionalAttributeColorPointRX_127(); break; case 128: - ChipLogProgress(chipTool, " ***** Test Step 128 : Read the optional attribute: ColorPointRY\n"); - err = TestReadTheOptionalAttributeColorPointRY_128(); + ChipLogProgress(chipTool, " ***** Test Step 128 : Write the default optional attribute: ColorPointRX\n"); + err = TestWriteTheDefaultOptionalAttributeColorPointRX_128(); break; case 129: - ChipLogProgress(chipTool, " ***** Test Step 129 : Write the default optional attribute: ColorPointRY\n"); - err = TestWriteTheDefaultOptionalAttributeColorPointRY_129(); + ChipLogProgress(chipTool, " ***** Test Step 129 : Read back the optional attribute: ColorPointRX\n"); + err = TestReadBackTheOptionalAttributeColorPointRX_129(); break; case 130: - ChipLogProgress(chipTool, " ***** Test Step 130 : Read back the optional attribute: ColorPointRY\n"); - err = TestReadBackTheOptionalAttributeColorPointRY_130(); + ChipLogProgress(chipTool, " ***** Test Step 130 : Read the optional attribute: ColorPointRY\n"); + err = TestReadTheOptionalAttributeColorPointRY_130(); break; case 131: - ChipLogProgress(chipTool, " ***** Test Step 131 : Read the optional attribute: ColorPointRIntensity\n"); - err = TestReadTheOptionalAttributeColorPointRIntensity_131(); + ChipLogProgress(chipTool, " ***** Test Step 131 : Write the default optional attribute: ColorPointRY\n"); + err = TestWriteTheDefaultOptionalAttributeColorPointRY_131(); break; case 132: - ChipLogProgress(chipTool, " ***** Test Step 132 : Read the optional attribute: ColorPointGX\n"); - err = TestReadTheOptionalAttributeColorPointGX_132(); + ChipLogProgress(chipTool, " ***** Test Step 132 : Read back the optional attribute: ColorPointRY\n"); + err = TestReadBackTheOptionalAttributeColorPointRY_132(); break; case 133: - ChipLogProgress(chipTool, " ***** Test Step 133 : Write the default optional attribute: ColorPointGX\n"); - err = TestWriteTheDefaultOptionalAttributeColorPointGX_133(); + ChipLogProgress(chipTool, " ***** Test Step 133 : Read the optional attribute: ColorPointRIntensity\n"); + err = TestReadTheOptionalAttributeColorPointRIntensity_133(); break; case 134: - ChipLogProgress(chipTool, " ***** Test Step 134 : Read back the optional attribute: ColorPointGX\n"); - err = TestReadBackTheOptionalAttributeColorPointGX_134(); + ChipLogProgress(chipTool, " ***** Test Step 134 : Write the default optional attribute: ColorPointRIntensity\n"); + err = TestWriteTheDefaultOptionalAttributeColorPointRIntensity_134(); break; case 135: - ChipLogProgress(chipTool, " ***** Test Step 135 : Read the optional attribute: ColorPointGY\n"); - err = TestReadTheOptionalAttributeColorPointGY_135(); + ChipLogProgress(chipTool, " ***** Test Step 135 : Read back the optional attribute: ColorPointRIntensity\n"); + err = TestReadBackTheOptionalAttributeColorPointRIntensity_135(); break; case 136: - ChipLogProgress(chipTool, " ***** Test Step 136 : Write the default optional attribute: ColorPointGY\n"); - err = TestWriteTheDefaultOptionalAttributeColorPointGY_136(); + ChipLogProgress(chipTool, " ***** Test Step 136 : Read the optional attribute: ColorPointGX\n"); + err = TestReadTheOptionalAttributeColorPointGX_136(); break; case 137: - ChipLogProgress(chipTool, " ***** Test Step 137 : Read back the optional attribute: ColorPointGY\n"); - err = TestReadBackTheOptionalAttributeColorPointGY_137(); + ChipLogProgress(chipTool, " ***** Test Step 137 : Write the default optional attribute: ColorPointGX\n"); + err = TestWriteTheDefaultOptionalAttributeColorPointGX_137(); break; case 138: - ChipLogProgress(chipTool, " ***** Test Step 138 : Read the optional attribute: ColorPointGIntensity\n"); - err = TestReadTheOptionalAttributeColorPointGIntensity_138(); + ChipLogProgress(chipTool, " ***** Test Step 138 : Read back the optional attribute: ColorPointGX\n"); + err = TestReadBackTheOptionalAttributeColorPointGX_138(); break; case 139: - ChipLogProgress(chipTool, " ***** Test Step 139 : Read the optional attribute: ColorPointBX\n"); - err = TestReadTheOptionalAttributeColorPointBX_139(); + ChipLogProgress(chipTool, " ***** Test Step 139 : Read the optional attribute: ColorPointGY\n"); + err = TestReadTheOptionalAttributeColorPointGY_139(); break; case 140: - ChipLogProgress(chipTool, " ***** Test Step 140 : Write the default optional attribute: ColorPointBX\n"); - err = TestWriteTheDefaultOptionalAttributeColorPointBX_140(); + ChipLogProgress(chipTool, " ***** Test Step 140 : Write the default optional attribute: ColorPointGY\n"); + err = TestWriteTheDefaultOptionalAttributeColorPointGY_140(); break; case 141: - ChipLogProgress(chipTool, " ***** Test Step 141 : Read back the optional attribute: ColorPointBX\n"); - err = TestReadBackTheOptionalAttributeColorPointBX_141(); + ChipLogProgress(chipTool, " ***** Test Step 141 : Read back the optional attribute: ColorPointGY\n"); + err = TestReadBackTheOptionalAttributeColorPointGY_141(); break; case 142: - ChipLogProgress(chipTool, " ***** Test Step 142 : Read the optional attribute: ColorPointBY\n"); - err = TestReadTheOptionalAttributeColorPointBY_142(); + ChipLogProgress(chipTool, " ***** Test Step 142 : Read the optional attribute: ColorPointGIntensity\n"); + err = TestReadTheOptionalAttributeColorPointGIntensity_142(); break; case 143: - ChipLogProgress(chipTool, " ***** Test Step 143 : Write the default optional attribute: ColorPointBY\n"); - err = TestWriteTheDefaultOptionalAttributeColorPointBY_143(); + ChipLogProgress(chipTool, " ***** Test Step 143 : Write the default optional attribute: ColorPointGIntensity\n"); + err = TestWriteTheDefaultOptionalAttributeColorPointGIntensity_143(); break; case 144: - ChipLogProgress(chipTool, " ***** Test Step 144 : Read back the optional attribute: ColorPointBY\n"); - err = TestReadBackTheOptionalAttributeColorPointBY_144(); + ChipLogProgress(chipTool, " ***** Test Step 144 : Read back the optional attribute: ColorPointGIntensity\n"); + err = TestReadBackTheOptionalAttributeColorPointGIntensity_144(); break; case 145: - ChipLogProgress(chipTool, " ***** Test Step 145 : Read the optional attribute: ColorPointBIntensity\n"); - err = TestReadTheOptionalAttributeColorPointBIntensity_145(); + ChipLogProgress(chipTool, " ***** Test Step 145 : Read the optional attribute: ColorPointBX\n"); + err = TestReadTheOptionalAttributeColorPointBX_145(); + break; + case 146: + ChipLogProgress(chipTool, " ***** Test Step 146 : Write the default optional attribute: ColorPointBX\n"); + err = TestWriteTheDefaultOptionalAttributeColorPointBX_146(); + break; + case 147: + ChipLogProgress(chipTool, " ***** Test Step 147 : Read back the optional attribute: ColorPointBX\n"); + err = TestReadBackTheOptionalAttributeColorPointBX_147(); + break; + case 148: + ChipLogProgress(chipTool, " ***** Test Step 148 : Read the optional attribute: ColorPointBY\n"); + err = TestReadTheOptionalAttributeColorPointBY_148(); + break; + case 149: + ChipLogProgress(chipTool, " ***** Test Step 149 : Write the default optional attribute: ColorPointBY\n"); + err = TestWriteTheDefaultOptionalAttributeColorPointBY_149(); + break; + case 150: + ChipLogProgress(chipTool, " ***** Test Step 150 : Read back the optional attribute: ColorPointBY\n"); + err = TestReadBackTheOptionalAttributeColorPointBY_150(); + break; + case 151: + ChipLogProgress(chipTool, " ***** Test Step 151 : Read the optional attribute: ColorPointBIntensity\n"); + err = TestReadTheOptionalAttributeColorPointBIntensity_151(); + break; + case 152: + ChipLogProgress(chipTool, " ***** Test Step 152 : Write the default optional attribute: ColorPointBIntensity\n"); + err = TestWriteTheDefaultOptionalAttributeColorPointBIntensity_152(); + break; + case 153: + ChipLogProgress(chipTool, " ***** Test Step 153 : Read back the optional attribute: ColorPointBIntensity\n"); + err = TestReadBackTheOptionalAttributeColorPointBIntensity_153(); break; } @@ -2297,7 +2329,7 @@ class Test_TC_CC_2_1 : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 146; + const uint16_t mTestCount = 154; chip::Optional mCluster; chip::Optional mEndpoint; @@ -2983,17 +3015,17 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_74(status); } - static void OnSuccessCallback_74(void * context, uint8_t numberOfPrimaries) - { - (static_cast(context))->OnSuccessResponse_74(numberOfPrimaries); - } + static void OnSuccessCallback_74(void * context) { (static_cast(context))->OnSuccessResponse_74(); } static void OnFailureCallback_75(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_75(status); } - static void OnSuccessCallback_75(void * context) { (static_cast(context))->OnSuccessResponse_75(); } + static void OnSuccessCallback_75(void * context, chip::CharSpan compensationText) + { + (static_cast(context))->OnSuccessResponse_75(compensationText); + } static void OnFailureCallback_76(void * context, EmberAfStatus status) { @@ -3010,17 +3042,17 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_77(status); } - static void OnSuccessCallback_77(void * context, uint16_t primary1X) - { - (static_cast(context))->OnSuccessResponse_77(primary1X); - } + static void OnSuccessCallback_77(void * context) { (static_cast(context))->OnSuccessResponse_77(); } static void OnFailureCallback_78(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_78(status); } - static void OnSuccessCallback_78(void * context) { (static_cast(context))->OnSuccessResponse_78(); } + static void OnSuccessCallback_78(void * context, uint8_t numberOfPrimaries) + { + (static_cast(context))->OnSuccessResponse_78(numberOfPrimaries); + } static void OnFailureCallback_79(void * context, EmberAfStatus status) { @@ -3037,17 +3069,17 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_80(status); } - static void OnSuccessCallback_80(void * context, uint16_t primary1Y) - { - (static_cast(context))->OnSuccessResponse_80(primary1Y); - } + static void OnSuccessCallback_80(void * context) { (static_cast(context))->OnSuccessResponse_80(); } static void OnFailureCallback_81(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_81(status); } - static void OnSuccessCallback_81(void * context) { (static_cast(context))->OnSuccessResponse_81(); } + static void OnSuccessCallback_81(void * context, uint16_t primary1X) + { + (static_cast(context))->OnSuccessResponse_81(primary1X); + } static void OnFailureCallback_82(void * context, EmberAfStatus status) { @@ -3064,19 +3096,16 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_83(status); } - static void OnSuccessCallback_83(void * context, uint8_t primary1Intensity) - { - (static_cast(context))->OnSuccessResponse_83(primary1Intensity); - } + static void OnSuccessCallback_83(void * context) { (static_cast(context))->OnSuccessResponse_83(); } static void OnFailureCallback_84(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_84(status); } - static void OnSuccessCallback_84(void * context, uint16_t primary2X) + static void OnSuccessCallback_84(void * context, uint16_t primary1Y) { - (static_cast(context))->OnSuccessResponse_84(primary2X); + (static_cast(context))->OnSuccessResponse_84(primary1Y); } static void OnFailureCallback_85(void * context, EmberAfStatus status) @@ -3084,7 +3113,10 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_85(status); } - static void OnSuccessCallback_85(void * context) { (static_cast(context))->OnSuccessResponse_85(); } + static void OnSuccessCallback_85(void * context, uint8_t primary1Intensity) + { + (static_cast(context))->OnSuccessResponse_85(primary1Intensity); + } static void OnFailureCallback_86(void * context, EmberAfStatus status) { @@ -3101,17 +3133,17 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_87(status); } - static void OnSuccessCallback_87(void * context, uint16_t primary2Y) - { - (static_cast(context))->OnSuccessResponse_87(primary2Y); - } + static void OnSuccessCallback_87(void * context) { (static_cast(context))->OnSuccessResponse_87(); } static void OnFailureCallback_88(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_88(status); } - static void OnSuccessCallback_88(void * context) { (static_cast(context))->OnSuccessResponse_88(); } + static void OnSuccessCallback_88(void * context, uint16_t primary2X) + { + (static_cast(context))->OnSuccessResponse_88(primary2X); + } static void OnFailureCallback_89(void * context, EmberAfStatus status) { @@ -3128,19 +3160,16 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_90(status); } - static void OnSuccessCallback_90(void * context, uint8_t primary2Intensity) - { - (static_cast(context))->OnSuccessResponse_90(primary2Intensity); - } + static void OnSuccessCallback_90(void * context) { (static_cast(context))->OnSuccessResponse_90(); } static void OnFailureCallback_91(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_91(status); } - static void OnSuccessCallback_91(void * context, uint16_t primary3X) + static void OnSuccessCallback_91(void * context, uint16_t primary2Y) { - (static_cast(context))->OnSuccessResponse_91(primary3X); + (static_cast(context))->OnSuccessResponse_91(primary2Y); } static void OnFailureCallback_92(void * context, EmberAfStatus status) @@ -3148,7 +3177,10 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_92(status); } - static void OnSuccessCallback_92(void * context) { (static_cast(context))->OnSuccessResponse_92(); } + static void OnSuccessCallback_92(void * context, uint8_t primary2Intensity) + { + (static_cast(context))->OnSuccessResponse_92(primary2Intensity); + } static void OnFailureCallback_93(void * context, EmberAfStatus status) { @@ -3165,17 +3197,17 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_94(status); } - static void OnSuccessCallback_94(void * context, uint16_t primary3Y) - { - (static_cast(context))->OnSuccessResponse_94(primary3Y); - } + static void OnSuccessCallback_94(void * context) { (static_cast(context))->OnSuccessResponse_94(); } static void OnFailureCallback_95(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_95(status); } - static void OnSuccessCallback_95(void * context) { (static_cast(context))->OnSuccessResponse_95(); } + static void OnSuccessCallback_95(void * context, uint16_t primary3X) + { + (static_cast(context))->OnSuccessResponse_95(primary3X); + } static void OnFailureCallback_96(void * context, EmberAfStatus status) { @@ -3192,19 +3224,16 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_97(status); } - static void OnSuccessCallback_97(void * context, uint8_t primary3Intensity) - { - (static_cast(context))->OnSuccessResponse_97(primary3Intensity); - } + static void OnSuccessCallback_97(void * context) { (static_cast(context))->OnSuccessResponse_97(); } static void OnFailureCallback_98(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_98(status); } - static void OnSuccessCallback_98(void * context, uint16_t primary4X) + static void OnSuccessCallback_98(void * context, uint16_t primary3Y) { - (static_cast(context))->OnSuccessResponse_98(primary4X); + (static_cast(context))->OnSuccessResponse_98(primary3Y); } static void OnFailureCallback_99(void * context, EmberAfStatus status) @@ -3212,7 +3241,10 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_99(status); } - static void OnSuccessCallback_99(void * context) { (static_cast(context))->OnSuccessResponse_99(); } + static void OnSuccessCallback_99(void * context, uint8_t primary3Intensity) + { + (static_cast(context))->OnSuccessResponse_99(primary3Intensity); + } static void OnFailureCallback_100(void * context, EmberAfStatus status) { @@ -3229,17 +3261,17 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_101(status); } - static void OnSuccessCallback_101(void * context, uint16_t primary4Y) - { - (static_cast(context))->OnSuccessResponse_101(primary4Y); - } + static void OnSuccessCallback_101(void * context) { (static_cast(context))->OnSuccessResponse_101(); } static void OnFailureCallback_102(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_102(status); } - static void OnSuccessCallback_102(void * context) { (static_cast(context))->OnSuccessResponse_102(); } + static void OnSuccessCallback_102(void * context, uint16_t primary4X) + { + (static_cast(context))->OnSuccessResponse_102(primary4X); + } static void OnFailureCallback_103(void * context, EmberAfStatus status) { @@ -3256,19 +3288,16 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_104(status); } - static void OnSuccessCallback_104(void * context, uint8_t primary4Intensity) - { - (static_cast(context))->OnSuccessResponse_104(primary4Intensity); - } + static void OnSuccessCallback_104(void * context) { (static_cast(context))->OnSuccessResponse_104(); } static void OnFailureCallback_105(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_105(status); } - static void OnSuccessCallback_105(void * context, uint16_t primary5X) + static void OnSuccessCallback_105(void * context, uint16_t primary4Y) { - (static_cast(context))->OnSuccessResponse_105(primary5X); + (static_cast(context))->OnSuccessResponse_105(primary4Y); } static void OnFailureCallback_106(void * context, EmberAfStatus status) @@ -3276,7 +3305,10 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_106(status); } - static void OnSuccessCallback_106(void * context) { (static_cast(context))->OnSuccessResponse_106(); } + static void OnSuccessCallback_106(void * context, uint8_t primary4Intensity) + { + (static_cast(context))->OnSuccessResponse_106(primary4Intensity); + } static void OnFailureCallback_107(void * context, EmberAfStatus status) { @@ -3293,17 +3325,17 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_108(status); } - static void OnSuccessCallback_108(void * context, uint16_t primary5Y) - { - (static_cast(context))->OnSuccessResponse_108(primary5Y); - } + static void OnSuccessCallback_108(void * context) { (static_cast(context))->OnSuccessResponse_108(); } static void OnFailureCallback_109(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_109(status); } - static void OnSuccessCallback_109(void * context) { (static_cast(context))->OnSuccessResponse_109(); } + static void OnSuccessCallback_109(void * context, uint16_t primary5X) + { + (static_cast(context))->OnSuccessResponse_109(primary5X); + } static void OnFailureCallback_110(void * context, EmberAfStatus status) { @@ -3320,19 +3352,16 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_111(status); } - static void OnSuccessCallback_111(void * context, uint8_t primary5Intensity) - { - (static_cast(context))->OnSuccessResponse_111(primary5Intensity); - } + static void OnSuccessCallback_111(void * context) { (static_cast(context))->OnSuccessResponse_111(); } static void OnFailureCallback_112(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_112(status); } - static void OnSuccessCallback_112(void * context, uint16_t primary6X) + static void OnSuccessCallback_112(void * context, uint16_t primary5Y) { - (static_cast(context))->OnSuccessResponse_112(primary6X); + (static_cast(context))->OnSuccessResponse_112(primary5Y); } static void OnFailureCallback_113(void * context, EmberAfStatus status) @@ -3340,7 +3369,10 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_113(status); } - static void OnSuccessCallback_113(void * context) { (static_cast(context))->OnSuccessResponse_113(); } + static void OnSuccessCallback_113(void * context, uint8_t primary5Intensity) + { + (static_cast(context))->OnSuccessResponse_113(primary5Intensity); + } static void OnFailureCallback_114(void * context, EmberAfStatus status) { @@ -3357,17 +3389,17 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_115(status); } - static void OnSuccessCallback_115(void * context, uint16_t primary6Y) - { - (static_cast(context))->OnSuccessResponse_115(primary6Y); - } + static void OnSuccessCallback_115(void * context) { (static_cast(context))->OnSuccessResponse_115(); } static void OnFailureCallback_116(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_116(status); } - static void OnSuccessCallback_116(void * context) { (static_cast(context))->OnSuccessResponse_116(); } + static void OnSuccessCallback_116(void * context, uint16_t primary6X) + { + (static_cast(context))->OnSuccessResponse_116(primary6X); + } static void OnFailureCallback_117(void * context, EmberAfStatus status) { @@ -3384,19 +3416,16 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_118(status); } - static void OnSuccessCallback_118(void * context, uint8_t primary6Intensity) - { - (static_cast(context))->OnSuccessResponse_118(primary6Intensity); - } + static void OnSuccessCallback_118(void * context) { (static_cast(context))->OnSuccessResponse_118(); } static void OnFailureCallback_119(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_119(status); } - static void OnSuccessCallback_119(void * context, uint16_t whitePointX) + static void OnSuccessCallback_119(void * context, uint16_t primary6Y) { - (static_cast(context))->OnSuccessResponse_119(whitePointX); + (static_cast(context))->OnSuccessResponse_119(primary6Y); } static void OnFailureCallback_120(void * context, EmberAfStatus status) @@ -3404,7 +3433,10 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_120(status); } - static void OnSuccessCallback_120(void * context) { (static_cast(context))->OnSuccessResponse_120(); } + static void OnSuccessCallback_120(void * context, uint8_t primary6Intensity) + { + (static_cast(context))->OnSuccessResponse_120(primary6Intensity); + } static void OnFailureCallback_121(void * context, EmberAfStatus status) { @@ -3421,17 +3453,17 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_122(status); } - static void OnSuccessCallback_122(void * context, uint16_t whitePointY) - { - (static_cast(context))->OnSuccessResponse_122(whitePointY); - } + static void OnSuccessCallback_122(void * context) { (static_cast(context))->OnSuccessResponse_122(); } static void OnFailureCallback_123(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_123(status); } - static void OnSuccessCallback_123(void * context) { (static_cast(context))->OnSuccessResponse_123(); } + static void OnSuccessCallback_123(void * context, uint16_t whitePointX) + { + (static_cast(context))->OnSuccessResponse_123(whitePointX); + } static void OnFailureCallback_124(void * context, EmberAfStatus status) { @@ -3448,17 +3480,17 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_125(status); } - static void OnSuccessCallback_125(void * context, uint16_t colorPointRX) - { - (static_cast(context))->OnSuccessResponse_125(colorPointRX); - } + static void OnSuccessCallback_125(void * context) { (static_cast(context))->OnSuccessResponse_125(); } static void OnFailureCallback_126(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_126(status); } - static void OnSuccessCallback_126(void * context) { (static_cast(context))->OnSuccessResponse_126(); } + static void OnSuccessCallback_126(void * context, uint16_t whitePointY) + { + (static_cast(context))->OnSuccessResponse_126(whitePointY); + } static void OnFailureCallback_127(void * context, EmberAfStatus status) { @@ -3475,17 +3507,17 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_128(status); } - static void OnSuccessCallback_128(void * context, uint16_t colorPointRY) - { - (static_cast(context))->OnSuccessResponse_128(colorPointRY); - } + static void OnSuccessCallback_128(void * context) { (static_cast(context))->OnSuccessResponse_128(); } static void OnFailureCallback_129(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_129(status); } - static void OnSuccessCallback_129(void * context) { (static_cast(context))->OnSuccessResponse_129(); } + static void OnSuccessCallback_129(void * context, uint16_t colorPointRX) + { + (static_cast(context))->OnSuccessResponse_129(colorPointRX); + } static void OnFailureCallback_130(void * context, EmberAfStatus status) { @@ -3502,19 +3534,16 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_131(status); } - static void OnSuccessCallback_131(void * context, uint8_t colorPointRIntensity) - { - (static_cast(context))->OnSuccessResponse_131(colorPointRIntensity); - } + static void OnSuccessCallback_131(void * context) { (static_cast(context))->OnSuccessResponse_131(); } static void OnFailureCallback_132(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_132(status); } - static void OnSuccessCallback_132(void * context, uint16_t colorPointGX) + static void OnSuccessCallback_132(void * context, uint16_t colorPointRY) { - (static_cast(context))->OnSuccessResponse_132(colorPointGX); + (static_cast(context))->OnSuccessResponse_132(colorPointRY); } static void OnFailureCallback_133(void * context, EmberAfStatus status) @@ -3522,26 +3551,26 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_133(status); } - static void OnSuccessCallback_133(void * context) { (static_cast(context))->OnSuccessResponse_133(); } + static void OnSuccessCallback_133(void * context, uint8_t colorPointRIntensity) + { + (static_cast(context))->OnSuccessResponse_133(colorPointRIntensity); + } static void OnFailureCallback_134(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_134(status); } - static void OnSuccessCallback_134(void * context, uint16_t colorPointGX) - { - (static_cast(context))->OnSuccessResponse_134(colorPointGX); - } + static void OnSuccessCallback_134(void * context) { (static_cast(context))->OnSuccessResponse_134(); } static void OnFailureCallback_135(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_135(status); } - static void OnSuccessCallback_135(void * context, uint16_t colorPointGY) + static void OnSuccessCallback_135(void * context, uint8_t colorPointRIntensity) { - (static_cast(context))->OnSuccessResponse_135(colorPointGY); + (static_cast(context))->OnSuccessResponse_135(colorPointRIntensity); } static void OnFailureCallback_136(void * context, EmberAfStatus status) @@ -3549,26 +3578,26 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_136(status); } - static void OnSuccessCallback_136(void * context) { (static_cast(context))->OnSuccessResponse_136(); } + static void OnSuccessCallback_136(void * context, uint16_t colorPointGX) + { + (static_cast(context))->OnSuccessResponse_136(colorPointGX); + } static void OnFailureCallback_137(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_137(status); } - static void OnSuccessCallback_137(void * context, uint16_t colorPointGY) - { - (static_cast(context))->OnSuccessResponse_137(colorPointGY); - } + static void OnSuccessCallback_137(void * context) { (static_cast(context))->OnSuccessResponse_137(); } static void OnFailureCallback_138(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_138(status); } - static void OnSuccessCallback_138(void * context, uint8_t colorPointGIntensity) + static void OnSuccessCallback_138(void * context, uint16_t colorPointGX) { - (static_cast(context))->OnSuccessResponse_138(colorPointGIntensity); + (static_cast(context))->OnSuccessResponse_138(colorPointGX); } static void OnFailureCallback_139(void * context, EmberAfStatus status) @@ -3576,9 +3605,9 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_139(status); } - static void OnSuccessCallback_139(void * context, uint16_t colorPointBX) + static void OnSuccessCallback_139(void * context, uint16_t colorPointGY) { - (static_cast(context))->OnSuccessResponse_139(colorPointBX); + (static_cast(context))->OnSuccessResponse_139(colorPointGY); } static void OnFailureCallback_140(void * context, EmberAfStatus status) @@ -3593,9 +3622,9 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_141(status); } - static void OnSuccessCallback_141(void * context, uint16_t colorPointBX) + static void OnSuccessCallback_141(void * context, uint16_t colorPointGY) { - (static_cast(context))->OnSuccessResponse_141(colorPointBX); + (static_cast(context))->OnSuccessResponse_141(colorPointGY); } static void OnFailureCallback_142(void * context, EmberAfStatus status) @@ -3603,9 +3632,9 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_142(status); } - static void OnSuccessCallback_142(void * context, uint16_t colorPointBY) + static void OnSuccessCallback_142(void * context, uint8_t colorPointGIntensity) { - (static_cast(context))->OnSuccessResponse_142(colorPointBY); + (static_cast(context))->OnSuccessResponse_142(colorPointGIntensity); } static void OnFailureCallback_143(void * context, EmberAfStatus status) @@ -3620,9 +3649,9 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_144(status); } - static void OnSuccessCallback_144(void * context, uint16_t colorPointBY) + static void OnSuccessCallback_144(void * context, uint8_t colorPointGIntensity) { - (static_cast(context))->OnSuccessResponse_144(colorPointBY); + (static_cast(context))->OnSuccessResponse_144(colorPointGIntensity); } static void OnFailureCallback_145(void * context, EmberAfStatus status) @@ -3630,9 +3659,80 @@ class Test_TC_CC_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_145(status); } - static void OnSuccessCallback_145(void * context, uint8_t colorPointBIntensity) + static void OnSuccessCallback_145(void * context, uint16_t colorPointBX) + { + (static_cast(context))->OnSuccessResponse_145(colorPointBX); + } + + static void OnFailureCallback_146(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_146(status); + } + + static void OnSuccessCallback_146(void * context) { (static_cast(context))->OnSuccessResponse_146(); } + + static void OnFailureCallback_147(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_147(status); + } + + static void OnSuccessCallback_147(void * context, uint16_t colorPointBX) + { + (static_cast(context))->OnSuccessResponse_147(colorPointBX); + } + + static void OnFailureCallback_148(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_148(status); + } + + static void OnSuccessCallback_148(void * context, uint16_t colorPointBY) + { + (static_cast(context))->OnSuccessResponse_148(colorPointBY); + } + + static void OnFailureCallback_149(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_149(status); + } + + static void OnSuccessCallback_149(void * context) { (static_cast(context))->OnSuccessResponse_149(); } + + static void OnFailureCallback_150(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_150(status); + } + + static void OnSuccessCallback_150(void * context, uint16_t colorPointBY) + { + (static_cast(context))->OnSuccessResponse_150(colorPointBY); + } + + static void OnFailureCallback_151(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_151(status); + } + + static void OnSuccessCallback_151(void * context, uint8_t colorPointBIntensity) { - (static_cast(context))->OnSuccessResponse_145(colorPointBIntensity); + (static_cast(context))->OnSuccessResponse_151(colorPointBIntensity); + } + + static void OnFailureCallback_152(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_152(status); + } + + static void OnSuccessCallback_152(void * context) { (static_cast(context))->OnSuccessResponse_152(); } + + static void OnFailureCallback_153(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_153(status); + } + + static void OnSuccessCallback_153(void * context, uint8_t colorPointBIntensity) + { + (static_cast(context))->OnSuccessResponse_153(colorPointBIntensity); } // @@ -5171,27 +5271,72 @@ class Test_TC_CC_2_1 : public TestCommand NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributeNumberOfPrimaries_74() + CHIP_ERROR TestWriteTheDefaultValuesToOptionalAttributeCompensationText_74() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::ColorControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::CharSpan compensationTextArgument; + compensationTextArgument = chip::Span("garbage: not in length on purpose", 0); + + ReturnErrorOnFailure(cluster.WriteAttribute( + compensationTextArgument, this, OnSuccessCallback_74, OnFailureCallback_74)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_74(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + } + + void OnSuccessResponse_74() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadsBackOptionalAttributeCompensationText_75() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::ColorControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_75, OnFailureCallback_75)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_75(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_75(chip::CharSpan compensationText) + { + VerifyOrReturn(CheckValueAsString("compensationText", compensationText, chip::CharSpan("", 0))); + + NextTest(); + } + + CHIP_ERROR TestReadTheMandatoryAttributeNumberOfPrimaries_76() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_74, OnFailureCallback_74)); + this, OnSuccessCallback_76, OnFailureCallback_76)); return CHIP_NO_ERROR; } - void OnFailureResponse_74(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_76(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_74(uint8_t numberOfPrimaries) + void OnSuccessResponse_76(uint8_t numberOfPrimaries) { VerifyOrReturn(CheckConstraintType("numberOfPrimaries", "", "uint8")); VerifyOrReturn(CheckConstraintMaxValue("numberOfPrimaries", numberOfPrimaries, 6)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributeNumberOfPrimaries_75() + CHIP_ERROR TestWriteTheDefaultMandatoryAttributeNumberOfPrimaries_77() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -5201,59 +5346,59 @@ class Test_TC_CC_2_1 : public TestCommand numberOfPrimariesArgument = 0; ReturnErrorOnFailure(cluster.WriteAttribute( - numberOfPrimariesArgument, this, OnSuccessCallback_75, OnFailureCallback_75)); + numberOfPrimariesArgument, this, OnSuccessCallback_77, OnFailureCallback_77)); return CHIP_NO_ERROR; } - void OnFailureResponse_75(EmberAfStatus status) + void OnFailureResponse_77(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_75() { ThrowSuccessResponse(); } + void OnSuccessResponse_77() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadBackTheMandatoryAttributeNumberOfPrimaries_76() + CHIP_ERROR TestReadBackTheMandatoryAttributeNumberOfPrimaries_78() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_76, OnFailureCallback_76)); + this, OnSuccessCallback_78, OnFailureCallback_78)); return CHIP_NO_ERROR; } - void OnFailureResponse_76(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_78(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_76(uint8_t numberOfPrimaries) + void OnSuccessResponse_78(uint8_t numberOfPrimaries) { VerifyOrReturn(CheckValue("numberOfPrimaries", numberOfPrimaries, 0)); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary1X_77() + CHIP_ERROR TestReadTheMandatoryAttributePrimary1X_79() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_77, OnFailureCallback_77)); + this, OnSuccessCallback_79, OnFailureCallback_79)); return CHIP_NO_ERROR; } - void OnFailureResponse_77(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_79(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_77(uint16_t primary1X) + void OnSuccessResponse_79(uint16_t primary1X) { VerifyOrReturn(CheckConstraintType("primary1X", "", "uint16")); VerifyOrReturn(CheckConstraintMaxValue("primary1X", primary1X, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary1X_78() + CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary1X_80() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -5263,59 +5408,59 @@ class Test_TC_CC_2_1 : public TestCommand primary1XArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - primary1XArgument, this, OnSuccessCallback_78, OnFailureCallback_78)); + primary1XArgument, this, OnSuccessCallback_80, OnFailureCallback_80)); return CHIP_NO_ERROR; } - void OnFailureResponse_78(EmberAfStatus status) + void OnFailureResponse_80(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_78() { ThrowSuccessResponse(); } + void OnSuccessResponse_80() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary1X_79() + CHIP_ERROR TestReadBackTheMandatoryAttributePrimary1X_81() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_79, OnFailureCallback_79)); + this, OnSuccessCallback_81, OnFailureCallback_81)); return CHIP_NO_ERROR; } - void OnFailureResponse_79(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_81(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_79(uint16_t primary1X) + void OnSuccessResponse_81(uint16_t primary1X) { VerifyOrReturn(CheckValue("primary1X", primary1X, 0U)); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary1Y_80() + CHIP_ERROR TestReadTheMandatoryAttributePrimary1Y_82() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_80, OnFailureCallback_80)); + this, OnSuccessCallback_82, OnFailureCallback_82)); return CHIP_NO_ERROR; } - void OnFailureResponse_80(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_82(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_80(uint16_t primary1Y) + void OnSuccessResponse_82(uint16_t primary1Y) { VerifyOrReturn(CheckConstraintType("primary1Y", "", "uint16")); VerifyOrReturn(CheckConstraintMaxValue("primary1Y", primary1Y, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary1Y_81() + CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary1Y_83() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -5325,78 +5470,78 @@ class Test_TC_CC_2_1 : public TestCommand primary1YArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - primary1YArgument, this, OnSuccessCallback_81, OnFailureCallback_81)); + primary1YArgument, this, OnSuccessCallback_83, OnFailureCallback_83)); return CHIP_NO_ERROR; } - void OnFailureResponse_81(EmberAfStatus status) + void OnFailureResponse_83(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_81() { ThrowSuccessResponse(); } + void OnSuccessResponse_83() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary1Y_82() + CHIP_ERROR TestReadBackTheMandatoryAttributePrimary1Y_84() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_82, OnFailureCallback_82)); + this, OnSuccessCallback_84, OnFailureCallback_84)); return CHIP_NO_ERROR; } - void OnFailureResponse_82(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_84(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_82(uint16_t primary1Y) + void OnSuccessResponse_84(uint16_t primary1Y) { VerifyOrReturn(CheckValue("primary1Y", primary1Y, 0U)); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary1Intensity_83() + CHIP_ERROR TestReadTheMandatoryAttributePrimary1Intensity_85() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_83, OnFailureCallback_83)); + this, OnSuccessCallback_85, OnFailureCallback_85)); return CHIP_NO_ERROR; } - void OnFailureResponse_83(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_85(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_83(uint8_t primary1Intensity) + void OnSuccessResponse_85(uint8_t primary1Intensity) { VerifyOrReturn(CheckConstraintType("primary1Intensity", "", "uint8")); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary2X_84() + CHIP_ERROR TestReadTheMandatoryAttributePrimary2X_86() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_84, OnFailureCallback_84)); + this, OnSuccessCallback_86, OnFailureCallback_86)); return CHIP_NO_ERROR; } - void OnFailureResponse_84(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_86(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_84(uint16_t primary2X) + void OnSuccessResponse_86(uint16_t primary2X) { VerifyOrReturn(CheckConstraintType("primary2X", "", "uint16")); VerifyOrReturn(CheckConstraintMaxValue("primary2X", primary2X, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary2X_85() + CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary2X_87() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -5406,59 +5551,59 @@ class Test_TC_CC_2_1 : public TestCommand primary2XArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - primary2XArgument, this, OnSuccessCallback_85, OnFailureCallback_85)); + primary2XArgument, this, OnSuccessCallback_87, OnFailureCallback_87)); return CHIP_NO_ERROR; } - void OnFailureResponse_85(EmberAfStatus status) + void OnFailureResponse_87(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_85() { ThrowSuccessResponse(); } + void OnSuccessResponse_87() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary2X_86() + CHIP_ERROR TestReadBackTheMandatoryAttributePrimary2X_88() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_86, OnFailureCallback_86)); + this, OnSuccessCallback_88, OnFailureCallback_88)); return CHIP_NO_ERROR; } - void OnFailureResponse_86(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_88(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_86(uint16_t primary2X) + void OnSuccessResponse_88(uint16_t primary2X) { VerifyOrReturn(CheckValue("primary2X", primary2X, 0U)); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary2Y_87() + CHIP_ERROR TestReadTheMandatoryAttributePrimary2Y_89() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_87, OnFailureCallback_87)); + this, OnSuccessCallback_89, OnFailureCallback_89)); return CHIP_NO_ERROR; } - void OnFailureResponse_87(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_89(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_87(uint16_t primary2Y) + void OnSuccessResponse_89(uint16_t primary2Y) { VerifyOrReturn(CheckConstraintType("primary2Y", "", "uint16")); VerifyOrReturn(CheckConstraintMaxValue("primary2Y", primary2Y, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary2Y_88() + CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary2Y_90() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -5468,78 +5613,78 @@ class Test_TC_CC_2_1 : public TestCommand primary2YArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - primary2YArgument, this, OnSuccessCallback_88, OnFailureCallback_88)); + primary2YArgument, this, OnSuccessCallback_90, OnFailureCallback_90)); return CHIP_NO_ERROR; } - void OnFailureResponse_88(EmberAfStatus status) + void OnFailureResponse_90(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_88() { ThrowSuccessResponse(); } + void OnSuccessResponse_90() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary2Y_89() + CHIP_ERROR TestReadBackTheMandatoryAttributePrimary2Y_91() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_89, OnFailureCallback_89)); + this, OnSuccessCallback_91, OnFailureCallback_91)); return CHIP_NO_ERROR; } - void OnFailureResponse_89(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_91(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_89(uint16_t primary2Y) + void OnSuccessResponse_91(uint16_t primary2Y) { VerifyOrReturn(CheckValue("primary2Y", primary2Y, 0U)); NextTest(); } - CHIP_ERROR TestValidateConstraintsOfAttributePrimary2Intensity_90() + CHIP_ERROR TestValidateConstraintsOfAttributePrimary2Intensity_92() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_90, OnFailureCallback_90)); + this, OnSuccessCallback_92, OnFailureCallback_92)); return CHIP_NO_ERROR; } - void OnFailureResponse_90(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_92(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_90(uint8_t primary2Intensity) + void OnSuccessResponse_92(uint8_t primary2Intensity) { VerifyOrReturn(CheckConstraintType("primary2Intensity", "", "uint8")); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary3X_91() + CHIP_ERROR TestReadTheMandatoryAttributePrimary3X_93() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_91, OnFailureCallback_91)); + this, OnSuccessCallback_93, OnFailureCallback_93)); return CHIP_NO_ERROR; } - void OnFailureResponse_91(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_93(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_91(uint16_t primary3X) + void OnSuccessResponse_93(uint16_t primary3X) { VerifyOrReturn(CheckConstraintType("primary3X", "", "uint16")); VerifyOrReturn(CheckConstraintMaxValue("primary3X", primary3X, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary3X_92() + CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary3X_94() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -5549,59 +5694,59 @@ class Test_TC_CC_2_1 : public TestCommand primary3XArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - primary3XArgument, this, OnSuccessCallback_92, OnFailureCallback_92)); + primary3XArgument, this, OnSuccessCallback_94, OnFailureCallback_94)); return CHIP_NO_ERROR; } - void OnFailureResponse_92(EmberAfStatus status) + void OnFailureResponse_94(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_92() { ThrowSuccessResponse(); } + void OnSuccessResponse_94() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary3X_93() + CHIP_ERROR TestReadBackTheMandatoryAttributePrimary3X_95() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_93, OnFailureCallback_93)); + this, OnSuccessCallback_95, OnFailureCallback_95)); return CHIP_NO_ERROR; } - void OnFailureResponse_93(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_95(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_93(uint16_t primary3X) + void OnSuccessResponse_95(uint16_t primary3X) { VerifyOrReturn(CheckValue("primary3X", primary3X, 0U)); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary3Y_94() + CHIP_ERROR TestReadTheMandatoryAttributePrimary3Y_96() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_94, OnFailureCallback_94)); + this, OnSuccessCallback_96, OnFailureCallback_96)); return CHIP_NO_ERROR; } - void OnFailureResponse_94(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_96(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_94(uint16_t primary3Y) + void OnSuccessResponse_96(uint16_t primary3Y) { VerifyOrReturn(CheckConstraintType("primary3Y", "", "uint16")); VerifyOrReturn(CheckConstraintMaxValue("primary3Y", primary3Y, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary3Y_95() + CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary3Y_97() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -5611,78 +5756,78 @@ class Test_TC_CC_2_1 : public TestCommand primary3YArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - primary3YArgument, this, OnSuccessCallback_95, OnFailureCallback_95)); + primary3YArgument, this, OnSuccessCallback_97, OnFailureCallback_97)); return CHIP_NO_ERROR; } - void OnFailureResponse_95(EmberAfStatus status) + void OnFailureResponse_97(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_95() { ThrowSuccessResponse(); } + void OnSuccessResponse_97() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary3Y_96() + CHIP_ERROR TestReadBackTheMandatoryAttributePrimary3Y_98() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_96, OnFailureCallback_96)); + this, OnSuccessCallback_98, OnFailureCallback_98)); return CHIP_NO_ERROR; } - void OnFailureResponse_96(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_98(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_96(uint16_t primary3Y) + void OnSuccessResponse_98(uint16_t primary3Y) { VerifyOrReturn(CheckValue("primary3Y", primary3Y, 0U)); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary3Intensity_97() + CHIP_ERROR TestReadTheMandatoryAttributePrimary3Intensity_99() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_97, OnFailureCallback_97)); + this, OnSuccessCallback_99, OnFailureCallback_99)); return CHIP_NO_ERROR; } - void OnFailureResponse_97(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_99(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_97(uint8_t primary3Intensity) + void OnSuccessResponse_99(uint8_t primary3Intensity) { VerifyOrReturn(CheckConstraintType("primary3Intensity", "", "uint8")); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary4X_98() + CHIP_ERROR TestReadTheMandatoryAttributePrimary4X_100() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_98, OnFailureCallback_98)); + this, OnSuccessCallback_100, OnFailureCallback_100)); return CHIP_NO_ERROR; } - void OnFailureResponse_98(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_100(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_98(uint16_t primary4X) + void OnSuccessResponse_100(uint16_t primary4X) { VerifyOrReturn(CheckConstraintType("primary4X", "", "uint16")); VerifyOrReturn(CheckConstraintMaxValue("primary4X", primary4X, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary4X_99() + CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary4X_101() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -5692,59 +5837,59 @@ class Test_TC_CC_2_1 : public TestCommand primary4XArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - primary4XArgument, this, OnSuccessCallback_99, OnFailureCallback_99)); + primary4XArgument, this, OnSuccessCallback_101, OnFailureCallback_101)); return CHIP_NO_ERROR; } - void OnFailureResponse_99(EmberAfStatus status) + void OnFailureResponse_101(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_99() { ThrowSuccessResponse(); } + void OnSuccessResponse_101() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary4X_100() + CHIP_ERROR TestReadBackTheMandatoryAttributePrimary4X_102() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_100, OnFailureCallback_100)); + this, OnSuccessCallback_102, OnFailureCallback_102)); return CHIP_NO_ERROR; } - void OnFailureResponse_100(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_102(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_100(uint16_t primary4X) + void OnSuccessResponse_102(uint16_t primary4X) { VerifyOrReturn(CheckValue("primary4X", primary4X, 0U)); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary4Y_101() + CHIP_ERROR TestReadTheMandatoryAttributePrimary4Y_103() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_101, OnFailureCallback_101)); + this, OnSuccessCallback_103, OnFailureCallback_103)); return CHIP_NO_ERROR; } - void OnFailureResponse_101(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_103(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_101(uint16_t primary4Y) + void OnSuccessResponse_103(uint16_t primary4Y) { VerifyOrReturn(CheckConstraintType("primary4Y", "", "uint16")); VerifyOrReturn(CheckConstraintMaxValue("primary4Y", primary4Y, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary4Y_102() + CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary4Y_104() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -5754,78 +5899,78 @@ class Test_TC_CC_2_1 : public TestCommand primary4YArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - primary4YArgument, this, OnSuccessCallback_102, OnFailureCallback_102)); + primary4YArgument, this, OnSuccessCallback_104, OnFailureCallback_104)); return CHIP_NO_ERROR; } - void OnFailureResponse_102(EmberAfStatus status) + void OnFailureResponse_104(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_102() { ThrowSuccessResponse(); } + void OnSuccessResponse_104() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary4Y_103() + CHIP_ERROR TestReadBackTheMandatoryAttributePrimary4Y_105() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_103, OnFailureCallback_103)); + this, OnSuccessCallback_105, OnFailureCallback_105)); return CHIP_NO_ERROR; } - void OnFailureResponse_103(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_105(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_103(uint16_t primary4Y) + void OnSuccessResponse_105(uint16_t primary4Y) { VerifyOrReturn(CheckValue("primary4Y", primary4Y, 0U)); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary4Intensity_104() + CHIP_ERROR TestReadTheMandatoryAttributePrimary4Intensity_106() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_104, OnFailureCallback_104)); + this, OnSuccessCallback_106, OnFailureCallback_106)); return CHIP_NO_ERROR; } - void OnFailureResponse_104(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_106(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_104(uint8_t primary4Intensity) + void OnSuccessResponse_106(uint8_t primary4Intensity) { VerifyOrReturn(CheckConstraintType("primary4Intensity", "", "uint8")); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary5X_105() + CHIP_ERROR TestReadTheMandatoryAttributePrimary5X_107() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_105, OnFailureCallback_105)); + this, OnSuccessCallback_107, OnFailureCallback_107)); return CHIP_NO_ERROR; } - void OnFailureResponse_105(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_107(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_105(uint16_t primary5X) + void OnSuccessResponse_107(uint16_t primary5X) { VerifyOrReturn(CheckConstraintType("primary5X", "", "uint16")); VerifyOrReturn(CheckConstraintMaxValue("primary5X", primary5X, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary5X_106() + CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary5X_108() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -5835,59 +5980,59 @@ class Test_TC_CC_2_1 : public TestCommand primary5XArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - primary5XArgument, this, OnSuccessCallback_106, OnFailureCallback_106)); + primary5XArgument, this, OnSuccessCallback_108, OnFailureCallback_108)); return CHIP_NO_ERROR; } - void OnFailureResponse_106(EmberAfStatus status) + void OnFailureResponse_108(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_106() { ThrowSuccessResponse(); } + void OnSuccessResponse_108() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary5X_107() + CHIP_ERROR TestReadBackTheMandatoryAttributePrimary5X_109() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_107, OnFailureCallback_107)); + this, OnSuccessCallback_109, OnFailureCallback_109)); return CHIP_NO_ERROR; } - void OnFailureResponse_107(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_109(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_107(uint16_t primary5X) + void OnSuccessResponse_109(uint16_t primary5X) { VerifyOrReturn(CheckValue("primary5X", primary5X, 0U)); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary5Y_108() + CHIP_ERROR TestReadTheMandatoryAttributePrimary5Y_110() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_108, OnFailureCallback_108)); + this, OnSuccessCallback_110, OnFailureCallback_110)); return CHIP_NO_ERROR; } - void OnFailureResponse_108(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_110(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_108(uint16_t primary5Y) + void OnSuccessResponse_110(uint16_t primary5Y) { VerifyOrReturn(CheckConstraintType("primary5Y", "", "uint16")); VerifyOrReturn(CheckConstraintMaxValue("primary5Y", primary5Y, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary5Y_109() + CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary5Y_111() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -5897,78 +6042,78 @@ class Test_TC_CC_2_1 : public TestCommand primary5YArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - primary5YArgument, this, OnSuccessCallback_109, OnFailureCallback_109)); + primary5YArgument, this, OnSuccessCallback_111, OnFailureCallback_111)); return CHIP_NO_ERROR; } - void OnFailureResponse_109(EmberAfStatus status) + void OnFailureResponse_111(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_109() { ThrowSuccessResponse(); } + void OnSuccessResponse_111() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary5Y_110() + CHIP_ERROR TestReadBackTheMandatoryAttributePrimary5Y_112() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_110, OnFailureCallback_110)); + this, OnSuccessCallback_112, OnFailureCallback_112)); return CHIP_NO_ERROR; } - void OnFailureResponse_110(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_112(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_110(uint16_t primary5Y) + void OnSuccessResponse_112(uint16_t primary5Y) { VerifyOrReturn(CheckValue("primary5Y", primary5Y, 0U)); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary5Intensity_111() + CHIP_ERROR TestReadTheMandatoryAttributePrimary5Intensity_113() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_111, OnFailureCallback_111)); + this, OnSuccessCallback_113, OnFailureCallback_113)); return CHIP_NO_ERROR; } - void OnFailureResponse_111(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_113(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_111(uint8_t primary5Intensity) + void OnSuccessResponse_113(uint8_t primary5Intensity) { VerifyOrReturn(CheckConstraintType("primary5Intensity", "", "uint8")); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary6X_112() + CHIP_ERROR TestReadTheMandatoryAttributePrimary6X_114() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_112, OnFailureCallback_112)); + this, OnSuccessCallback_114, OnFailureCallback_114)); return CHIP_NO_ERROR; } - void OnFailureResponse_112(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_114(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_112(uint16_t primary6X) + void OnSuccessResponse_114(uint16_t primary6X) { VerifyOrReturn(CheckConstraintType("primary6X", "", "uint16")); VerifyOrReturn(CheckConstraintMaxValue("primary6X", primary6X, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary6X_113() + CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary6X_115() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -5978,59 +6123,59 @@ class Test_TC_CC_2_1 : public TestCommand primary6XArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - primary6XArgument, this, OnSuccessCallback_113, OnFailureCallback_113)); + primary6XArgument, this, OnSuccessCallback_115, OnFailureCallback_115)); return CHIP_NO_ERROR; } - void OnFailureResponse_113(EmberAfStatus status) + void OnFailureResponse_115(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_113() { ThrowSuccessResponse(); } + void OnSuccessResponse_115() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary6X_114() + CHIP_ERROR TestReadBackTheMandatoryAttributePrimary6X_116() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_114, OnFailureCallback_114)); + this, OnSuccessCallback_116, OnFailureCallback_116)); return CHIP_NO_ERROR; } - void OnFailureResponse_114(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_116(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_114(uint16_t primary6X) + void OnSuccessResponse_116(uint16_t primary6X) { VerifyOrReturn(CheckValue("primary6X", primary6X, 0U)); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary6Y_115() + CHIP_ERROR TestReadTheMandatoryAttributePrimary6Y_117() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_115, OnFailureCallback_115)); + this, OnSuccessCallback_117, OnFailureCallback_117)); return CHIP_NO_ERROR; } - void OnFailureResponse_115(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_117(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_115(uint16_t primary6Y) + void OnSuccessResponse_117(uint16_t primary6Y) { VerifyOrReturn(CheckConstraintType("primary6Y", "", "uint16")); VerifyOrReturn(CheckConstraintMaxValue("primary6Y", primary6Y, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary6Y_116() + CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary6Y_118() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -6040,81 +6185,81 @@ class Test_TC_CC_2_1 : public TestCommand primary6YArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - primary6YArgument, this, OnSuccessCallback_116, OnFailureCallback_116)); + primary6YArgument, this, OnSuccessCallback_118, OnFailureCallback_118)); return CHIP_NO_ERROR; } - void OnFailureResponse_116(EmberAfStatus status) + void OnFailureResponse_118(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_116() { ThrowSuccessResponse(); } + void OnSuccessResponse_118() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary6Y_117() + CHIP_ERROR TestReadBackTheMandatoryAttributePrimary6Y_119() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_117, OnFailureCallback_117)); + this, OnSuccessCallback_119, OnFailureCallback_119)); return CHIP_NO_ERROR; } - void OnFailureResponse_117(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_119(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_117(uint16_t primary6Y) + void OnSuccessResponse_119(uint16_t primary6Y) { VerifyOrReturn(CheckValue("primary6Y", primary6Y, 0U)); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributePrimary6Intensity_118() + CHIP_ERROR TestReadTheMandatoryAttributePrimary6Intensity_120() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_118, OnFailureCallback_118)); + this, OnSuccessCallback_120, OnFailureCallback_120)); return CHIP_NO_ERROR; } - void OnFailureResponse_118(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_120(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_118(uint8_t primary6Intensity) + void OnSuccessResponse_120(uint8_t primary6Intensity) { VerifyOrReturn(CheckConstraintType("primary6Intensity", "", "uint8")); NextTest(); } - CHIP_ERROR TestReadTheOptionalAttributeWhitePointX_119() + CHIP_ERROR TestReadTheOptionalAttributeWhitePointX_121() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_119, OnFailureCallback_119)); + this, OnSuccessCallback_121, OnFailureCallback_121)); return CHIP_NO_ERROR; } - void OnFailureResponse_119(EmberAfStatus status) + void OnFailureResponse_121(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_119(uint16_t whitePointX) + void OnSuccessResponse_121(uint16_t whitePointX) { VerifyOrReturn(CheckConstraintType("whitePointX", "", "uint16")); VerifyOrReturn(CheckConstraintMaxValue("whitePointX", whitePointX, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultOptionalAttributeWhitePointX_120() + CHIP_ERROR TestWriteTheDefaultOptionalAttributeWhitePointX_122() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -6124,64 +6269,64 @@ class Test_TC_CC_2_1 : public TestCommand whitePointXArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - whitePointXArgument, this, OnSuccessCallback_120, OnFailureCallback_120)); + whitePointXArgument, this, OnSuccessCallback_122, OnFailureCallback_122)); return CHIP_NO_ERROR; } - void OnFailureResponse_120(EmberAfStatus status) + void OnFailureResponse_122(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_120() { NextTest(); } + void OnSuccessResponse_122() { NextTest(); } - CHIP_ERROR TestReadBackTheOptionalAttributeWhitePointX_121() + CHIP_ERROR TestReadBackTheOptionalAttributeWhitePointX_123() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_121, OnFailureCallback_121)); + this, OnSuccessCallback_123, OnFailureCallback_123)); return CHIP_NO_ERROR; } - void OnFailureResponse_121(EmberAfStatus status) + void OnFailureResponse_123(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_121(uint16_t whitePointX) + void OnSuccessResponse_123(uint16_t whitePointX) { VerifyOrReturn(CheckValue("whitePointX", whitePointX, 0U)); NextTest(); } - CHIP_ERROR TestReadTheOptionalAttributeWhitePointY_122() + CHIP_ERROR TestReadTheOptionalAttributeWhitePointY_124() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_122, OnFailureCallback_122)); + this, OnSuccessCallback_124, OnFailureCallback_124)); return CHIP_NO_ERROR; } - void OnFailureResponse_122(EmberAfStatus status) + void OnFailureResponse_124(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_122(uint16_t whitePointY) + void OnSuccessResponse_124(uint16_t whitePointY) { VerifyOrReturn(CheckConstraintType("whitePointY", "", "uint16")); VerifyOrReturn(CheckConstraintMaxValue("whitePointY", whitePointY, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultOptionalAttributeWhitePointY_123() + CHIP_ERROR TestWriteTheDefaultOptionalAttributeWhitePointY_125() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -6191,64 +6336,64 @@ class Test_TC_CC_2_1 : public TestCommand whitePointYArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - whitePointYArgument, this, OnSuccessCallback_123, OnFailureCallback_123)); + whitePointYArgument, this, OnSuccessCallback_125, OnFailureCallback_125)); return CHIP_NO_ERROR; } - void OnFailureResponse_123(EmberAfStatus status) + void OnFailureResponse_125(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_123() { NextTest(); } + void OnSuccessResponse_125() { NextTest(); } - CHIP_ERROR TestReadBackTheOptionalAttributeWhitePointY_124() + CHIP_ERROR TestReadBackTheOptionalAttributeWhitePointY_126() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_124, OnFailureCallback_124)); + this, OnSuccessCallback_126, OnFailureCallback_126)); return CHIP_NO_ERROR; } - void OnFailureResponse_124(EmberAfStatus status) + void OnFailureResponse_126(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_124(uint16_t whitePointY) + void OnSuccessResponse_126(uint16_t whitePointY) { VerifyOrReturn(CheckValue("whitePointY", whitePointY, 0U)); NextTest(); } - CHIP_ERROR TestReadTheOptionalAttributeColorPointRX_125() + CHIP_ERROR TestReadTheOptionalAttributeColorPointRX_127() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_125, OnFailureCallback_125)); + this, OnSuccessCallback_127, OnFailureCallback_127)); return CHIP_NO_ERROR; } - void OnFailureResponse_125(EmberAfStatus status) + void OnFailureResponse_127(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_125(uint16_t colorPointRX) + void OnSuccessResponse_127(uint16_t colorPointRX) { VerifyOrReturn(CheckConstraintType("colorPointRX", "", "uint16")); VerifyOrReturn(CheckConstraintMaxValue("colorPointRX", colorPointRX, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointRX_126() + CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointRX_128() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -6258,64 +6403,64 @@ class Test_TC_CC_2_1 : public TestCommand colorPointRXArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - colorPointRXArgument, this, OnSuccessCallback_126, OnFailureCallback_126)); + colorPointRXArgument, this, OnSuccessCallback_128, OnFailureCallback_128)); return CHIP_NO_ERROR; } - void OnFailureResponse_126(EmberAfStatus status) + void OnFailureResponse_128(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_126() { NextTest(); } + void OnSuccessResponse_128() { NextTest(); } - CHIP_ERROR TestReadBackTheOptionalAttributeColorPointRX_127() + CHIP_ERROR TestReadBackTheOptionalAttributeColorPointRX_129() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_127, OnFailureCallback_127)); + this, OnSuccessCallback_129, OnFailureCallback_129)); return CHIP_NO_ERROR; } - void OnFailureResponse_127(EmberAfStatus status) + void OnFailureResponse_129(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_127(uint16_t colorPointRX) + void OnSuccessResponse_129(uint16_t colorPointRX) { VerifyOrReturn(CheckValue("colorPointRX", colorPointRX, 0U)); NextTest(); } - CHIP_ERROR TestReadTheOptionalAttributeColorPointRY_128() + CHIP_ERROR TestReadTheOptionalAttributeColorPointRY_130() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_128, OnFailureCallback_128)); + this, OnSuccessCallback_130, OnFailureCallback_130)); return CHIP_NO_ERROR; } - void OnFailureResponse_128(EmberAfStatus status) + void OnFailureResponse_130(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_128(uint16_t colorPointRY) + void OnSuccessResponse_130(uint16_t colorPointRY) { VerifyOrReturn(CheckConstraintType("colorPointRY", "", "uint16")); VerifyOrReturn(CheckConstraintMaxValue("colorPointRY", colorPointRY, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointRY_129() + CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointRY_131() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -6325,86 +6470,130 @@ class Test_TC_CC_2_1 : public TestCommand colorPointRYArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - colorPointRYArgument, this, OnSuccessCallback_129, OnFailureCallback_129)); + colorPointRYArgument, this, OnSuccessCallback_131, OnFailureCallback_131)); return CHIP_NO_ERROR; } - void OnFailureResponse_129(EmberAfStatus status) + void OnFailureResponse_131(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_129() { NextTest(); } + void OnSuccessResponse_131() { NextTest(); } - CHIP_ERROR TestReadBackTheOptionalAttributeColorPointRY_130() + CHIP_ERROR TestReadBackTheOptionalAttributeColorPointRY_132() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_130, OnFailureCallback_130)); + this, OnSuccessCallback_132, OnFailureCallback_132)); return CHIP_NO_ERROR; } - void OnFailureResponse_130(EmberAfStatus status) + void OnFailureResponse_132(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_130(uint16_t colorPointRY) + void OnSuccessResponse_132(uint16_t colorPointRY) { VerifyOrReturn(CheckValue("colorPointRY", colorPointRY, 0U)); NextTest(); } - CHIP_ERROR TestReadTheOptionalAttributeColorPointRIntensity_131() + CHIP_ERROR TestReadTheOptionalAttributeColorPointRIntensity_133() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_131, OnFailureCallback_131)); + this, OnSuccessCallback_133, OnFailureCallback_133)); return CHIP_NO_ERROR; } - void OnFailureResponse_131(EmberAfStatus status) + void OnFailureResponse_133(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_131(uint8_t colorPointRIntensity) + void OnSuccessResponse_133(uint8_t colorPointRIntensity) { VerifyOrReturn(CheckConstraintType("colorPointRIntensity", "", "uint8")); NextTest(); } - CHIP_ERROR TestReadTheOptionalAttributeColorPointGX_132() + CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointRIntensity_134() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::ColorControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + uint8_t colorPointRIntensityArgument; + colorPointRIntensityArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + colorPointRIntensityArgument, this, OnSuccessCallback_134, OnFailureCallback_134)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_134(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_134() { NextTest(); } + + CHIP_ERROR TestReadBackTheOptionalAttributeColorPointRIntensity_135() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::ColorControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_135, OnFailureCallback_135)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_135(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_135(uint8_t colorPointRIntensity) + { + VerifyOrReturn(CheckValue("colorPointRIntensity", colorPointRIntensity, 0)); + + NextTest(); + } + + CHIP_ERROR TestReadTheOptionalAttributeColorPointGX_136() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_132, OnFailureCallback_132)); + this, OnSuccessCallback_136, OnFailureCallback_136)); return CHIP_NO_ERROR; } - void OnFailureResponse_132(EmberAfStatus status) + void OnFailureResponse_136(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_132(uint16_t colorPointGX) + void OnSuccessResponse_136(uint16_t colorPointGX) { VerifyOrReturn(CheckConstraintType("colorPointGX", "", "uint16")); VerifyOrReturn(CheckConstraintMaxValue("colorPointGX", colorPointGX, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointGX_133() + CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointGX_137() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -6414,64 +6603,64 @@ class Test_TC_CC_2_1 : public TestCommand colorPointGXArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - colorPointGXArgument, this, OnSuccessCallback_133, OnFailureCallback_133)); + colorPointGXArgument, this, OnSuccessCallback_137, OnFailureCallback_137)); return CHIP_NO_ERROR; } - void OnFailureResponse_133(EmberAfStatus status) + void OnFailureResponse_137(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_133() { NextTest(); } + void OnSuccessResponse_137() { NextTest(); } - CHIP_ERROR TestReadBackTheOptionalAttributeColorPointGX_134() + CHIP_ERROR TestReadBackTheOptionalAttributeColorPointGX_138() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_134, OnFailureCallback_134)); + this, OnSuccessCallback_138, OnFailureCallback_138)); return CHIP_NO_ERROR; } - void OnFailureResponse_134(EmberAfStatus status) + void OnFailureResponse_138(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_134(uint16_t colorPointGX) + void OnSuccessResponse_138(uint16_t colorPointGX) { VerifyOrReturn(CheckValue("colorPointGX", colorPointGX, 0U)); NextTest(); } - CHIP_ERROR TestReadTheOptionalAttributeColorPointGY_135() + CHIP_ERROR TestReadTheOptionalAttributeColorPointGY_139() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_135, OnFailureCallback_135)); + this, OnSuccessCallback_139, OnFailureCallback_139)); return CHIP_NO_ERROR; } - void OnFailureResponse_135(EmberAfStatus status) + void OnFailureResponse_139(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_135(uint16_t colorPointGY) + void OnSuccessResponse_139(uint16_t colorPointGY) { VerifyOrReturn(CheckConstraintType("colorPointGY", "", "uint16")); VerifyOrReturn(CheckConstraintMaxValue("colorPointGY", colorPointGY, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointGY_136() + CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointGY_140() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -6481,86 +6670,130 @@ class Test_TC_CC_2_1 : public TestCommand colorPointGYArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - colorPointGYArgument, this, OnSuccessCallback_136, OnFailureCallback_136)); + colorPointGYArgument, this, OnSuccessCallback_140, OnFailureCallback_140)); return CHIP_NO_ERROR; } - void OnFailureResponse_136(EmberAfStatus status) + void OnFailureResponse_140(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_136() { NextTest(); } + void OnSuccessResponse_140() { NextTest(); } - CHIP_ERROR TestReadBackTheOptionalAttributeColorPointGY_137() + CHIP_ERROR TestReadBackTheOptionalAttributeColorPointGY_141() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_137, OnFailureCallback_137)); + this, OnSuccessCallback_141, OnFailureCallback_141)); return CHIP_NO_ERROR; } - void OnFailureResponse_137(EmberAfStatus status) + void OnFailureResponse_141(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_137(uint16_t colorPointGY) + void OnSuccessResponse_141(uint16_t colorPointGY) { VerifyOrReturn(CheckValue("colorPointGY", colorPointGY, 0U)); NextTest(); } - CHIP_ERROR TestReadTheOptionalAttributeColorPointGIntensity_138() + CHIP_ERROR TestReadTheOptionalAttributeColorPointGIntensity_142() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_138, OnFailureCallback_138)); + this, OnSuccessCallback_142, OnFailureCallback_142)); return CHIP_NO_ERROR; } - void OnFailureResponse_138(EmberAfStatus status) + void OnFailureResponse_142(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_138(uint8_t colorPointGIntensity) + void OnSuccessResponse_142(uint8_t colorPointGIntensity) { VerifyOrReturn(CheckConstraintType("colorPointGIntensity", "", "uint8")); NextTest(); } - CHIP_ERROR TestReadTheOptionalAttributeColorPointBX_139() + CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointGIntensity_143() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::ColorControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + uint8_t colorPointGIntensityArgument; + colorPointGIntensityArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + colorPointGIntensityArgument, this, OnSuccessCallback_143, OnFailureCallback_143)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_143(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_143() { NextTest(); } + + CHIP_ERROR TestReadBackTheOptionalAttributeColorPointGIntensity_144() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::ColorControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_144, OnFailureCallback_144)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_144(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_144(uint8_t colorPointGIntensity) + { + VerifyOrReturn(CheckValue("colorPointGIntensity", colorPointGIntensity, 0)); + + NextTest(); + } + + CHIP_ERROR TestReadTheOptionalAttributeColorPointBX_145() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_139, OnFailureCallback_139)); + this, OnSuccessCallback_145, OnFailureCallback_145)); return CHIP_NO_ERROR; } - void OnFailureResponse_139(EmberAfStatus status) + void OnFailureResponse_145(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_139(uint16_t colorPointBX) + void OnSuccessResponse_145(uint16_t colorPointBX) { VerifyOrReturn(CheckConstraintType("colorPointBX", "", "uint16")); VerifyOrReturn(CheckConstraintMaxValue("colorPointBX", colorPointBX, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointBX_140() + CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointBX_146() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -6570,64 +6803,64 @@ class Test_TC_CC_2_1 : public TestCommand colorPointBXArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - colorPointBXArgument, this, OnSuccessCallback_140, OnFailureCallback_140)); + colorPointBXArgument, this, OnSuccessCallback_146, OnFailureCallback_146)); return CHIP_NO_ERROR; } - void OnFailureResponse_140(EmberAfStatus status) + void OnFailureResponse_146(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_140() { NextTest(); } + void OnSuccessResponse_146() { NextTest(); } - CHIP_ERROR TestReadBackTheOptionalAttributeColorPointBX_141() + CHIP_ERROR TestReadBackTheOptionalAttributeColorPointBX_147() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_141, OnFailureCallback_141)); + this, OnSuccessCallback_147, OnFailureCallback_147)); return CHIP_NO_ERROR; } - void OnFailureResponse_141(EmberAfStatus status) + void OnFailureResponse_147(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_141(uint16_t colorPointBX) + void OnSuccessResponse_147(uint16_t colorPointBX) { VerifyOrReturn(CheckValue("colorPointBX", colorPointBX, 0U)); NextTest(); } - CHIP_ERROR TestReadTheOptionalAttributeColorPointBY_142() + CHIP_ERROR TestReadTheOptionalAttributeColorPointBY_148() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_142, OnFailureCallback_142)); + this, OnSuccessCallback_148, OnFailureCallback_148)); return CHIP_NO_ERROR; } - void OnFailureResponse_142(EmberAfStatus status) + void OnFailureResponse_148(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_142(uint16_t colorPointBY) + void OnSuccessResponse_148(uint16_t colorPointBY) { VerifyOrReturn(CheckConstraintType("colorPointBY", "", "uint16")); VerifyOrReturn(CheckConstraintMaxValue("colorPointBY", colorPointBY, 65279U)); NextTest(); } - CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointBY_143() + CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointBY_149() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; @@ -6637,61 +6870,105 @@ class Test_TC_CC_2_1 : public TestCommand colorPointBYArgument = 0U; ReturnErrorOnFailure(cluster.WriteAttribute( - colorPointBYArgument, this, OnSuccessCallback_143, OnFailureCallback_143)); + colorPointBYArgument, this, OnSuccessCallback_149, OnFailureCallback_149)); return CHIP_NO_ERROR; } - void OnFailureResponse_143(EmberAfStatus status) + void OnFailureResponse_149(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_143() { NextTest(); } + void OnSuccessResponse_149() { NextTest(); } - CHIP_ERROR TestReadBackTheOptionalAttributeColorPointBY_144() + CHIP_ERROR TestReadBackTheOptionalAttributeColorPointBY_150() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_144, OnFailureCallback_144)); + this, OnSuccessCallback_150, OnFailureCallback_150)); return CHIP_NO_ERROR; } - void OnFailureResponse_144(EmberAfStatus status) + void OnFailureResponse_150(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_144(uint16_t colorPointBY) + void OnSuccessResponse_150(uint16_t colorPointBY) { VerifyOrReturn(CheckValue("colorPointBY", colorPointBY, 0U)); NextTest(); } - CHIP_ERROR TestReadTheOptionalAttributeColorPointBIntensity_145() + CHIP_ERROR TestReadTheOptionalAttributeColorPointBIntensity_151() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_145, OnFailureCallback_145)); + this, OnSuccessCallback_151, OnFailureCallback_151)); return CHIP_NO_ERROR; } - void OnFailureResponse_145(EmberAfStatus status) + void OnFailureResponse_151(EmberAfStatus status) { (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_145(uint8_t colorPointBIntensity) + void OnSuccessResponse_151(uint8_t colorPointBIntensity) { VerifyOrReturn(CheckConstraintType("colorPointBIntensity", "", "uint8")); NextTest(); } + + CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointBIntensity_152() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::ColorControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + uint8_t colorPointBIntensityArgument; + colorPointBIntensityArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + colorPointBIntensityArgument, this, OnSuccessCallback_152, OnFailureCallback_152)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_152(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_152() { NextTest(); } + + CHIP_ERROR TestReadBackTheOptionalAttributeColorPointBIntensity_153() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::ColorControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_153, OnFailureCallback_153)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_153(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_153(uint8_t colorPointBIntensity) + { + VerifyOrReturn(CheckValue("colorPointBIntensity", colorPointBIntensity, 0)); + + NextTest(); + } }; class Test_TC_CC_3_1 : public TestCommand @@ -25893,6 +26170,14 @@ class Test_TC_RH_2_1 : public TestCommand ChipLogProgress(chipTool, " ***** Test Step 2 : Reads constraints of attribute: MinMeasuredValue\n"); err = TestReadsConstraintsOfAttributeMinMeasuredValue_2(); break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the optional attribute: Tolerance\n"); + err = TestReadsTheOptionalAttributeTolerance_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads constraints of attribute: Tolerance\n"); + err = TestReadsConstraintsOfAttributeTolerance_4(); + break; } if (CHIP_NO_ERROR != err) @@ -25904,7 +26189,7 @@ class Test_TC_RH_2_1 : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + const uint16_t mTestCount = 5; chip::Optional mCluster; chip::Optional mEndpoint; @@ -25929,6 +26214,26 @@ class Test_TC_RH_2_1 : public TestCommand (static_cast(context))->OnSuccessResponse_2(minMeasuredValue); } + static void OnFailureCallback_3(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_3(status); + } + + static void OnSuccessCallback_3(void * context, uint16_t tolerance) + { + (static_cast(context))->OnSuccessResponse_3(tolerance); + } + + static void OnFailureCallback_4(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_4(status); + } + + static void OnSuccessCallback_4(void * context, uint16_t tolerance) + { + (static_cast(context))->OnSuccessResponse_4(tolerance); + } + // // Tests methods // @@ -25979,6 +26284,54 @@ class Test_TC_RH_2_1 : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", minMeasuredValue, 9999U)); NextTest(); } + + CHIP_ERROR TestReadsTheOptionalAttributeTolerance_3() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::RelativeHumidityMeasurementClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_3(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_3(uint16_t tolerance) + { + VerifyOrReturn(CheckValue("tolerance", tolerance, 0U)); + + NextTest(); + } + + CHIP_ERROR TestReadsConstraintsOfAttributeTolerance_4() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::RelativeHumidityMeasurementClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_4(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_4(uint16_t tolerance) + { + VerifyOrReturn(CheckConstraintType("tolerance", "", "uint16")); + VerifyOrReturn(CheckConstraintMaxValue("tolerance", tolerance, 2048U)); + NextTest(); + } }; class Test_TC_RH_2_2 : public TestCommand @@ -26360,6 +26713,10 @@ class Test_TC_TM_2_1 : public TestCommand ChipLogProgress(chipTool, " ***** Test Step 1 : read the mandatory attribute: MeasuredValue\n"); err = TestReadTheMandatoryAttributeMeasuredValue_1(); break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : read the optional attribute: Tolerance\n"); + err = TestReadTheOptionalAttributeTolerance_2(); + break; } if (CHIP_NO_ERROR != err) @@ -26371,7 +26728,7 @@ class Test_TC_TM_2_1 : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; + const uint16_t mTestCount = 3; chip::Optional mCluster; chip::Optional mEndpoint; @@ -26386,6 +26743,16 @@ class Test_TC_TM_2_1 : public TestCommand (static_cast(context))->OnSuccessResponse_1(measuredValue); } + static void OnFailureCallback_2(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_2(status); + } + + static void OnSuccessCallback_2(void * context, uint16_t tolerance) + { + (static_cast(context))->OnSuccessResponse_2(tolerance); + } + // // Tests methods // @@ -26415,6 +26782,29 @@ class Test_TC_TM_2_1 : public TestCommand VerifyOrReturn(CheckConstraintType("measuredValue", "", "int16")); NextTest(); } + + CHIP_ERROR TestReadTheOptionalAttributeTolerance_2() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TemperatureMeasurementClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_2(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_2(uint16_t tolerance) + { + VerifyOrReturn(CheckConstraintType("tolerance", "", "uint16")); + VerifyOrReturn(CheckConstraintMaxValue("tolerance", tolerance, 2048U)); + NextTest(); + } }; class Test_TC_TM_2_2 : public TestCommand @@ -60689,6 +61079,15 @@ class Test_TC_SWDIAG_3_1 : public TestCommand ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads CurrentHeapUsed attribute value from DUT\n"); + err = ShouldSkip("A_CURRENTHEAPUSED") ? CHIP_NO_ERROR : TestReadsCurrentHeapUsedAttributeValueFromDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads CurrentHeapHighWaterMark attribute value from DUT\n"); + err = ShouldSkip("A_CURRENTHEAPHIGHWATERMARK") ? CHIP_NO_ERROR + : TestReadsCurrentHeapHighWaterMarkAttributeValueFromDut_2(); + break; } if (CHIP_NO_ERROR != err) @@ -60700,11 +61099,31 @@ class Test_TC_SWDIAG_3_1 : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 1; + const uint16_t mTestCount = 3; chip::Optional mCluster; chip::Optional mEndpoint; + static void OnFailureCallback_1(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_1(status); + } + + static void OnSuccessCallback_1(void * context, uint64_t currentHeapUsed) + { + (static_cast(context))->OnSuccessResponse_1(currentHeapUsed); + } + + static void OnFailureCallback_2(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_2(status); + } + + static void OnSuccessCallback_2(void * context, uint64_t currentHeapHighWatermark) + { + (static_cast(context))->OnSuccessResponse_2(currentHeapHighWatermark); + } + // // Tests methods // @@ -60714,6 +61133,53 @@ class Test_TC_SWDIAG_3_1 : public TestCommand SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } + + CHIP_ERROR TestReadsCurrentHeapUsedAttributeValueFromDut_1() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::SoftwareDiagnosticsClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_1(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_1(uint64_t currentHeapUsed) + { + VerifyOrReturn(CheckValue("currentHeapUsed", currentHeapUsed, 0ULL)); + + NextTest(); + } + + CHIP_ERROR TestReadsCurrentHeapHighWaterMarkAttributeValueFromDut_2() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::SoftwareDiagnosticsClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_2(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_2(uint64_t currentHeapHighWatermark) + { + VerifyOrReturn(CheckValue("currentHeapHighWatermark", currentHeapHighWatermark, 0ULL)); + + NextTest(); + } }; class TestSubscribe_OnOff : public TestCommand From 7d2771f779f03ff589e8af9376d2cc35369bfd91 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 10 Jan 2022 15:57:47 -0500 Subject: [PATCH 25/64] Switch to having only one struct named LabelStruct. (#13380) This is shared across the fixed label and user label clusters. The struct definition is in the "detail" namespace, with alias namespaces in the two clusters that use it. Consumers are generally expected to use the per-cluster aliases. --- examples/chip-tool/templates/commands.zapt | 33 ++--- .../templates/partials/log_struct_value.zapt | 16 +++ examples/chip-tool/templates/templates.json | 4 + src/app/common/templates/templates.json | 4 + .../partials/cluster-objects-struct.zapt | 77 +++++++++++ .../templates/app/cluster-objects-src.zapt | 52 +++---- .../templates/app/cluster-objects.zapt | 53 +++----- src/app/zap-templates/templates/app/helper.js | 12 +- .../data-model/chip/fixed-label-cluster.xml | 1 + .../data-model/chip/user-label-cluster.xml | 6 - .../CHIPAttributeTLVValueDecoder.mm | 12 -- .../CHIP/zap-generated/CHIPCallbackBridge.mm | 12 -- .../CHIP/zap-generated/CHIPClustersObjc.mm | 2 - .../zap-generated/CHIPTestClustersObjc.mm | 2 - .../zap-generated/cluster-objects.cpp | 127 +++++++----------- .../zap-generated/cluster-objects.h | 68 ++++------ .../zap-generated/cluster/Commands.h | 77 ++++------- 17 files changed, 263 insertions(+), 295 deletions(-) create mode 100644 examples/chip-tool/templates/partials/log_struct_value.zapt create mode 100644 src/app/zap-templates/partials/cluster-objects-struct.zapt diff --git a/examples/chip-tool/templates/commands.zapt b/examples/chip-tool/templates/commands.zapt index 52b80012429e8f..e8d04e9c789e16 100644 --- a/examples/chip-tool/templates/commands.zapt +++ b/examples/chip-tool/templates/commands.zapt @@ -22,9 +22,17 @@ // generated ones, so are placed here. namespace { +{{#zcl_structs}} +{{#if has_more_than_one_cluster}} +CHIP_ERROR LogValue(const char * label, size_t indent, {{zapTypeToDecodableClusterObjectType name ns="detail" isArgument=true}} value); +{{/if}} +{{/zcl_structs}} + {{#zcl_clusters}} {{#zcl_structs}} +{{#unless has_more_than_one_cluster}} CHIP_ERROR LogValue(const char * label, size_t indent, {{zapTypeToDecodableClusterObjectType name ns=parent.name isArgument=true}} value); +{{/unless}} {{/zcl_structs}} {{/zcl_clusters}} @@ -145,24 +153,17 @@ CHIP_ERROR LogValue(const char * label, size_t indent, const chip::Optional & // be logging. #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-function" +{{#zcl_structs}} +{{#if has_more_than_one_cluster}} +{{> log_struct_value ns="detail"}} +{{/if}} +{{/zcl_structs}} + {{#zcl_clusters}} {{#zcl_structs}} -CHIP_ERROR LogValue(const char * label, size_t indent, {{zapTypeToDecodableClusterObjectType name ns=parent.name isArgument=true}} value) -{ - ChipLogProgress(chipTool, "%s%s: {", IndentStr(indent).c_str(), label); -{{#zcl_struct_items}} - { - CHIP_ERROR err = LogValue("{{asUpperCamelCase label}}", indent + 1, value.{{asLowerCamelCase label}}); - if (err != CHIP_NO_ERROR) - { - ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for '{{asUpperCamelCase label}}'", IndentStr(indent + 1).c_str()); - return err; - } - } -{{/zcl_struct_items}} - ChipLogProgress(chipTool, "%s}", IndentStr(indent).c_str()); - return CHIP_NO_ERROR; -} +{{#unless has_more_than_one_cluster}} +{{> log_struct_value ns=parent.name}} +{{/unless}} {{/zcl_structs}} {{/zcl_clusters}} #pragma GCC diagnostic pop diff --git a/examples/chip-tool/templates/partials/log_struct_value.zapt b/examples/chip-tool/templates/partials/log_struct_value.zapt new file mode 100644 index 00000000000000..33d6b9561cebe1 --- /dev/null +++ b/examples/chip-tool/templates/partials/log_struct_value.zapt @@ -0,0 +1,16 @@ +CHIP_ERROR LogValue(const char * label, size_t indent, {{zapTypeToDecodableClusterObjectType name ns=ns isArgument=true}} value) +{ + ChipLogProgress(chipTool, "%s%s: {", IndentStr(indent).c_str(), label); +{{#zcl_struct_items}} + { + CHIP_ERROR err = LogValue("{{asUpperCamelCase label}}", indent + 1, value.{{asLowerCamelCase label}}); + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for '{{asUpperCamelCase label}}'", IndentStr(indent + 1).c_str()); + return err; + } + } +{{/zcl_struct_items}} + ChipLogProgress(chipTool, "%s}", IndentStr(indent).c_str()); + return CHIP_NO_ERROR; +} diff --git a/examples/chip-tool/templates/templates.json b/examples/chip-tool/templates/templates.json index e56bcf9f99c1f5..cda0394f4b7ea4 100644 --- a/examples/chip-tool/templates/templates.json +++ b/examples/chip-tool/templates/templates.json @@ -35,6 +35,10 @@ { "name": "valueEquals", "path": "partials/test_cluster_value_equals.zapt" + }, + { + "name": "log_struct_value", + "path": "partials/log_struct_value.zapt" } ], "templates": [ diff --git a/src/app/common/templates/templates.json b/src/app/common/templates/templates.json index 16be724a8ae62a..a91a71c88b3af1 100644 --- a/src/app/common/templates/templates.json +++ b/src/app/common/templates/templates.json @@ -13,6 +13,10 @@ { "name": "header", "path": "../../zap-templates/partials/header.zapt" + }, + { + "name": "cluster_objects_struct", + "path": "../../zap-templates/partials/cluster-objects-struct.zapt" } ], "templates": [ diff --git a/src/app/zap-templates/partials/cluster-objects-struct.zapt b/src/app/zap-templates/partials/cluster-objects-struct.zapt new file mode 100644 index 00000000000000..8e502eb4f6e14e --- /dev/null +++ b/src/app/zap-templates/partials/cluster-objects-struct.zapt @@ -0,0 +1,77 @@ +{{#if header}} +namespace {{asUpperCamelCase name}} { + enum class Fields { + {{#zcl_struct_items}} + k{{asUpperCamelCase label}} = {{fieldIdentifier}}, + {{/zcl_struct_items}} + }; + + struct Type { + public: + {{#zcl_struct_items}} + {{zapTypeToEncodableClusterObjectType type}} {{asLowerCamelCase label}}; + {{/zcl_struct_items}} + + CHIP_ERROR Encode(TLV::TLVWriter &writer, TLV::Tag tag) const; + {{#unless struct_contains_array}} + CHIP_ERROR Decode(TLV::TLVReader &reader); + {{/unless}} + {{#if struct_is_fabric_scoped}} + bool MatchesFabricIndex(FabricIndex fabricIndex_) const { + return {{ asLowerCamelCase struct_fabric_idx_field }} == fabricIndex_; + } + {{/if}} + }; + + {{#if struct_contains_array}} + struct DecodableType { + public: + {{#zcl_struct_items}} + {{zapTypeToDecodableClusterObjectType type}} {{asLowerCamelCase label}}; + {{/zcl_struct_items}} + CHIP_ERROR Decode(TLV::TLVReader &reader); + }; + {{else}} + using DecodableType = Type; + {{/if}} + +} // namespace {{asUpperCamelCase name}} +{{else}} +namespace {{asUpperCamelCase name}} { +CHIP_ERROR Type::Encode(TLV::TLVWriter &writer, TLV::Tag tag) const{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + {{#zcl_struct_items}} + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::k{{asUpperCamelCase label}})), {{asLowerCamelCase label}})); + {{/zcl_struct_items}} + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader &reader) { + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + err = reader.EnterContainer(outer); + ReturnErrorOnFailure(err); + while ((err = reader.Next()) == CHIP_NO_ERROR) { + VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (TLV::TagNumFromTag(reader.GetTag())) + { + {{#zcl_struct_items}} + case to_underlying(Fields::k{{asUpperCamelCase label}}): + ReturnErrorOnFailure(DataModel::Decode(reader, {{asLowerCamelCase label}})); + break; + {{/zcl_struct_items}} + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} + +} // namespace {{asUpperCamelCase name}} +{{/if}} \ No newline at end of file diff --git a/src/app/zap-templates/templates/app/cluster-objects-src.zapt b/src/app/zap-templates/templates/app/cluster-objects-src.zapt index c19740f8cf8ce1..0e61078026453d 100644 --- a/src/app/zap-templates/templates/app/cluster-objects-src.zapt +++ b/src/app/zap-templates/templates/app/cluster-objects-src.zapt @@ -5,49 +5,27 @@ namespace chip { namespace app { namespace Clusters { + +namespace detail { +// Structs shared across multiple clusters. +namespace Structs { +{{#zcl_structs}} +{{#if has_more_than_one_cluster}} +{{> cluster_objects_struct header=false}} +{{/if}} +{{/zcl_structs}} +} // namespace Structs +} // namespace detail + {{#zcl_clusters}} namespace {{asUpperCamelCase name}} { {{#zcl_structs}} {{#first}} namespace Structs { {{/first}} -namespace {{asType label}} { -CHIP_ERROR Type::Encode(TLV::TLVWriter &writer, TLV::Tag tag) const{ - TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - {{#zcl_struct_items}} - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::k{{asUpperCamelCase label}})), {{asLowerCamelCase label}})); - {{/zcl_struct_items}} - ReturnErrorOnFailure(writer.EndContainer(outer)); - return CHIP_NO_ERROR; -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader &reader) { - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVType outer; - VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); - err = reader.EnterContainer(outer); - ReturnErrorOnFailure(err); - while ((err = reader.Next()) == CHIP_NO_ERROR) { - VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); - switch (TLV::TagNumFromTag(reader.GetTag())) - { - {{#zcl_struct_items}} - case to_underlying(Fields::k{{asUpperCamelCase label}}): - ReturnErrorOnFailure(DataModel::Decode(reader, {{asLowerCamelCase label}})); - break; - {{/zcl_struct_items}} - default: - break; - } - } - - VerifyOrReturnError(err == CHIP_END_OF_TLV, err); - ReturnErrorOnFailure(reader.ExitContainer(outer)); - return CHIP_NO_ERROR; -} - -} // namespace {{asType label}} +{{#unless has_more_than_one_cluster}} +{{> cluster_objects_struct header=false}} +{{/unless}} {{#last}} } // namespace Structs {{/last}} diff --git a/src/app/zap-templates/templates/app/cluster-objects.zapt b/src/app/zap-templates/templates/app/cluster-objects.zapt index 32198df4eb324f..762649454499e3 100644 --- a/src/app/zap-templates/templates/app/cluster-objects.zapt +++ b/src/app/zap-templates/templates/app/cluster-objects.zapt @@ -20,6 +20,17 @@ namespace chip { namespace app { namespace Clusters { +namespace detail { +// Structs shared across multiple clusters. +namespace Structs { +{{#zcl_structs}} +{{#if has_more_than_one_cluster}} +{{> cluster_objects_struct header=true}} +{{/if}} +{{/zcl_structs}} +} // namespace Structs +} // namespace detail + {{#zcl_clusters}} namespace {{asUpperCamelCase name}} { {{#zcl_enums}} @@ -55,43 +66,11 @@ k{{asUpperCamelCase label}} = {{asHex mask}}, {{#first}} namespace Structs { {{/first}} -namespace {{asUpperCamelCase name}} { - enum class Fields { - {{#zcl_struct_items}} - k{{asUpperCamelCase label}} = {{fieldIdentifier}}, - {{/zcl_struct_items}} - }; - - struct Type { - public: - {{#zcl_struct_items}} - {{zapTypeToEncodableClusterObjectType type}} {{asLowerCamelCase label}}; - {{/zcl_struct_items}} - - CHIP_ERROR Encode(TLV::TLVWriter &writer, TLV::Tag tag) const; - {{#unless struct_contains_array}} - CHIP_ERROR Decode(TLV::TLVReader &reader); - {{/unless}} - {{#if struct_is_fabric_scoped}} - bool MatchesFabricIndex(FabricIndex fabricIndex_) const { - return {{ asLowerCamelCase struct_fabric_idx_field }} == fabricIndex_; - } - {{/if}} - }; - - {{#if struct_contains_array}} - struct DecodableType { - public: - {{#zcl_struct_items}} - {{zapTypeToDecodableClusterObjectType type}} {{asLowerCamelCase label}}; - {{/zcl_struct_items}} - CHIP_ERROR Decode(TLV::TLVReader &reader); - }; - {{else}} - using DecodableType = Type; - {{/if}} - -} // namespace {{asUpperCamelCase name}} +{{#if has_more_than_one_cluster}} +namespace {{asUpperCamelCase name}} = Clusters::detail::Structs::{{asUpperCamelCase name}}; +{{else}} +{{> cluster_objects_struct header=true}} +{{/if}} {{#last}} } // namespace Structs {{/last}} diff --git a/src/app/zap-templates/templates/app/helper.js b/src/app/zap-templates/templates/app/helper.js index b0cba01b38400e..1c4bb270720da2 100644 --- a/src/app/zap-templates/templates/app/helper.js +++ b/src/app/zap-templates/templates/app/helper.js @@ -352,6 +352,16 @@ function asMEI(prefix, suffix) return cHelper.asHex((prefix << 16) + suffix, 8); } +// Not to be exported. +function nsValueToNamespace(ns) +{ + if (ns == "detail") { + return ns; + } + + return asUpperCamelCase(ns); +} + /* * @brief * @@ -372,7 +382,7 @@ async function zapTypeToClusterObjectType(type, isDecodable, options) let passByReference = false; async function fn(pkgId) { - const ns = options.hash.ns ? ('chip::app::Clusters::' + asUpperCamelCase(options.hash.ns) + '::') : ''; + const ns = options.hash.ns ? ('chip::app::Clusters::' + nsValueToNamespace(options.hash.ns) + '::') : ''; const typeChecker = async (method) => zclHelper[method](this.global.db, type, pkgId).then(zclType => zclType != 'unknown'); if (await typeChecker('isEnum')) { diff --git a/src/app/zap-templates/zcl/data-model/chip/fixed-label-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/fixed-label-cluster.xml index 62497c43e0231e..727da449590993 100644 --- a/src/app/zap-templates/zcl/data-model/chip/fixed-label-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/fixed-label-cluster.xml @@ -19,6 +19,7 @@ limitations under the License. + diff --git a/src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml index d54cdef16e1f5c..6a7c5a9e67578c 100644 --- a/src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml @@ -17,12 +17,6 @@ limitations under the License. - - - - - - General User Label diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm index 94046a3660c397..c54917d50ef6d0 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm @@ -2889,12 +2889,6 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() length:entry_0.label.size() encoding:NSUTF8StringEncoding]; - newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() - length:entry_0.label.size() - encoding:NSUTF8StringEncoding]; - newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() - length:entry_0.value.size() - encoding:NSUTF8StringEncoding]; newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() length:entry_0.value.size() encoding:NSUTF8StringEncoding]; @@ -8807,12 +8801,6 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() length:entry_0.label.size() encoding:NSUTF8StringEncoding]; - newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() - length:entry_0.label.size() - encoding:NSUTF8StringEncoding]; - newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() - length:entry_0.value.size() - encoding:NSUTF8StringEncoding]; newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() length:entry_0.value.size() encoding:NSUTF8StringEncoding]; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm index 3db41dee7cd30f..38356da0500dc8 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm @@ -2182,12 +2182,6 @@ newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() length:entry_0.label.size() encoding:NSUTF8StringEncoding]; - newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() - length:entry_0.label.size() - encoding:NSUTF8StringEncoding]; - newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() - length:entry_0.value.size() - encoding:NSUTF8StringEncoding]; newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() length:entry_0.value.size() encoding:NSUTF8StringEncoding]; @@ -4911,12 +4905,6 @@ newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() length:entry_0.label.size() encoding:NSUTF8StringEncoding]; - newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() - length:entry_0.label.size() - encoding:NSUTF8StringEncoding]; - newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() - length:entry_0.value.size() - encoding:NSUTF8StringEncoding]; newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() length:entry_0.value.size() encoding:NSUTF8StringEncoding]; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index 86c4b8bcf84d8a..1ef1774893c22f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -22033,8 +22033,6 @@ new CHIPDefaultSuccessCallbackBridge( } auto element_0 = (CHIPUserLabelClusterLabelStruct *) value[i_0]; listHolder_0->mList[i_0].label = [self asCharSpan:element_0.label]; - listHolder_0->mList[i_0].label = [self asCharSpan:element_0.label]; - listHolder_0->mList[i_0].value = [self asCharSpan:element_0.value]; listHolder_0->mList[i_0].value = [self asCharSpan:element_0.value]; } cppValue = ListType_0(listHolder_0->mList, value.count); diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm index f496d1a3e84469..1127c6d8da58f9 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm @@ -3853,8 +3853,6 @@ new CHIPDefaultSuccessCallbackBridge( } auto element_0 = (CHIPFixedLabelClusterLabelStruct *) value[i_0]; listHolder_0->mList[i_0].label = [self asCharSpan:element_0.label]; - listHolder_0->mList[i_0].label = [self asCharSpan:element_0.label]; - listHolder_0->mList[i_0].value = [self asCharSpan:element_0.value]; listHolder_0->mList[i_0].value = [self asCharSpan:element_0.value]; } cppValue = ListType_0(listHolder_0->mList, value.count); diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index 8e9200bfb34abb..f88d21cd6be73f 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -22,6 +22,53 @@ namespace chip { namespace app { namespace Clusters { + +namespace detail { +// Structs shared across multiple clusters. +namespace Structs { +namespace LabelStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLabel)), label)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kValue)), value)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + err = reader.EnterContainer(outer); + ReturnErrorOnFailure(err); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kLabel): + ReturnErrorOnFailure(DataModel::Decode(reader, label)); + break; + case to_underlying(Fields::kValue): + ReturnErrorOnFailure(DataModel::Decode(reader, value)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} + +} // namespace LabelStruct +} // namespace Structs +} // namespace detail + namespace PowerConfiguration { namespace Commands { @@ -10639,46 +10686,6 @@ namespace Events { } // namespace GroupKeyManagement namespace FixedLabel { namespace Structs { -namespace LabelStruct { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const -{ - TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLabel)), label)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kValue)), value)); - ReturnErrorOnFailure(writer.EndContainer(outer)); - return CHIP_NO_ERROR; -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVType outer; - VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); - err = reader.EnterContainer(outer); - ReturnErrorOnFailure(err); - while ((err = reader.Next()) == CHIP_NO_ERROR) - { - VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); - switch (TLV::TagNumFromTag(reader.GetTag())) - { - case to_underlying(Fields::kLabel): - ReturnErrorOnFailure(DataModel::Decode(reader, label)); - break; - case to_underlying(Fields::kValue): - ReturnErrorOnFailure(DataModel::Decode(reader, value)); - break; - default: - break; - } - } - - VerifyOrReturnError(err == CHIP_END_OF_TLV, err); - ReturnErrorOnFailure(reader.ExitContainer(outer)); - return CHIP_NO_ERROR; -} - -} // namespace LabelStruct } // namespace Structs namespace Commands { @@ -10715,46 +10722,6 @@ namespace Events { } // namespace FixedLabel namespace UserLabel { namespace Structs { -namespace LabelStruct { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const -{ - TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLabel)), label)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kValue)), value)); - ReturnErrorOnFailure(writer.EndContainer(outer)); - return CHIP_NO_ERROR; -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVType outer; - VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); - err = reader.EnterContainer(outer); - ReturnErrorOnFailure(err); - while ((err = reader.Next()) == CHIP_NO_ERROR) - { - VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); - switch (TLV::TagNumFromTag(reader.GetTag())) - { - case to_underlying(Fields::kLabel): - ReturnErrorOnFailure(DataModel::Decode(reader, label)); - break; - case to_underlying(Fields::kValue): - ReturnErrorOnFailure(DataModel::Decode(reader, value)); - break; - default: - break; - } - } - - VerifyOrReturnError(err == CHIP_END_OF_TLV, err); - ReturnErrorOnFailure(reader.ExitContainer(outer)); - return CHIP_NO_ERROR; -} - -} // namespace LabelStruct } // namespace Structs namespace Commands { 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 89f5b534549069..8064d67fa1195a 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 @@ -37,6 +37,32 @@ namespace chip { namespace app { namespace Clusters { +namespace detail { +// Structs shared across multiple clusters. +namespace Structs { +namespace LabelStruct { +enum class Fields +{ + kLabel = 1, + kValue = 2, +}; + +struct Type +{ +public: + chip::CharSpan label; + chip::CharSpan value; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; + +using DecodableType = Type; + +} // namespace LabelStruct +} // namespace Structs +} // namespace detail + namespace PowerConfiguration { namespace Attributes { @@ -15459,26 +15485,7 @@ struct TypeInfo namespace FixedLabel { namespace Structs { -namespace LabelStruct { -enum class Fields -{ - kLabel = 1, - kValue = 2, -}; - -struct Type -{ -public: - chip::CharSpan label; - chip::CharSpan value; - - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; - -using DecodableType = Type; - -} // namespace LabelStruct +namespace LabelStruct = Clusters::detail::Structs::LabelStruct; } // namespace Structs namespace Attributes { @@ -15552,26 +15559,7 @@ struct TypeInfo namespace UserLabel { namespace Structs { -namespace LabelStruct { -enum class Fields -{ - kLabel = 1, - kValue = 2, -}; - -struct Type -{ -public: - chip::CharSpan label; - chip::CharSpan value; - - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; - -using DecodableType = Type; - -} // namespace LabelStruct +namespace LabelStruct = Clusters::detail::Structs::LabelStruct; } // namespace Structs namespace Attributes { diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 62e06a3fe67bf4..324333277943e2 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -39,6 +39,9 @@ // generated ones, so are placed here. namespace { +CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::detail::Structs::LabelStruct::DecodableType & value); + CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Scenes::Structs::SceneExtensionFieldSet::DecodableType & value); CHIP_ERROR LogValue(const char * label, size_t indent, @@ -94,10 +97,6 @@ CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::GroupKeyManagement::Structs::GroupKey::DecodableType & value); CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::GroupKeyManagement::Structs::GroupKeySet::DecodableType & value); -CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::FixedLabel::Structs::LabelStruct::DecodableType & value); -CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::UserLabel::Structs::LabelStruct::DecodableType & value); CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::ModeSelect::Structs::ModeOptionStruct::DecodableType & value); CHIP_ERROR LogValue(const char * label, size_t indent, @@ -268,6 +267,30 @@ CHIP_ERROR LogValue(const char * label, size_t indent, const chip::Optional & // be logging. #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-function" +CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::detail::Structs::LabelStruct::DecodableType & value) +{ + ChipLogProgress(chipTool, "%s%s: {", IndentStr(indent).c_str(), label); + { + CHIP_ERROR err = LogValue("Label", indent + 1, value.label); + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'Label'", IndentStr(indent + 1).c_str()); + return err; + } + } + { + CHIP_ERROR err = LogValue("Value", indent + 1, value.value); + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'Value'", IndentStr(indent + 1).c_str()); + return err; + } + } + ChipLogProgress(chipTool, "%s}", IndentStr(indent).c_str()); + return CHIP_NO_ERROR; +} + CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Scenes::Structs::SceneExtensionFieldSet::DecodableType & value) { @@ -1552,52 +1575,6 @@ CHIP_ERROR LogValue(const char * label, size_t indent, ChipLogProgress(chipTool, "%s}", IndentStr(indent).c_str()); return CHIP_NO_ERROR; } -CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::FixedLabel::Structs::LabelStruct::DecodableType & value) -{ - ChipLogProgress(chipTool, "%s%s: {", IndentStr(indent).c_str(), label); - { - CHIP_ERROR err = LogValue("Label", indent + 1, value.label); - if (err != CHIP_NO_ERROR) - { - ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'Label'", IndentStr(indent + 1).c_str()); - return err; - } - } - { - CHIP_ERROR err = LogValue("Value", indent + 1, value.value); - if (err != CHIP_NO_ERROR) - { - ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'Value'", IndentStr(indent + 1).c_str()); - return err; - } - } - ChipLogProgress(chipTool, "%s}", IndentStr(indent).c_str()); - return CHIP_NO_ERROR; -} -CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::UserLabel::Structs::LabelStruct::DecodableType & value) -{ - ChipLogProgress(chipTool, "%s%s: {", IndentStr(indent).c_str(), label); - { - CHIP_ERROR err = LogValue("Label", indent + 1, value.label); - if (err != CHIP_NO_ERROR) - { - ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'Label'", IndentStr(indent + 1).c_str()); - return err; - } - } - { - CHIP_ERROR err = LogValue("Value", indent + 1, value.value); - if (err != CHIP_NO_ERROR) - { - ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'Value'", IndentStr(indent + 1).c_str()); - return err; - } - } - ChipLogProgress(chipTool, "%s}", IndentStr(indent).c_str()); - return CHIP_NO_ERROR; -} CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::ModeSelect::Structs::ModeOptionStruct::DecodableType & value) { From 19f61ebd90836421b8e6cb99f185ba9b19b7aa78 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 10 Jan 2022 16:15:59 -0500 Subject: [PATCH 26/64] Enforce spec range restrictions on most nullable integer types for command/struct fields. (#13072) This does not enforce restrictions for the "odd-sized" (3-, 5-, 6-, 7-byte) integers, because at the point when we do TLV decoding for command/struct fields we don't know we're dealing with one of those. Those should generally not be used in command/struct fields anyway. --- src/app/data-model/Decode.h | 7 +++++- src/app/data-model/Encode.h | 11 +++++++++ src/app/data-model/Nullable.h | 21 +++++++++++++++++ .../Framework Helpers/DefaultsUtils.m | 2 +- .../QRCode/QRCodeViewController.m | 8 +++---- src/darwin/Framework/CHIP/CHIPError.h | 3 ++- src/darwin/Framework/CHIP/CHIPError.mm | 23 ++++++++++++------- .../Framework/CHIP/CHIPError_Internal.h | 2 +- .../Framework/CHIPTests/CHIPErrorTestUtils.mm | 2 -- src/lib/core/CHIPError.h | 9 ++++++++ 10 files changed, 70 insertions(+), 18 deletions(-) diff --git a/src/app/data-model/Decode.h b/src/app/data-model/Decode.h index dffad80af0e204..17076900befccd 100644 --- a/src/app/data-model/Decode.h +++ b/src/app/data-model/Decode.h @@ -158,7 +158,12 @@ CHIP_ERROR Decode(TLV::TLVReader & reader, Nullable & x) } // We have a value; decode it. - return Decode(reader, x.SetNonNull()); + ReturnErrorOnFailure(Decode(reader, x.SetNonNull())); + if (!x.HasValidValue()) + { + return CHIP_ERROR_IM_CONSTRAINT_ERROR; + } + return CHIP_NO_ERROR; } } // namespace DataModel diff --git a/src/app/data-model/Encode.h b/src/app/data-model/Encode.h index e78481b8344e7d..86ffc2c6ca5a74 100644 --- a/src/app/data-model/Encode.h +++ b/src/app/data-model/Encode.h @@ -22,6 +22,8 @@ #include #include +#include + namespace chip { namespace app { namespace DataModel { @@ -115,6 +117,15 @@ CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag, const Nullable & x) { return writer.PutNull(tag); } + // Allow sending invalid values for nullables when + // CONFIG_IM_BUILD_FOR_UNIT_TEST is true, so we can test how the other side + // responds. +#if !CONFIG_IM_BUILD_FOR_UNIT_TEST + if (!x.HasValidValue()) + { + return CHIP_ERROR_IM_CONSTRAINT_ERROR; + } +#endif // !CONFIG_IM_BUILD_FOR_UNIT_TEST return Encode(writer, tag, x.Value()); } diff --git a/src/app/data-model/Nullable.h b/src/app/data-model/Nullable.h index ff33d2d0d68fde..e8bf8c5ae2d1a1 100644 --- a/src/app/data-model/Nullable.h +++ b/src/app/data-model/Nullable.h @@ -18,8 +18,11 @@ #pragma once +#include #include +#include + namespace chip { namespace app { namespace DataModel { @@ -52,6 +55,24 @@ struct Nullable : protected Optional { return Optional::Emplace(std::forward(args)...); } + + // For integer types, being nullable involves a range restriction. + template < + typename U = std::decay_t, + typename std::enable_if_t<(std::is_integral::value && !std::is_same::value) || std::is_enum::value, int> = 0> + constexpr bool HasValidValue() const + { + return NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, Value()); + } + + // For all other types, all values are valid. + template , + typename std::enable_if_t<(!std::is_integral::value || std::is_same::value) && !std::is_enum::value, + int> = 0> + constexpr bool HasValidValue() const + { + return true; + } }; } // namespace DataModel diff --git a/src/darwin/CHIPTool/CHIPTool/Framework Helpers/DefaultsUtils.m b/src/darwin/CHIPTool/CHIPTool/Framework Helpers/DefaultsUtils.m index 9b4f09ce5fe64a..5e30ddb8e62154 100644 --- a/src/darwin/CHIPTool/CHIPTool/Framework Helpers/DefaultsUtils.m +++ b/src/darwin/CHIPTool/CHIPTool/Framework Helpers/DefaultsUtils.m @@ -119,7 +119,7 @@ BOOL CHIPIsDevicePaired(uint64_t deviceId) NSError * error; bool paired = [controller isDevicePaired:deviceId error:&error]; - if (error.code != CHIPSuccess) { + if (error != nil) { NSLog(@"Error retrieving device info for deviceId %llu", deviceId); paired = NO; } diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.m b/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.m index 275c57a5cad81e..df63c6978e8aec 100644 --- a/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.m +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.m @@ -474,9 +474,9 @@ - (void)setVendorIDOnAccessory } // MARK: CHIPDevicePairingDelegate -- (void)onPairingComplete:(NSError *)error +- (void)onPairingComplete:(NSError * _Nullable)error { - if (error.code != CHIPSuccess) { + if (error != nil) { NSLog(@"Got pairing error back %@", error); } else { dispatch_async(dispatch_get_main_queue(), ^{ @@ -721,9 +721,9 @@ - (void)onConnectNetworkResponse:(NSError *)error [controller updateDevice:deviceId fabricId:0]; } -- (void)onAddressUpdated:(NSError *)error +- (void)onAddressUpdated:(NSError * _Nullable)error { - if (error.code != CHIPSuccess) { + if (error != nil) { NSLog(@"Error retrieving device informations over Mdns: %@", error); return; } diff --git a/src/darwin/Framework/CHIP/CHIPError.h b/src/darwin/Framework/CHIP/CHIPError.h index ea0c6c32652f21..1c4c2ba5304ff1 100644 --- a/src/darwin/Framework/CHIP/CHIPError.h +++ b/src/darwin/Framework/CHIP/CHIPError.h @@ -20,8 +20,8 @@ NS_ASSUME_NONNULL_BEGIN FOUNDATION_EXPORT NSErrorDomain const CHIPErrorDomain; +// clang-format off typedef NS_ERROR_ENUM(CHIPErrorDomain, CHIPErrorCode){ - CHIPSuccess = 0, CHIPErrorCodeUndefinedError = 1, CHIPErrorCodeInvalidStringLength = 2, CHIPErrorCodeInvalidIntegerValue = 3, @@ -39,5 +39,6 @@ typedef NS_ERROR_ENUM(CHIPErrorDomain, CHIPErrorCode){ CHIPErrorCodeUnsupportedWrite = 0x88, CHIPErrorCodeUnsupportedCluster = 0xC3, }; +// clang-format on NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/CHIPError.mm b/src/darwin/Framework/CHIP/CHIPError.mm index 0cf8db0c967ceb..eab2a978150e2f 100644 --- a/src/darwin/Framework/CHIP/CHIPError.mm +++ b/src/darwin/Framework/CHIP/CHIPError.mm @@ -63,10 +63,14 @@ + (NSError *)errorForCHIPErrorCode:(CHIP_ERROR)errorCode userInfo:@{ NSLocalizedDescriptionKey : NSLocalizedString(@"Integrity check failed.", nil) }]; } - if (errorCode == CHIP_NO_ERROR) { + if (errorCode == CHIP_ERROR_IM_CONSTRAINT_ERROR) { return [NSError errorWithDomain:CHIPErrorDomain - code:CHIPSuccess - userInfo:@{ NSLocalizedDescriptionKey : NSLocalizedString(@"Success.", nil) }]; + code:CHIPErrorCodeConstraintError + userInfo:@{ NSLocalizedDescriptionKey : NSLocalizedString(@"Value out of range.", nil) }]; + } + + if (errorCode == CHIP_NO_ERROR) { + return nil; } return [NSError errorWithDomain:CHIPErrorDomain @@ -132,8 +136,12 @@ + (NSError *)errorForZCLErrorCode:(uint8_t)errorCode } } -+ (CHIP_ERROR)errorToCHIPErrorCode:(NSError *)error ++ (CHIP_ERROR)errorToCHIPErrorCode:(NSError * _Nullable)error { + if (error == nil) { + return CHIP_NO_ERROR; + } + if (error.domain != CHIPErrorDomain) { return CHIP_ERROR_INTERNAL; } @@ -151,8 +159,8 @@ + (CHIP_ERROR)errorToCHIPErrorCode:(NSError *)error return CHIP_ERROR_INCORRECT_STATE; case CHIPErrorCodeIntegrityCheckFailed: return CHIP_ERROR_INTEGRITY_CHECK_FAILED; - case CHIPSuccess: - return CHIP_NO_ERROR; + case CHIPErrorCodeConstraintError: + return CHIP_ERROR_IM_CONSTRAINT_ERROR; default: return CHIP_ERROR_INTERNAL; } @@ -165,6 +173,7 @@ + (uint8_t)errorToZCLErrorCode:(NSError * _Nullable)error if (error == nil) { return EMBER_ZCL_STATUS_SUCCESS; } + if (error.domain != CHIPErrorDomain) { return EMBER_ZCL_STATUS_FAILURE; } @@ -186,8 +195,6 @@ + (uint8_t)errorToZCLErrorCode:(NSError * _Nullable)error return EMBER_ZCL_STATUS_UNSUPPORTED_WRITE; case CHIPErrorCodeUnsupportedCluster: return EMBER_ZCL_STATUS_UNSUPPORTED_CLUSTER; - case CHIPSuccess: - return EMBER_ZCL_STATUS_SUCCESS; default: return EMBER_ZCL_STATUS_FAILURE; } diff --git a/src/darwin/Framework/CHIP/CHIPError_Internal.h b/src/darwin/Framework/CHIP/CHIPError_Internal.h index 8656dd0e7a8399..4b121a3e6b365f 100644 --- a/src/darwin/Framework/CHIP/CHIPError_Internal.h +++ b/src/darwin/Framework/CHIP/CHIPError_Internal.h @@ -24,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN @interface CHIPError : NSObject + (nullable NSError *)errorForCHIPErrorCode:(CHIP_ERROR)errorCode; + (nullable NSError *)errorForZCLErrorCode:(uint8_t)errorCode; -+ (CHIP_ERROR)errorToCHIPErrorCode:(NSError *)error; ++ (CHIP_ERROR)errorToCHIPErrorCode:(NSError * _Nullable)error; + (uint8_t)errorToZCLErrorCode:(NSError * _Nullable)error; @end diff --git a/src/darwin/Framework/CHIPTests/CHIPErrorTestUtils.mm b/src/darwin/Framework/CHIPTests/CHIPErrorTestUtils.mm index 4a24cf04a351f6..585a743c81dc84 100644 --- a/src/darwin/Framework/CHIPTests/CHIPErrorTestUtils.mm +++ b/src/darwin/Framework/CHIPTests/CHIPErrorTestUtils.mm @@ -54,8 +54,6 @@ + (uint8_t)errorToZCLErrorCode:(NSError * _Nullable)error return EMBER_ZCL_STATUS_UNSUPPORTED_WRITE; case CHIPErrorCodeUnsupportedCluster: return EMBER_ZCL_STATUS_UNSUPPORTED_CLUSTER; - case CHIPSuccess: - return EMBER_ZCL_STATUS_SUCCESS; default: return EMBER_ZCL_STATUS_FAILURE; } diff --git a/src/lib/core/CHIPError.h b/src/lib/core/CHIPError.h index f1039996298ca8..f7961f7c55768d 100644 --- a/src/lib/core/CHIPError.h +++ b/src/lib/core/CHIPError.h @@ -2357,6 +2357,15 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_MISSING_URI_SEPARATOR CHIP_CORE_ERROR(0xd7) +/** + * @def CHIP_ERROR_IM_CONSTRAINT_ERROR + * + * @brief + * The equivalent of a CONSTRAINT_ERROR status: a value was out of the valid + * range. + */ +#define CHIP_ERROR_IM_CONSTRAINT_ERROR CHIP_CORE_ERROR(0xd8) + /** * @} */ From a841e21e4253a8aa36966844ef52bfbd4723dfaf Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Tue, 11 Jan 2022 00:56:45 -0800 Subject: [PATCH 27/64] Implement localization configuration server support (#13415) * Implement localization configuration server support * Run codegen --- .../all-clusters-common/all-clusters-app.zap | 102 ++ .../esp32/main/CMakeLists.txt | 1 + examples/all-clusters-app/mbed/CMakeLists.txt | 1 + .../bridge-app/bridge-common/bridge-app.zap | 54 +- examples/bridge-app/esp32/main/CMakeLists.txt | 1 + .../door-lock-common/door-lock-app.zap | 51 + .../lighting-app/esp32/main/CMakeLists.txt | 1 + .../lighting-common/lighting-app.zap | 54 +- examples/lighting-app/mbed/CMakeLists.txt | 1 + examples/lighting-app/telink/CMakeLists.txt | 1 + examples/lock-app/esp32/main/CMakeLists.txt | 1 + examples/lock-app/lock-common/lock-app.zap | 51 + examples/lock-app/mbed/CMakeLists.txt | 1 + .../esp32/main/CMakeLists.txt | 1 + .../ota-provider-common/ota-provider-app.zap | 54 +- .../esp32/main/CMakeLists.txt | 1 + .../ota-requestor-app.zap | 54 +- examples/pump-app/pump-common/pump-app.zap | 54 +- .../pump-controller-app.zap | 54 +- .../esp32/main/CMakeLists.txt | 1 + .../esp32/main/temperature-measurement.zap | 54 +- .../thermostat-common/thermostat.zap | 283 ++--- examples/tv-app/tv-common/tv-app.zap | 51 + .../tv-casting-common/tv-casting-app.zap | 55 +- examples/window-app/common/window-app.zap | 54 +- .../localization-configuration-server.cpp | 145 +++ .../tests/suites/TestDescriptorCluster.yaml | 1 + src/app/util/util.cpp | 1 - src/app/zap_cluster_list.py | 2 +- .../data_model/controller-clusters.zap | 51 + .../java/zap-generated/CHIPCallbackTypes.h | 5 + .../java/zap-generated/CHIPClusters-JNI.cpp | 46 + .../zap-generated/CHIPClustersRead-JNI.cpp | 77 ++ .../java/zap-generated/CHIPReadCallbacks.cpp | 87 ++ .../java/zap-generated/CHIPReadCallbacks.h | 30 + .../chip/devicecontroller/ChipClusters.java | 42 + .../devicecontroller/ClusterInfoMapping.java | 37 + .../devicecontroller/ClusterReadMapping.java | 34 + .../devicecontroller/ClusterWriteMapping.java | 22 + .../python/chip/clusters/CHIPClusters.py | 21 + .../CHIPAttributeTLVValueDecoder.mm | 46 + .../CHIP/zap-generated/CHIPCallbackBridge.mm | 39 + .../CHIPCallbackBridge_internal.h | 29 + .../CHIP/zap-generated/CHIPClustersObjc.h | 15 + .../CHIP/zap-generated/CHIPClustersObjc.mm | 50 + .../zap-generated/CHIPClustersObjc_internal.h | 4 + .../CHIP/zap-generated/CHIPTestClustersObjc.h | 10 + .../zap-generated/CHIPTestClustersObjc.mm | 52 + .../Framework/CHIPTests/CHIPClustersTests.m | 109 +- src/include/platform/PlatformManager.h | 11 +- .../internal/GenericPlatformManagerImpl.h | 8 + .../Darwin/ConfigurationManagerImpl.cpp | 12 + .../Darwin/ConfigurationManagerImpl.h | 2 + src/platform/Darwin/PlatformManagerImpl.cpp | 16 + src/platform/Darwin/PlatformManagerImpl.h | 1 + .../Linux/ConfigurationManagerImpl.cpp | 6 + src/platform/Linux/PlatformManagerImpl.cpp | 16 + src/platform/Linux/PlatformManagerImpl.h | 1 + src/platform/fake/PlatformManagerImpl.h | 5 + .../zap-generated/IMClusterCommandHandler.cpp | 46 +- .../PluginApplicationCallbacks.h | 1 + .../zap-generated/callback-stub.cpp | 8 + .../zap-generated/endpoint_config.h | 1076 +++++++++-------- .../zap-generated/gen_config.h | 6 + .../PluginApplicationCallbacks.h | 1 + .../zap-generated/callback-stub.cpp | 8 + .../zap-generated/endpoint_config.h | 49 +- .../bridge-app/zap-generated/gen_config.h | 6 + .../zap-generated/cluster/Commands.h | 110 ++ .../chip-tool/zap-generated/test/Commands.h | 34 +- .../zap-generated/CHIPClientCallbacks.cpp | 22 + .../zap-generated/CHIPClientCallbacks.h | 5 + .../zap-generated/CHIPClusters.cpp | 2 + .../zap-generated/CHIPClusters.h | 7 + .../PluginApplicationCallbacks.h | 1 + .../zap-generated/callback-stub.cpp | 8 + .../zap-generated/endpoint_config.h | 7 +- .../zap-generated/gen_config.h | 5 + .../zap-generated/tests/CHIPClustersTest.h | 7 + .../PluginApplicationCallbacks.h | 1 + .../zap-generated/callback-stub.cpp | 8 + .../zap-generated/endpoint_config.h | 49 +- .../door-lock-app/zap-generated/gen_config.h | 6 + .../PluginApplicationCallbacks.h | 1 + .../zap-generated/callback-stub.cpp | 8 + .../zap-generated/endpoint_config.h | 57 +- .../lighting-app/zap-generated/gen_config.h | 6 + .../PluginApplicationCallbacks.h | 1 + .../lock-app/zap-generated/callback-stub.cpp | 8 + .../lock-app/zap-generated/endpoint_config.h | 49 +- .../lock-app/zap-generated/gen_config.h | 6 + .../PluginApplicationCallbacks.h | 1 + .../zap-generated/callback-stub.cpp | 8 + .../zap-generated/endpoint_config.h | 25 +- .../zap-generated/gen_config.h | 6 + .../PluginApplicationCallbacks.h | 1 + .../zap-generated/callback-stub.cpp | 8 + .../zap-generated/endpoint_config.h | 25 +- .../zap-generated/gen_config.h | 6 + .../PluginApplicationCallbacks.h | 1 + .../pump-app/zap-generated/callback-stub.cpp | 8 + .../pump-app/zap-generated/endpoint_config.h | 55 +- .../pump-app/zap-generated/gen_config.h | 6 + .../PluginApplicationCallbacks.h | 1 + .../zap-generated/callback-stub.cpp | 8 + .../zap-generated/endpoint_config.h | 51 +- .../zap-generated/gen_config.h | 6 + .../PluginApplicationCallbacks.h | 1 + .../zap-generated/callback-stub.cpp | 8 + .../zap-generated/endpoint_config.h | 41 +- .../zap-generated/gen_config.h | 6 + .../PluginApplicationCallbacks.h | 1 + .../zap-generated/callback-stub.cpp | 8 + .../zap-generated/endpoint_config.h | 53 +- .../thermostat/zap-generated/gen_config.h | 6 + .../PluginApplicationCallbacks.h | 1 + .../tv-app/zap-generated/callback-stub.cpp | 8 + .../tv-app/zap-generated/endpoint_config.h | 99 +- .../tv-app/zap-generated/gen_config.h | 6 + .../PluginApplicationCallbacks.h | 1 + .../zap-generated/callback-stub.cpp | 8 + .../zap-generated/endpoint_config.h | 115 +- .../tv-casting-app/zap-generated/gen_config.h | 6 + .../PluginApplicationCallbacks.h | 1 + .../zap-generated/callback-stub.cpp | 8 + .../zap-generated/endpoint_config.h | 49 +- .../window-app/zap-generated/gen_config.h | 6 + 127 files changed, 3250 insertions(+), 1076 deletions(-) create mode 100644 src/app/clusters/localization-configuration-server/localization-configuration-server.cpp 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 151d3c92463b45..d5ca564c973bfc 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 @@ -1626,6 +1626,57 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ActiveLocale", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Power Source Configuration", "code": 46, @@ -8987,6 +9038,57 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ActiveLocale", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Power Source", "code": 47, diff --git a/examples/all-clusters-app/esp32/main/CMakeLists.txt b/examples/all-clusters-app/esp32/main/CMakeLists.txt index 904178d23f1fb4..f45ffca624370a 100644 --- a/examples/all-clusters-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/main/CMakeLists.txt @@ -77,6 +77,7 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/occupancy-sensor-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ias-zone-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ethernet-network-diagnostics-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/localization-configuration-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/wifi-network-diagnostics-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/wake-on-lan-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/pump-configuration-and-control-server" diff --git a/examples/all-clusters-app/mbed/CMakeLists.txt b/examples/all-clusters-app/mbed/CMakeLists.txt index 03798b5d4d2258..e63b91ee53179e 100644 --- a/examples/all-clusters-app/mbed/CMakeLists.txt +++ b/examples/all-clusters-app/mbed/CMakeLists.txt @@ -111,6 +111,7 @@ target_sources(${APP_TARGET} PRIVATE ${APP_CLUSTERS}/keypad-input-server/keypad-input-server.cpp ${APP_CLUSTERS}/level-control/level-control.cpp ${APP_CLUSTERS}/low-power-server/low-power-server.cpp + ${APP_CLUSTERS}/localization-configuration-server/localization-configuration-server.cpp ${APP_CLUSTERS}/media-input-server/media-input-server.cpp ${APP_CLUSTERS}/media-playback-server/media-playback-server.cpp ${APP_CLUSTERS}/mode-select-server/mode-select-server.cpp diff --git a/examples/bridge-app/bridge-common/bridge-app.zap b/examples/bridge-app/bridge-common/bridge-app.zap index 79aa436e01699c..8797f9f2f9e7dc 100644 --- a/examples/bridge-app/bridge-common/bridge-app.zap +++ b/examples/bridge-app/bridge-common/bridge-app.zap @@ -365,6 +365,57 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ActiveLocale", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "General Commissioning", "code": 48, @@ -4493,5 +4544,6 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/bridge-app/esp32/main/CMakeLists.txt b/examples/bridge-app/esp32/main/CMakeLists.txt index ee2ca2f5cab616..697feecf78abb7 100644 --- a/examples/bridge-app/esp32/main/CMakeLists.txt +++ b/examples/bridge-app/esp32/main/CMakeLists.txt @@ -30,6 +30,7 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/level-control" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/diagnostic-logs-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ethernet-network-diagnostics-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/localization-configuration-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/fixed-label-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/user-label-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thread-network-diagnostics-server" diff --git a/examples/door-lock-app/door-lock-common/door-lock-app.zap b/examples/door-lock-app/door-lock-common/door-lock-app.zap index fee9a5287e34e7..2005037317d9cf 100644 --- a/examples/door-lock-app/door-lock-common/door-lock-app.zap +++ b/examples/door-lock-app/door-lock-common/door-lock-app.zap @@ -1159,6 +1159,57 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ActiveLocale", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Power Source Configuration", "code": 46, diff --git a/examples/lighting-app/esp32/main/CMakeLists.txt b/examples/lighting-app/esp32/main/CMakeLists.txt index f4a667cd42fb53..fa544eadb52424 100644 --- a/examples/lighting-app/esp32/main/CMakeLists.txt +++ b/examples/lighting-app/esp32/main/CMakeLists.txt @@ -42,6 +42,7 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general-commissioning-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general-diagnostics-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/identify-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/localization-configuration-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/level-control" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/network-commissioning-old" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/occupancy-sensor-server" diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index a0f66f9986e364..bc7f5e82de85cd 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -1344,6 +1344,57 @@ ], "attributes": [] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ActiveLocale", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "General Commissioning", "code": 48, @@ -6686,5 +6737,6 @@ "endpointVersion": 1, "deviceIdentifier": 259 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/lighting-app/mbed/CMakeLists.txt b/examples/lighting-app/mbed/CMakeLists.txt index e79b8e443772e9..5c90f5e4a644a3 100644 --- a/examples/lighting-app/mbed/CMakeLists.txt +++ b/examples/lighting-app/mbed/CMakeLists.txt @@ -80,6 +80,7 @@ target_sources(${APP_TARGET} PRIVATE ${CHIP_ROOT}/src/app/clusters/identify-server/identify-server.cpp ${CHIP_ROOT}/src/app/clusters/diagnostic-logs-server/diagnostic-logs-server.cpp ${CHIP_ROOT}/src/app/clusters/ethernet-network-diagnostics-server/ethernet-network-diagnostics-server.cpp + ${CHIP_ROOT}/src/app/clusters/localization-configuration-server/localization-configuration-server.cpp ${CHIP_ROOT}/src/app/clusters/fixed-label-server/fixed-label-server.cpp ${CHIP_ROOT}/src/app/clusters/user-label-server/user-label-server.cpp ${CHIP_ROOT}/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-server.cpp diff --git a/examples/lighting-app/telink/CMakeLists.txt b/examples/lighting-app/telink/CMakeLists.txt index 2f367d1c761593..0dfdd67b0cf741 100644 --- a/examples/lighting-app/telink/CMakeLists.txt +++ b/examples/lighting-app/telink/CMakeLists.txt @@ -80,6 +80,7 @@ target_sources(app PRIVATE ${CHIP_ROOT}/src/app/clusters/identify-server/identify-server.cpp ${CHIP_ROOT}/src/app/clusters/diagnostic-logs-server/diagnostic-logs-server.cpp ${CHIP_ROOT}/src/app/clusters/ethernet-network-diagnostics-server/ethernet-network-diagnostics-server.cpp + ${CHIP_ROOT}/src/app/clusters/localization-configuration-server/localization-configuration-server.cpp ${CHIP_ROOT}/src/app/clusters/fixed-label-server/fixed-label-server.cpp ${CHIP_ROOT}/src/app/clusters/user-label-server/user-label-server.cpp ${CHIP_ROOT}/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-server.cpp diff --git a/examples/lock-app/esp32/main/CMakeLists.txt b/examples/lock-app/esp32/main/CMakeLists.txt index 2360ce4384e07a..353812d4dc7ed2 100644 --- a/examples/lock-app/esp32/main/CMakeLists.txt +++ b/examples/lock-app/esp32/main/CMakeLists.txt @@ -138,6 +138,7 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/descriptor" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/diagnostic-logs-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ethernet-network-diagnostics-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/localization-configuration-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/fixed-label-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thread-network-diagnostics-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/wifi-network-diagnostics-server" diff --git a/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index fa00c5ce5fdd29..3a4a932f72b95f 100644 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -1159,6 +1159,57 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ActiveLocale", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Power Source Configuration", "code": 46, diff --git a/examples/lock-app/mbed/CMakeLists.txt b/examples/lock-app/mbed/CMakeLists.txt index c7ad27a340177e..a6821cdf28e0d0 100644 --- a/examples/lock-app/mbed/CMakeLists.txt +++ b/examples/lock-app/mbed/CMakeLists.txt @@ -78,6 +78,7 @@ target_sources(${APP_TARGET} PRIVATE ${CHIP_ROOT}/src/app/clusters/descriptor/descriptor.cpp ${CHIP_ROOT}/src/app/clusters/diagnostic-logs-server/diagnostic-logs-server.cpp ${CHIP_ROOT}/src/app/clusters/ethernet-network-diagnostics-server/ethernet-network-diagnostics-server.cpp + ${CHIP_ROOT}/src/app/clusters/localization-configuration-server/localization-configuration-server.cpp ${CHIP_ROOT}/src/app/clusters/fixed-label-server/fixed-label-server.cpp ${CHIP_ROOT}/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-server.cpp ${CHIP_ROOT}/src/app/clusters/wifi-network-diagnostics-server/wifi-network-diagnostics-server.cpp diff --git a/examples/ota-provider-app/esp32/main/CMakeLists.txt b/examples/ota-provider-app/esp32/main/CMakeLists.txt index ee8077e9c8ff7a..2d673860ea9668 100644 --- a/examples/ota-provider-app/esp32/main/CMakeLists.txt +++ b/examples/ota-provider-app/esp32/main/CMakeLists.txt @@ -34,6 +34,7 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/descriptor" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/diagnostic-logs-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ethernet-network-diagnostics-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/localization-configuration-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/fixed-label-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/user-label-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thread-network-diagnostics-server" diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap b/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap index 87d608abc236eb..ac517f02102643 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap @@ -1107,6 +1107,57 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ActiveLocale", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "General Commissioning", "code": 48, @@ -3813,5 +3864,6 @@ "endpointVersion": 1, "deviceIdentifier": 22 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/ota-requestor-app/esp32/main/CMakeLists.txt b/examples/ota-requestor-app/esp32/main/CMakeLists.txt index 4b65e80c847aba..e0287765287da3 100644 --- a/examples/ota-requestor-app/esp32/main/CMakeLists.txt +++ b/examples/ota-requestor-app/esp32/main/CMakeLists.txt @@ -34,6 +34,7 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/descriptor" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/diagnostic-logs-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ethernet-network-diagnostics-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/localization-configuration-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/fixed-label-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/user-label-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thread-network-diagnostics-server" diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap index 9cb1e4a6837e87..61f9c57ef951e1 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap @@ -1206,6 +1206,57 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ActiveLocale", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "General Commissioning", "code": 48, @@ -3912,5 +3963,6 @@ "endpointVersion": 1, "deviceIdentifier": 22 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/pump-app/pump-common/pump-app.zap b/examples/pump-app/pump-common/pump-app.zap index 724aa5e0b7b721..aa5acc9e5c7880 100644 --- a/examples/pump-app/pump-common/pump-app.zap +++ b/examples/pump-app/pump-common/pump-app.zap @@ -1073,6 +1073,57 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ActiveLocale", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "General Commissioning", "code": 48, @@ -6202,5 +6253,6 @@ "endpointVersion": 1, "deviceIdentifier": 771 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap index 9f86d51aaeba81..5c5dabed60e3e5 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap @@ -1073,6 +1073,57 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ActiveLocale", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "General Commissioning", "code": 48, @@ -5947,5 +5998,6 @@ "endpointVersion": 1, "deviceIdentifier": 772 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/temperature-measurement-app/esp32/main/CMakeLists.txt b/examples/temperature-measurement-app/esp32/main/CMakeLists.txt index 47439a37fe78a9..0c6ff31b1961cc 100644 --- a/examples/temperature-measurement-app/esp32/main/CMakeLists.txt +++ b/examples/temperature-measurement-app/esp32/main/CMakeLists.txt @@ -34,6 +34,7 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/descriptor" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/diagnostic-logs-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ethernet-network-diagnostics-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/localization-configuration-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/fixed-label-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/user-label-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thread-network-diagnostics-server" diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap b/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap index ce9e32d49f441e..503fdb2e7bb73e 100644 --- a/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap @@ -767,6 +767,57 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ActiveLocale", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "General Commissioning", "code": 48, @@ -3357,5 +3408,6 @@ "endpointVersion": 1, "deviceIdentifier": 22 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index 9df9f49d2c2020..4eabfcd62e8e4d 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -1356,6 +1356,57 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ActiveLocale", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "General Commissioning", "code": 48, @@ -12390,7 +12441,7 @@ "enabled": 0, "commands": [ { - "name": "ChangeChannel", + "name": "ChangeChannelRequest", "code": 0, "mfgCode": null, "source": "client", @@ -12398,15 +12449,7 @@ "outgoing": 1 }, { - "name": "ChangeChannelByNumber", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "SkipChannel", + "name": "ChangeChannelByNumberRequest", "code": 2, "mfgCode": null, "source": "client", @@ -12439,16 +12482,7 @@ "define": "CHANNEL_CLUSTER", "side": "server", "enabled": 0, - "commands": [ - { - "name": "ChangeChannelResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - } - ], + "commands": [], "attributes": [ { "name": "channel list", @@ -12554,16 +12588,7 @@ "define": "TARGET_NAVIGATOR_CLUSTER", "side": "server", "enabled": 0, - "commands": [ - { - "name": "NavigateTargetResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - } - ], + "commands": [], "attributes": [ { "name": "target navigator list", @@ -12606,7 +12631,7 @@ "enabled": 0, "commands": [ { - "name": "MediaPlay", + "name": "PlayRequest", "code": 0, "mfgCode": null, "source": "client", @@ -12614,7 +12639,7 @@ "outgoing": 1 }, { - "name": "MediaPause", + "name": "PauseRequest", "code": 1, "mfgCode": null, "source": "client", @@ -12622,7 +12647,7 @@ "outgoing": 1 }, { - "name": "MediaStop", + "name": "StopRequest", "code": 2, "mfgCode": null, "source": "client", @@ -12630,7 +12655,7 @@ "outgoing": 1 }, { - "name": "MediaStartOver", + "name": "StartOverRequest", "code": 3, "mfgCode": null, "source": "client", @@ -12638,7 +12663,7 @@ "outgoing": 1 }, { - "name": "MediaPrevious", + "name": "PreviousRequest", "code": 4, "mfgCode": null, "source": "client", @@ -12646,7 +12671,7 @@ "outgoing": 1 }, { - "name": "MediaNext", + "name": "NextRequest", "code": 5, "mfgCode": null, "source": "client", @@ -12654,7 +12679,7 @@ "outgoing": 1 }, { - "name": "MediaRewind", + "name": "RewindRequest", "code": 6, "mfgCode": null, "source": "client", @@ -12662,7 +12687,7 @@ "outgoing": 1 }, { - "name": "MediaFastForward", + "name": "FastForwardRequest", "code": 7, "mfgCode": null, "source": "client", @@ -12670,7 +12695,7 @@ "outgoing": 1 }, { - "name": "MediaSkipForward", + "name": "SkipForwardRequest", "code": 8, "mfgCode": null, "source": "client", @@ -12678,20 +12703,12 @@ "outgoing": 1 }, { - "name": "MediaSkipBackward", + "name": "SkipBackwardRequest", "code": 9, "mfgCode": null, "source": "client", "incoming": 0, "outgoing": 1 - }, - { - "name": "MediaSeek", - "code": 10, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 } ], "attributes": [ @@ -12719,88 +12736,7 @@ "define": "MEDIA_PLAYBACK_CLUSTER", "side": "server", "enabled": 0, - "commands": [ - { - "name": "MediaPlayResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MediaPauseResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MediaStopResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MediaStartOverResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MediaPreviousResponse", - "code": 4, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MediaNextResponse", - "code": 5, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MediaRewindResponse", - "code": 6, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MediaFastForwardResponse", - "code": 7, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MediaSkipForwardResponse", - "code": 8, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MediaSkipBackwardResponse", - "code": 9, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - } - ], + "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -12828,7 +12764,7 @@ "enabled": 0, "commands": [ { - "name": "SelectInput", + "name": "SelectInputRequest", "code": 0, "mfgCode": null, "source": "client", @@ -12836,7 +12772,7 @@ "outgoing": 1 }, { - "name": "ShowInputStatus", + "name": "ShowInputStatusRequest", "code": 1, "mfgCode": null, "source": "client", @@ -12844,7 +12780,7 @@ "outgoing": 1 }, { - "name": "HideInputStatus", + "name": "HideInputStatusRequest", "code": 2, "mfgCode": null, "source": "client", @@ -12852,7 +12788,7 @@ "outgoing": 1 }, { - "name": "RenameInput", + "name": "RenameInputRequest", "code": 3, "mfgCode": null, "source": "client", @@ -12989,7 +12925,7 @@ "enabled": 0, "commands": [ { - "name": "SendKey", + "name": "SendKeyRequest", "code": 0, "mfgCode": null, "source": "client", @@ -13022,16 +12958,7 @@ "define": "KEYPAD_INPUT_CLUSTER", "side": "server", "enabled": 0, - "commands": [ - { - "name": "SendKeyResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - } - ], + "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -13059,7 +12986,7 @@ "enabled": 0, "commands": [ { - "name": "LaunchContent", + "name": "LaunchContentRequest", "code": 0, "mfgCode": null, "source": "client", @@ -13067,7 +12994,7 @@ "outgoing": 1 }, { - "name": "LaunchURL", + "name": "LaunchURLRequest", "code": 1, "mfgCode": null, "source": "client", @@ -13100,24 +13027,7 @@ "define": "CONTENT_LAUNCH_CLUSTER", "side": "server", "enabled": 0, - "commands": [ - { - "name": "LaunchContentResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "LaunchURLResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - } - ], + "commands": [], "attributes": [ { "name": "accept header list", @@ -13175,7 +13085,7 @@ "enabled": 0, "commands": [ { - "name": "SelectOutput", + "name": "SelectOutputRequest", "code": 0, "mfgCode": null, "source": "client", @@ -13183,7 +13093,7 @@ "outgoing": 1 }, { - "name": "RenameOutput", + "name": "RenameOutputRequest", "code": 1, "mfgCode": null, "source": "client", @@ -13259,7 +13169,7 @@ "enabled": 0, "commands": [ { - "name": "LaunchApp", + "name": "LaunchAppRequest", "code": 0, "mfgCode": null, "source": "client", @@ -13292,16 +13202,7 @@ "define": "APPLICATION_LAUNCHER_CLUSTER", "side": "server", "enabled": 0, - "commands": [ - { - "name": "LaunchAppResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - } - ], + "commands": [], "attributes": [ { "name": "application launcher list", @@ -13486,20 +13387,12 @@ "enabled": 0, "commands": [ { - "name": "GetSetupPIN", + "name": "GetSetupPINRequest", "code": 0, "mfgCode": null, "source": "client", "incoming": 0, "outgoing": 1 - }, - { - "name": "Login", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 } ], "attributes": [ @@ -13527,16 +13420,7 @@ "define": "ACCOUNT_LOGIN_CLUSTER", "side": "server", "enabled": 0, - "commands": [ - { - "name": "GetSetupPINResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - } - ], + "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -13955,5 +13839,6 @@ "endpointVersion": 1, "deviceIdentifier": 769 } - ] -} + ], + "log": [] +} \ No newline at end of file diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index 45bded72d77abc..bdb14be5f02b4d 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -1341,6 +1341,57 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ActiveLocale", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "General Commissioning", "code": 48, diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap index baffa731a1a644..7e95189d1b678c 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap @@ -1356,6 +1356,57 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ActiveLocale", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "General Commissioning", "code": 48, @@ -12093,7 +12144,7 @@ "outgoing": 1 }, { - "name": "PauseReques", + "name": "PauseRequest", "code": 1, "mfgCode": null, "source": "client", @@ -12109,7 +12160,7 @@ "outgoing": 1 }, { - "name": "StartOver", + "name": "StartOverRequest", "code": 3, "mfgCode": null, "source": "client", diff --git a/examples/window-app/common/window-app.zap b/examples/window-app/common/window-app.zap index 4847140a84e503..320de9fd66734b 100644 --- a/examples/window-app/common/window-app.zap +++ b/examples/window-app/common/window-app.zap @@ -945,6 +945,57 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ActiveLocale", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Power Source", "code": 47, @@ -7557,5 +7608,6 @@ "endpointVersion": 1, "deviceIdentifier": 514 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/src/app/clusters/localization-configuration-server/localization-configuration-server.cpp b/src/app/clusters/localization-configuration-server/localization-configuration-server.cpp new file mode 100644 index 00000000000000..d8f06923d4c065 --- /dev/null +++ b/src/app/clusters/localization-configuration-server/localization-configuration-server.cpp @@ -0,0 +1,145 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/**************************************************************************** + * @file + * @brief Implementation for the Localization Configuration Server Cluster + ***************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::LocalizationConfiguration; +using namespace chip::app::Clusters::LocalizationConfiguration::Attributes; + +namespace { + +class LocalizationConfigurationAttrAccess : public AttributeAccessInterface +{ +public: + // Register for the Localization Configuration cluster on all endpoints. + LocalizationConfigurationAttrAccess() : AttributeAccessInterface(Optional::Missing(), LocalizationConfiguration::Id) + {} + + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override; + +private: + CHIP_ERROR ReadActiveLocale(EndpointId endpoint, AttributeValueEncoder & aEncoder); + CHIP_ERROR WriteActiveLocale(EndpointId endpoint, AttributeValueDecoder & aDecoder); + CHIP_ERROR ReadSupportedLocales(AttributeValueEncoder & aEncoder); +}; + +LocalizationConfigurationAttrAccess gAttrAccess; + +CHIP_ERROR LocalizationConfigurationAttrAccess::ReadActiveLocale(EndpointId endpoint, AttributeValueEncoder & aEncoder) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + char activeLocale[DeviceLayer::ConfigurationManager::kMaxLanguageTagLength + 1]; + size_t codeLen = 0; + + if (DeviceLayer::ConfigurationMgr().GetActiveLocale(activeLocale, sizeof(activeLocale), codeLen) == CHIP_NO_ERROR) + { + err = aEncoder.Encode(chip::CharSpan(activeLocale, strlen(activeLocale))); + } + + return err; +} + +CHIP_ERROR LocalizationConfigurationAttrAccess::WriteActiveLocale(EndpointId endpoint, AttributeValueDecoder & aDecoder) +{ + DeviceLayer::AttributeList supportedLocales; + chip::CharSpan activeLocale; + + ReturnErrorOnFailure(aDecoder.Decode(activeLocale)); + VerifyOrReturnError(activeLocale.size() <= DeviceLayer::ConfigurationManager::kMaxLanguageTagLength, + CHIP_ERROR_INVALID_MESSAGE_LENGTH); + + return DeviceLayer::ConfigurationMgr().StoreActiveLocale(activeLocale.data(), activeLocale.size()); +} + +CHIP_ERROR LocalizationConfigurationAttrAccess::ReadSupportedLocales(AttributeValueEncoder & aEncoder) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + DeviceLayer::AttributeList supportedLocales; + + if (DeviceLayer::PlatformMgr().GetSupportedLocales(supportedLocales) == CHIP_NO_ERROR) + { + err = aEncoder.EncodeList([&supportedLocales](const auto & encoder) -> CHIP_ERROR { + for (auto locales : supportedLocales) + { + ReturnErrorOnFailure(encoder.Encode(locales)); + } + + return CHIP_NO_ERROR; + }); + } + else + { + err = aEncoder.EncodeEmptyList(); + } + + return err; +} + +CHIP_ERROR LocalizationConfigurationAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) +{ + VerifyOrDie(aPath.mClusterId == LocalizationConfiguration::Id); + + switch (aPath.mAttributeId) + { + case ActiveLocale::Id: + return ReadActiveLocale(aPath.mEndpointId, aEncoder); + case SupportedLocales::Id: + return ReadSupportedLocales(aEncoder); + default: + break; + } + return CHIP_NO_ERROR; +} + +CHIP_ERROR LocalizationConfigurationAttrAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) +{ + VerifyOrDie(aPath.mClusterId == LocalizationConfiguration::Id); + + switch (aPath.mAttributeId) + { + case ActiveLocale::Id: + return WriteActiveLocale(aPath.mEndpointId, aDecoder); + default: + break; + } + return CHIP_NO_ERROR; +} + +} // anonymous namespace + +void MatterLocalizationConfigurationPluginServerInitCallback(void) +{ + registerAttributeAccessOverride(&gAttrAccess); +} diff --git a/src/app/tests/suites/TestDescriptorCluster.yaml b/src/app/tests/suites/TestDescriptorCluster.yaml index 7f5745480d45f5..81831fe0ed18d7 100644 --- a/src/app/tests/suites/TestDescriptorCluster.yaml +++ b/src/app/tests/suites/TestDescriptorCluster.yaml @@ -42,6 +42,7 @@ tests: 0x0028, # Basic Information 0x0029, # OTA Software Update Provider 0x002A, # OTA Software Update Requestor + 0x002B, # Localization Configuration 0x002E, # Power Source Configuration 0x0030, # General Commissioning 0x0031, # Network Commissioning diff --git a/src/app/util/util.cpp b/src/app/util/util.cpp index 67621dcfba7552..c304e440be67b8 100644 --- a/src/app/util/util.cpp +++ b/src/app/util/util.cpp @@ -311,7 +311,6 @@ void MatterAlarmsPluginServerInitCallback() {} void MatterTimePluginServerInitCallback() {} void MatterAclPluginServerInitCallback() {} void MatterPollControlPluginServerInitCallback() {} -void MatterLocalizationConfigurationPluginServerInitCallback() {} void MatterLocalizationUnitPluginServerInitCallback() {} void MatterLocalizationTimeFormatPluginServerInitCallback() {} void MatterTimeSynchronizationPluginServerInitCallback() {} diff --git a/src/app/zap_cluster_list.py b/src/app/zap_cluster_list.py index efea6547296770..dd763a17eea499 100755 --- a/src/app/zap_cluster_list.py +++ b/src/app/zap_cluster_list.py @@ -44,7 +44,7 @@ 'ILLUMINANCE_MEASUREMENT_CLUSTER': [], 'KEYPAD_INPUT_CLUSTER': ['keypad-input-server'], 'LEVEL_CONTROL_CLUSTER': ['level-control'], - 'LOCALIZATION_CONFIGURATION_CLUSTER': [], + 'LOCALIZATION_CONFIGURATION_CLUSTER': ['localization-configuration-server'], 'LOCALIZATION_TIME_FORMAT_CLUSTER': [], 'LOCALIZATION_UNIT_CLUSTER': [], 'LOW_POWER_CLUSTER': ['low-power-server'], diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 4b93e00304b3b4..c69350722fabee 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -2489,6 +2489,57 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [], + "attributes": [] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [], + "attributes": [ + { + "name": "ActiveLocale", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Power Source Configuration", "code": 46, diff --git a/src/controller/java/zap-generated/CHIPCallbackTypes.h b/src/controller/java/zap-generated/CHIPCallbackTypes.h index 3fc0d5c6385238..7f604c7534ea12 100644 --- a/src/controller/java/zap-generated/CHIPCallbackTypes.h +++ b/src/controller/java/zap-generated/CHIPCallbackTypes.h @@ -584,6 +584,11 @@ typedef void (*CHIPLevelControlClusterAttributeListAttributeCallbackType)( typedef void (*CHIPLevelControlClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::LevelControl::Attributes::ClusterRevision::TypeInfo::DecodableArgType); +typedef void (*CHIPLocalizationConfigurationClusterActiveLocaleAttributeCallbackType)( + void *, chip::app::Clusters::LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo::DecodableArgType); +typedef void (*CHIPLocalizationConfigurationClusterSupportedLocalesAttributeCallbackType)( + void *, const chip::app::Clusters::LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo::DecodableType &); + typedef void (*CHIPLowPowerClusterAttributeListAttributeCallbackType)( void *, const chip::app::Clusters::LowPower::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPLowPowerClusterClusterRevisionAttributeCallbackType)( diff --git a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp index a682dd33846d9b..a3ca7427bcf524 100644 --- a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp @@ -11927,6 +11927,52 @@ JNI_METHOD(void, LevelControlCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(jlong, LocalizationConfigurationCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +{ + chip::DeviceLayer::StackLock lock; + LocalizationConfigurationCluster * cppCluster = new LocalizationConfigurationCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} + +JNI_METHOD(void, LocalizationConfigurationCluster, writeActiveLocaleAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; + TypeInfo::Type cppValue; + + cppValue = chip::JniUtfString(env, static_cast(value)).charSpan(); + + 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; + LocalizationConfigurationCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(jlong, LowPowerCluster, 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 9aa754e40fb606..35059ef7947460 100644 --- a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp @@ -8695,6 +8695,83 @@ JNI_METHOD(void, LevelControlCluster, readClusterRevisionAttribute)(JNIEnv * env onFailure.release(); } +JNI_METHOD(void, LocalizationConfigurationCluster, readActiveLocaleAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; + 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::LocalizationConfigurationCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, LocalizationConfigurationCluster, readSupportedLocalesAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; + 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::LocalizationConfigurationCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, LowPowerCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index b94fe8f896d4f6..d601ecc1a90fc6 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -6623,6 +6623,93 @@ void CHIPLevelControlAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } +CHIPLocalizationConfigurationSupportedLocalesAttributeCallback::CHIPLocalizationConfigurationSupportedLocalesAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPLocalizationConfigurationSupportedLocalesAttributeCallback::~CHIPLocalizationConfigurationSupportedLocalesAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPLocalizationConfigurationSupportedLocalesAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::CharSpan entryValue = entry; + + jstring entryObject = nullptr; + chip::UtfString entryStr(env, entryValue); + if (!entryNull) + { + entryObject = jstring(entryStr.jniValue()); + } + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding SupportedLocalesAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + CHIPLowPowerAttributeListAttributeCallback::CHIPLowPowerAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h index e8318d9d36a451..63517b51228b9f 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.h +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h @@ -2336,6 +2336,36 @@ class CHIPLevelControlAttributeListAttributeCallback bool keepAlive; }; +class CHIPLocalizationConfigurationSupportedLocalesAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPLocalizationConfigurationSupportedLocalesAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPLocalizationConfigurationSupportedLocalesAttributeCallback(); + + static void maybeDestroy(CHIPLocalizationConfigurationSupportedLocalesAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + static void OnSubscriptionEstablished(void * context) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + class CHIPLowPowerAttributeListAttributeCallback : public chip::Callback::Callback { diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 20ff51cc26ce34..5a49c6f38638e6 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -6213,6 +6213,48 @@ private native void subscribeClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); } + public static class LocalizationConfigurationCluster extends BaseChipCluster { + public LocalizationConfigurationCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + public static long clusterId() { + return Long.parseUnsignedLong("43"); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface SupportedLocalesAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public void readActiveLocaleAttribute(CharStringAttributeCallback callback) { + readActiveLocaleAttribute(chipClusterPtr, callback); + } + + public void writeActiveLocaleAttribute(DefaultClusterCallback callback, String value) { + writeActiveLocaleAttribute(chipClusterPtr, callback, value); + } + + public void readSupportedLocalesAttribute(SupportedLocalesAttributeCallback callback) { + readSupportedLocalesAttribute(chipClusterPtr, callback); + } + + private native void readActiveLocaleAttribute( + long chipClusterPtr, CharStringAttributeCallback callback); + + private native void writeActiveLocaleAttribute( + long chipClusterPtr, DefaultClusterCallback callback, String value); + + private native void readSupportedLocalesAttribute( + long chipClusterPtr, SupportedLocalesAttributeCallback callback); + } + public static class LowPowerCluster extends BaseChipCluster { public LowPowerCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index aabc135a13f3e1..b689eb3b748e05 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -2100,6 +2100,32 @@ public void onError(Exception ex) { } } + public static class DelegatedLocalizationConfigurationClusterSupportedLocalesAttributeCallback + implements ChipClusters.LocalizationConfigurationCluster.SupportedLocalesAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = + new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedLowPowerClusterAttributeListAttributeCallback implements ChipClusters.LowPowerCluster.AttributeListAttributeCallback, DelegatedClusterCallback { @@ -4308,6 +4334,11 @@ public Map initializeClusterMap() { (ptr, endpointId) -> new ChipClusters.LevelControlCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("levelControl", levelControlClusterInfo); + ClusterInfo localizationConfigurationClusterInfo = + new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.LocalizationConfigurationCluster(ptr, endpointId), + new HashMap<>()); + clusterMap.put("localizationConfiguration", localizationConfigurationClusterInfo); ClusterInfo lowPowerClusterInfo = new ClusterInfo( (ptr, endpointId) -> new ChipClusters.LowPowerCluster(ptr, endpointId), @@ -4495,6 +4526,9 @@ public void combineCommand( destination.get("illuminanceMeasurement").combineCommands(source.get("illuminanceMeasurement")); destination.get("keypadInput").combineCommands(source.get("keypadInput")); destination.get("levelControl").combineCommands(source.get("levelControl")); + destination + .get("localizationConfiguration") + .combineCommands(source.get("localizationConfiguration")); destination.get("lowPower").combineCommands(source.get("lowPower")); destination.get("mediaInput").combineCommands(source.get("mediaInput")); destination.get("mediaPlayback").combineCommands(source.get("mediaPlayback")); @@ -7209,6 +7243,9 @@ public Map> getCommandMap() { levelControlClusterInteractionInfoMap.put( "stopWithOnOff", levelControlstopWithOnOffInteractionInfo); commandMap.put("levelControl", levelControlClusterInteractionInfoMap); + Map localizationConfigurationClusterInteractionInfoMap = + new LinkedHashMap<>(); + commandMap.put("localizationConfiguration", localizationConfigurationClusterInteractionInfoMap); Map lowPowerClusterInteractionInfoMap = new LinkedHashMap<>(); Map lowPowersleepCommandParams = new LinkedHashMap(); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java index 2b72e2ba2654b4..683e425cab0083 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java @@ -3335,6 +3335,40 @@ public Map> getReadAttributeMap() { readLevelControlInteractionInfo.put( "readClusterRevisionAttribute", readLevelControlClusterRevisionAttributeInteractionInfo); readAttributeMap.put("levelControl", readLevelControlInteractionInfo); + Map readLocalizationConfigurationInteractionInfo = + new LinkedHashMap<>(); + Map readLocalizationConfigurationActiveLocaleCommandParams = + new LinkedHashMap(); + InteractionInfo readLocalizationConfigurationActiveLocaleAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.LocalizationConfigurationCluster) cluster) + .readActiveLocaleAttribute((ChipClusters.CharStringAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedCharStringAttributeCallback(), + readLocalizationConfigurationActiveLocaleCommandParams); + readLocalizationConfigurationInteractionInfo.put( + "readActiveLocaleAttribute", + readLocalizationConfigurationActiveLocaleAttributeInteractionInfo); + Map readLocalizationConfigurationSupportedLocalesCommandParams = + new LinkedHashMap(); + InteractionInfo readLocalizationConfigurationSupportedLocalesAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.LocalizationConfigurationCluster) cluster) + .readSupportedLocalesAttribute( + (ChipClusters.LocalizationConfigurationCluster + .SupportedLocalesAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedLocalizationConfigurationClusterSupportedLocalesAttributeCallback(), + readLocalizationConfigurationSupportedLocalesCommandParams); + readLocalizationConfigurationInteractionInfo.put( + "readSupportedLocalesAttribute", + readLocalizationConfigurationSupportedLocalesAttributeInteractionInfo); + readAttributeMap.put("localizationConfiguration", readLocalizationConfigurationInteractionInfo); Map readLowPowerInteractionInfo = new LinkedHashMap<>(); Map readLowPowerAttributeListCommandParams = new LinkedHashMap(); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java index a9142c66b7e062..9acf2b4ab55d94 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java @@ -695,6 +695,28 @@ public Map> getWriteAttributeMap() { "writeStartUpCurrentLevelAttribute", writeLevelControlStartUpCurrentLevelAttributeInteractionInfo); writeAttributeMap.put("levelControl", writeLevelControlInteractionInfo); + Map writeLocalizationConfigurationInteractionInfo = + new LinkedHashMap<>(); + Map writeLocalizationConfigurationActiveLocaleCommandParams = + new LinkedHashMap(); + CommandParameterInfo localizationConfigurationactiveLocaleCommandParameterInfo = + new CommandParameterInfo("value", String.class); + writeLocalizationConfigurationActiveLocaleCommandParams.put( + "value", localizationConfigurationactiveLocaleCommandParameterInfo); + InteractionInfo writeLocalizationConfigurationActiveLocaleAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.LocalizationConfigurationCluster) cluster) + .writeActiveLocaleAttribute( + (DefaultClusterCallback) callback, (String) commandArguments.get("value")); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeLocalizationConfigurationActiveLocaleCommandParams); + writeLocalizationConfigurationInteractionInfo.put( + "writeActiveLocaleAttribute", + writeLocalizationConfigurationActiveLocaleAttributeInteractionInfo); + writeAttributeMap.put( + "localizationConfiguration", writeLocalizationConfigurationInteractionInfo); Map writeLowPowerInteractionInfo = new LinkedHashMap<>(); writeAttributeMap.put("lowPower", writeLowPowerInteractionInfo); Map writeMediaInputInteractionInfo = new LinkedHashMap<>(); diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 1ceeb9ec38273e..5be5c8d09d65e7 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -2504,6 +2504,25 @@ class ChipClusters: }, }, } + _LOCALIZATION_CONFIGURATION_CLUSTER_INFO = { + "clusterName": "LocalizationConfiguration", + "clusterId": 0x0000002B, + "commands": { + }, + "attributes": { + 0x00000001: { + "attributeName": "ActiveLocale", + "attributeId": 0x00000001, + "type": "str", + "writable": True, + }, + 0x00000002: { + "attributeName": "SupportedLocales", + "attributeId": 0x00000002, + "type": "str", + }, + }, + } _LOW_POWER_CLUSTER_INFO = { "clusterName": "LowPower", "clusterId": 0x00000508, @@ -5612,6 +5631,7 @@ class ChipClusters: 0x00000400: _ILLUMINANCE_MEASUREMENT_CLUSTER_INFO, 0x00000509: _KEYPAD_INPUT_CLUSTER_INFO, 0x00000008: _LEVEL_CONTROL_CLUSTER_INFO, + 0x0000002B: _LOCALIZATION_CONFIGURATION_CLUSTER_INFO, 0x00000508: _LOW_POWER_CLUSTER_INFO, 0x00000507: _MEDIA_INPUT_CLUSTER_INFO, 0x00000506: _MEDIA_PLAYBACK_CLUSTER_INFO, @@ -5675,6 +5695,7 @@ class ChipClusters: "IlluminanceMeasurement": _ILLUMINANCE_MEASUREMENT_CLUSTER_INFO, "KeypadInput": _KEYPAD_INPUT_CLUSTER_INFO, "LevelControl": _LEVEL_CONTROL_CLUSTER_INFO, + "LocalizationConfiguration": _LOCALIZATION_CONFIGURATION_CLUSTER_INFO, "LowPower": _LOW_POWER_CLUSTER_INFO, "MediaInput": _MEDIA_INPUT_CLUSTER_INFO, "MediaPlayback": _MEDIA_PLAYBACK_CLUSTER_INFO, diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm index c54917d50ef6d0..4bdb997075acae 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm @@ -3994,6 +3994,52 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } break; } + case Clusters::LocalizationConfiguration::Id: { + using namespace Clusters::LocalizationConfiguration; + switch (aPath.mAttributeId) { + case Attributes::ActiveLocale::Id: { + using TypeInfo = Attributes::ActiveLocale::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSString * _Nonnull value; + value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; + return value; + } + case Attributes::SupportedLocales::Id: { + using TypeInfo = Attributes::SupportedLocales::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSString * newElement_0; + newElement_0 = [[NSString alloc] initWithBytes:entry_0.data() length:entry_0.size() encoding:NSUTF8StringEncoding]; + [array_0 addObject:newElement_0]; + } + { // Scope for the error so we will know what it's named + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + } + value = array_0; + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; + break; + } + break; + } case Clusters::LowPower::Id: { using namespace Clusters::LowPower; switch (aPath.mAttributeId) { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm index 38356da0500dc8..ecdf7792c73be0 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm @@ -2913,6 +2913,45 @@ } } +void CHIPLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSString * newElement_0; + newElement_0 = [[NSString alloc] initWithBytes:entry_0.data() length:entry_0.size() encoding:NSUTF8StringEncoding]; + [array_0 addObject:newElement_0]; + } + { // Scope for the error so we will know what it's named + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + void CHIPLowPowerAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h index 64172a12ad4ffd..1032d9631181e6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h @@ -2708,6 +2708,35 @@ class CHIPLevelControlAttributeListListAttributeCallbackSubscriptionBridge SubscriptionEstablishedHandler mEstablishedHandler; }; +class CHIPLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge + : public CHIPLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge +{ +public: + CHIPLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + class CHIPLowPowerAttributeListListAttributeCallbackBridge : public CHIPCallbackBridge { public: diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h index adba66092048c8..7bf08af9c922d3 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h @@ -2201,6 +2201,21 @@ NS_ASSUME_NONNULL_BEGIN @end +/** + * Cluster Localization Configuration + * + */ +@interface CHIPLocalizationConfiguration : CHIPCluster + +- (void)readAttributeActiveLocaleWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; + +- (void)readAttributeSupportedLocalesWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; + +@end + /** * Cluster Low Power * diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index 1ef1774893c22f..529c687976f447 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -9345,6 +9345,56 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( @end +@implementation CHIPLocalizationConfiguration + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)readAttributeActiveLocaleWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)readAttributeSupportedLocalesWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +@end + @implementation CHIPLowPower - (chip::Controller::ClusterBase *)getCluster diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc_internal.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc_internal.h index 043118d96a06a5..d75b3cd0ae5539 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc_internal.h @@ -145,6 +145,10 @@ @property (readonly) chip::Controller::LevelControlCluster cppCluster; @end +@interface CHIPLocalizationConfiguration () +@property (readonly) chip::Controller::LocalizationConfigurationCluster cppCluster; +@end + @interface CHIPLowPower () @property (readonly) chip::Controller::LowPowerCluster cppCluster; @end diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h index 24530fb8e4de2e..c5cf0391eaab4b 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h @@ -525,6 +525,16 @@ NS_ASSUME_NONNULL_BEGIN @end +/** + * Cluster Localization Configuration + * + */ +@interface CHIPTestLocalizationConfiguration : CHIPLocalizationConfiguration + +- (void)writeAttributeSupportedLocalesWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; + +@end + /** * Cluster Low Power * diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm index 1127c6d8da58f9..bb89a0747e26ce 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm @@ -5354,6 +5354,58 @@ new CHIPDefaultSuccessCallbackBridge( @end +@interface CHIPTestLocalizationConfiguration () +@property (readonly) chip::Controller::LocalizationConfigurationClusterTest cppCluster; +@end + +@implementation CHIPTestLocalizationConfiguration + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeSupportedLocalesWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSString class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSString *) value[i_0]; + listHolder_0->mList[i_0] = [self asCharSpan:element_0]; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +@end + @interface CHIPTestLowPower () @property (readonly) chip::Controller::LowPowerClusterTest cppCluster; @end diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index 2bfaa3eff9c4fd..8c186da3dbb116 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -36725,7 +36725,7 @@ - (void)testSendClusterTestDescriptorCluster_000002_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue count], 23); + XCTAssertEqual([actualValue count], 24); XCTAssertEqual([actualValue[0] unsignedIntValue], 3UL); XCTAssertEqual([actualValue[1] unsignedIntValue], 4UL); XCTAssertEqual([actualValue[2] unsignedIntValue], 29UL); @@ -36734,21 +36734,22 @@ - (void)testSendClusterTestDescriptorCluster_000002_ReadAttribute XCTAssertEqual([actualValue[5] unsignedIntValue], 40UL); XCTAssertEqual([actualValue[6] unsignedIntValue], 41UL); XCTAssertEqual([actualValue[7] unsignedIntValue], 42UL); - XCTAssertEqual([actualValue[8] unsignedIntValue], 46UL); - XCTAssertEqual([actualValue[9] unsignedIntValue], 48UL); - XCTAssertEqual([actualValue[10] unsignedIntValue], 49UL); - XCTAssertEqual([actualValue[11] unsignedIntValue], 50UL); - XCTAssertEqual([actualValue[12] unsignedIntValue], 51UL); - XCTAssertEqual([actualValue[13] unsignedIntValue], 52UL); - XCTAssertEqual([actualValue[14] unsignedIntValue], 53UL); - XCTAssertEqual([actualValue[15] unsignedIntValue], 54UL); - XCTAssertEqual([actualValue[16] unsignedIntValue], 55UL); - XCTAssertEqual([actualValue[17] unsignedIntValue], 60UL); - XCTAssertEqual([actualValue[18] unsignedIntValue], 62UL); - XCTAssertEqual([actualValue[19] unsignedIntValue], 63UL); - XCTAssertEqual([actualValue[20] unsignedIntValue], 64UL); - XCTAssertEqual([actualValue[21] unsignedIntValue], 65UL); - XCTAssertEqual([actualValue[22] unsignedIntValue], 1029UL); + XCTAssertEqual([actualValue[8] unsignedIntValue], 43UL); + XCTAssertEqual([actualValue[9] unsignedIntValue], 46UL); + XCTAssertEqual([actualValue[10] unsignedIntValue], 48UL); + XCTAssertEqual([actualValue[11] unsignedIntValue], 49UL); + XCTAssertEqual([actualValue[12] unsignedIntValue], 50UL); + XCTAssertEqual([actualValue[13] unsignedIntValue], 51UL); + XCTAssertEqual([actualValue[14] unsignedIntValue], 52UL); + XCTAssertEqual([actualValue[15] unsignedIntValue], 53UL); + XCTAssertEqual([actualValue[16] unsignedIntValue], 54UL); + XCTAssertEqual([actualValue[17] unsignedIntValue], 55UL); + XCTAssertEqual([actualValue[18] unsignedIntValue], 60UL); + XCTAssertEqual([actualValue[19] unsignedIntValue], 62UL); + XCTAssertEqual([actualValue[20] unsignedIntValue], 63UL); + XCTAssertEqual([actualValue[21] unsignedIntValue], 64UL); + XCTAssertEqual([actualValue[22] unsignedIntValue], 65UL); + XCTAssertEqual([actualValue[23] unsignedIntValue], 1029UL); } [expectation fulfill]; @@ -44518,6 +44519,82 @@ - (void)testSendClusterLevelControlReadAttributeClusterRevisionWithCompletionHan [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterLocalizationConfigurationReadAttributeActiveLocaleWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPLocalizationConfiguration * cluster = [[CHIPLocalizationConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"LocalizationConfigurationReadAttributeActiveLocaleWithCompletionHandler"]; + + [cluster readAttributeActiveLocaleWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"LocalizationConfiguration ActiveLocale Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterLocalizationConfigurationWriteAttributeActiveLocaleWithValue +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPLocalizationConfiguration * cluster = [[CHIPLocalizationConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"LocalizationConfigurationWriteAttributeActiveLocaleWithValue"]; + + NSString * _Nonnull value = @"Test"; + [cluster writeAttributeActiveLocaleWithValue:value + completionHandler:^(NSError * _Nullable err) { + NSLog(@"LocalizationConfiguration ActiveLocale Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterLocalizationConfigurationReadAttributeSupportedLocalesWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPLocalizationConfiguration * cluster = [[CHIPLocalizationConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"LocalizationConfigurationReadAttributeSupportedLocalesWithCompletionHandler"]; + + [cluster readAttributeSupportedLocalesWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"LocalizationConfiguration SupportedLocales Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterLowPowerReadAttributeAttributeListWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); diff --git a/src/include/platform/PlatformManager.h b/src/include/platform/PlatformManager.h index 8e935e165e3945..4d1664cf6c040d 100644 --- a/src/include/platform/PlatformManager.h +++ b/src/include/platform/PlatformManager.h @@ -37,8 +37,9 @@ class DiscoveryImplPlatform; namespace DeviceLayer { -static constexpr size_t kMaxFixedLabels = 10; -static constexpr size_t kMaxUserLabels = 10; +static constexpr size_t kMaxFixedLabels = 10; +static constexpr size_t kMaxUserLabels = 10; +static constexpr size_t kMaxLanguageTags = 254; // Maximum number of entry type 'ARRAY' supports class PlatformManagerImpl; class ConnectivityManagerImpl; @@ -187,6 +188,7 @@ class PlatformManager AttributeList & labelList); CHIP_ERROR GetUserLabelList(EndpointId endpoint, AttributeList & labelList); + CHIP_ERROR GetSupportedLocales(AttributeList & supportedLocales); private: bool mInitialized = false; @@ -448,5 +450,10 @@ PlatformManager::GetUserLabelList(EndpointId endpoint, return static_cast(this)->_GetUserLabelList(endpoint, labelList); } +inline CHIP_ERROR PlatformManager::GetSupportedLocales(AttributeList & supportedLocales) +{ + return static_cast(this)->_GetSupportedLocales(supportedLocales); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/include/platform/internal/GenericPlatformManagerImpl.h b/src/include/platform/internal/GenericPlatformManagerImpl.h index cd058dea30c461..e2af4652b51361 100644 --- a/src/include/platform/internal/GenericPlatformManagerImpl.h +++ b/src/include/platform/internal/GenericPlatformManagerImpl.h @@ -65,6 +65,7 @@ class GenericPlatformManagerImpl AttributeList & labelList); CHIP_ERROR _GetUserLabelList(EndpointId endpoint, AttributeList & labelList); + CHIP_ERROR _GetSupportedLocales(AttributeList & supportedLocales); // ===== Support methods that can be overridden by the implementation subclass. @@ -102,6 +103,13 @@ inline CHIP_ERROR GenericPlatformManagerImpl::_GetUserLabelList( return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } +template +inline CHIP_ERROR +GenericPlatformManagerImpl::_GetSupportedLocales(AttributeList & supportedLocales) +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + } // namespace Internal } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/Darwin/ConfigurationManagerImpl.cpp b/src/platform/Darwin/ConfigurationManagerImpl.cpp index 3011c9e97ea266..e774115bb3d061 100644 --- a/src/platform/Darwin/ConfigurationManagerImpl.cpp +++ b/src/platform/Darwin/ConfigurationManagerImpl.cpp @@ -164,6 +164,18 @@ CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * buf) #endif // TARGET_OS_OSX } +CHIP_ERROR ConfigurationManagerImpl::GetActiveLocale(char * buf, size_t bufSize, size_t & codeLen) +{ + // TODO: read current active locale. + return CHIP_NO_ERROR; +} + +CHIP_ERROR ConfigurationManagerImpl::StoreActiveLocale(const char * code, size_t codeLen) +{ + // TODO: write current active locale. + return CHIP_NO_ERROR; +} + bool ConfigurationManagerImpl::CanFactoryReset() { // TODO(#742): query the application to determine if factory reset is allowed. diff --git a/src/platform/Darwin/ConfigurationManagerImpl.h b/src/platform/Darwin/ConfigurationManagerImpl.h index 364ffdd035e533..386e66a9733db5 100644 --- a/src/platform/Darwin/ConfigurationManagerImpl.h +++ b/src/platform/Darwin/ConfigurationManagerImpl.h @@ -44,6 +44,8 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp CHIP_ERROR Init(void) override; CHIP_ERROR GetPrimaryWiFiMACAddress(uint8_t * buf) override; + CHIP_ERROR GetActiveLocale(char * buf, size_t bufSize, size_t & codeLen) override; + CHIP_ERROR StoreActiveLocale(const char * code, size_t codeLen) override; bool CanFactoryReset(void) override; void InitiateFactoryReset(void) override; CHIP_ERROR ReadPersistedStorageValue(::chip::Platform::PersistedStorage::Key key, uint32_t & value) override; diff --git a/src/platform/Darwin/PlatformManagerImpl.cpp b/src/platform/Darwin/PlatformManagerImpl.cpp index f67445ef255b15..628f3266b1fc1a 100644 --- a/src/platform/Darwin/PlatformManagerImpl.cpp +++ b/src/platform/Darwin/PlatformManagerImpl.cpp @@ -133,5 +133,21 @@ PlatformManagerImpl::_SetUserLabelList( return CHIP_NO_ERROR; } +CHIP_ERROR +PlatformManagerImpl::_GetSupportedLocales(AttributeList & supportedLocales) +{ + // In Darwin simulation, return following hardcoded list of Strings that are valid values for the ActiveLocale. + supportedLocales.add(CharSpan("en-US", strlen("en-US"))); + supportedLocales.add(CharSpan("de-DE", strlen("de-DE"))); + supportedLocales.add(CharSpan("fr-FR", strlen("fr-FR"))); + supportedLocales.add(CharSpan("en-GB", strlen("en-GB"))); + supportedLocales.add(CharSpan("es-ES", strlen("es-ES"))); + supportedLocales.add(CharSpan("zh-CN", strlen("zh-CN"))); + supportedLocales.add(CharSpan("it-IT", strlen("it-IT"))); + supportedLocales.add(CharSpan("ja-JP", strlen("ja-JP"))); + + return CHIP_NO_ERROR; +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/Darwin/PlatformManagerImpl.h b/src/platform/Darwin/PlatformManagerImpl.h index 7a69e07f0d49d4..e3a535edb1abcd 100644 --- a/src/platform/Darwin/PlatformManagerImpl.h +++ b/src/platform/Darwin/PlatformManagerImpl.h @@ -64,6 +64,7 @@ class PlatformManagerImpl final : public PlatformManager, public Internal::Gener CHIP_ERROR _SetUserLabelList(EndpointId endpoint, AttributeList & labelList); + CHIP_ERROR _GetSupportedLocales(AttributeList & supportedLocales); void _RunEventLoop(); void _LockChipStack(){}; diff --git a/src/platform/Linux/ConfigurationManagerImpl.cpp b/src/platform/Linux/ConfigurationManagerImpl.cpp index d536cf672a9dec..6d4282bf0440ca 100644 --- a/src/platform/Linux/ConfigurationManagerImpl.cpp +++ b/src/platform/Linux/ConfigurationManagerImpl.cpp @@ -106,6 +106,12 @@ CHIP_ERROR ConfigurationManagerImpl::Init() SuccessOrExit(err); } + if (!PosixConfig::ConfigValueExists(PosixConfig::kConfigKey_ActiveLocale)) + { + err = WriteConfigValueStr(PosixConfig::kConfigKey_ActiveLocale, "en-US", strlen("en-US")); + SuccessOrExit(err); + } + // If the fail-safe was armed when the device last shutdown, initiate a factory reset. if (GetFailSafeArmed(failSafeArmed) == CHIP_NO_ERROR && failSafeArmed) { diff --git a/src/platform/Linux/PlatformManagerImpl.cpp b/src/platform/Linux/PlatformManagerImpl.cpp index 7ff96b9de8e34e..d9fbaeb9d32c1a 100644 --- a/src/platform/Linux/PlatformManagerImpl.cpp +++ b/src/platform/Linux/PlatformManagerImpl.cpp @@ -339,6 +339,22 @@ PlatformManagerImpl::_GetUserLabelList( return CHIP_NO_ERROR; } +CHIP_ERROR +PlatformManagerImpl::_GetSupportedLocales(AttributeList & supportedLocales) +{ + // In Linux simulation, return following hardcoded list of Strings that are valid values for the ActiveLocale. + supportedLocales.add(CharSpan("en-US", strlen("en-US"))); + supportedLocales.add(CharSpan("de-DE", strlen("de-DE"))); + supportedLocales.add(CharSpan("fr-FR", strlen("fr-FR"))); + supportedLocales.add(CharSpan("en-GB", strlen("en-GB"))); + supportedLocales.add(CharSpan("es-ES", strlen("es-ES"))); + supportedLocales.add(CharSpan("zh-CN", strlen("zh-CN"))); + supportedLocales.add(CharSpan("it-IT", strlen("it-IT"))); + supportedLocales.add(CharSpan("ja-JP", strlen("ja-JP"))); + + return CHIP_NO_ERROR; +} + void PlatformManagerImpl::HandleDeviceRebooted(intptr_t arg) { PlatformManagerDelegate * platformManagerDelegate = PlatformMgr().GetDelegate(); diff --git a/src/platform/Linux/PlatformManagerImpl.h b/src/platform/Linux/PlatformManagerImpl.h index 9655772f8f5b02..57576286950bfb 100644 --- a/src/platform/Linux/PlatformManagerImpl.h +++ b/src/platform/Linux/PlatformManagerImpl.h @@ -72,6 +72,7 @@ class PlatformManagerImpl final : public PlatformManager, public Internal::Gener AttributeList & labelList); CHIP_ERROR _GetUserLabelList(EndpointId endpoint, AttributeList & labelList); + CHIP_ERROR _GetSupportedLocales(AttributeList & supportedLocales); // ===== Members for internal use by the following friends. diff --git a/src/platform/fake/PlatformManagerImpl.h b/src/platform/fake/PlatformManagerImpl.h index ab92669c4f3c73..b2a13ca32aa859 100644 --- a/src/platform/fake/PlatformManagerImpl.h +++ b/src/platform/fake/PlatformManagerImpl.h @@ -116,6 +116,11 @@ class PlatformManagerImpl final : public PlatformManager return CHIP_ERROR_NOT_IMPLEMENTED; } + CHIP_ERROR _GetSupportedLocales(AttributeList & supportedLocales) + { + return CHIP_ERROR_NOT_IMPLEMENTED; + } + void _LockChipStack() {} bool _TryLockChipStack() { return true; } void _UnlockChipStack() {} diff --git a/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp index 55728b9df88554..d38a6c8f3883f0 100644 --- a/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp @@ -1297,9 +1297,49 @@ namespace OtaSoftwareUpdateProvider { void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) { - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, - ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV + // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. + // Any error value TLVUnpackError means we have received an illegal value. + // The following variables are used for all commands to save code size. + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::ApplyUpdateRequest::Id: { + Commands::ApplyUpdateRequest::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = + emberAfOtaSoftwareUpdateProviderClusterApplyUpdateRequestCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::QueryImage::Id: { + Commands::QueryImage::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfOtaSoftwareUpdateProviderClusterQueryImageCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } } } // namespace OtaSoftwareUpdateProvider diff --git a/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h index 651dec8dd7888f..bbfccc11029d89 100644 --- a/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h @@ -54,6 +54,7 @@ MatterIlluminanceMeasurementPluginServerInitCallback(); \ MatterKeypadInputPluginServerInitCallback(); \ MatterLevelControlPluginServerInitCallback(); \ + MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterLowPowerPluginServerInitCallback(); \ MatterMediaInputPluginServerInitCallback(); \ MatterMediaPlaybackPluginServerInitCallback(); \ diff --git a/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp b/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp index e609c8bf2420a3..3d5bf0ef4e2b03 100644 --- a/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp @@ -125,6 +125,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_LEVEL_CONTROL_CLUSTER_ID: emberAfLevelControlClusterInitCallback(endpoint); break; + case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: + emberAfLocalizationConfigurationClusterInitCallback(endpoint); + break; case ZCL_LOW_POWER_CLUSTER_ID: emberAfLowPowerClusterInitCallback(endpoint); break; @@ -378,6 +381,11 @@ void __attribute__((weak)) emberAfLevelControlClusterInitCallback(EndpointId end // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfLocalizationConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfLowPowerClusterInitCallback(EndpointId endpoint) { // To prevent warning 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 6d90ca619b4af5..fae62789a46262 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -35,12 +35,30 @@ /* 4 - ManufacturingDate, */ \ 16, '2', '0', '2', '1', '0', '6', '1', '4', '1', '2', '3', '4', '5', '6', 'Z', 'Z', \ \ + /* Endpoint: 0, Cluster: Localization Configuration (server), big-endian */ \ + \ + /* 21 - SupportedLocales, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 0, Cluster: General Commissioning (server), big-endian */ \ \ - /* 21 - Breadcrumb, */ \ + /* 275 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 29 - BasicCommissioningInfoList, */ \ + /* 283 - BasicCommissioningInfoList, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -56,263 +74,263 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 283 - FeatureMap, */ \ + /* 537 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x06, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), big-endian */ \ \ - /* 287 - Networks, */ \ + /* 541 - Networks, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 299 - LastConnectErrorValue, */ \ + /* 553 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 303 - FeatureMap, */ \ + /* 557 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), big-endian */ \ \ - /* 307 - UpTime, */ \ + /* 561 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 315 - TotalOperationalHours, */ \ + /* 569 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), big-endian */ \ \ - /* 319 - CurrentHeapFree, */ \ + /* 573 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 327 - CurrentHeapUsed, */ \ + /* 581 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 335 - CurrentHeapHighWatermark, */ \ + /* 589 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 343 - FeatureMap, */ \ + /* 597 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), big-endian */ \ \ - /* 347 - NetworkName, */ \ + /* 601 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 349 - ExtendedPanId, */ \ + /* 603 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 357 - OverrunCount, */ \ + /* 611 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 365 - PartitionId, */ \ + /* 619 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 369 - TxTotalCount, */ \ + /* 623 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 373 - TxUnicastCount, */ \ + /* 627 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 377 - TxBroadcastCount, */ \ + /* 631 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 381 - TxAckRequestedCount, */ \ + /* 635 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 385 - TxAckedCount, */ \ + /* 639 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 389 - TxNoAckRequestedCount, */ \ + /* 643 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 393 - TxDataCount, */ \ + /* 647 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 397 - TxDataPollCount, */ \ + /* 651 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 401 - TxBeaconCount, */ \ + /* 655 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 405 - TxBeaconRequestCount, */ \ + /* 659 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 409 - TxOtherCount, */ \ + /* 663 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 413 - TxRetryCount, */ \ + /* 667 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 417 - TxDirectMaxRetryExpiryCount, */ \ + /* 671 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 421 - TxIndirectMaxRetryExpiryCount, */ \ + /* 675 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 425 - TxErrCcaCount, */ \ + /* 679 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 429 - TxErrAbortCount, */ \ + /* 683 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 433 - TxErrBusyChannelCount, */ \ + /* 687 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 437 - RxTotalCount, */ \ + /* 691 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 441 - RxUnicastCount, */ \ + /* 695 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 445 - RxBroadcastCount, */ \ + /* 699 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 449 - RxDataCount, */ \ + /* 703 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 453 - RxDataPollCount, */ \ + /* 707 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 457 - RxBeaconCount, */ \ + /* 711 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 461 - RxBeaconRequestCount, */ \ + /* 715 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 465 - RxOtherCount, */ \ + /* 719 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 469 - RxAddressFilteredCount, */ \ + /* 723 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 473 - RxDestAddrFilteredCount, */ \ + /* 727 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 477 - RxDuplicatedCount, */ \ + /* 731 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 481 - RxErrNoFrameCount, */ \ + /* 735 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 485 - RxErrUnknownNeighborCount, */ \ + /* 739 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 489 - RxErrInvalidSrcAddrCount, */ \ + /* 743 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 493 - RxErrSecCount, */ \ + /* 747 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 497 - RxErrFcsCount, */ \ + /* 751 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 501 - RxErrOtherCount, */ \ + /* 755 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 505 - ActiveTimestamp, */ \ + /* 759 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 513 - PendingTimestamp, */ \ + /* 767 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 521 - delay, */ \ + /* 775 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 525 - ChannelMask, */ \ + /* 779 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 532 - FeatureMap, */ \ + /* 786 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0F, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), big-endian */ \ \ - /* 536 - BeaconLostCount, */ \ + /* 790 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 540 - BeaconRxCount, */ \ + /* 794 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 544 - PacketMulticastRxCount, */ \ + /* 798 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 548 - PacketMulticastTxCount, */ \ + /* 802 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 552 - PacketUnicastRxCount, */ \ + /* 806 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 556 - PacketUnicastTxCount, */ \ + /* 810 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 560 - CurrentMaxRate, */ \ + /* 814 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 568 - OverrunCount, */ \ + /* 822 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 576 - FeatureMap, */ \ + /* 830 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), big-endian */ \ \ - /* 580 - PacketRxCount, */ \ + /* 834 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 588 - PacketTxCount, */ \ + /* 842 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 596 - TxErrCount, */ \ + /* 850 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 604 - CollisionCount, */ \ + /* 858 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 612 - OverrunCount, */ \ + /* 866 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 620 - TimeSinceReset, */ \ + /* 874 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 628 - FeatureMap, */ \ + /* 882 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 1, Cluster: On/Off (server), big-endian */ \ \ - /* 632 - FeatureMap, */ \ + /* 886 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Power Source (server), big-endian */ \ \ - /* 636 - BatteryVoltage, */ \ + /* 890 - BatteryVoltage, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 640 - BatteryTimeRemaining, */ \ + /* 894 - BatteryTimeRemaining, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 644 - ActiveBatteryFaults, */ \ + /* 898 - ActiveBatteryFaults, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 652 - FeatureMap, */ \ + /* 906 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Network Commissioning (server), big-endian */ \ \ - /* 656 - Networks, */ \ + /* 910 - Networks, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 668 - LastConnectErrorValue, */ \ + /* 922 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 672 - FeatureMap, */ \ + /* 926 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Switch (server), big-endian */ \ \ - /* 676 - FeatureMap, */ \ + /* 930 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Fixed Label (server), big-endian */ \ \ - /* 680 - label list, */ \ + /* 934 - label list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -330,49 +348,49 @@ \ /* Endpoint: 1, Cluster: Mode Select (server), big-endian */ \ \ - /* 934 - Description, */ \ + /* 1188 - Description, */ \ 6, 'C', 'o', 'f', 'f', 'e', 'e', \ \ /* Endpoint: 1, Cluster: Door Lock (server), big-endian */ \ \ - /* 941 - Language, */ \ + /* 1195 - Language, */ \ 2, 'e', 'n', \ \ - /* 944 - AutoRelockTime, */ \ + /* 1198 - AutoRelockTime, */ \ 0x00, 0x00, 0x00, 0x60, \ \ /* Endpoint: 1, Cluster: Window Covering (server), big-endian */ \ \ - /* 948 - FeatureMap, */ \ + /* 1202 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server), big-endian */ \ \ - /* 952 - LifetimeRunningHours, */ \ + /* 1206 - LifetimeRunningHours, */ \ 0x00, 0x00, 0x00, \ \ - /* 955 - Power, */ \ + /* 1209 - Power, */ \ 0x00, 0x00, 0x00, \ \ - /* 958 - LifetimeEnergyConsumed, */ \ + /* 1212 - LifetimeEnergyConsumed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 962 - FeatureMap, */ \ + /* 1216 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Thermostat (server), big-endian */ \ \ - /* 966 - FeatureMap, */ \ + /* 1220 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0B, \ \ /* Endpoint: 1, Cluster: IAS Zone (server), big-endian */ \ \ - /* 970 - IAS CIE address, */ \ + /* 1224 - IAS CIE address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Channel (server), big-endian */ \ \ - /* 978 - channel list, */ \ + /* 1232 - channel list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -390,7 +408,7 @@ \ /* Endpoint: 1, Cluster: Target Navigator (server), big-endian */ \ \ - /* 1232 - target navigator list, */ \ + /* 1486 - target navigator list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -408,24 +426,24 @@ \ /* Endpoint: 1, Cluster: Media Playback (server), big-endian */ \ \ - /* 1486 - start time, */ \ + /* 1740 - start time, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, \ \ - /* 1494 - duration, */ \ + /* 1748 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1502 - playback speed, */ \ + /* 1756 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1506 - seek range end, */ \ + /* 1760 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1514 - seek range start, */ \ + /* 1768 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Media Input (server), big-endian */ \ \ - /* 1522 - media input list, */ \ + /* 1776 - media input list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -443,7 +461,7 @@ \ /* Endpoint: 1, Cluster: Content Launcher (server), big-endian */ \ \ - /* 1776 - accept header list, */ \ + /* 2030 - accept header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -459,12 +477,12 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2030 - supported streaming protocols, */ \ + /* 2284 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Audio Output (server), big-endian */ \ \ - /* 2034 - audio output list, */ \ + /* 2288 - audio output list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -482,7 +500,7 @@ \ /* Endpoint: 1, Cluster: Application Launcher (server), big-endian */ \ \ - /* 2288 - application launcher list, */ \ + /* 2542 - application launcher list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -500,67 +518,67 @@ \ /* Endpoint: 1, Cluster: Application Basic (server), big-endian */ \ \ - /* 2542 - allowed vendor list, */ \ + /* 2796 - allowed vendor list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Test Cluster (server), big-endian */ \ \ - /* 2574 - bitmap32, */ \ + /* 2828 - bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2578 - bitmap64, */ \ + /* 2832 - bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2586 - int24u, */ \ + /* 2840 - int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 2589 - int32u, */ \ + /* 2843 - int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2593 - int40u, */ \ + /* 2847 - int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2598 - int48u, */ \ + /* 2852 - int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2604 - int56u, */ \ + /* 2858 - int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2611 - int64u, */ \ + /* 2865 - int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2619 - int24s, */ \ + /* 2873 - int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 2622 - int32s, */ \ + /* 2876 - int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2626 - int40s, */ \ + /* 2880 - int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2631 - int48s, */ \ + /* 2885 - int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2637 - int56s, */ \ + /* 2891 - int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2644 - int64s, */ \ + /* 2898 - int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2652 - float_single, */ \ + /* 2906 - float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2656 - float_double, */ \ + /* 2910 - float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2664 - epoch_us, */ \ + /* 2918 - epoch_us, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2672 - epoch_s, */ \ + /* 2926 - epoch_s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2676 - list_long_octet_string, */ \ + /* 2930 - list_long_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -615,65 +633,65 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3676 - nullable_bitmap32, */ \ + /* 3930 - nullable_bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3680 - nullable_bitmap64, */ \ + /* 3934 - nullable_bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3688 - nullable_int24u, */ \ + /* 3942 - nullable_int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 3691 - nullable_int32u, */ \ + /* 3945 - nullable_int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3695 - nullable_int40u, */ \ + /* 3949 - nullable_int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3700 - nullable_int48u, */ \ + /* 3954 - nullable_int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3706 - nullable_int56u, */ \ + /* 3960 - nullable_int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3713 - nullable_int64u, */ \ + /* 3967 - nullable_int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3721 - nullable_int24s, */ \ + /* 3975 - nullable_int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 3724 - nullable_int32s, */ \ + /* 3978 - nullable_int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3728 - nullable_int40s, */ \ + /* 3982 - nullable_int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3733 - nullable_int48s, */ \ + /* 3987 - nullable_int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3739 - nullable_int56s, */ \ + /* 3993 - nullable_int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3746 - nullable_int64s, */ \ + /* 4000 - nullable_int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3754 - nullable_float_single, */ \ + /* 4008 - nullable_float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3758 - nullable_float_double, */ \ + /* 4012 - nullable_float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Electrical Measurement (server), big-endian */ \ \ - /* 3766 - measurement type, */ \ + /* 4020 - measurement type, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3770 - total active power, */ \ + /* 4024 - total active power, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: On/Off (server), big-endian */ \ \ - /* 3774 - FeatureMap, */ \ + /* 4028 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ } @@ -689,12 +707,30 @@ /* 4 - ManufacturingDate, */ \ 16, '2', '0', '2', '1', '0', '6', '1', '4', '1', '2', '3', '4', '5', '6', 'Z', 'Z', \ \ + /* Endpoint: 0, Cluster: Localization Configuration (server), little-endian */ \ + \ + /* 21 - SupportedLocales, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 0, Cluster: General Commissioning (server), little-endian */ \ \ - /* 21 - Breadcrumb, */ \ + /* 275 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 29 - BasicCommissioningInfoList, */ \ + /* 283 - BasicCommissioningInfoList, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -710,263 +746,263 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 283 - FeatureMap, */ \ + /* 537 - FeatureMap, */ \ 0x06, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), little-endian */ \ \ - /* 287 - Networks, */ \ + /* 541 - Networks, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 299 - LastConnectErrorValue, */ \ + /* 553 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 303 - FeatureMap, */ \ + /* 557 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), little-endian */ \ \ - /* 307 - UpTime, */ \ + /* 561 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 315 - TotalOperationalHours, */ \ + /* 569 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), little-endian */ \ \ - /* 319 - CurrentHeapFree, */ \ + /* 573 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 327 - CurrentHeapUsed, */ \ + /* 581 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 335 - CurrentHeapHighWatermark, */ \ + /* 589 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 343 - FeatureMap, */ \ + /* 597 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), little-endian */ \ \ - /* 347 - NetworkName, */ \ + /* 601 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 349 - ExtendedPanId, */ \ + /* 603 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 357 - OverrunCount, */ \ + /* 611 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 365 - PartitionId, */ \ + /* 619 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 369 - TxTotalCount, */ \ + /* 623 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 373 - TxUnicastCount, */ \ + /* 627 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 377 - TxBroadcastCount, */ \ + /* 631 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 381 - TxAckRequestedCount, */ \ + /* 635 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 385 - TxAckedCount, */ \ + /* 639 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 389 - TxNoAckRequestedCount, */ \ + /* 643 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 393 - TxDataCount, */ \ + /* 647 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 397 - TxDataPollCount, */ \ + /* 651 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 401 - TxBeaconCount, */ \ + /* 655 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 405 - TxBeaconRequestCount, */ \ + /* 659 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 409 - TxOtherCount, */ \ + /* 663 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 413 - TxRetryCount, */ \ + /* 667 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 417 - TxDirectMaxRetryExpiryCount, */ \ + /* 671 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 421 - TxIndirectMaxRetryExpiryCount, */ \ + /* 675 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 425 - TxErrCcaCount, */ \ + /* 679 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 429 - TxErrAbortCount, */ \ + /* 683 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 433 - TxErrBusyChannelCount, */ \ + /* 687 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 437 - RxTotalCount, */ \ + /* 691 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 441 - RxUnicastCount, */ \ + /* 695 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 445 - RxBroadcastCount, */ \ + /* 699 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 449 - RxDataCount, */ \ + /* 703 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 453 - RxDataPollCount, */ \ + /* 707 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 457 - RxBeaconCount, */ \ + /* 711 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 461 - RxBeaconRequestCount, */ \ + /* 715 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 465 - RxOtherCount, */ \ + /* 719 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 469 - RxAddressFilteredCount, */ \ + /* 723 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 473 - RxDestAddrFilteredCount, */ \ + /* 727 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 477 - RxDuplicatedCount, */ \ + /* 731 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 481 - RxErrNoFrameCount, */ \ + /* 735 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 485 - RxErrUnknownNeighborCount, */ \ + /* 739 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 489 - RxErrInvalidSrcAddrCount, */ \ + /* 743 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 493 - RxErrSecCount, */ \ + /* 747 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 497 - RxErrFcsCount, */ \ + /* 751 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 501 - RxErrOtherCount, */ \ + /* 755 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 505 - ActiveTimestamp, */ \ + /* 759 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 513 - PendingTimestamp, */ \ + /* 767 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 521 - delay, */ \ + /* 775 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 525 - ChannelMask, */ \ + /* 779 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 532 - FeatureMap, */ \ + /* 786 - FeatureMap, */ \ 0x0F, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), little-endian */ \ \ - /* 536 - BeaconLostCount, */ \ + /* 790 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 540 - BeaconRxCount, */ \ + /* 794 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 544 - PacketMulticastRxCount, */ \ + /* 798 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 548 - PacketMulticastTxCount, */ \ + /* 802 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 552 - PacketUnicastRxCount, */ \ + /* 806 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 556 - PacketUnicastTxCount, */ \ + /* 810 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 560 - CurrentMaxRate, */ \ + /* 814 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 568 - OverrunCount, */ \ + /* 822 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 576 - FeatureMap, */ \ + /* 830 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), little-endian */ \ \ - /* 580 - PacketRxCount, */ \ + /* 834 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 588 - PacketTxCount, */ \ + /* 842 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 596 - TxErrCount, */ \ + /* 850 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 604 - CollisionCount, */ \ + /* 858 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 612 - OverrunCount, */ \ + /* 866 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 620 - TimeSinceReset, */ \ + /* 874 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 628 - FeatureMap, */ \ + /* 882 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: On/Off (server), little-endian */ \ \ - /* 632 - FeatureMap, */ \ + /* 886 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Power Source (server), little-endian */ \ \ - /* 636 - BatteryVoltage, */ \ + /* 890 - BatteryVoltage, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 640 - BatteryTimeRemaining, */ \ + /* 894 - BatteryTimeRemaining, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 644 - ActiveBatteryFaults, */ \ + /* 898 - ActiveBatteryFaults, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 652 - FeatureMap, */ \ + /* 906 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Network Commissioning (server), little-endian */ \ \ - /* 656 - Networks, */ \ + /* 910 - Networks, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 668 - LastConnectErrorValue, */ \ + /* 922 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 672 - FeatureMap, */ \ + /* 926 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Switch (server), little-endian */ \ \ - /* 676 - FeatureMap, */ \ + /* 930 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Fixed Label (server), little-endian */ \ \ - /* 680 - label list, */ \ + /* 934 - label list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -984,49 +1020,49 @@ \ /* Endpoint: 1, Cluster: Mode Select (server), little-endian */ \ \ - /* 934 - Description, */ \ + /* 1188 - Description, */ \ 6, 'C', 'o', 'f', 'f', 'e', 'e', \ \ /* Endpoint: 1, Cluster: Door Lock (server), little-endian */ \ \ - /* 941 - Language, */ \ + /* 1195 - Language, */ \ 2, 'e', 'n', \ \ - /* 944 - AutoRelockTime, */ \ + /* 1198 - AutoRelockTime, */ \ 0x60, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Window Covering (server), little-endian */ \ \ - /* 948 - FeatureMap, */ \ + /* 1202 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server), little-endian */ \ \ - /* 952 - LifetimeRunningHours, */ \ + /* 1206 - LifetimeRunningHours, */ \ 0x00, 0x00, 0x00, \ \ - /* 955 - Power, */ \ + /* 1209 - Power, */ \ 0x00, 0x00, 0x00, \ \ - /* 958 - LifetimeEnergyConsumed, */ \ + /* 1212 - LifetimeEnergyConsumed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 962 - FeatureMap, */ \ + /* 1216 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Thermostat (server), little-endian */ \ \ - /* 966 - FeatureMap, */ \ + /* 1220 - FeatureMap, */ \ 0x0B, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: IAS Zone (server), little-endian */ \ \ - /* 970 - IAS CIE address, */ \ + /* 1224 - IAS CIE address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Channel (server), little-endian */ \ \ - /* 978 - channel list, */ \ + /* 1232 - channel list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1044,7 +1080,7 @@ \ /* Endpoint: 1, Cluster: Target Navigator (server), little-endian */ \ \ - /* 1232 - target navigator list, */ \ + /* 1486 - target navigator list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1062,24 +1098,24 @@ \ /* Endpoint: 1, Cluster: Media Playback (server), little-endian */ \ \ - /* 1486 - start time, */ \ + /* 1740 - start time, */ \ 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1494 - duration, */ \ + /* 1748 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1502 - playback speed, */ \ + /* 1756 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1506 - seek range end, */ \ + /* 1760 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1514 - seek range start, */ \ + /* 1768 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Media Input (server), little-endian */ \ \ - /* 1522 - media input list, */ \ + /* 1776 - media input list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1097,7 +1133,7 @@ \ /* Endpoint: 1, Cluster: Content Launcher (server), little-endian */ \ \ - /* 1776 - accept header list, */ \ + /* 2030 - accept header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1113,12 +1149,12 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2030 - supported streaming protocols, */ \ + /* 2284 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Audio Output (server), little-endian */ \ \ - /* 2034 - audio output list, */ \ + /* 2288 - audio output list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1136,7 +1172,7 @@ \ /* Endpoint: 1, Cluster: Application Launcher (server), little-endian */ \ \ - /* 2288 - application launcher list, */ \ + /* 2542 - application launcher list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1154,67 +1190,67 @@ \ /* Endpoint: 1, Cluster: Application Basic (server), little-endian */ \ \ - /* 2542 - allowed vendor list, */ \ + /* 2796 - allowed vendor list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Test Cluster (server), little-endian */ \ \ - /* 2574 - bitmap32, */ \ + /* 2828 - bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2578 - bitmap64, */ \ + /* 2832 - bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2586 - int24u, */ \ + /* 2840 - int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 2589 - int32u, */ \ + /* 2843 - int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2593 - int40u, */ \ + /* 2847 - int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2598 - int48u, */ \ + /* 2852 - int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2604 - int56u, */ \ + /* 2858 - int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2611 - int64u, */ \ + /* 2865 - int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2619 - int24s, */ \ + /* 2873 - int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 2622 - int32s, */ \ + /* 2876 - int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2626 - int40s, */ \ + /* 2880 - int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2631 - int48s, */ \ + /* 2885 - int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2637 - int56s, */ \ + /* 2891 - int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2644 - int64s, */ \ + /* 2898 - int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2652 - float_single, */ \ + /* 2906 - float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2656 - float_double, */ \ + /* 2910 - float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2664 - epoch_us, */ \ + /* 2918 - epoch_us, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2672 - epoch_s, */ \ + /* 2926 - epoch_s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2676 - list_long_octet_string, */ \ + /* 2930 - list_long_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1269,71 +1305,71 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3676 - nullable_bitmap32, */ \ + /* 3930 - nullable_bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3680 - nullable_bitmap64, */ \ + /* 3934 - nullable_bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3688 - nullable_int24u, */ \ + /* 3942 - nullable_int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 3691 - nullable_int32u, */ \ + /* 3945 - nullable_int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3695 - nullable_int40u, */ \ + /* 3949 - nullable_int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3700 - nullable_int48u, */ \ + /* 3954 - nullable_int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3706 - nullable_int56u, */ \ + /* 3960 - nullable_int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3713 - nullable_int64u, */ \ + /* 3967 - nullable_int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3721 - nullable_int24s, */ \ + /* 3975 - nullable_int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 3724 - nullable_int32s, */ \ + /* 3978 - nullable_int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3728 - nullable_int40s, */ \ + /* 3982 - nullable_int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3733 - nullable_int48s, */ \ + /* 3987 - nullable_int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3739 - nullable_int56s, */ \ + /* 3993 - nullable_int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3746 - nullable_int64s, */ \ + /* 4000 - nullable_int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3754 - nullable_float_single, */ \ + /* 4008 - nullable_float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3758 - nullable_float_double, */ \ + /* 4012 - nullable_float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Electrical Measurement (server), little-endian */ \ \ - /* 3766 - measurement type, */ \ + /* 4020 - measurement type, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3770 - total active power, */ \ + /* 4024 - total active power, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: On/Off (server), little-endian */ \ \ - /* 3774 - FeatureMap, */ \ + /* 4028 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (144) +#define GENERATED_DEFAULTS_COUNT (145) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -1426,7 +1462,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 602 +#define GENERATED_ATTRIBUTE_COUNT 606 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1498,35 +1534,39 @@ { 0x0003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x0002, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(21) }, /* SupportedLocales */ \ + \ /* Endpoint: 0, Cluster: Power Source Configuration (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Sources */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(21) }, /* Breadcrumb */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(29) }, /* BasicCommissioningInfoList */ \ + { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(275) }, /* Breadcrumb */ \ + { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(283) }, /* BasicCommissioningInfoList */ \ { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ { 0x0003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(283) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(537) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x0001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(287) }, /* Networks */ \ + { 0x0001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(541) }, /* Networks */ \ { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ { 0x0004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ { 0x0006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(299) }, /* LastConnectErrorValue */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(303) }, /* FeatureMap */ \ + { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(553) }, /* LastConnectErrorValue */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(557) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(307) }, /* UpTime */ \ - { 0x0003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(315) }, /* TotalOperationalHours */ \ + { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(561) }, /* UpTime */ \ + { 0x0003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(569) }, /* TotalOperationalHours */ \ { 0x0004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ { 0x0005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ { 0x0006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ @@ -1535,23 +1575,23 @@ \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ - { 0x0001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(319) }, /* CurrentHeapFree */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(327) }, /* CurrentHeapUsed */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(335) }, /* CurrentHeapHighWatermark */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(343) }, /* FeatureMap */ \ + { 0x0001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(573) }, /* CurrentHeapFree */ \ + { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(581) }, /* CurrentHeapUsed */ \ + { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(589) }, /* CurrentHeapHighWatermark */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(597) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { 0x0000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ - { 0x0002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(347) }, /* NetworkName */ \ + { 0x0002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(601) }, /* NetworkName */ \ { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(349) }, /* ExtendedPanId */ \ + { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(603) }, /* ExtendedPanId */ \ { 0x0005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(357) }, /* OverrunCount */ \ + { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(611) }, /* OverrunCount */ \ { 0x0007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ { 0x0008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(365) }, /* PartitionId */ \ + { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(619) }, /* PartitionId */ \ { 0x000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ { 0x000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ { 0x000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ @@ -1564,50 +1604,50 @@ { 0x0013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ { 0x0014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ { 0x0015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ - { 0x0016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(369) }, /* TxTotalCount */ \ - { 0x0017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(373) }, /* TxUnicastCount */ \ - { 0x0018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(377) }, /* TxBroadcastCount */ \ - { 0x0019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(381) }, /* TxAckRequestedCount */ \ - { 0x001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(385) }, /* TxAckedCount */ \ - { 0x001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(389) }, /* TxNoAckRequestedCount */ \ - { 0x001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(393) }, /* TxDataCount */ \ - { 0x001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(397) }, /* TxDataPollCount */ \ - { 0x001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(401) }, /* TxBeaconCount */ \ - { 0x001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(405) }, /* TxBeaconRequestCount */ \ - { 0x0020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(409) }, /* TxOtherCount */ \ - { 0x0021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(413) }, /* TxRetryCount */ \ - { 0x0022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(417) }, /* TxDirectMaxRetryExpiryCount */ \ - { 0x0023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(421) }, /* TxIndirectMaxRetryExpiryCount */ \ - { 0x0024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(425) }, /* TxErrCcaCount */ \ - { 0x0025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(429) }, /* TxErrAbortCount */ \ - { 0x0026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(433) }, /* TxErrBusyChannelCount */ \ - { 0x0027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(437) }, /* RxTotalCount */ \ - { 0x0028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(441) }, /* RxUnicastCount */ \ - { 0x0029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(445) }, /* RxBroadcastCount */ \ - { 0x002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(449) }, /* RxDataCount */ \ - { 0x002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(453) }, /* RxDataPollCount */ \ - { 0x002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(457) }, /* RxBeaconCount */ \ - { 0x002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(461) }, /* RxBeaconRequestCount */ \ - { 0x002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(465) }, /* RxOtherCount */ \ - { 0x002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(469) }, /* RxAddressFilteredCount */ \ - { 0x0030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(473) }, /* RxDestAddrFilteredCount */ \ - { 0x0031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(477) }, /* RxDuplicatedCount */ \ - { 0x0032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(481) }, /* RxErrNoFrameCount */ \ - { 0x0033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(485) }, /* RxErrUnknownNeighborCount */ \ - { 0x0034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(489) }, /* RxErrInvalidSrcAddrCount */ \ - { 0x0035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(493) }, /* RxErrSecCount */ \ - { 0x0036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(497) }, /* RxErrFcsCount */ \ - { 0x0037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(501) }, /* RxErrOtherCount */ \ - { 0x0038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(505) }, /* ActiveTimestamp */ \ - { 0x0039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(513) }, /* PendingTimestamp */ \ - { 0x003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(521) }, /* delay */ \ + { 0x0016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(623) }, /* TxTotalCount */ \ + { 0x0017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(627) }, /* TxUnicastCount */ \ + { 0x0018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(631) }, /* TxBroadcastCount */ \ + { 0x0019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(635) }, /* TxAckRequestedCount */ \ + { 0x001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(639) }, /* TxAckedCount */ \ + { 0x001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(643) }, /* TxNoAckRequestedCount */ \ + { 0x001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(647) }, /* TxDataCount */ \ + { 0x001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(651) }, /* TxDataPollCount */ \ + { 0x001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(655) }, /* TxBeaconCount */ \ + { 0x001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(659) }, /* TxBeaconRequestCount */ \ + { 0x0020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(663) }, /* TxOtherCount */ \ + { 0x0021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(667) }, /* TxRetryCount */ \ + { 0x0022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(671) }, /* TxDirectMaxRetryExpiryCount */ \ + { 0x0023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(675) }, /* TxIndirectMaxRetryExpiryCount */ \ + { 0x0024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(679) }, /* TxErrCcaCount */ \ + { 0x0025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(683) }, /* TxErrAbortCount */ \ + { 0x0026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(687) }, /* TxErrBusyChannelCount */ \ + { 0x0027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(691) }, /* RxTotalCount */ \ + { 0x0028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(695) }, /* RxUnicastCount */ \ + { 0x0029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(699) }, /* RxBroadcastCount */ \ + { 0x002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(703) }, /* RxDataCount */ \ + { 0x002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(707) }, /* RxDataPollCount */ \ + { 0x002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(711) }, /* RxBeaconCount */ \ + { 0x002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(715) }, /* RxBeaconRequestCount */ \ + { 0x002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(719) }, /* RxOtherCount */ \ + { 0x002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(723) }, /* RxAddressFilteredCount */ \ + { 0x0030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(727) }, /* RxDestAddrFilteredCount */ \ + { 0x0031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(731) }, /* RxDuplicatedCount */ \ + { 0x0032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(735) }, /* RxErrNoFrameCount */ \ + { 0x0033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(739) }, /* RxErrUnknownNeighborCount */ \ + { 0x0034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(743) }, /* RxErrInvalidSrcAddrCount */ \ + { 0x0035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(747) }, /* RxErrSecCount */ \ + { 0x0036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(751) }, /* RxErrFcsCount */ \ + { 0x0037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(755) }, /* RxErrOtherCount */ \ + { 0x0038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(759) }, /* ActiveTimestamp */ \ + { 0x0039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(767) }, /* PendingTimestamp */ \ + { 0x003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(775) }, /* delay */ \ { 0x003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ - { 0x003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(525) }, /* ChannelMask */ \ + { 0x003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(779) }, /* ChannelMask */ \ { 0x003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* OperationalDatasetComponents */ \ { 0x003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(532) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(786) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ @@ -1616,28 +1656,28 @@ { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ { 0x0004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ - { 0x0005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(536) }, /* BeaconLostCount */ \ - { 0x0006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(540) }, /* BeaconRxCount */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(544) }, /* PacketMulticastRxCount */ \ - { 0x0008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(548) }, /* PacketMulticastTxCount */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(552) }, /* PacketUnicastRxCount */ \ - { 0x000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(556) }, /* PacketUnicastTxCount */ \ - { 0x000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(560) }, /* CurrentMaxRate */ \ - { 0x000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(568) }, /* OverrunCount */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(576) }, /* FeatureMap */ \ + { 0x0005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(790) }, /* BeaconLostCount */ \ + { 0x0006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(794) }, /* BeaconRxCount */ \ + { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(798) }, /* PacketMulticastRxCount */ \ + { 0x0008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(802) }, /* PacketMulticastTxCount */ \ + { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(806) }, /* PacketUnicastRxCount */ \ + { 0x000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(810) }, /* PacketUnicastTxCount */ \ + { 0x000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(814) }, /* CurrentMaxRate */ \ + { 0x000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(822) }, /* OverrunCount */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(830) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ { 0x0001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(580) }, /* PacketRxCount */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(588) }, /* PacketTxCount */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(596) }, /* TxErrCount */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(604) }, /* CollisionCount */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(612) }, /* OverrunCount */ \ + { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(834) }, /* PacketRxCount */ \ + { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(842) }, /* PacketTxCount */ \ + { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(850) }, /* TxErrCount */ \ + { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(858) }, /* CollisionCount */ \ + { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(866) }, /* OverrunCount */ \ { 0x0007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x0008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(620) }, /* TimeSinceReset */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(628) }, /* FeatureMap */ \ + { 0x0008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(874) }, /* TimeSinceReset */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(882) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ @@ -1704,7 +1744,7 @@ { 0x4001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OnTime */ \ { 0x4002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OffWaitTime */ \ { 0x4003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(632) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(886) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ @@ -1760,29 +1800,33 @@ { 0x0002, ZAP_TYPE(LONG_CHAR_STRING), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* setup url */ \ { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ + /* Endpoint: 1, Cluster: Localization Configuration (server) */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* SupportedLocales */ \ + \ /* Endpoint: 1, Cluster: Power Source (server) */ \ { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Status */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Order */ \ { 0x0002, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_EMPTY_DEFAULT() }, /* Description */ \ - { 0x000B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(636) }, /* BatteryVoltage */ \ + { 0x000B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(890) }, /* BatteryVoltage */ \ { 0x000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryPercentRemaining */ \ - { 0x000D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(640) }, /* BatteryTimeRemaining */ \ + { 0x000D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(894) }, /* BatteryTimeRemaining */ \ { 0x000E, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeLevel */ \ - { 0x0012, ZAP_TYPE(ARRAY), 8, 0, ZAP_LONG_DEFAULTS_INDEX(644) }, /* ActiveBatteryFaults */ \ + { 0x0012, ZAP_TYPE(ARRAY), 8, 0, ZAP_LONG_DEFAULTS_INDEX(898) }, /* ActiveBatteryFaults */ \ { 0x001A, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeState */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(652) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(906) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Network Commissioning (server) */ \ { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x0001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(656) }, /* Networks */ \ + { 0x0001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(910) }, /* Networks */ \ { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ { 0x0004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ { 0x0006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(668) }, /* LastConnectErrorValue */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(672) }, /* FeatureMap */ \ + { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(922) }, /* LastConnectErrorValue */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(926) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ @@ -1792,11 +1836,11 @@ { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* number of positions */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* current position */ \ { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* multi press max */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(676) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(930) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Fixed Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(680) }, /* label list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(934) }, /* label list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: User Label (server) */ \ @@ -1813,7 +1857,7 @@ { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* SupportedModes */ \ { 0x0002, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OnMode */ \ { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* StartUpMode */ \ - { 0x0004, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_LONG_DEFAULTS_INDEX(934) }, /* Description */ \ + { 0x0004, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_LONG_DEFAULTS_INDEX(1188) }, /* Description */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Door Lock (server) */ \ @@ -1826,8 +1870,8 @@ { 0x0017, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(6) }, /* MaxPINCodeLength */ \ { 0x0018, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(6) }, /* MinPINCodeLength */ \ { 0x001B, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* CredentialRulesSupport */ \ - { 0x0021, ZAP_TYPE(CHAR_STRING), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(941) }, /* Language */ \ - { 0x0023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(944) }, /* AutoRelockTime */ \ + { 0x0021, ZAP_TYPE(CHAR_STRING), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1195) }, /* Language */ \ + { 0x0023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1198) }, /* AutoRelockTime */ \ { 0x0024, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(5) }, /* SoundVolume */ \ { 0x0025, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -1866,10 +1910,10 @@ { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitTilt */ \ { 0x0013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitTilt */ \ { 0x0017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* Mode */ \ - { 0x001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* SafetyStatus */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(948) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* Mode */ \ + { 0x001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* SafetyStatus */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1202) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Barrier Control (server) */ \ { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* barrier moving state */ \ @@ -1898,17 +1942,17 @@ { 0x0013, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Capacity */ \ { 0x0014, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Speed */ \ { 0x0015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(952) }, /* LifetimeRunningHours */ \ - { 0x0016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(955) }, /* Power */ \ + ZAP_LONG_DEFAULTS_INDEX(1206) }, /* LifetimeRunningHours */ \ + { 0x0016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(1209) }, /* Power */ \ { 0x0017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(958) }, /* LifetimeEnergyConsumed */ \ + ZAP_LONG_DEFAULTS_INDEX(1212) }, /* LifetimeEnergyConsumed */ \ { 0x0020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(10) }, /* OperationMode */ \ { 0x0021, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(11) }, /* ControlMode */ \ - { 0x0022, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* AlarmMask */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(962) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(11) }, /* ControlMode */ \ + { 0x0022, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* AlarmMask */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1216) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ { 0x0000, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* local temperature */ \ @@ -1933,12 +1977,12 @@ { 0x001B, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(17) }, /* control sequence of operation */ \ { 0x001C, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(18) }, /* system mode */ \ - { 0x0020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ - { 0x0021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* number of weekly transitions */ \ - { 0x0022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* number of daily transitions */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(966) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(18) }, /* system mode */ \ + { 0x0020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ + { 0x0021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* number of weekly transitions */ \ + { 0x0022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* number of daily transitions */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1220) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ { 0x0000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -2055,37 +2099,37 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: IAS Zone (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* zone state */ \ - { 0x0001, ZAP_TYPE(ENUM16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* zone type */ \ - { 0x0002, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* zone status */ \ - { 0x0010, ZAP_TYPE(NODE_ID), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(970) }, /* IAS CIE address */ \ - { 0x0011, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xff) }, /* Zone ID */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* zone state */ \ + { 0x0001, ZAP_TYPE(ENUM16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* zone type */ \ + { 0x0002, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* zone status */ \ + { 0x0010, ZAP_TYPE(NODE_ID), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1224) }, /* IAS CIE address */ \ + { 0x0011, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xff) }, /* Zone ID */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { 0x0000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* wake on lan mac address */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Channel (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(978) }, /* channel list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1232) }, /* channel list */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Target Navigator (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1232) }, /* target navigator list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1486) }, /* target navigator list */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current navigator target */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Media Playback (server) */ \ { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* playback state */ \ - { 0x0001, ZAP_TYPE(EPOCH_US), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1486) }, /* start time */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1494) }, /* duration */ \ - { 0x0004, ZAP_TYPE(SINGLE), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1502) }, /* playback speed */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1506) }, /* seek range end */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1514) }, /* seek range start */ \ + { 0x0001, ZAP_TYPE(EPOCH_US), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1740) }, /* start time */ \ + { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1748) }, /* duration */ \ + { 0x0004, ZAP_TYPE(SINGLE), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1756) }, /* playback speed */ \ + { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1760) }, /* seek range end */ \ + { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1768) }, /* seek range start */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Media Input (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1522) }, /* media input list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1776) }, /* media input list */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current media input */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ @@ -2096,18 +2140,18 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Content Launcher (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1776) }, /* accept header list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2030) }, /* accept header list */ \ { 0x0001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(2030) }, /* supported streaming protocols */ \ + ZAP_LONG_DEFAULTS_INDEX(2284) }, /* supported streaming protocols */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Audio Output (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2034) }, /* audio output list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2288) }, /* audio output list */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current audio output */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Application Launcher (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2288) }, /* application launcher list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2542) }, /* application launcher list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Application Basic (server) */ \ @@ -2117,7 +2161,7 @@ { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* product id */ \ { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ { 0x0006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ - { 0x0007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(2542) }, /* allowed vendor list */ \ + { 0x0007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(2796) }, /* allowed vendor list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Account Login (server) */ \ @@ -2127,28 +2171,28 @@ { 0x0000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(false) }, /* boolean */ \ { 0x0001, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap8 */ \ { 0x0002, ZAP_TYPE(BITMAP16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap16 */ \ - { 0x0003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2574) }, /* bitmap32 */ \ - { 0x0004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2578) }, /* bitmap64 */ \ + { 0x0003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2828) }, /* bitmap32 */ \ + { 0x0004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2832) }, /* bitmap64 */ \ { 0x0005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8u */ \ { 0x0006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16u */ \ - { 0x0007, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2586) }, /* int24u */ \ - { 0x0008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2589) }, /* int32u */ \ - { 0x0009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2593) }, /* int40u */ \ - { 0x000A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2598) }, /* int48u */ \ - { 0x000B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2604) }, /* int56u */ \ - { 0x000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2611) }, /* int64u */ \ + { 0x0007, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2840) }, /* int24u */ \ + { 0x0008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2843) }, /* int32u */ \ + { 0x0009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2847) }, /* int40u */ \ + { 0x000A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2852) }, /* int48u */ \ + { 0x000B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2858) }, /* int56u */ \ + { 0x000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2865) }, /* int64u */ \ { 0x000D, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8s */ \ { 0x000E, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16s */ \ - { 0x000F, ZAP_TYPE(INT24S), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2619) }, /* int24s */ \ - { 0x0010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2622) }, /* int32s */ \ - { 0x0011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2626) }, /* int40s */ \ - { 0x0012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2631) }, /* int48s */ \ - { 0x0013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2637) }, /* int56s */ \ - { 0x0014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2644) }, /* int64s */ \ + { 0x000F, ZAP_TYPE(INT24S), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2873) }, /* int24s */ \ + { 0x0010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2876) }, /* int32s */ \ + { 0x0011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2880) }, /* int40s */ \ + { 0x0012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2885) }, /* int48s */ \ + { 0x0013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2891) }, /* int56s */ \ + { 0x0014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2898) }, /* int64s */ \ { 0x0015, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum8 */ \ { 0x0016, ZAP_TYPE(ENUM16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum16 */ \ - { 0x0017, ZAP_TYPE(SINGLE), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2652) }, /* float_single */ \ - { 0x0018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2656) }, /* float_double */ \ + { 0x0017, ZAP_TYPE(SINGLE), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2906) }, /* float_single */ \ + { 0x0018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2910) }, /* float_double */ \ { 0x0019, ZAP_TYPE(OCTET_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* octet_string */ \ { 0x001A, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* list_int8u */ \ @@ -2161,8 +2205,8 @@ { 0x001E, ZAP_TYPE(CHAR_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* char_string */ \ { 0x001F, ZAP_TYPE(LONG_CHAR_STRING), 1002, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* long_char_string */ \ - { 0x0020, ZAP_TYPE(EPOCH_US), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2664) }, /* epoch_us */ \ - { 0x0021, ZAP_TYPE(EPOCH_S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2672) }, /* epoch_s */ \ + { 0x0020, ZAP_TYPE(EPOCH_US), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2918) }, /* epoch_us */ \ + { 0x0021, ZAP_TYPE(EPOCH_S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2926) }, /* 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_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* list_nullables_and_optionals_struct */ \ @@ -2177,7 +2221,7 @@ ZAP_MIN_MAX_DEFAULTS_INDEX(33) }, /* range_restricted_int16u */ \ { 0x0029, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(34) }, /* range_restricted_int16s */ \ - { 0x002A, ZAP_TYPE(ARRAY), 1000, 0, ZAP_LONG_DEFAULTS_INDEX(2676) }, /* list_long_octet_string */ \ + { 0x002A, ZAP_TYPE(ARRAY), 1000, 0, ZAP_LONG_DEFAULTS_INDEX(2930) }, /* list_long_octet_string */ \ { 0x0030, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(MUST_USE_TIMED_WRITE), \ ZAP_EMPTY_DEFAULT() }, /* timed_write_boolean */ \ { 0x8000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ @@ -2187,49 +2231,49 @@ { 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(3676) }, /* nullable_bitmap32 */ \ + ZAP_LONG_DEFAULTS_INDEX(3930) }, /* nullable_bitmap32 */ \ { 0x8004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3680) }, /* nullable_bitmap64 */ \ + ZAP_LONG_DEFAULTS_INDEX(3934) }, /* 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 */ \ { 0x8007, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3688) }, /* nullable_int24u */ \ + ZAP_LONG_DEFAULTS_INDEX(3942) }, /* nullable_int24u */ \ { 0x8008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3691) }, /* nullable_int32u */ \ + ZAP_LONG_DEFAULTS_INDEX(3945) }, /* nullable_int32u */ \ { 0x8009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3695) }, /* nullable_int40u */ \ + ZAP_LONG_DEFAULTS_INDEX(3949) }, /* nullable_int40u */ \ { 0x800A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3700) }, /* nullable_int48u */ \ + ZAP_LONG_DEFAULTS_INDEX(3954) }, /* nullable_int48u */ \ { 0x800B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3706) }, /* nullable_int56u */ \ + ZAP_LONG_DEFAULTS_INDEX(3960) }, /* nullable_int56u */ \ { 0x800C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3713) }, /* nullable_int64u */ \ + ZAP_LONG_DEFAULTS_INDEX(3967) }, /* 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 */ \ { 0x800F, ZAP_TYPE(INT24S), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3721) }, /* nullable_int24s */ \ + ZAP_LONG_DEFAULTS_INDEX(3975) }, /* nullable_int24s */ \ { 0x8010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3724) }, /* nullable_int32s */ \ + ZAP_LONG_DEFAULTS_INDEX(3978) }, /* nullable_int32s */ \ { 0x8011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3728) }, /* nullable_int40s */ \ + ZAP_LONG_DEFAULTS_INDEX(3982) }, /* nullable_int40s */ \ { 0x8012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3733) }, /* nullable_int48s */ \ + ZAP_LONG_DEFAULTS_INDEX(3987) }, /* nullable_int48s */ \ { 0x8013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3739) }, /* nullable_int56s */ \ + ZAP_LONG_DEFAULTS_INDEX(3993) }, /* nullable_int56s */ \ { 0x8014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3746) }, /* nullable_int64s */ \ + ZAP_LONG_DEFAULTS_INDEX(4000) }, /* 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 */ \ { 0x8017, ZAP_TYPE(SINGLE), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3754) }, /* nullable_float_single */ \ + ZAP_LONG_DEFAULTS_INDEX(4008) }, /* nullable_float_single */ \ { 0x8018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3758) }, /* nullable_float_double */ \ + ZAP_LONG_DEFAULTS_INDEX(4012) }, /* nullable_float_double */ \ { 0x8019, ZAP_TYPE(OCTET_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* nullable_octet_string */ \ { 0x801E, ZAP_TYPE(CHAR_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ @@ -2254,8 +2298,8 @@ { 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(3766) }, /* measurement type */ \ - { 0x0304, ZAP_TYPE(INT32S), 4, 0, ZAP_LONG_DEFAULTS_INDEX(3770) }, /* total active power */ \ + { 0x0000, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4020) }, /* measurement type */ \ + { 0x0304, ZAP_TYPE(INT32S), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4024) }, /* 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 */ \ @@ -2277,7 +2321,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(3774) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4028) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ @@ -2345,7 +2389,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 74 +#define GENERATED_CLUSTER_COUNT 76 #define GENERATED_CLUSTERS \ { \ { 0x0003, \ @@ -2385,247 +2429,253 @@ 0x002A, ZAP_ATTRIBUTE_INDEX(36), 5, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { \ - 0x002E, ZAP_ATTRIBUTE_INDEX(41), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(41), 2, 290, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { \ + 0x002E, ZAP_ATTRIBUTE_INDEX(43), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Power Source Configuration (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(43), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0030, ZAP_ATTRIBUTE_INDEX(45), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(49), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(51), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(59), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0032, ZAP_ATTRIBUTE_INDEX(61), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(59), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(61), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(68), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(70), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(74), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(76), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(139), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0036, ZAP_ATTRIBUTE_INDEX(141), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(154), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(156), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(165), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(167), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(169), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(171), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x003F, ZAP_ATTRIBUTE_INDEX(175), 5, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003F, ZAP_ATTRIBUTE_INDEX(177), 5, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Group Key Management (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(180), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(182), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(182), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(184), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(184), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0405, ZAP_ATTRIBUTE_INDEX(186), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Relative Humidity Measurement (server) */ \ { 0x0003, \ - ZAP_ATTRIBUTE_INDEX(188), \ + ZAP_ATTRIBUTE_INDEX(190), \ 3, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayIdentifyServer }, /* Endpoint: 1, Cluster: Identify (server) */ \ { 0x0004, \ - ZAP_ATTRIBUTE_INDEX(191), \ + ZAP_ATTRIBUTE_INDEX(193), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 1, Cluster: Groups (server) */ \ { 0x0005, \ - ZAP_ATTRIBUTE_INDEX(193), \ + ZAP_ATTRIBUTE_INDEX(195), \ 6, \ 8, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayScenesServer }, /* Endpoint: 1, Cluster: Scenes (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(199), \ + ZAP_ATTRIBUTE_INDEX(201), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { \ - 0x0007, ZAP_ATTRIBUTE_INDEX(206), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0007, ZAP_ATTRIBUTE_INDEX(208), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ { 0x0008, \ - ZAP_ATTRIBUTE_INDEX(209), \ + ZAP_ATTRIBUTE_INDEX(211), \ 15, \ 23, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x000F, ZAP_ATTRIBUTE_INDEX(224), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x000F, ZAP_ATTRIBUTE_INDEX(226), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(228), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(230), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x001E, ZAP_ATTRIBUTE_INDEX(233), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001E, ZAP_ATTRIBUTE_INDEX(235), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binding (server) */ \ { \ - 0x0025, ZAP_ATTRIBUTE_INDEX(234), 4, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0025, ZAP_ATTRIBUTE_INDEX(236), 4, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Actions (server) */ \ { \ - 0x002F, ZAP_ATTRIBUTE_INDEX(238), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(240), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 1, Cluster: Localization Configuration (server) */ \ + { \ + 0x002F, ZAP_ATTRIBUTE_INDEX(242), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Power Source (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(249), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(253), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Network Commissioning (server) */ \ { \ - 0x0039, ZAP_ATTRIBUTE_INDEX(259), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0039, ZAP_ATTRIBUTE_INDEX(263), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ { \ - 0x003B, ZAP_ATTRIBUTE_INDEX(260), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003B, ZAP_ATTRIBUTE_INDEX(264), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(265), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(269), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(267), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(271), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: User Label (server) */ \ { \ - 0x0045, ZAP_ATTRIBUTE_INDEX(269), 2, 3, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0045, ZAP_ATTRIBUTE_INDEX(273), 2, 3, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Boolean State (server) */ \ { \ - 0x0050, ZAP_ATTRIBUTE_INDEX(271), 6, 38, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0050, ZAP_ATTRIBUTE_INDEX(275), 6, 38, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Mode Select (server) */ \ { 0x0101, \ - ZAP_ATTRIBUTE_INDEX(277), \ + ZAP_ATTRIBUTE_INDEX(281), \ 19, \ 29, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | \ ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayDoorLockServer }, /* Endpoint: 1, Cluster: Door Lock (server) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(296), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0102, ZAP_ATTRIBUTE_INDEX(300), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (server) */ \ { \ - 0x0103, ZAP_ATTRIBUTE_INDEX(316), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0103, ZAP_ATTRIBUTE_INDEX(320), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Barrier Control (server) */ \ { \ 0x0200, \ - ZAP_ATTRIBUTE_INDEX(321), \ + ZAP_ATTRIBUTE_INDEX(325), \ 26, \ 54, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayPumpConfigurationAndControlServer \ }, /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ { 0x0201, \ - ZAP_ATTRIBUTE_INDEX(347), \ + ZAP_ATTRIBUTE_INDEX(351), \ 19, \ 34, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayThermostatServer }, /* Endpoint: 1, Cluster: Thermostat (server) */ \ { \ 0x0204, \ - ZAP_ATTRIBUTE_INDEX(366), \ + ZAP_ATTRIBUTE_INDEX(370), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayThermostatUserInterfaceConfigurationServer \ }, /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ { 0x0300, \ - ZAP_ATTRIBUTE_INDEX(370), \ + ZAP_ATTRIBUTE_INDEX(374), \ 53, \ 341, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { \ - 0x0400, ZAP_ATTRIBUTE_INDEX(423), 6, 11, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0400, ZAP_ATTRIBUTE_INDEX(427), 6, 11, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Illuminance Measurement (server) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(429), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0402, ZAP_ATTRIBUTE_INDEX(433), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ { \ - 0x0403, ZAP_ATTRIBUTE_INDEX(434), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0403, ZAP_ATTRIBUTE_INDEX(438), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ { \ - 0x0404, ZAP_ATTRIBUTE_INDEX(438), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0404, ZAP_ATTRIBUTE_INDEX(442), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(443), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0405, ZAP_ATTRIBUTE_INDEX(447), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(448), \ + ZAP_ATTRIBUTE_INDEX(452), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOccupancySensingServer }, /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ { 0x0500, \ - ZAP_ATTRIBUTE_INDEX(452), \ + ZAP_ATTRIBUTE_INDEX(456), \ 6, \ 16, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION) | \ ZAP_CLUSTER_MASK(MESSAGE_SENT_FUNCTION), \ chipFuncArrayIasZoneServer }, /* Endpoint: 1, Cluster: IAS Zone (server) */ \ { \ - 0x0503, ZAP_ATTRIBUTE_INDEX(458), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0503, ZAP_ATTRIBUTE_INDEX(462), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(460), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0504, ZAP_ATTRIBUTE_INDEX(464), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Channel (server) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(462), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0505, ZAP_ATTRIBUTE_INDEX(466), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(465), 7, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(469), 7, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (server) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(472), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0507, ZAP_ATTRIBUTE_INDEX(476), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Input (server) */ \ { \ - 0x0508, ZAP_ATTRIBUTE_INDEX(475), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0508, ZAP_ATTRIBUTE_INDEX(479), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Low Power (server) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(476), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0509, ZAP_ATTRIBUTE_INDEX(480), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(477), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(481), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (server) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(480), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(484), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (server) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(483), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050C, ZAP_ATTRIBUTE_INDEX(487), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(485), 8, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(489), 8, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (server) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(493), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(497), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Account Login (server) */ \ { \ - 0x050F, ZAP_ATTRIBUTE_INDEX(494), 78, 3285, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050F, ZAP_ATTRIBUTE_INDEX(498), 78, 3285, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (server) */ \ { \ - 0x0B04, ZAP_ATTRIBUTE_INDEX(572), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0B04, ZAP_ATTRIBUTE_INDEX(576), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ { 0x0004, \ - ZAP_ATTRIBUTE_INDEX(584), \ + ZAP_ATTRIBUTE_INDEX(588), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 2, Cluster: Groups (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(586), \ + ZAP_ATTRIBUTE_INDEX(590), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(593), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(597), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(598), \ + ZAP_ATTRIBUTE_INDEX(602), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2637,7 +2687,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 24, 1467 }, { ZAP_CLUSTER_INDEX(24), 46, 6170 }, { ZAP_CLUSTER_INDEX(70), 4, 21 }, \ + { ZAP_CLUSTER_INDEX(0), 25, 1757 }, { ZAP_CLUSTER_INDEX(25), 47, 6206 }, { ZAP_CLUSTER_INDEX(72), 4, 21 }, \ } // Largest attribute size is needed for various buffers @@ -2647,7 +2697,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (689) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (7658) +#define ATTRIBUTE_MAX_SIZE (7984) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) diff --git a/zzz_generated/all-clusters-app/zap-generated/gen_config.h b/zzz_generated/all-clusters-app/zap-generated/gen_config.h index 74f55052a98ae0..a6ebfe6fb3413e 100644 --- a/zzz_generated/all-clusters-app/zap-generated/gen_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/gen_config.h @@ -61,6 +61,7 @@ #define EMBER_AF_ILLUMINANCE_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_KEYPAD_INPUT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (2) #define EMBER_AF_LOW_POWER_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_MEDIA_INPUT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_MEDIA_PLAYBACK_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -264,6 +265,11 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 +// Use this macro to check if the server side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION + // Use this macro to check if the server side of the Low Power cluster is included #define ZCL_USING_LOW_POWER_CLUSTER_SERVER #define EMBER_AF_PLUGIN_LOW_POWER_SERVER diff --git a/zzz_generated/bridge-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/bridge-app/zap-generated/PluginApplicationCallbacks.h index a396b014b04a5f..6433919a7732e5 100644 --- a/zzz_generated/bridge-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/bridge-app/zap-generated/PluginApplicationCallbacks.h @@ -31,6 +31,7 @@ MatterGeneralCommissioningPluginServerInitCallback(); \ MatterGeneralDiagnosticsPluginServerInitCallback(); \ MatterLevelControlPluginServerInitCallback(); \ + MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterNetworkCommissioningPluginServerInitCallback(); \ MatterOnOffPluginServerInitCallback(); \ MatterOperationalCredentialsPluginServerInitCallback(); \ diff --git a/zzz_generated/bridge-app/zap-generated/callback-stub.cpp b/zzz_generated/bridge-app/zap-generated/callback-stub.cpp index d56d5611cc11df..db808e845ccbf2 100644 --- a/zzz_generated/bridge-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/bridge-app/zap-generated/callback-stub.cpp @@ -56,6 +56,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_LEVEL_CONTROL_CLUSTER_ID: emberAfLevelControlClusterInitCallback(endpoint); break; + case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: + emberAfLocalizationConfigurationClusterInitCallback(endpoint); + break; case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: emberAfNetworkCommissioningClusterInitCallback(endpoint); break; @@ -131,6 +134,11 @@ void __attribute__((weak)) emberAfLevelControlClusterInitCallback(EndpointId end // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfLocalizationConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfNetworkCommissioningClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/bridge-app/zap-generated/endpoint_config.h b/zzz_generated/bridge-app/zap-generated/endpoint_config.h index 24894096c77bb7..6b91a3e0efab7c 100644 --- a/zzz_generated/bridge-app/zap-generated/endpoint_config.h +++ b/zzz_generated/bridge-app/zap-generated/endpoint_config.h @@ -604,7 +604,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 182 +#define GENERATED_ATTRIBUTE_COUNT 184 #define GENERATED_ATTRIBUTES \ { \ \ @@ -632,6 +632,10 @@ { 0x000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4) }, /* Breadcrumb */ \ { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* BasicCommissioningInfoList */ \ @@ -858,7 +862,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 19 +#define GENERATED_CLUSTER_COUNT 20 #define GENERATED_CLUSTERS \ { \ { 0x001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ @@ -869,61 +873,64 @@ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(17), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(17), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { \ + 0x0030, ZAP_ATTRIBUTE_INDEX(19), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(23), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(25), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(33), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0032, ZAP_ATTRIBUTE_INDEX(35), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(33), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(35), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(42), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(44), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(48), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(50), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(113), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0036, ZAP_ATTRIBUTE_INDEX(115), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(128), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(130), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(139), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(141), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(143), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(145), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(149), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(151), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(151), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(153), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(153), \ + ZAP_ATTRIBUTE_INDEX(155), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { 0x0008, \ - ZAP_ATTRIBUTE_INDEX(155), \ + ZAP_ATTRIBUTE_INDEX(157), \ 15, \ 23, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(170), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(172), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x003B, ZAP_ATTRIBUTE_INDEX(175), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003B, ZAP_ATTRIBUTE_INDEX(177), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(180), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(182), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ } @@ -932,7 +939,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 14, 995 }, { ZAP_CLUSTER_INDEX(14), 5, 291 }, \ + { ZAP_CLUSTER_INDEX(0), 15, 1031 }, { ZAP_CLUSTER_INDEX(15), 5, 291 }, \ } // Largest attribute size is needed for various buffers @@ -942,7 +949,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (246) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1286) +#define ATTRIBUTE_MAX_SIZE (1322) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/bridge-app/zap-generated/gen_config.h b/zzz_generated/bridge-app/zap-generated/gen_config.h index 9803e3fc719eb2..c996e9c9ea84ab 100644 --- a/zzz_generated/bridge-app/zap-generated/gen_config.h +++ b/zzz_generated/bridge-app/zap-generated/gen_config.h @@ -38,6 +38,7 @@ #define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OPERATIONAL_CREDENTIALS_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -98,6 +99,11 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 +// Use this macro to check if the server side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION + // Use this macro to check if the server side of the Network Commissioning cluster is included #define ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER #define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING_SERVER diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 324333277943e2..886cdd82f8f329 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -3464,6 +3464,7 @@ static void OnThermostatGetWeeklyScheduleResponseSuccess( | IlluminanceMeasurement | 0x0400 | | KeypadInput | 0x0509 | | LevelControl | 0x0008 | +| LocalizationConfiguration | 0x002B | | LowPower | 0x0508 | | MediaInput | 0x0507 | | MediaPlayback | 0x0506 | @@ -22510,6 +22511,102 @@ class ReportLevelControlClusterRevision : public ModelCommand bool mWait; }; +/*----------------------------------------------------------------------------*\ +| Cluster LocalizationConfiguration | 0x002B | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * ActiveLocale | 0x0001 | +| * SupportedLocales | 0x0002 | +\*----------------------------------------------------------------------------*/ + +/* + * Attribute ActiveLocale + */ +class ReadLocalizationConfigurationActiveLocale : public ModelCommand +{ +public: + ReadLocalizationConfigurationActiveLocale() : ModelCommand("read") + { + AddArgument("attr-name", "active-locale"); + ModelCommand::AddArguments(); + } + + ~ReadLocalizationConfigurationActiveLocale() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x002B) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::LocalizationConfigurationCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, chip::CharSpan value) + { + OnGeneralAttributeResponse(context, "LocalizationConfiguration.ActiveLocale response", value); + } +}; + +class WriteLocalizationConfigurationActiveLocale : public ModelCommand +{ +public: + WriteLocalizationConfigurationActiveLocale() : ModelCommand("write") + { + AddArgument("attr-name", "active-locale"); + AddArgument("attr-value", &mValue); + ModelCommand::AddArguments(); + } + + ~WriteLocalizationConfigurationActiveLocale() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x002B) command (0x01) on endpoint %" PRIu8, endpointId); + + chip::Controller::LocalizationConfigurationCluster cluster; + cluster.Associate(device, endpointId); + return cluster.WriteAttribute( + mValue, this, OnDefaultSuccessResponse, OnDefaultFailure, mTimedInteractionTimeoutMs); + } + +private: + chip::CharSpan mValue; +}; + +/* + * Attribute SupportedLocales + */ +class ReadLocalizationConfigurationSupportedLocales : public ModelCommand +{ +public: + ReadLocalizationConfigurationSupportedLocales() : ModelCommand("read") + { + AddArgument("attr-name", "supported-locales"); + ModelCommand::AddArguments(); + } + + ~ReadLocalizationConfigurationSupportedLocales() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x002B) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::LocalizationConfigurationCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "LocalizationConfiguration.SupportedLocales response", value); + } +}; + /*----------------------------------------------------------------------------*\ | Cluster LowPower | 0x0508 | |------------------------------------------------------------------------------| @@ -51870,6 +51967,18 @@ void registerClusterLevelControl(Commands & commands) commands.Register(clusterName, clusterCommands); } +void registerClusterLocalizationConfiguration(Commands & commands) +{ + const char * clusterName = "LocalizationConfiguration"; + + commands_list clusterCommands = { + make_unique(), // + make_unique(), // + make_unique(), // + }; + + commands.Register(clusterName, clusterCommands); +} void registerClusterLowPower(Commands & commands) { const char * clusterName = "LowPower"; @@ -52993,6 +53102,7 @@ void registerClusters(Commands & commands) registerClusterIlluminanceMeasurement(commands); registerClusterKeypadInput(commands); registerClusterLevelControl(commands); + registerClusterLocalizationConfiguration(commands); registerClusterLowPower(commands); registerClusterMediaInput(commands); registerClusterMediaPlayback(commands); diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 231836632c25c0..11bde29340c432 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -58921,36 +58921,38 @@ class TestDescriptorCluster : public TestCommand VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 7)); VerifyOrReturn(CheckValue("serverList[7]", iter_0.GetValue(), 42UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 8)); - VerifyOrReturn(CheckValue("serverList[8]", iter_0.GetValue(), 46UL)); + VerifyOrReturn(CheckValue("serverList[8]", iter_0.GetValue(), 43UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 9)); - VerifyOrReturn(CheckValue("serverList[9]", iter_0.GetValue(), 48UL)); + VerifyOrReturn(CheckValue("serverList[9]", iter_0.GetValue(), 46UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 10)); - VerifyOrReturn(CheckValue("serverList[10]", iter_0.GetValue(), 49UL)); + VerifyOrReturn(CheckValue("serverList[10]", iter_0.GetValue(), 48UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 11)); - VerifyOrReturn(CheckValue("serverList[11]", iter_0.GetValue(), 50UL)); + VerifyOrReturn(CheckValue("serverList[11]", iter_0.GetValue(), 49UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 12)); - VerifyOrReturn(CheckValue("serverList[12]", iter_0.GetValue(), 51UL)); + VerifyOrReturn(CheckValue("serverList[12]", iter_0.GetValue(), 50UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 13)); - VerifyOrReturn(CheckValue("serverList[13]", iter_0.GetValue(), 52UL)); + VerifyOrReturn(CheckValue("serverList[13]", iter_0.GetValue(), 51UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 14)); - VerifyOrReturn(CheckValue("serverList[14]", iter_0.GetValue(), 53UL)); + VerifyOrReturn(CheckValue("serverList[14]", iter_0.GetValue(), 52UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 15)); - VerifyOrReturn(CheckValue("serverList[15]", iter_0.GetValue(), 54UL)); + VerifyOrReturn(CheckValue("serverList[15]", iter_0.GetValue(), 53UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 16)); - VerifyOrReturn(CheckValue("serverList[16]", iter_0.GetValue(), 55UL)); + VerifyOrReturn(CheckValue("serverList[16]", iter_0.GetValue(), 54UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 17)); - VerifyOrReturn(CheckValue("serverList[17]", iter_0.GetValue(), 60UL)); + VerifyOrReturn(CheckValue("serverList[17]", iter_0.GetValue(), 55UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 18)); - VerifyOrReturn(CheckValue("serverList[18]", iter_0.GetValue(), 62UL)); + VerifyOrReturn(CheckValue("serverList[18]", iter_0.GetValue(), 60UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 19)); - VerifyOrReturn(CheckValue("serverList[19]", iter_0.GetValue(), 63UL)); + VerifyOrReturn(CheckValue("serverList[19]", iter_0.GetValue(), 62UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 20)); - VerifyOrReturn(CheckValue("serverList[20]", iter_0.GetValue(), 64UL)); + VerifyOrReturn(CheckValue("serverList[20]", iter_0.GetValue(), 63UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 21)); - VerifyOrReturn(CheckValue("serverList[21]", iter_0.GetValue(), 65UL)); + VerifyOrReturn(CheckValue("serverList[21]", iter_0.GetValue(), 64UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 22)); - VerifyOrReturn(CheckValue("serverList[22]", iter_0.GetValue(), 1029UL)); - VerifyOrReturn(CheckNoMoreListItems("serverList", iter_0, 23)); + VerifyOrReturn(CheckValue("serverList[22]", iter_0.GetValue(), 65UL)); + VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 23)); + VerifyOrReturn(CheckValue("serverList[23]", iter_0.GetValue(), 1029UL)); + VerifyOrReturn(CheckNoMoreListItems("serverList", iter_0, 24)); } NextTest(); diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp index 779834df8d925a..de5456c1a8614e 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp @@ -1235,6 +1235,28 @@ void LevelControlClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvDat cb->mCall(cb->mContext, list); } +void LocalizationConfigurationClusterSupportedLocalesListAttributeFilter(TLV::TLVReader * tlvData, + Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + void LowPowerClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h index c4551161a6357c..1f74c841b7950d 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h @@ -372,6 +372,11 @@ void LevelControlClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * chip::Callback::Cancelable * onFailureCallback); typedef void (*LevelControlAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); +void LocalizationConfigurationClusterSupportedLocalesListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*LocalizationConfigurationSupportedLocalesListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); void LowPowerClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); typedef void (*LowPowerAttributeListListAttributeCallback)(void * context, diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp index 681b6afefaf038..eaad14c95e5f23 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp @@ -3992,6 +3992,8 @@ CHIP_ERROR LevelControlCluster::StopWithOnOff(Callback::Cancelable * onSuccessCa return err; } +// LocalizationConfiguration Cluster Commands + // LowPower Cluster Commands CHIP_ERROR LowPowerCluster::Sleep(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 3e6c0b7081c175..9945c3a9d07fe1 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h @@ -456,6 +456,13 @@ class DLL_EXPORT LevelControlCluster : public ClusterBase CHIP_ERROR StopWithOnOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); }; +class DLL_EXPORT LocalizationConfigurationCluster : public ClusterBase +{ +public: + LocalizationConfigurationCluster() : ClusterBase(app::Clusters::LocalizationConfiguration::Id) {} + ~LocalizationConfigurationCluster() {} +}; + class DLL_EXPORT LowPowerCluster : public ClusterBase { public: diff --git a/zzz_generated/controller-clusters/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/controller-clusters/zap-generated/PluginApplicationCallbacks.h index 58ad4eee403386..a1db299d699aa0 100644 --- a/zzz_generated/controller-clusters/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/controller-clusters/zap-generated/PluginApplicationCallbacks.h @@ -53,6 +53,7 @@ MatterIlluminanceMeasurementPluginClientInitCallback(); \ MatterKeypadInputPluginClientInitCallback(); \ MatterLevelControlPluginClientInitCallback(); \ + MatterLocalizationConfigurationPluginClientInitCallback(); \ MatterLowPowerPluginClientInitCallback(); \ MatterMediaInputPluginClientInitCallback(); \ MatterMediaPlaybackPluginClientInitCallback(); \ diff --git a/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp b/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp index 105f048289f12a..553c4b2eace656 100644 --- a/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp +++ b/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp @@ -122,6 +122,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_LEVEL_CONTROL_CLUSTER_ID: emberAfLevelControlClusterInitCallback(endpoint); break; + case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: + emberAfLocalizationConfigurationClusterInitCallback(endpoint); + break; case ZCL_LOW_POWER_CLUSTER_ID: emberAfLowPowerClusterInitCallback(endpoint); break; @@ -370,6 +373,11 @@ void __attribute__((weak)) emberAfLevelControlClusterInitCallback(EndpointId end // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfLocalizationConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfLowPowerClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/controller-clusters/zap-generated/endpoint_config.h b/zzz_generated/controller-clusters/zap-generated/endpoint_config.h index b595a44c43dc83..f38eedda6b7b15 100644 --- a/zzz_generated/controller-clusters/zap-generated/endpoint_config.h +++ b/zzz_generated/controller-clusters/zap-generated/endpoint_config.h @@ -318,7 +318,7 @@ #define GENERATED_FUNCTION_ARRAYS #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 60 +#define GENERATED_CLUSTER_COUNT 61 #define GENERATED_CLUSTERS \ { \ { 0x0003, ZAP_ATTRIBUTE_INDEX(0), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Identify (client) */ \ @@ -351,6 +351,9 @@ { \ 0x002A, ZAP_ATTRIBUTE_INDEX(13), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: OTA Software Update Requestor (client) */ \ + { \ + 0x002B, ZAP_ATTRIBUTE_INDEX(14), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ + }, /* Endpoint: 1, Cluster: Localization Configuration (client) */ \ { \ 0x002E, ZAP_ATTRIBUTE_INDEX(14), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Power Source Configuration (client) */ \ @@ -494,7 +497,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 60, 138 }, \ + { ZAP_CLUSTER_INDEX(0), 61, 138 }, \ } // Largest attribute size is needed for various buffers diff --git a/zzz_generated/controller-clusters/zap-generated/gen_config.h b/zzz_generated/controller-clusters/zap-generated/gen_config.h index 1a538867128128..b434e22141f697 100644 --- a/zzz_generated/controller-clusters/zap-generated/gen_config.h +++ b/zzz_generated/controller-clusters/zap-generated/gen_config.h @@ -60,6 +60,7 @@ #define EMBER_AF_ILLUMINANCE_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_KEYPAD_INPUT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_LEVEL_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (1) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_LOW_POWER_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_MEDIA_INPUT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_MEDIA_PLAYBACK_CLUSTER_CLIENT_ENDPOINT_COUNT (1) @@ -216,6 +217,10 @@ #define ZCL_USING_LEVEL_CONTROL_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_LEVEL_CONTROL_CLIENT +// Use this macro to check if the client side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_CLIENT +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_CLIENT + // Use this macro to check if the client side of the Low Power cluster is included #define ZCL_USING_LOW_POWER_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_LOW_POWER_CLIENT diff --git a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h index 8733079a01b4f4..aa243c4170bd4d 100644 --- a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h +++ b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h @@ -241,6 +241,13 @@ class DLL_EXPORT LevelControlClusterTest : public LevelControlCluster ~LevelControlClusterTest() {} }; +class DLL_EXPORT LocalizationConfigurationClusterTest : public LocalizationConfigurationCluster +{ +public: + LocalizationConfigurationClusterTest() : LocalizationConfigurationCluster() {} + ~LocalizationConfigurationClusterTest() {} +}; + class DLL_EXPORT LowPowerClusterTest : public LowPowerCluster { public: diff --git a/zzz_generated/door-lock-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/door-lock-app/zap-generated/PluginApplicationCallbacks.h index fd99dee02a36fa..721fcc1e447ca9 100644 --- a/zzz_generated/door-lock-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/door-lock-app/zap-generated/PluginApplicationCallbacks.h @@ -31,6 +31,7 @@ MatterFixedLabelPluginServerInitCallback(); \ MatterGeneralCommissioningPluginServerInitCallback(); \ MatterGeneralDiagnosticsPluginServerInitCallback(); \ + MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterNetworkCommissioningPluginServerInitCallback(); \ MatterOperationalCredentialsPluginServerInitCallback(); \ MatterPowerSourcePluginServerInitCallback(); \ diff --git a/zzz_generated/door-lock-app/zap-generated/callback-stub.cpp b/zzz_generated/door-lock-app/zap-generated/callback-stub.cpp index 6f8c064ca598c2..91e0e39bba160a 100644 --- a/zzz_generated/door-lock-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/door-lock-app/zap-generated/callback-stub.cpp @@ -56,6 +56,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID: emberAfGeneralDiagnosticsClusterInitCallback(endpoint); break; + case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: + emberAfLocalizationConfigurationClusterInitCallback(endpoint); + break; case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: emberAfNetworkCommissioningClusterInitCallback(endpoint); break; @@ -131,6 +134,11 @@ void __attribute__((weak)) emberAfGeneralDiagnosticsClusterInitCallback(Endpoint // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfLocalizationConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfNetworkCommissioningClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/door-lock-app/zap-generated/endpoint_config.h b/zzz_generated/door-lock-app/zap-generated/endpoint_config.h index aae0e26c48f0b7..4c1522a59ddfe2 100644 --- a/zzz_generated/door-lock-app/zap-generated/endpoint_config.h +++ b/zzz_generated/door-lock-app/zap-generated/endpoint_config.h @@ -615,7 +615,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 194 +#define GENERATED_ATTRIBUTE_COUNT 196 #define GENERATED_ATTRIBUTES \ { \ \ @@ -642,6 +642,10 @@ { 0x000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + \ /* Endpoint: 0, Cluster: Power Source Configuration (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Sources */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ @@ -877,7 +881,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 19 +#define GENERATED_CLUSTER_COUNT 20 #define GENERATED_CLUSTERS \ { \ { 0x001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ @@ -888,55 +892,58 @@ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ { \ - 0x002E, ZAP_ATTRIBUTE_INDEX(17), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(17), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { \ + 0x002E, ZAP_ATTRIBUTE_INDEX(19), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Power Source Configuration (server) */ \ { \ - 0x002F, ZAP_ATTRIBUTE_INDEX(19), 6, 73, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002F, ZAP_ATTRIBUTE_INDEX(21), 6, 73, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Power Source (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(25), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0030, ZAP_ATTRIBUTE_INDEX(27), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(31), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(33), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(41), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0032, ZAP_ATTRIBUTE_INDEX(43), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(41), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(43), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(50), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(52), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(56), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(58), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(121), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0036, ZAP_ATTRIBUTE_INDEX(123), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(136), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(138), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(147), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(149), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(151), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(153), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(157), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(159), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(159), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(161), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(161), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(163), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x002F, ZAP_ATTRIBUTE_INDEX(166), 9, 133, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002F, ZAP_ATTRIBUTE_INDEX(168), 9, 133, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Power Source (server) */ \ { 0x0101, \ - ZAP_ATTRIBUTE_INDEX(175), \ + ZAP_ATTRIBUTE_INDEX(177), \ 19, \ 29, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | \ @@ -949,7 +956,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 16, 1070 }, { ZAP_CLUSTER_INDEX(16), 3, 162 }, \ + { ZAP_CLUSTER_INDEX(0), 17, 1106 }, { ZAP_CLUSTER_INDEX(17), 3, 162 }, \ } // Largest attribute size is needed for various buffers @@ -959,7 +966,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (246) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1232) +#define ATTRIBUTE_MAX_SIZE (1268) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/door-lock-app/zap-generated/gen_config.h b/zzz_generated/door-lock-app/zap-generated/gen_config.h index 0c7333888530e9..e77427d0c9a328 100644 --- a/zzz_generated/door-lock-app/zap-generated/gen_config.h +++ b/zzz_generated/door-lock-app/zap-generated/gen_config.h @@ -38,6 +38,7 @@ #define EMBER_AF_FIXED_LABEL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OPERATIONAL_CREDENTIALS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_POWER_SOURCE_CLUSTER_SERVER_ENDPOINT_COUNT (2) @@ -94,6 +95,11 @@ #define EMBER_AF_PLUGIN_GENERAL_DIAGNOSTICS_SERVER #define EMBER_AF_PLUGIN_GENERAL_DIAGNOSTICS +// Use this macro to check if the server side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION + // Use this macro to check if the server side of the Network Commissioning cluster is included #define ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER #define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING_SERVER diff --git a/zzz_generated/lighting-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/lighting-app/zap-generated/PluginApplicationCallbacks.h index ac93a15a8550c2..a1fb371ae0b6b7 100644 --- a/zzz_generated/lighting-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/lighting-app/zap-generated/PluginApplicationCallbacks.h @@ -33,6 +33,7 @@ MatterGeneralDiagnosticsPluginServerInitCallback(); \ MatterIdentifyPluginServerInitCallback(); \ MatterLevelControlPluginServerInitCallback(); \ + MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterNetworkCommissioningPluginServerInitCallback(); \ MatterOtaSoftwareUpdateProviderPluginClientInitCallback(); \ MatterOccupancySensingPluginServerInitCallback(); \ diff --git a/zzz_generated/lighting-app/zap-generated/callback-stub.cpp b/zzz_generated/lighting-app/zap-generated/callback-stub.cpp index ff219206cbe828..ccb5454a214c2c 100644 --- a/zzz_generated/lighting-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/lighting-app/zap-generated/callback-stub.cpp @@ -62,6 +62,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_LEVEL_CONTROL_CLUSTER_ID: emberAfLevelControlClusterInitCallback(endpoint); break; + case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: + emberAfLocalizationConfigurationClusterInitCallback(endpoint); + break; case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: emberAfNetworkCommissioningClusterInitCallback(endpoint); break; @@ -156,6 +159,11 @@ void __attribute__((weak)) emberAfLevelControlClusterInitCallback(EndpointId end // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfLocalizationConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfNetworkCommissioningClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/lighting-app/zap-generated/endpoint_config.h b/zzz_generated/lighting-app/zap-generated/endpoint_config.h index b5fca851ead891..e32b52b850391d 100644 --- a/zzz_generated/lighting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lighting-app/zap-generated/endpoint_config.h @@ -577,7 +577,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 221 +#define GENERATED_ATTRIBUTE_COUNT 223 #define GENERATED_ATTRIBUTES \ { \ \ @@ -613,6 +613,10 @@ { 0x0012, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* UniqueID */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4) }, /* Breadcrumb */ \ { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* BasicCommissioningInfoList */ \ @@ -889,7 +893,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 24 +#define GENERATED_CLUSTER_COUNT 25 #define GENERATED_CLUSTERS \ { \ { 0x001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ @@ -903,82 +907,85 @@ 0x0029, ZAP_ATTRIBUTE_INDEX(25), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 0, Cluster: OTA Software Update Provider (client) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(25), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(25), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { \ + 0x0030, ZAP_ATTRIBUTE_INDEX(27), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(31), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(33), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(41), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0032, ZAP_ATTRIBUTE_INDEX(43), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(41), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(43), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(50), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(52), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(56), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(58), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(121), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0036, ZAP_ATTRIBUTE_INDEX(123), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(136), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(138), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003B, ZAP_ATTRIBUTE_INDEX(147), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003B, ZAP_ATTRIBUTE_INDEX(149), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Switch (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(147), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(149), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(151), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(153), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(157), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(159), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(159), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(161), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { 0x0003, \ - ZAP_ATTRIBUTE_INDEX(161), \ + ZAP_ATTRIBUTE_INDEX(163), \ 3, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayIdentifyServer }, /* Endpoint: 1, Cluster: Identify (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(164), \ + ZAP_ATTRIBUTE_INDEX(166), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { 0x0008, \ - ZAP_ATTRIBUTE_INDEX(171), \ + ZAP_ATTRIBUTE_INDEX(173), \ 15, \ 23, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(186), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(188), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { 0x0300, \ - ZAP_ATTRIBUTE_INDEX(191), \ + ZAP_ATTRIBUTE_INDEX(193), \ 22, \ 36, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(213), \ + ZAP_ATTRIBUTE_INDEX(215), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOccupancySensingServer }, /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ { \ - 0x0006, ZAP_ATTRIBUTE_INDEX(217), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0006, ZAP_ATTRIBUTE_INDEX(219), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 2, Cluster: On/Off (client) */ \ { \ - 0x0007, ZAP_ATTRIBUTE_INDEX(218), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0007, ZAP_ATTRIBUTE_INDEX(220), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: On/off Switch Configuration (server) */ \ } @@ -987,7 +994,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 16, 1436 }, { ZAP_CLUSTER_INDEX(16), 6, 82 }, { ZAP_CLUSTER_INDEX(22), 2, 6 }, \ + { ZAP_CLUSTER_INDEX(0), 17, 1472 }, { ZAP_CLUSTER_INDEX(17), 6, 82 }, { ZAP_CLUSTER_INDEX(23), 2, 6 }, \ } // Largest attribute size is needed for various buffers @@ -997,7 +1004,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (687) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1524) +#define ATTRIBUTE_MAX_SIZE (1560) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) diff --git a/zzz_generated/lighting-app/zap-generated/gen_config.h b/zzz_generated/lighting-app/zap-generated/gen_config.h index 1ce9f36f46e1aa..053035a8d0e6cc 100644 --- a/zzz_generated/lighting-app/zap-generated/gen_config.h +++ b/zzz_generated/lighting-app/zap-generated/gen_config.h @@ -40,6 +40,7 @@ #define EMBER_AF_GENERAL_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_IDENTIFY_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OTA_PROVIDER_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_OCCUPANCY_SENSING_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -118,6 +119,11 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 +// Use this macro to check if the server side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION + // Use this macro to check if the server side of the Network Commissioning cluster is included #define ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER #define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING_SERVER diff --git a/zzz_generated/lock-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/lock-app/zap-generated/PluginApplicationCallbacks.h index 9a4bb6ef208247..283a0d39b2a71d 100644 --- a/zzz_generated/lock-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/lock-app/zap-generated/PluginApplicationCallbacks.h @@ -30,6 +30,7 @@ MatterFixedLabelPluginServerInitCallback(); \ MatterGeneralCommissioningPluginServerInitCallback(); \ MatterGeneralDiagnosticsPluginServerInitCallback(); \ + MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterNetworkCommissioningPluginServerInitCallback(); \ MatterOnOffPluginServerInitCallback(); \ MatterOperationalCredentialsPluginServerInitCallback(); \ diff --git a/zzz_generated/lock-app/zap-generated/callback-stub.cpp b/zzz_generated/lock-app/zap-generated/callback-stub.cpp index ab25a52ca85fbf..0ff68ab589c5c0 100644 --- a/zzz_generated/lock-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/lock-app/zap-generated/callback-stub.cpp @@ -53,6 +53,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID: emberAfGeneralDiagnosticsClusterInitCallback(endpoint); break; + case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: + emberAfLocalizationConfigurationClusterInitCallback(endpoint); + break; case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: emberAfNetworkCommissioningClusterInitCallback(endpoint); break; @@ -126,6 +129,11 @@ void __attribute__((weak)) emberAfGeneralDiagnosticsClusterInitCallback(Endpoint // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfLocalizationConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfNetworkCommissioningClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/lock-app/zap-generated/endpoint_config.h b/zzz_generated/lock-app/zap-generated/endpoint_config.h index ea9e855079a2e8..42073b3fa69f29 100644 --- a/zzz_generated/lock-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lock-app/zap-generated/endpoint_config.h @@ -601,7 +601,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 182 +#define GENERATED_ATTRIBUTE_COUNT 184 #define GENERATED_ATTRIBUTES \ { \ \ @@ -628,6 +628,10 @@ { 0x000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + \ /* Endpoint: 0, Cluster: Power Source Configuration (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Sources */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ @@ -845,7 +849,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 19 +#define GENERATED_CLUSTER_COUNT 20 #define GENERATED_CLUSTERS \ { \ { 0x001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ @@ -856,58 +860,61 @@ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ { \ - 0x002E, ZAP_ATTRIBUTE_INDEX(17), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(17), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { \ + 0x002E, ZAP_ATTRIBUTE_INDEX(19), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Power Source Configuration (server) */ \ { \ - 0x002F, ZAP_ATTRIBUTE_INDEX(19), 6, 73, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002F, ZAP_ATTRIBUTE_INDEX(21), 6, 73, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Power Source (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(25), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0030, ZAP_ATTRIBUTE_INDEX(27), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(31), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(33), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(41), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0032, ZAP_ATTRIBUTE_INDEX(43), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(41), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(43), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(50), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(52), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(56), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(58), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(121), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0036, ZAP_ATTRIBUTE_INDEX(123), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(136), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(138), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(147), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(149), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(151), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(153), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(157), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(159), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(159), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(161), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(161), \ + ZAP_ATTRIBUTE_INDEX(163), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(168), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(170), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x002F, ZAP_ATTRIBUTE_INDEX(173), 9, 133, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002F, ZAP_ATTRIBUTE_INDEX(175), 9, 133, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Power Source (server) */ \ } @@ -916,7 +923,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 16, 1070 }, { ZAP_CLUSTER_INDEX(16), 3, 146 }, \ + { ZAP_CLUSTER_INDEX(0), 17, 1106 }, { ZAP_CLUSTER_INDEX(17), 3, 146 }, \ } // Largest attribute size is needed for various buffers @@ -926,7 +933,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (246) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1216) +#define ATTRIBUTE_MAX_SIZE (1252) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/lock-app/zap-generated/gen_config.h b/zzz_generated/lock-app/zap-generated/gen_config.h index 39b4ce04665a4e..ff49f2cd25c1ad 100644 --- a/zzz_generated/lock-app/zap-generated/gen_config.h +++ b/zzz_generated/lock-app/zap-generated/gen_config.h @@ -37,6 +37,7 @@ #define EMBER_AF_FIXED_LABEL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OPERATIONAL_CREDENTIALS_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -89,6 +90,11 @@ #define EMBER_AF_PLUGIN_GENERAL_DIAGNOSTICS_SERVER #define EMBER_AF_PLUGIN_GENERAL_DIAGNOSTICS +// Use this macro to check if the server side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION + // Use this macro to check if the server side of the Network Commissioning cluster is included #define ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER #define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING_SERVER diff --git a/zzz_generated/ota-provider-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/ota-provider-app/zap-generated/PluginApplicationCallbacks.h index fad0ef9d414927..f03b2fe574ae10 100644 --- a/zzz_generated/ota-provider-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/ota-provider-app/zap-generated/PluginApplicationCallbacks.h @@ -24,6 +24,7 @@ #define MATTER_PLUGINS_INIT \ MatterFixedLabelPluginServerInitCallback(); \ MatterGeneralCommissioningPluginServerInitCallback(); \ + MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterNetworkCommissioningPluginServerInitCallback(); \ MatterOtaSoftwareUpdateProviderPluginServerInitCallback(); \ MatterOperationalCredentialsPluginServerInitCallback(); \ diff --git a/zzz_generated/ota-provider-app/zap-generated/callback-stub.cpp b/zzz_generated/ota-provider-app/zap-generated/callback-stub.cpp index 38d052057955ba..970d17d71a9bb9 100644 --- a/zzz_generated/ota-provider-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/ota-provider-app/zap-generated/callback-stub.cpp @@ -35,6 +35,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: emberAfGeneralCommissioningClusterInitCallback(endpoint); break; + case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: + emberAfLocalizationConfigurationClusterInitCallback(endpoint); + break; case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: emberAfNetworkCommissioningClusterInitCallback(endpoint); break; @@ -63,6 +66,11 @@ void __attribute__((weak)) emberAfGeneralCommissioningClusterInitCallback(Endpoi // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfLocalizationConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfNetworkCommissioningClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h b/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h index 9d1654a9823ee0..a579509c0b88d0 100644 --- a/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h +++ b/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h @@ -133,13 +133,17 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 27 +#define GENERATED_ATTRIBUTE_COUNT 29 #define GENERATED_ATTRIBUTES \ { \ \ /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* SupportedLocales */ \ + \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(0) }, /* Breadcrumb */ \ { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(8) }, /* BasicCommissioningInfoList */ \ @@ -187,26 +191,29 @@ #define GENERATED_FUNCTION_ARRAYS #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 6 +#define GENERATED_CLUSTER_COUNT 7 #define GENERATED_CLUSTERS \ { \ { \ 0x0029, ZAP_ATTRIBUTE_INDEX(0), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(1), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(1), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { \ + 0x0030, ZAP_ATTRIBUTE_INDEX(3), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(7), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(9), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(17), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(19), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(23), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(25), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(25), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(27), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ } @@ -215,7 +222,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 6, 340 }, \ + { ZAP_CLUSTER_INDEX(0), 7, 376 }, \ } // Largest attribute size is needed for various buffers @@ -225,7 +232,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (0) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (340) +#define ATTRIBUTE_MAX_SIZE (376) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (1) diff --git a/zzz_generated/ota-provider-app/zap-generated/gen_config.h b/zzz_generated/ota-provider-app/zap-generated/gen_config.h index 9f87a95135c1fa..c87b837d639c15 100644 --- a/zzz_generated/ota-provider-app/zap-generated/gen_config.h +++ b/zzz_generated/ota-provider-app/zap-generated/gen_config.h @@ -31,6 +31,7 @@ /**** Cluster endpoint counts ****/ #define EMBER_AF_FIXED_LABEL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OTA_PROVIDER_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OPERATIONAL_CREDENTIALS_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -48,6 +49,11 @@ #define EMBER_AF_PLUGIN_GENERAL_COMMISSIONING_SERVER #define EMBER_AF_PLUGIN_GENERAL_COMMISSIONING +// Use this macro to check if the server side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION + // Use this macro to check if the server side of the Network Commissioning cluster is included #define ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER #define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING_SERVER diff --git a/zzz_generated/ota-requestor-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/ota-requestor-app/zap-generated/PluginApplicationCallbacks.h index 3bbd9e5dc78fa3..1755fcd9f503a4 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/ota-requestor-app/zap-generated/PluginApplicationCallbacks.h @@ -25,6 +25,7 @@ MatterBasicPluginServerInitCallback(); \ MatterFixedLabelPluginServerInitCallback(); \ MatterGeneralCommissioningPluginServerInitCallback(); \ + MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterNetworkCommissioningPluginServerInitCallback(); \ MatterOtaSoftwareUpdateProviderPluginClientInitCallback(); \ MatterOtaSoftwareUpdateRequestorPluginServerInitCallback(); \ diff --git a/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp b/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp index 10c525beeb9ce6..500c51e856ba69 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp @@ -38,6 +38,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: emberAfGeneralCommissioningClusterInitCallback(endpoint); break; + case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: + emberAfLocalizationConfigurationClusterInitCallback(endpoint); + break; case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: emberAfNetworkCommissioningClusterInitCallback(endpoint); break; @@ -74,6 +77,11 @@ void __attribute__((weak)) emberAfGeneralCommissioningClusterInitCallback(Endpoi // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfLocalizationConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfNetworkCommissioningClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h b/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h index 2366566c61aa77..370e417762b800 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h +++ b/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h @@ -143,7 +143,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 44 +#define GENERATED_ATTRIBUTE_COUNT 46 #define GENERATED_ATTRIBUTES \ { \ \ @@ -174,6 +174,10 @@ { 0x0003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* SupportedLocales */ \ + \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4) }, /* Breadcrumb */ \ { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* BasicCommissioningInfoList */ \ @@ -224,7 +228,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 8 +#define GENERATED_CLUSTER_COUNT 9 #define GENERATED_CLUSTERS \ { \ { 0x0028, \ @@ -240,19 +244,22 @@ 0x002A, ZAP_ATTRIBUTE_INDEX(13), 5, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(18), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(18), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { \ + 0x0030, ZAP_ATTRIBUTE_INDEX(20), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(24), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(26), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(34), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(36), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(40), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(42), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(42), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(44), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ } @@ -261,7 +268,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 8, 591 }, \ + { ZAP_CLUSTER_INDEX(0), 9, 627 }, \ } // Largest attribute size is needed for various buffers @@ -271,7 +278,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (246) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (591) +#define ATTRIBUTE_MAX_SIZE (627) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (1) diff --git a/zzz_generated/ota-requestor-app/zap-generated/gen_config.h b/zzz_generated/ota-requestor-app/zap-generated/gen_config.h index d317f39bbdc43c..c24be940fb3941 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/gen_config.h +++ b/zzz_generated/ota-requestor-app/zap-generated/gen_config.h @@ -32,6 +32,7 @@ #define EMBER_AF_BASIC_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_FIXED_LABEL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OTA_PROVIDER_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_OTA_REQUESTOR_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -55,6 +56,11 @@ #define EMBER_AF_PLUGIN_GENERAL_COMMISSIONING_SERVER #define EMBER_AF_PLUGIN_GENERAL_COMMISSIONING +// Use this macro to check if the server side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION + // Use this macro to check if the server side of the Network Commissioning cluster is included #define ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER #define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING_SERVER diff --git a/zzz_generated/pump-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/pump-app/zap-generated/PluginApplicationCallbacks.h index 3de849fbc19dfb..1577ba5b20e53c 100644 --- a/zzz_generated/pump-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/pump-app/zap-generated/PluginApplicationCallbacks.h @@ -32,6 +32,7 @@ MatterGeneralCommissioningPluginServerInitCallback(); \ MatterGeneralDiagnosticsPluginServerInitCallback(); \ MatterLevelControlPluginServerInitCallback(); \ + MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterNetworkCommissioningPluginServerInitCallback(); \ MatterOnOffPluginServerInitCallback(); \ MatterOperationalCredentialsPluginServerInitCallback(); \ diff --git a/zzz_generated/pump-app/zap-generated/callback-stub.cpp b/zzz_generated/pump-app/zap-generated/callback-stub.cpp index c9eb42086f4c57..56c234f67b6905 100644 --- a/zzz_generated/pump-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/pump-app/zap-generated/callback-stub.cpp @@ -56,6 +56,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_LEVEL_CONTROL_CLUSTER_ID: emberAfLevelControlClusterInitCallback(endpoint); break; + case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: + emberAfLocalizationConfigurationClusterInitCallback(endpoint); + break; case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: emberAfNetworkCommissioningClusterInitCallback(endpoint); break; @@ -134,6 +137,11 @@ void __attribute__((weak)) emberAfLevelControlClusterInitCallback(EndpointId end // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfLocalizationConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfNetworkCommissioningClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/pump-app/zap-generated/endpoint_config.h b/zzz_generated/pump-app/zap-generated/endpoint_config.h index 569d0885c7a39e..200f63cd9215b2 100644 --- a/zzz_generated/pump-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-app/zap-generated/endpoint_config.h @@ -483,7 +483,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 177 +#define GENERATED_ATTRIBUTE_COUNT 179 #define GENERATED_ATTRIBUTES \ { \ \ @@ -510,6 +510,10 @@ { 0x000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4) }, /* Breadcrumb */ \ { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* BasicCommissioningInfoList */ \ @@ -739,7 +743,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 22 +#define GENERATED_CLUSTER_COUNT 23 #define GENERATED_CLUSTERS \ { \ { 0x001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ @@ -750,75 +754,78 @@ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(17), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(17), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { \ + 0x0030, ZAP_ATTRIBUTE_INDEX(19), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(23), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(25), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(33), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0032, ZAP_ATTRIBUTE_INDEX(35), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(33), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(35), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(42), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(44), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(48), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(50), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(113), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(115), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(117), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(119), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(123), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(125), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(125), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(127), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(127), \ + ZAP_ATTRIBUTE_INDEX(129), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { 0x0008, \ - ZAP_ATTRIBUTE_INDEX(129), \ + ZAP_ATTRIBUTE_INDEX(131), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(131), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(133), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ 0x0200, \ - ZAP_ATTRIBUTE_INDEX(136), \ + ZAP_ATTRIBUTE_INDEX(138), \ 26, \ 54, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayPumpConfigurationAndControlServer \ }, /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(162), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0402, ZAP_ATTRIBUTE_INDEX(164), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (client) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(163), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0402, ZAP_ATTRIBUTE_INDEX(165), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ { \ - 0x0403, ZAP_ATTRIBUTE_INDEX(167), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0403, ZAP_ATTRIBUTE_INDEX(169), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (client) */ \ { \ - 0x0403, ZAP_ATTRIBUTE_INDEX(168), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0403, ZAP_ATTRIBUTE_INDEX(170), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ { \ - 0x0404, ZAP_ATTRIBUTE_INDEX(172), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0404, ZAP_ATTRIBUTE_INDEX(174), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (client) */ \ { \ - 0x0404, ZAP_ATTRIBUTE_INDEX(173), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0404, ZAP_ATTRIBUTE_INDEX(175), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ } @@ -827,7 +834,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 12, 880 }, { ZAP_CLUSTER_INDEX(12), 10, 90 }, \ + { ZAP_CLUSTER_INDEX(0), 13, 916 }, { ZAP_CLUSTER_INDEX(13), 10, 90 }, \ } // Largest attribute size is needed for various buffers @@ -837,7 +844,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (246) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (970) +#define ATTRIBUTE_MAX_SIZE (1006) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/pump-app/zap-generated/gen_config.h b/zzz_generated/pump-app/zap-generated/gen_config.h index e88eb960407f5d..f7026fcb38420f 100644 --- a/zzz_generated/pump-app/zap-generated/gen_config.h +++ b/zzz_generated/pump-app/zap-generated/gen_config.h @@ -39,6 +39,7 @@ #define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OPERATIONAL_CREDENTIALS_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -106,6 +107,11 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 +// Use this macro to check if the server side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION + // Use this macro to check if the server side of the Network Commissioning cluster is included #define ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER #define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING_SERVER diff --git a/zzz_generated/pump-controller-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/pump-controller-app/zap-generated/PluginApplicationCallbacks.h index 142169742a9d52..65591bafed56d7 100644 --- a/zzz_generated/pump-controller-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/pump-controller-app/zap-generated/PluginApplicationCallbacks.h @@ -32,6 +32,7 @@ MatterGeneralCommissioningPluginServerInitCallback(); \ MatterGeneralDiagnosticsPluginServerInitCallback(); \ MatterLevelControlPluginClientInitCallback(); \ + MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterNetworkCommissioningPluginServerInitCallback(); \ MatterOnOffPluginClientInitCallback(); \ MatterOperationalCredentialsPluginServerInitCallback(); \ diff --git a/zzz_generated/pump-controller-app/zap-generated/callback-stub.cpp b/zzz_generated/pump-controller-app/zap-generated/callback-stub.cpp index bf672f6f48cf56..b3ada25d6ddec5 100644 --- a/zzz_generated/pump-controller-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/pump-controller-app/zap-generated/callback-stub.cpp @@ -59,6 +59,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_LEVEL_CONTROL_CLUSTER_ID: emberAfLevelControlClusterInitCallback(endpoint); break; + case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: + emberAfLocalizationConfigurationClusterInitCallback(endpoint); + break; case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: emberAfNetworkCommissioningClusterInitCallback(endpoint); break; @@ -145,6 +148,11 @@ void __attribute__((weak)) emberAfLevelControlClusterInitCallback(EndpointId end // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfLocalizationConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfNetworkCommissioningClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h index 1c2c759c8e7f4c..35a93f18cdfa24 100644 --- a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h @@ -553,7 +553,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 164 +#define GENERATED_ATTRIBUTE_COUNT 166 #define GENERATED_ATTRIBUTES \ { \ \ @@ -583,6 +583,10 @@ { 0x000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4) }, /* Breadcrumb */ \ { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* BasicCommissioningInfoList */ \ @@ -780,7 +784,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 21 +#define GENERATED_CLUSTER_COUNT 22 #define GENERATED_CLUSTERS \ { \ { \ @@ -796,58 +800,61 @@ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(18), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(18), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { \ + 0x0030, ZAP_ATTRIBUTE_INDEX(20), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(24), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(26), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(34), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0032, ZAP_ATTRIBUTE_INDEX(36), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(34), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(36), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(43), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(45), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(49), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(51), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(114), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0036, ZAP_ATTRIBUTE_INDEX(116), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(129), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(131), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(140), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(142), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(144), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(146), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(150), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(152), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(152), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(154), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x0006, ZAP_ATTRIBUTE_INDEX(154), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0006, ZAP_ATTRIBUTE_INDEX(156), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: On/Off (client) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(155), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(157), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x0200, ZAP_ATTRIBUTE_INDEX(160), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0200, ZAP_ATTRIBUTE_INDEX(162), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Pump Configuration and Control (client) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(161), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0402, ZAP_ATTRIBUTE_INDEX(163), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (client) */ \ { \ - 0x0403, ZAP_ATTRIBUTE_INDEX(162), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0403, ZAP_ATTRIBUTE_INDEX(164), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (client) */ \ { \ - 0x0404, ZAP_ATTRIBUTE_INDEX(163), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0404, ZAP_ATTRIBUTE_INDEX(165), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (client) */ \ } @@ -856,7 +863,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 15, 997 }, { ZAP_CLUSTER_INDEX(15), 6, 10 }, \ + { ZAP_CLUSTER_INDEX(0), 16, 1033 }, { ZAP_CLUSTER_INDEX(16), 6, 10 }, \ } // Largest attribute size is needed for various buffers @@ -866,7 +873,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (246) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1007) +#define ATTRIBUTE_MAX_SIZE (1043) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/pump-controller-app/zap-generated/gen_config.h b/zzz_generated/pump-controller-app/zap-generated/gen_config.h index 718e956174bf18..fbdad125670956 100644 --- a/zzz_generated/pump-controller-app/zap-generated/gen_config.h +++ b/zzz_generated/pump-controller-app/zap-generated/gen_config.h @@ -39,6 +39,7 @@ #define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_LEVEL_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (1) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_ON_OFF_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_OPERATIONAL_CREDENTIALS_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -100,6 +101,11 @@ #define ZCL_USING_LEVEL_CONTROL_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_LEVEL_CONTROL_CLIENT +// Use this macro to check if the server side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION + // Use this macro to check if the server side of the Network Commissioning cluster is included #define ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER #define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING_SERVER diff --git a/zzz_generated/temperature-measurement-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/temperature-measurement-app/zap-generated/PluginApplicationCallbacks.h index b6ef4d19178f9a..e23d944246c149 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/temperature-measurement-app/zap-generated/PluginApplicationCallbacks.h @@ -30,6 +30,7 @@ MatterFixedLabelPluginServerInitCallback(); \ MatterGeneralCommissioningPluginServerInitCallback(); \ MatterGeneralDiagnosticsPluginServerInitCallback(); \ + MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterNetworkCommissioningPluginServerInitCallback(); \ MatterOperationalCredentialsPluginServerInitCallback(); \ MatterSoftwareDiagnosticsPluginServerInitCallback(); \ diff --git a/zzz_generated/temperature-measurement-app/zap-generated/callback-stub.cpp b/zzz_generated/temperature-measurement-app/zap-generated/callback-stub.cpp index b5982dfa75391b..ecf1610feb98f7 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/temperature-measurement-app/zap-generated/callback-stub.cpp @@ -53,6 +53,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID: emberAfGeneralDiagnosticsClusterInitCallback(endpoint); break; + case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: + emberAfLocalizationConfigurationClusterInitCallback(endpoint); + break; case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: emberAfNetworkCommissioningClusterInitCallback(endpoint); break; @@ -117,6 +120,11 @@ void __attribute__((weak)) emberAfGeneralDiagnosticsClusterInitCallback(Endpoint // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfLocalizationConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfNetworkCommissioningClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h b/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h index 8e1bd856a844ab..4197c1af68af6a 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h +++ b/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h @@ -279,7 +279,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 94 +#define GENERATED_ATTRIBUTE_COUNT 96 #define GENERATED_ATTRIBUTES \ { \ \ @@ -306,6 +306,10 @@ { 0x000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4) }, /* Breadcrumb */ \ { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* BasicCommissioningInfoList */ \ @@ -422,7 +426,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 15 +#define GENERATED_CLUSTER_COUNT 16 #define GENERATED_CLUSTERS \ { \ { 0x001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ @@ -433,43 +437,46 @@ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(17), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(17), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { \ + 0x0030, ZAP_ATTRIBUTE_INDEX(19), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(23), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(25), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(33), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0032, ZAP_ATTRIBUTE_INDEX(35), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(33), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(35), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(42), 3, 14, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(44), 3, 14, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(45), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0036, ZAP_ATTRIBUTE_INDEX(47), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(60), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(62), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(71), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(73), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(75), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(77), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(81), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(83), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(83), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(85), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(85), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(87), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(90), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0402, ZAP_ATTRIBUTE_INDEX(92), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ } @@ -478,7 +485,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 13, 732 }, { ZAP_CLUSTER_INDEX(13), 2, 8 }, \ + { ZAP_CLUSTER_INDEX(0), 14, 768 }, { ZAP_CLUSTER_INDEX(14), 2, 8 }, \ } // Largest attribute size is needed for various buffers @@ -488,7 +495,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (246) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (740) +#define ATTRIBUTE_MAX_SIZE (776) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/temperature-measurement-app/zap-generated/gen_config.h b/zzz_generated/temperature-measurement-app/zap-generated/gen_config.h index 60f8d01ee7fa07..4220daf57ace22 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/gen_config.h +++ b/zzz_generated/temperature-measurement-app/zap-generated/gen_config.h @@ -37,6 +37,7 @@ #define EMBER_AF_FIXED_LABEL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OPERATIONAL_CREDENTIALS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_SOFTWARE_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -86,6 +87,11 @@ #define EMBER_AF_PLUGIN_GENERAL_DIAGNOSTICS_SERVER #define EMBER_AF_PLUGIN_GENERAL_DIAGNOSTICS +// Use this macro to check if the server side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION + // Use this macro to check if the server side of the Network Commissioning cluster is included #define ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER #define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING_SERVER diff --git a/zzz_generated/thermostat/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/thermostat/zap-generated/PluginApplicationCallbacks.h index ddf961a4f73ae7..0503178449e649 100644 --- a/zzz_generated/thermostat/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/thermostat/zap-generated/PluginApplicationCallbacks.h @@ -35,6 +35,7 @@ MatterGroupsPluginServerInitCallback(); \ MatterIdentifyPluginClientInitCallback(); \ MatterIdentifyPluginServerInitCallback(); \ + MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterNetworkCommissioningPluginServerInitCallback(); \ MatterOtaSoftwareUpdateProviderPluginServerInitCallback(); \ MatterOperationalCredentialsPluginServerInitCallback(); \ diff --git a/zzz_generated/thermostat/zap-generated/callback-stub.cpp b/zzz_generated/thermostat/zap-generated/callback-stub.cpp index 19e86e1145d4dd..5b349786749461 100644 --- a/zzz_generated/thermostat/zap-generated/callback-stub.cpp +++ b/zzz_generated/thermostat/zap-generated/callback-stub.cpp @@ -65,6 +65,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_IDENTIFY_CLUSTER_ID: emberAfIdentifyClusterInitCallback(endpoint); break; + case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: + emberAfLocalizationConfigurationClusterInitCallback(endpoint); + break; case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: emberAfNetworkCommissioningClusterInitCallback(endpoint); break; @@ -158,6 +161,11 @@ void __attribute__((weak)) emberAfIdentifyClusterInitCallback(EndpointId endpoin // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfLocalizationConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfNetworkCommissioningClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/thermostat/zap-generated/endpoint_config.h b/zzz_generated/thermostat/zap-generated/endpoint_config.h index 9465e8e9300b8d..f1d91899ef636d 100644 --- a/zzz_generated/thermostat/zap-generated/endpoint_config.h +++ b/zzz_generated/thermostat/zap-generated/endpoint_config.h @@ -664,7 +664,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 211 +#define GENERATED_ATTRIBUTE_COUNT 213 #define GENERATED_ATTRIBUTES \ { \ \ @@ -713,6 +713,10 @@ /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(21) }, /* Breadcrumb */ \ { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(29) }, /* BasicCommissioningInfoList */ \ @@ -973,7 +977,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 24 +#define GENERATED_CLUSTER_COUNT 25 #define GENERATED_CLUSTERS \ { \ { 0x0003, \ @@ -996,73 +1000,76 @@ 0x0029, ZAP_ATTRIBUTE_INDEX(28), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(29), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(29), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { \ + 0x0030, ZAP_ATTRIBUTE_INDEX(31), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(35), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(37), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(45), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0032, ZAP_ATTRIBUTE_INDEX(47), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(45), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(47), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(54), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(56), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(60), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(62), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(125), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0036, ZAP_ATTRIBUTE_INDEX(127), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(140), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(142), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(151), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(153), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(155), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(157), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x003F, ZAP_ATTRIBUTE_INDEX(161), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003F, ZAP_ATTRIBUTE_INDEX(163), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Group Key Management (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(164), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(166), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(166), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(168), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x0003, ZAP_ATTRIBUTE_INDEX(168), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0003, ZAP_ATTRIBUTE_INDEX(170), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Identify (client) */ \ { 0x0003, \ - ZAP_ATTRIBUTE_INDEX(169), \ + ZAP_ATTRIBUTE_INDEX(171), \ 3, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayIdentifyServer }, /* Endpoint: 1, Cluster: Identify (server) */ \ { 0x0004, \ - ZAP_ATTRIBUTE_INDEX(172), \ + ZAP_ATTRIBUTE_INDEX(174), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 1, Cluster: Groups (server) */ \ { 0x0005, \ - ZAP_ATTRIBUTE_INDEX(174), \ + ZAP_ATTRIBUTE_INDEX(176), \ 6, \ 8, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayScenesServer }, /* Endpoint: 1, Cluster: Scenes (server) */ \ { 0x0028, \ - ZAP_ATTRIBUTE_INDEX(180), \ + ZAP_ATTRIBUTE_INDEX(182), \ 12, \ 246, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 1, Cluster: Basic (server) */ \ { 0x0201, \ - ZAP_ATTRIBUTE_INDEX(192), \ + ZAP_ATTRIBUTE_INDEX(194), \ 19, \ 34, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -1074,7 +1081,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 18, 1954 }, { ZAP_CLUSTER_INDEX(18), 6, 298 }, \ + { ZAP_CLUSTER_INDEX(0), 19, 1990 }, { ZAP_CLUSTER_INDEX(19), 6, 298 }, \ } // Largest attribute size is needed for various buffers @@ -1084,7 +1091,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (933) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (2252) +#define ATTRIBUTE_MAX_SIZE (2288) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/thermostat/zap-generated/gen_config.h b/zzz_generated/thermostat/zap-generated/gen_config.h index 2b56c70d885655..8a8c6ea2df6ca0 100644 --- a/zzz_generated/thermostat/zap-generated/gen_config.h +++ b/zzz_generated/thermostat/zap-generated/gen_config.h @@ -42,6 +42,7 @@ #define EMBER_AF_GROUPS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_IDENTIFY_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_IDENTIFY_CLUSTER_SERVER_ENDPOINT_COUNT (2) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OTA_PROVIDER_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OPERATIONAL_CREDENTIALS_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -118,6 +119,11 @@ #define EMBER_AF_PLUGIN_IDENTIFY_SERVER #define EMBER_AF_PLUGIN_IDENTIFY +// Use this macro to check if the server side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION + // Use this macro to check if the server side of the Network Commissioning cluster is included #define ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER #define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING_SERVER diff --git a/zzz_generated/tv-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/tv-app/zap-generated/PluginApplicationCallbacks.h index 37896ec66a3021..25f724f468dcb6 100644 --- a/zzz_generated/tv-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/tv-app/zap-generated/PluginApplicationCallbacks.h @@ -42,6 +42,7 @@ MatterGroupKeyManagementPluginServerInitCallback(); \ MatterKeypadInputPluginServerInitCallback(); \ MatterLevelControlPluginServerInitCallback(); \ + MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterLowPowerPluginServerInitCallback(); \ MatterMediaInputPluginServerInitCallback(); \ MatterMediaPlaybackPluginServerInitCallback(); \ diff --git a/zzz_generated/tv-app/zap-generated/callback-stub.cpp b/zzz_generated/tv-app/zap-generated/callback-stub.cpp index 92d6949c3e3f27..84e72526be3645 100644 --- a/zzz_generated/tv-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/tv-app/zap-generated/callback-stub.cpp @@ -83,6 +83,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_LEVEL_CONTROL_CLUSTER_ID: emberAfLevelControlClusterInitCallback(endpoint); break; + case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: + emberAfLocalizationConfigurationClusterInitCallback(endpoint); + break; case ZCL_LOW_POWER_CLUSTER_ID: emberAfLowPowerClusterInitCallback(endpoint); break; @@ -221,6 +224,11 @@ void __attribute__((weak)) emberAfLevelControlClusterInitCallback(EndpointId end // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfLocalizationConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfLowPowerClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/tv-app/zap-generated/endpoint_config.h b/zzz_generated/tv-app/zap-generated/endpoint_config.h index d693a74ca0d717..5c6861c64f3ea3 100644 --- a/zzz_generated/tv-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-app/zap-generated/endpoint_config.h @@ -1000,7 +1000,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 282 +#define GENERATED_ATTRIBUTE_COUNT 284 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1045,6 +1045,10 @@ /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + \ /* Endpoint: 0, Cluster: General Commissioning (client) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ @@ -1419,7 +1423,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 46 +#define GENERATED_CLUSTER_COUNT 47 #define GENERATED_CLUSTERS \ { \ { 0x001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ @@ -1435,136 +1439,139 @@ 0x0029, ZAP_ATTRIBUTE_INDEX(26), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(27), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(27), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { \ + 0x0030, ZAP_ATTRIBUTE_INDEX(29), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (client) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(28), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0030, ZAP_ATTRIBUTE_INDEX(30), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(34), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(36), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (client) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(36), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(38), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(46), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0032, ZAP_ATTRIBUTE_INDEX(48), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(46), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(48), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(55), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(57), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(61), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(63), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(126), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0036, ZAP_ATTRIBUTE_INDEX(128), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(141), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(143), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(152), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(154), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(156), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(158), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (client) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(157), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(159), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x003F, ZAP_ATTRIBUTE_INDEX(163), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003F, ZAP_ATTRIBUTE_INDEX(165), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Group Key Management (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(166), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(168), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(168), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(170), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(170), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0405, ZAP_ATTRIBUTE_INDEX(172), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Relative Humidity Measurement (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(174), \ + ZAP_ATTRIBUTE_INDEX(176), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(176), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(178), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x0503, ZAP_ATTRIBUTE_INDEX(181), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0503, ZAP_ATTRIBUTE_INDEX(183), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(183), 4, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0504, ZAP_ATTRIBUTE_INDEX(185), 4, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Channel (server) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(187), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0505, ZAP_ATTRIBUTE_INDEX(189), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(190), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0507, ZAP_ATTRIBUTE_INDEX(192), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Input (server) */ \ { \ - 0x0508, ZAP_ATTRIBUTE_INDEX(193), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0508, ZAP_ATTRIBUTE_INDEX(195), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Low Power (server) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(194), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0509, ZAP_ATTRIBUTE_INDEX(196), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(195), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(197), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (server) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(198), 3, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050C, ZAP_ATTRIBUTE_INDEX(200), 3, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(201), \ + ZAP_ATTRIBUTE_INDEX(203), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { 0x0008, \ - ZAP_ATTRIBUTE_INDEX(203), \ + ZAP_ATTRIBUTE_INDEX(205), \ 15, \ 23, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 2, Cluster: Level Control (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(218), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(220), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(223), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(225), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Audio Output (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(226), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(228), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Descriptor (server) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(231), 8, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(233), 8, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Media Playback (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(239), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(241), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Content Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(242), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(244), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Application Basic (server) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(251), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(253), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Account Login (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(252), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(254), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Descriptor (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(257), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(259), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Content Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(260), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(262), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Application Basic (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(269), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(271), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 5, Cluster: Descriptor (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(274), 8, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(276), 8, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 5, Cluster: Application Basic (server) */ \ } @@ -1573,8 +1580,8 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 22, 1969 }, { ZAP_CLUSTER_INDEX(22), 10, 1328 }, { ZAP_CLUSTER_INDEX(32), 4, 283 }, \ - { ZAP_CLUSTER_INDEX(36), 5, 439 }, { ZAP_CLUSTER_INDEX(41), 3, 398 }, { ZAP_CLUSTER_INDEX(44), 2, 106 }, \ + { ZAP_CLUSTER_INDEX(0), 23, 2005 }, { ZAP_CLUSTER_INDEX(23), 10, 1328 }, { ZAP_CLUSTER_INDEX(33), 4, 283 }, \ + { ZAP_CLUSTER_INDEX(37), 5, 439 }, { ZAP_CLUSTER_INDEX(42), 3, 398 }, { ZAP_CLUSTER_INDEX(45), 2, 106 }, \ } // Largest attribute size is needed for various buffers @@ -1584,7 +1591,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (686) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (4523) +#define ATTRIBUTE_MAX_SIZE (4559) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (6) diff --git a/zzz_generated/tv-app/zap-generated/gen_config.h b/zzz_generated/tv-app/zap-generated/gen_config.h index 505dbc52c7334e..6bfc53dfb17504 100644 --- a/zzz_generated/tv-app/zap-generated/gen_config.h +++ b/zzz_generated/tv-app/zap-generated/gen_config.h @@ -49,6 +49,7 @@ #define EMBER_AF_GROUP_KEY_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_KEYPAD_INPUT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_LOW_POWER_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_MEDIA_INPUT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_MEDIA_PLAYBACK_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -170,6 +171,11 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 +// Use this macro to check if the server side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION + // Use this macro to check if the server side of the Low Power cluster is included #define ZCL_USING_LOW_POWER_CLUSTER_SERVER #define EMBER_AF_PLUGIN_LOW_POWER_SERVER diff --git a/zzz_generated/tv-casting-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/tv-casting-app/zap-generated/PluginApplicationCallbacks.h index 88263561b15ab6..750c9b932af6dc 100644 --- a/zzz_generated/tv-casting-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/tv-casting-app/zap-generated/PluginApplicationCallbacks.h @@ -49,6 +49,7 @@ MatterIdentifyPluginServerInitCallback(); \ MatterKeypadInputPluginClientInitCallback(); \ MatterLevelControlPluginServerInitCallback(); \ + MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterMediaInputPluginClientInitCallback(); \ MatterMediaPlaybackPluginClientInitCallback(); \ MatterNetworkCommissioningPluginServerInitCallback(); \ diff --git a/zzz_generated/tv-casting-app/zap-generated/callback-stub.cpp b/zzz_generated/tv-casting-app/zap-generated/callback-stub.cpp index 8b5794eb07ee0b..5e6947d605ad84 100644 --- a/zzz_generated/tv-casting-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/tv-casting-app/zap-generated/callback-stub.cpp @@ -110,6 +110,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_LEVEL_CONTROL_CLUSTER_ID: emberAfLevelControlClusterInitCallback(endpoint); break; + case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: + emberAfLocalizationConfigurationClusterInitCallback(endpoint); + break; case ZCL_MEDIA_INPUT_CLUSTER_ID: emberAfMediaInputClusterInitCallback(endpoint); break; @@ -314,6 +317,11 @@ void __attribute__((weak)) emberAfLevelControlClusterInitCallback(EndpointId end // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfLocalizationConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfMediaInputClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h index d5bb8fc7b5d760..f31900054264a7 100644 --- a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h @@ -864,7 +864,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 402 +#define GENERATED_ATTRIBUTE_COUNT 404 #define GENERATED_ATTRIBUTES \ { \ \ @@ -908,6 +908,10 @@ /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(21) }, /* Breadcrumb */ \ { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(29) }, /* BasicCommissioningInfoList */ \ @@ -1469,7 +1473,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 54 +#define GENERATED_CLUSTER_COUNT 55 #define GENERATED_CLUSTERS \ { \ { 0x001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ @@ -1484,186 +1488,189 @@ 0x0029, ZAP_ATTRIBUTE_INDEX(26), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(27), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(27), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { \ + 0x0030, ZAP_ATTRIBUTE_INDEX(29), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(33), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(35), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(43), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0032, ZAP_ATTRIBUTE_INDEX(45), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(43), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(45), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(52), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(54), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(58), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(60), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(123), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0036, ZAP_ATTRIBUTE_INDEX(125), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(138), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(140), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(149), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(151), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(153), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(155), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x003F, ZAP_ATTRIBUTE_INDEX(159), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003F, ZAP_ATTRIBUTE_INDEX(161), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Group Key Management (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(162), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(164), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(164), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(166), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(166), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0405, ZAP_ATTRIBUTE_INDEX(168), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Relative Humidity Measurement (server) */ \ { 0x0003, \ - ZAP_ATTRIBUTE_INDEX(170), \ + ZAP_ATTRIBUTE_INDEX(172), \ 2, \ 4, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayIdentifyServer }, /* Endpoint: 1, Cluster: Identify (server) */ \ { 0x0004, \ - ZAP_ATTRIBUTE_INDEX(172), \ + ZAP_ATTRIBUTE_INDEX(174), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 1, Cluster: Groups (server) */ \ { 0x0005, \ - ZAP_ATTRIBUTE_INDEX(174), \ + ZAP_ATTRIBUTE_INDEX(176), \ 6, \ 8, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayScenesServer }, /* Endpoint: 1, Cluster: Scenes (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(180), \ + ZAP_ATTRIBUTE_INDEX(182), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { 0x0008, \ - ZAP_ATTRIBUTE_INDEX(187), \ + ZAP_ATTRIBUTE_INDEX(189), \ 15, \ 23, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x000F, ZAP_ATTRIBUTE_INDEX(202), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x000F, ZAP_ATTRIBUTE_INDEX(204), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(206), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(208), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x001E, ZAP_ATTRIBUTE_INDEX(211), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001E, ZAP_ATTRIBUTE_INDEX(213), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binding (server) */ \ { \ - 0x0039, ZAP_ATTRIBUTE_INDEX(212), 15, 646, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0039, ZAP_ATTRIBUTE_INDEX(214), 15, 646, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ { \ - 0x003B, ZAP_ATTRIBUTE_INDEX(227), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003B, ZAP_ATTRIBUTE_INDEX(229), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(230), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(232), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ { 0x0101, \ - ZAP_ATTRIBUTE_INDEX(232), \ + ZAP_ATTRIBUTE_INDEX(234), \ 19, \ 29, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | \ ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayDoorLockServer }, /* Endpoint: 1, Cluster: Door Lock (server) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(251), 19, 31, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0102, ZAP_ATTRIBUTE_INDEX(253), 19, 31, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (server) */ \ { \ - 0x0103, ZAP_ATTRIBUTE_INDEX(270), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0103, ZAP_ATTRIBUTE_INDEX(272), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Barrier Control (server) */ \ { 0x0201, \ - ZAP_ATTRIBUTE_INDEX(275), \ + ZAP_ATTRIBUTE_INDEX(277), \ 10, \ 17, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayThermostatServer }, /* Endpoint: 1, Cluster: Thermostat (server) */ \ { 0x0300, \ - ZAP_ATTRIBUTE_INDEX(285), \ + ZAP_ATTRIBUTE_INDEX(287), \ 51, \ 337, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(336), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0402, ZAP_ATTRIBUTE_INDEX(338), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ { \ - 0x0403, ZAP_ATTRIBUTE_INDEX(340), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0403, ZAP_ATTRIBUTE_INDEX(342), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ { \ - 0x0404, ZAP_ATTRIBUTE_INDEX(344), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0404, ZAP_ATTRIBUTE_INDEX(346), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(348), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0405, ZAP_ATTRIBUTE_INDEX(350), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ { 0x0500, \ - ZAP_ATTRIBUTE_INDEX(352), \ + ZAP_ATTRIBUTE_INDEX(354), \ 6, \ 16, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION) | \ ZAP_CLUSTER_MASK(MESSAGE_SENT_FUNCTION), \ chipFuncArrayIasZoneServer }, /* Endpoint: 1, Cluster: IAS Zone (server) */ \ { \ - 0x0503, ZAP_ATTRIBUTE_INDEX(358), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0503, ZAP_ATTRIBUTE_INDEX(360), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(360), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0504, ZAP_ATTRIBUTE_INDEX(362), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Channel (client) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(361), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0505, ZAP_ATTRIBUTE_INDEX(363), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (client) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(362), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(364), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (client) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(363), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0507, ZAP_ATTRIBUTE_INDEX(365), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Media Input (client) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(364), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0509, ZAP_ATTRIBUTE_INDEX(366), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (client) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(365), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(367), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (client) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(366), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(368), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (client) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(367), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050C, ZAP_ATTRIBUTE_INDEX(369), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (client) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(368), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(370), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (client) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(369), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(371), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Account Login (client) */ \ { \ - 0x050F, ZAP_ATTRIBUTE_INDEX(370), 21, 1582, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050F, ZAP_ATTRIBUTE_INDEX(372), 21, 1582, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(391), \ + ZAP_ATTRIBUTE_INDEX(393), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(393), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(395), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(398), \ + ZAP_ATTRIBUTE_INDEX(400), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -1675,7 +1682,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 18, 1958 }, { ZAP_CLUSTER_INDEX(18), 33, 3070 }, { ZAP_CLUSTER_INDEX(51), 3, 8 }, \ + { ZAP_CLUSTER_INDEX(0), 19, 1994 }, { ZAP_CLUSTER_INDEX(19), 33, 3070 }, { ZAP_CLUSTER_INDEX(52), 3, 8 }, \ } // Largest attribute size is needed for various buffers @@ -1685,7 +1692,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (1333) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (5036) +#define ATTRIBUTE_MAX_SIZE (5072) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) diff --git a/zzz_generated/tv-casting-app/zap-generated/gen_config.h b/zzz_generated/tv-casting-app/zap-generated/gen_config.h index 357d784b21e5ea..6d1336ae44732a 100644 --- a/zzz_generated/tv-casting-app/zap-generated/gen_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/gen_config.h @@ -56,6 +56,7 @@ #define EMBER_AF_IDENTIFY_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_KEYPAD_INPUT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_MEDIA_INPUT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_MEDIA_PLAYBACK_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -218,6 +219,11 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 +// Use this macro to check if the server side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION + // Use this macro to check if the client side of the Media Input cluster is included #define ZCL_USING_MEDIA_INPUT_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_MEDIA_INPUT_CLIENT diff --git a/zzz_generated/window-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/window-app/zap-generated/PluginApplicationCallbacks.h index 711efcc060e74d..8eba42de88aea1 100644 --- a/zzz_generated/window-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/window-app/zap-generated/PluginApplicationCallbacks.h @@ -30,6 +30,7 @@ MatterGeneralCommissioningPluginServerInitCallback(); \ MatterGeneralDiagnosticsPluginServerInitCallback(); \ MatterIdentifyPluginServerInitCallback(); \ + MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterNetworkCommissioningPluginServerInitCallback(); \ MatterOperationalCredentialsPluginServerInitCallback(); \ MatterPowerSourcePluginServerInitCallback(); \ diff --git a/zzz_generated/window-app/zap-generated/callback-stub.cpp b/zzz_generated/window-app/zap-generated/callback-stub.cpp index 797dda2ce0ff60..b92b84140138dc 100644 --- a/zzz_generated/window-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/window-app/zap-generated/callback-stub.cpp @@ -53,6 +53,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_IDENTIFY_CLUSTER_ID: emberAfIdentifyClusterInitCallback(endpoint); break; + case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: + emberAfLocalizationConfigurationClusterInitCallback(endpoint); + break; case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: emberAfNetworkCommissioningClusterInitCallback(endpoint); break; @@ -123,6 +126,11 @@ void __attribute__((weak)) emberAfIdentifyClusterInitCallback(EndpointId endpoin // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfLocalizationConfigurationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfNetworkCommissioningClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/window-app/zap-generated/endpoint_config.h b/zzz_generated/window-app/zap-generated/endpoint_config.h index f9360fd687863b..e4923a8de5e910 100644 --- a/zzz_generated/window-app/zap-generated/endpoint_config.h +++ b/zzz_generated/window-app/zap-generated/endpoint_config.h @@ -609,7 +609,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 224 +#define GENERATED_ATTRIBUTE_COUNT 226 #define GENERATED_ATTRIBUTES \ { \ \ @@ -644,6 +644,10 @@ { 0x0011, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* Reachable */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + \ /* Endpoint: 0, Cluster: Power Source (server) */ \ { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Status */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Order */ \ @@ -914,7 +918,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 19 +#define GENERATED_CLUSTER_COUNT 20 #define GENERATED_CLUSTERS \ { \ { 0x001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ @@ -925,58 +929,61 @@ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ { \ - 0x002F, ZAP_ATTRIBUTE_INDEX(24), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(24), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { \ + 0x002F, ZAP_ATTRIBUTE_INDEX(26), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Power Source (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(35), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0030, ZAP_ATTRIBUTE_INDEX(37), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(41), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(43), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(51), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(53), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(60), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(62), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(66), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(68), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(131), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0036, ZAP_ATTRIBUTE_INDEX(133), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(146), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(148), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(157), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(159), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(161), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(163), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(167), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(169), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(169), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(171), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { 0x0003, \ - ZAP_ATTRIBUTE_INDEX(171), \ + ZAP_ATTRIBUTE_INDEX(173), \ 3, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayIdentifyServer }, /* Endpoint: 1, Cluster: Identify (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(174), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(176), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(179), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0102, ZAP_ATTRIBUTE_INDEX(181), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(199), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(201), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(204), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0102, ZAP_ATTRIBUTE_INDEX(206), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Window Covering (server) */ \ } @@ -985,7 +992,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 14, 1491 }, { ZAP_CLUSTER_INDEX(14), 3, 40 }, { ZAP_CLUSTER_INDEX(17), 2, 35 }, \ + { ZAP_CLUSTER_INDEX(0), 15, 1527 }, { ZAP_CLUSTER_INDEX(15), 3, 40 }, { ZAP_CLUSTER_INDEX(18), 2, 35 }, \ } // Largest attribute size is needed for various buffers @@ -995,7 +1002,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (654) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1566) +#define ATTRIBUTE_MAX_SIZE (1602) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) diff --git a/zzz_generated/window-app/zap-generated/gen_config.h b/zzz_generated/window-app/zap-generated/gen_config.h index 35647a0101b356..845f489e283cc4 100644 --- a/zzz_generated/window-app/zap-generated/gen_config.h +++ b/zzz_generated/window-app/zap-generated/gen_config.h @@ -37,6 +37,7 @@ #define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_IDENTIFY_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OPERATIONAL_CREDENTIALS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_POWER_SOURCE_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -88,6 +89,11 @@ #define EMBER_AF_PLUGIN_IDENTIFY_SERVER #define EMBER_AF_PLUGIN_IDENTIFY +// Use this macro to check if the server side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION + // Use this macro to check if the server side of the Network Commissioning cluster is included #define ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER #define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING_SERVER From a0979c9445a8c0b21801adb7f3cdab1c4d175dce Mon Sep 17 00:00:00 2001 From: C Freeman Date: Tue, 11 Jan 2022 09:18:58 -0500 Subject: [PATCH 28/64] Increase test cluster time (#13436) * Increase TestCluster timeout This timeout is the timeout for running the entire test suite. * Fix cluster test #161 --- examples/chip-tool/commands/tests/TestCommand.h | 2 +- src/app/clusters/test-cluster-server/test-cluster-server.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/chip-tool/commands/tests/TestCommand.h b/examples/chip-tool/commands/tests/TestCommand.h index 3926ea24816486..acaff9a8335859 100644 --- a/examples/chip-tool/commands/tests/TestCommand.h +++ b/examples/chip-tool/commands/tests/TestCommand.h @@ -29,7 +29,7 @@ #include #include -constexpr uint16_t kTimeoutInSeconds = 30; +constexpr uint16_t kTimeoutInSeconds = 90; class TestCommand : public CHIPCommand { diff --git a/src/app/clusters/test-cluster-server/test-cluster-server.cpp b/src/app/clusters/test-cluster-server/test-cluster-server.cpp index 09fd86b52b8b4c..9ea4deaa26aef7 100644 --- a/src/app/clusters/test-cluster-server/test-cluster-server.cpp +++ b/src/app/clusters/test-cluster-server/test-cluster-server.cpp @@ -610,6 +610,11 @@ bool emberAfTestClusterClusterTestListInt8UReverseRequestCallback( { auto iter = commandData.arg1.begin(); Commands::TestListInt8UReverseResponse::Type responseData; + if (count == 0) + { + SuccessOrExit(commandObj->AddResponseData(commandPath, responseData)); + return true; + } size_t cur = count; Platform::ScopedMemoryBuffer responseBuf; VerifyOrExit(responseBuf.Calloc(count), ); From ad6c1a044bfc7c433937a4c419c8392341b98598 Mon Sep 17 00:00:00 2001 From: Kamil Kasperczyk <66371704+kkasperczyk-no@users.noreply.github.com> Date: Tue, 11 Jan 2022 15:20:35 +0100 Subject: [PATCH 29/64] shell: Fixed dns resolve and browse commands (#13451) Currently the dns resolve and dns browse commands don't work, as after adding ResolverProxy the shell Dns module uses wrong Resolver instance and operations fail due to delegate set to null. Utilized ResolverProxy instead of Resolve Instace(). --- src/lib/shell/commands/Dns.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/lib/shell/commands/Dns.cpp b/src/lib/shell/commands/Dns.cpp index 4ab4cd2c26f5f1..57c182da402598 100644 --- a/src/lib/shell/commands/Dns.cpp +++ b/src/lib/shell/commands/Dns.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -113,6 +114,7 @@ class DnsShellResolverDelegate : public Dnssd::ResolverDelegate }; DnsShellResolverDelegate sDnsShellResolverDelegate; +Dnssd::ResolverProxy sResolverProxy; CHIP_ERROR ResolveHandler(int argc, char ** argv) { @@ -124,7 +126,7 @@ CHIP_ERROR ResolveHandler(int argc, char ** argv) peerId.SetCompressedFabricId(strtoull(argv[0], NULL, 10)); peerId.SetNodeId(strtoull(argv[1], NULL, 10)); - return Dnssd::Resolver::Instance().ResolveNodeId(peerId, Inet::IPAddressType::kAny, Dnssd::Resolver::CacheBypass::On); + return sResolverProxy.ResolveNodeId(peerId, Inet::IPAddressType::kAny, Dnssd::Resolver::CacheBypass::On); } bool ParseSubType(int argc, char ** argv, Dnssd::DiscoveryFilter & filter) @@ -184,7 +186,7 @@ CHIP_ERROR BrowseCommissionableHandler(int argc, char ** argv) streamer_printf(streamer_get(), "Browsing commissionable nodes...\r\n"); - return Dnssd::Resolver::Instance().FindCommissionableNodes(filter); + return sResolverProxy.FindCommissionableNodes(filter); } CHIP_ERROR BrowseCommissionerHandler(int argc, char ** argv) @@ -199,7 +201,7 @@ CHIP_ERROR BrowseCommissionerHandler(int argc, char ** argv) streamer_printf(streamer_get(), "Browsing commissioners...\r\n"); - return Dnssd::Resolver::Instance().FindCommissioners(filter); + return sResolverProxy.FindCommissioners(filter); } CHIP_ERROR BrowseHandler(int argc, char ** argv) @@ -221,8 +223,8 @@ CHIP_ERROR DnsHandler(int argc, char ** argv) return CHIP_NO_ERROR; } - Dnssd::Resolver::Instance().Init(DeviceLayer::UDPEndPointManager()); - Dnssd::Resolver::Instance().SetResolverDelegate(&sDnsShellResolverDelegate); + sResolverProxy.Init(DeviceLayer::UDPEndPointManager()); + sResolverProxy.SetResolverDelegate(&sDnsShellResolverDelegate); return sShellDnsSubcommands.ExecCommand(argc, argv); } From 333dfc7d2a8e85f369c7e2a672f76b274ec780e0 Mon Sep 17 00:00:00 2001 From: pankore <86098180+pankore@users.noreply.github.com> Date: Tue, 11 Jan 2022 22:21:52 +0800 Subject: [PATCH 30/64] [Ameba] Update yaml file to 0.5.43 (#13407) * [Ameba] Update yaml file to 0.5.43 * Update yaml files for other platforms --- .devcontainer/devcontainer.json | 2 +- .github/workflows/android.yaml | 2 +- .github/workflows/bloat_check.yaml | 2 +- .github/workflows/build.yaml | 6 +++--- .github/workflows/cirque.yaml | 4 ++-- .github/workflows/doxygen.yaml | 2 +- .github/workflows/examples-ameba.yaml | 2 +- .github/workflows/examples-efr32.yaml | 2 +- .github/workflows/examples-esp32.yaml | 2 +- .github/workflows/examples-infineon.yaml | 2 +- .github/workflows/examples-k32w.yaml | 2 +- .github/workflows/examples-linux-arm.yaml | 2 +- .github/workflows/examples-linux-standalone.yaml | 2 +- .github/workflows/examples-mbed.yaml | 2 +- .github/workflows/examples-qpg.yaml | 2 +- .github/workflows/examples-telink.yaml | 2 +- .github/workflows/examples-tizen.yaml | 2 +- .github/workflows/qemu.yaml | 2 +- .github/workflows/release_artifacts.yaml | 4 ++-- .github/workflows/tests.yaml | 2 +- .github/workflows/unit_integration_test.yaml | 2 +- integrations/cloudbuild/build-all.yaml | 4 ++-- integrations/cloudbuild/smoke-test.yaml | 12 ++++++------ 23 files changed, 33 insertions(+), 33 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 3740ac511ff36f..721859d9022430 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -17,7 +17,7 @@ "build": { "dockerfile": "Dockerfile", "args": { - "BUILD_VERSION": "0.5.40" + "BUILD_VERSION": "0.5.43" } }, "remoteUser": "vscode", diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index 9370f617b819d5..63a7a1f4e72615 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-android:0.5.40 + image: connectedhomeip/chip-build-android:0.5.43 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/bloat_check.yaml b/.github/workflows/bloat_check.yaml index 40e0d5355a65a2..b78dabb6281dff 100644 --- a/.github/workflows/bloat_check.yaml +++ b/.github/workflows/bloat_check.yaml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.5.40 + image: connectedhomeip/chip-build:0.5.43 steps: - name: Checkout diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 44fe6ce9cd0f43..fa74edbdb0ecd4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -32,7 +32,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.5.40 + image: connectedhomeip/chip-build:0.5.43 volumes: - "/tmp/log_output:/tmp/test_logs" options: @@ -98,7 +98,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.5.40 + image: connectedhomeip/chip-build:0.5.43 volumes: - "/tmp/log_output:/tmp/test_logs" options: @@ -205,7 +205,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.5.40 + image: connectedhomeip/chip-build:0.5.43 volumes: - "/tmp/log_output:/tmp/test_logs" options: diff --git a/.github/workflows/cirque.yaml b/.github/workflows/cirque.yaml index e6fbd6c8bd43c2..1b037fefbaecc1 100644 --- a/.github/workflows/cirque.yaml +++ b/.github/workflows/cirque.yaml @@ -29,7 +29,7 @@ jobs: timeout-minutes: 60 env: - DOCKER_RUN_VERSION: 0.5.40 + DOCKER_RUN_VERSION: 0.5.43 GITHUB_CACHE_PATH: /tmp/cirque-cache/ runs-on: ubuntu-latest @@ -38,7 +38,7 @@ jobs: # need to run with privilege, which isn't supported by job.XXX.contaner # https://github.com/actions/container-action/issues/2 # container: -# image: connectedhomeip/chip-build-cirque:0.5.40 +# image: connectedhomeip/chip-build-cirque:0.5.43 # volumes: # - "/tmp:/tmp" # - "/dev/pts:/dev/pts" diff --git a/.github/workflows/doxygen.yaml b/.github/workflows/doxygen.yaml index 83941d82b64da9..e09fb1db8046a8 100644 --- a/.github/workflows/doxygen.yaml +++ b/.github/workflows/doxygen.yaml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: connectedhomeip/chip-build-doxygen:0.5.40 + image: connectedhomeip/chip-build-doxygen:0.5.43 if: github.actor != 'restyled-io[bot]' diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index d058866af0e6e9..624bf946713fb3 100644 --- a/.github/workflows/examples-ameba.yaml +++ b/.github/workflows/examples-ameba.yaml @@ -28,7 +28,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-ameba:0.5.40 + image: connectedhomeip/chip-build-ameba:0.5.43 options: --user root steps: diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index b34bfb0106065e..bc557d43d11438 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-efr32:0.5.40 + image: connectedhomeip/chip-build-efr32:0.5.43 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index 00d86f2cdb7aca..717069b40819bd 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -32,7 +32,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32:0.5.40 + image: connectedhomeip/chip-build-esp32:0.5.43 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml index cfbefeea96d23e..aff96b707cc4c5 100644 --- a/.github/workflows/examples-infineon.yaml +++ b/.github/workflows/examples-infineon.yaml @@ -32,7 +32,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-infineon:0.5.40 + image: connectedhomeip/chip-build-infineon:0.5.43 steps: - name: Checkout diff --git a/.github/workflows/examples-k32w.yaml b/.github/workflows/examples-k32w.yaml index cada68ca75c908..b850818a530654 100644 --- a/.github/workflows/examples-k32w.yaml +++ b/.github/workflows/examples-k32w.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-k32w:0.5.40 + image: connectedhomeip/chip-build-k32w:0.5.43 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-linux-arm.yaml b/.github/workflows/examples-linux-arm.yaml index 09898224ce11af..7d83c07be51513 100644 --- a/.github/workflows/examples-linux-arm.yaml +++ b/.github/workflows/examples-linux-arm.yaml @@ -31,7 +31,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-crosscompile:0.5.40 + image: connectedhomeip/chip-build-crosscompile:0.5.43 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml index 08052bdf7860fc..b13da3cf20d486 100644 --- a/.github/workflows/examples-linux-standalone.yaml +++ b/.github/workflows/examples-linux-standalone.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.5.40 + image: connectedhomeip/chip-build:0.5.43 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-mbed.yaml b/.github/workflows/examples-mbed.yaml index ebb083efb8acef..23f6af19813d2f 100644 --- a/.github/workflows/examples-mbed.yaml +++ b/.github/workflows/examples-mbed.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-mbed-os:0.5.40 + image: connectedhomeip/chip-build-mbed-os:0.5.43 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml index 555edda31fa26c..769fb2b3dc22d8 100644 --- a/.github/workflows/examples-qpg.yaml +++ b/.github/workflows/examples-qpg.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.5.40 + image: connectedhomeip/chip-build:0.5.43 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index 73dd6c774cd3e0..18687a9254e5c5 100644 --- a/.github/workflows/examples-telink.yaml +++ b/.github/workflows/examples-telink.yaml @@ -32,7 +32,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-telink:0.5.40 + image: connectedhomeip/chip-build-telink:0.5.43 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml index 06f0bfdf0dacee..265e2ff36add77 100644 --- a/.github/workflows/examples-tizen.yaml +++ b/.github/workflows/examples-tizen.yaml @@ -28,7 +28,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-tizen:0.5.40 + image: connectedhomeip/chip-build-tizen:0.5.43 options: --user root volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index 8fb83c42429701..3b55f757372b20 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32-qemu:0.5.40 + image: connectedhomeip/chip-build-esp32-qemu:0.5.43 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index a92195c022dce2..294378203b569b 100644 --- a/.github/workflows/release_artifacts.yaml +++ b/.github/workflows/release_artifacts.yaml @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build-esp32:0.5.40 + image: connectedhomeip/chip-build-esp32:0.5.43 steps: - name: Checkout @@ -70,7 +70,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build-efr32:0.5.40 + image: connectedhomeip/chip-build-efr32:0.5.43 steps: - name: Checkout uses: actions/checkout@v2 diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 1577d0280eee0b..caefd00b4d3c72 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -43,7 +43,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.5.40 + image: connectedhomeip/chip-build:0.5.43 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" diff --git a/.github/workflows/unit_integration_test.yaml b/.github/workflows/unit_integration_test.yaml index 8d7a3044215967..f306d02ba93f0d 100644 --- a/.github/workflows/unit_integration_test.yaml +++ b/.github/workflows/unit_integration_test.yaml @@ -37,7 +37,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.5.40 + image: connectedhomeip/chip-build:0.5.43 volumes: - "/tmp/log_output:/tmp/test_logs" options: diff --git a/integrations/cloudbuild/build-all.yaml b/integrations/cloudbuild/build-all.yaml index e940f6b235ceda..a20a9fade5148e 100644 --- a/integrations/cloudbuild/build-all.yaml +++ b/integrations/cloudbuild/build-all.yaml @@ -1,5 +1,5 @@ steps: - - name: "connectedhomeip/chip-build-vscode:0.5.40" + - name: "connectedhomeip/chip-build-vscode:0.5.43" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -12,7 +12,7 @@ steps: path: /pwenv timeout: 900s - - name: "connectedhomeip/chip-build-vscode:0.5.40" + - name: "connectedhomeip/chip-build-vscode:0.5.43" env: - PW_ENVIRONMENT_ROOT=/pwenv args: diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml index 3286cf95973659..745983cf7489ff 100644 --- a/integrations/cloudbuild/smoke-test.yaml +++ b/integrations/cloudbuild/smoke-test.yaml @@ -1,5 +1,5 @@ steps: - - name: "connectedhomeip/chip-build-vscode:0.5.40" + - name: "connectedhomeip/chip-build-vscode:0.5.43" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -12,7 +12,7 @@ steps: path: /pwenv timeout: 900s - - name: "connectedhomeip/chip-build-vscode:0.5.40" + - name: "connectedhomeip/chip-build-vscode:0.5.43" id: ESP32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -28,7 +28,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.5.40" + - name: "connectedhomeip/chip-build-vscode:0.5.43" id: NRFConnect env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -45,7 +45,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.5.40" + - name: "connectedhomeip/chip-build-vscode:0.5.43" id: EFR32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -62,7 +62,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.5.40" + - name: "connectedhomeip/chip-build-vscode:0.5.43" id: Linux env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -79,7 +79,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.5.40" + - name: "connectedhomeip/chip-build-vscode:0.5.43" id: Android env: - PW_ENVIRONMENT_ROOT=/pwenv From f1e33cc0dce3e9896969a1be0cfcb9548529da6a Mon Sep 17 00:00:00 2001 From: kowsisoundhar12 <57476670+kowsisoundhar12@users.noreply.github.com> Date: Tue, 11 Jan 2022 19:52:38 +0530 Subject: [PATCH 31/64] Removed optional tag (#13446) --- .../suites/certification/Test_TC_BI_1_1.yaml | 2 +- .../suites/certification/Test_TC_BI_2_1.yaml | 24 +------------------ .../certification/Test_TC_BOOL_1_1.yaml | 2 +- .../suites/certification/Test_TC_CC_1_1.yaml | 2 +- .../suites/certification/Test_TC_FLW_1_1.yaml | 2 +- .../suites/certification/Test_TC_PRS_2_1.yaml | 19 +-------------- .../certification/Test_TC_SWDIAG_1_1.yaml | 2 +- .../certification/Test_TC_SWDIAG_2_1.yaml | 1 - .../certification/Test_TC_SWDIAG_3_1.yaml | 3 +-- 9 files changed, 8 insertions(+), 49 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_BI_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BI_1_1.yaml index a068c690d2b602..feba2b4417c049 100644 --- a/src/app/tests/suites/certification/Test_TC_BI_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BI_1_1.yaml @@ -53,6 +53,7 @@ tests: value: 1 #issue #11053 disabled steps below Global attributes missing from YAML framework + #disabled due to issue #13442 - label: "Read the global attribute: AttributeList" disabled: true command: "readAttribute" @@ -95,7 +96,6 @@ tests: - label: "Read the optional global attribute : FeatureMap" disabled: true - optional: true command: "readAttribute" attribute: "FeatureMap" response: diff --git a/src/app/tests/suites/certification/Test_TC_BI_2_1.yaml b/src/app/tests/suites/certification/Test_TC_BI_2_1.yaml index b634927d16000c..e03d8780d69676 100644 --- a/src/app/tests/suites/certification/Test_TC_BI_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BI_2_1.yaml @@ -103,9 +103,9 @@ tests: value: 0 #Issue #11142 Disabled all optional attribute checks + #disabled due to issue #13442 - label: "Read optional non-global attribute: ActiveText" disabled: true - optional: true command: "readAttribute" attribute: "active text" response: @@ -113,7 +113,6 @@ tests: - label: "Read optional non-global attribute constraints: ActiveText" disabled: true - optional: true command: "readAttribute" attribute: "active text" response: @@ -123,7 +122,6 @@ tests: - label: "Write the default values to optional non-global attribute: ActiveText" disabled: true - optional: true command: "writeAttribute" attribute: "active text" arguments: @@ -131,7 +129,6 @@ tests: - label: "Reads back the optional non-global attribute: ActiveText" disabled: true - optional: true command: "readAttribute" attribute: "active text" response: @@ -139,7 +136,6 @@ tests: - label: "Read optional non-global attribute: Description" disabled: true - optional: true command: "readAttribute" attribute: "description" response: @@ -147,7 +143,6 @@ tests: - label: "Read optional non-global attribute constraints: Description" disabled: true - optional: true command: "readAttribute" attribute: "description" response: @@ -158,7 +153,6 @@ tests: "Write the default values to optional non-global attribute: Description" disabled: true - optional: true command: "writeAttribute" attribute: "description" arguments: @@ -166,7 +160,6 @@ tests: - label: "Reads back the optional non-global attribute: Description" disabled: true - optional: true command: "readAttribute" attribute: "description" response: @@ -174,7 +167,6 @@ tests: - label: "Read optional non-global attribute: InactiveText" disabled: true - optional: true command: "readAttribute" attribute: "inactive text" response: @@ -182,7 +174,6 @@ tests: - label: "Read optional non-global attribute constraints: InactiveText" disabled: true - optional: true command: "readAttribute" attribute: "inactive text" response: @@ -193,7 +184,6 @@ tests: "Write the default values to optional non-global attribute: InactiveText" disabled: true - optional: true command: "writeAttribute" attribute: "inactive text" arguments: @@ -201,7 +191,6 @@ tests: - label: "Reads back the optional non-global attribute: InactiveText" disabled: true - optional: true command: "readAttribute" attribute: "inactive text" response: @@ -209,7 +198,6 @@ tests: - label: "Read optional non-global attribute: Polarity" disabled: true - optional: true command: "readAttribute" attribute: "polarity" response: @@ -217,7 +205,6 @@ tests: - label: "Read optional non-global attribute constraints: Polarity" disabled: true - optional: true command: "readAttribute" attribute: "polarity" response: @@ -227,7 +214,6 @@ tests: - label: "Write the default values to optional non-global attribute: Polarity" disabled: true - optional: true command: "writeAttribute" attribute: "polarity" arguments: @@ -237,7 +223,6 @@ tests: - label: "Reads back the optional non-global attribute: Polarity" disabled: true - optional: true command: "readAttribute" attribute: "polarity" response: @@ -245,7 +230,6 @@ tests: - label: "Read optional non-global attribute: Reliability" disabled: true - optional: true command: "readAttribute" attribute: "reliability" response: @@ -253,7 +237,6 @@ tests: - label: "Read optional non-global attribute constraints: Reliability" disabled: true - optional: true command: "readAttribute" attribute: "reliability" response: @@ -264,7 +247,6 @@ tests: "Write the default values to optional non-global attribute: Reliability" disabled: true - optional: true command: "writeAttribute" attribute: "reliability" arguments: @@ -272,7 +254,6 @@ tests: - label: "Reads back the optional non-global attribute: Reliability" disabled: true - optional: true command: "readAttribute" attribute: "reliability" response: @@ -280,7 +261,6 @@ tests: - label: "Read optional non-global attribute constraints: ApplicationType" disabled: true - optional: true command: "readAttribute" attribute: "application type" response: @@ -293,7 +273,6 @@ tests: "Write the default values to optional non-global attribute: ApplicationType" disabled: true - optional: true command: "writeAttribute" attribute: "application type" arguments: @@ -303,7 +282,6 @@ tests: - label: "Reads back the optional non-global attribute: ApplicationType" disabled: true - optional: true command: "readAttribute" attribute: "application type" response: diff --git a/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml index ae2106abcbb752..1c1605a4e87dcd 100644 --- a/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml @@ -53,6 +53,7 @@ tests: value: 1 #issue #11053 disabled steps below Global attributes missing from YAML framework + #disabled due to issue #13442 - label: "Read the global attribute: AttributeList" disabled: true command: "readAttribute" @@ -95,7 +96,6 @@ tests: - label: "Read the optional global attribute : FeatureMap" disabled: true - optional: true command: "readAttribute" attribute: "FeatureMap" response: diff --git a/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml index 0d74d9f336a7c4..db3007ae7a19bd 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml @@ -55,6 +55,7 @@ tests: value: 4 #issue #11053 disabled steps below Global attributes missing from YAML framework + #disabled due to issue #13442 - label: "Read the global attribute: AttributeList" disabled: true command: "readAttribute" @@ -124,7 +125,6 @@ tests: - label: "reads back optional global attribute: FeatureMap" disabled: true - optional: true command: "readAttribute" attribute: "FeatureMap" response: diff --git a/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml b/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml index f5f6083243f698..0480455f01e573 100644 --- a/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml @@ -56,6 +56,7 @@ tests: value: 2 #issue #11053 disabled steps below Global attributes missing from YAML framework + #disabled due to issue #13442 - label: "Read the global attribute: AttributeList" disabled: true command: "readAttribute" @@ -98,7 +99,6 @@ tests: - label: "Read the optional global attribute : FeatureMap" disabled: true - optional: true command: "readAttribute" attribute: "FeatureMap" response: diff --git a/src/app/tests/suites/certification/Test_TC_PRS_2_1.yaml b/src/app/tests/suites/certification/Test_TC_PRS_2_1.yaml index 8f1704f095b24e..1be6831d3dda17 100644 --- a/src/app/tests/suites/certification/Test_TC_PRS_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PRS_2_1.yaml @@ -86,9 +86,9 @@ tests: response: value: 0 + #disabled due to issue #13442 - label: "Read the optional attribute: Tolerance" disabled: true - optional: true command: "readAttribute" attribute: "Tolerance" response: @@ -96,7 +96,6 @@ tests: - label: "Write the default values to optional attribute: Tolerance" disabled: true - optional: true command: "writeAttribute" attribute: "Tolerance" arguments: @@ -106,7 +105,6 @@ tests: - label: "Reads back optional attribute: Tolerance" disabled: true - optional: true command: "readAttribute" attribute: "Tolerance" response: @@ -115,7 +113,6 @@ tests: #Following attributes are based on the value of the extended feature in the cluster feature map - label: "Read the optional attribute: ScaledValue" disabled: true - optional: true command: "readAttribute" attribute: "ScaledValue" response: @@ -123,7 +120,6 @@ tests: - label: "Write the default values to optional attribute: ScaledValue" disabled: true - optional: true command: "writeAttribute" attribute: "ScaledValue" arguments: @@ -133,7 +129,6 @@ tests: - label: "Reads back optional attribute: ScaledValue" disabled: true - optional: true command: "readAttribute" attribute: "ScaledValue" response: @@ -141,7 +136,6 @@ tests: - label: "Read the optional attribute: MinScaledValue" disabled: true - optional: true command: "readAttribute" attribute: "MinScaledValue" response: @@ -149,7 +143,6 @@ tests: - label: "Write the default values to optional attribute: MinScaledValue" disabled: true - optional: true command: "writeAttribute" attribute: "MinScaledValue" arguments: @@ -159,7 +152,6 @@ tests: - label: "Reads back optional attribute: MinScaledValue" disabled: true - optional: true command: "readAttribute" attribute: "MinScaledValue" response: @@ -167,7 +159,6 @@ tests: - label: "Read the optional attribute: MaxScaledValue" disabled: true - optional: true command: "readAttribute" attribute: "MaxScaledValue" response: @@ -175,7 +166,6 @@ tests: - label: "Write the default values to optional attribute: MaxScaledValue" disabled: true - optional: true command: "writeAttribute" attribute: "MaxScaledValue" arguments: @@ -185,7 +175,6 @@ tests: - label: "Reads back optional attribute: MaxScaledValue" disabled: true - optional: true command: "readAttribute" attribute: "MaxScaledValue" response: @@ -193,7 +182,6 @@ tests: - label: "Read the optional attribute: ScaledTolerance" disabled: true - optional: true command: "readAttribute" attribute: "ScaledTolerance" response: @@ -201,7 +189,6 @@ tests: - label: "Write the default values to optional attribute: ScaledTolerance" disabled: true - optional: true command: "writeAttribute" attribute: "ScaledTolerance" arguments: @@ -211,7 +198,6 @@ tests: - label: "Reads back optional attribute: ScaledTolerance" disabled: true - optional: true command: "readAttribute" attribute: "ScaledTolerance" response: @@ -219,7 +205,6 @@ tests: - label: "Read the optional attribute: Scale" disabled: true - optional: true command: "readAttribute" attribute: "Scale" response: @@ -227,7 +212,6 @@ tests: - label: "Write the default values to optional attribute: Scale" disabled: true - optional: true command: "writeAttribute" attribute: "Scale" arguments: @@ -237,7 +221,6 @@ tests: - label: "Reads back optional attribute: Scale" disabled: true - optional: true command: "readAttribute" attribute: "Scale" response: diff --git a/src/app/tests/suites/certification/Test_TC_SWDIAG_1_1.yaml b/src/app/tests/suites/certification/Test_TC_SWDIAG_1_1.yaml index 5a3b2eb272b2ef..dcbccd4cdf2ca2 100644 --- a/src/app/tests/suites/certification/Test_TC_SWDIAG_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SWDIAG_1_1.yaml @@ -24,10 +24,10 @@ tests: command: "WaitForCommissionee" #Issue #11185 Disabled as ThreadMetrics attribute missing + #disabled due to issue #13441 - label: "Reads a list of ThreadMetrics struct non-global attribute from DUT." disabled: true - optional: true command: "readAttribute" attribute: "ThreadMetrics" PICS: A_THREADMETRICS diff --git a/src/app/tests/suites/certification/Test_TC_SWDIAG_2_1.yaml b/src/app/tests/suites/certification/Test_TC_SWDIAG_2_1.yaml index 317e07670041c7..159935ef59a7ef 100644 --- a/src/app/tests/suites/certification/Test_TC_SWDIAG_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SWDIAG_2_1.yaml @@ -22,7 +22,6 @@ tests: #issue #11725 Reading the List is not implemented in YAML framework - label: "Reads a list of SoftwareFault struct from DUT" disabled: true - optional: true command: "readAttribute" attribute: "SoftwareFault" PICS: E_SOFTWAREFAULT diff --git a/src/app/tests/suites/certification/Test_TC_SWDIAG_3_1.yaml b/src/app/tests/suites/certification/Test_TC_SWDIAG_3_1.yaml index 4a850969f8000f..8e276d80071ea6 100644 --- a/src/app/tests/suites/certification/Test_TC_SWDIAG_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SWDIAG_3_1.yaml @@ -24,15 +24,14 @@ tests: command: "WaitForCommissionee" #issue #11578 ResetWatermarks command is Failing + #disabled due to issue #13441 - label: "Sends ResetWatermarks to DUT" disabled: true - optional: true command: "ResetWatermarks" PICS: CR_RESETWATERMARKS - label: "Reads a list of ThreadMetrics struct attribute from DUT." disabled: true - optional: true command: "readAttribute" attribute: "ThreadMetrics" PICS: A_THREADMETRICS From fa47b31224b637cf9019d185eb4574e2ef4f708d Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 11 Jan 2022 09:54:45 -0500 Subject: [PATCH 32/64] Fix SEGFAULT when running minmdns client (#13423) * Fix SEGFAULT when running minmdns client * Fix typo --- examples/minimal-mdns/client.cpp | 13 +++++++++---- src/lib/dnssd/minimal_mdns/Server.cpp | 5 +---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/examples/minimal-mdns/client.cpp b/examples/minimal-mdns/client.cpp index 246a97252e6009..1a98bc539764df 100644 --- a/examples/minimal-mdns/client.cpp +++ b/examples/minimal-mdns/client.cpp @@ -301,6 +301,8 @@ void BroadcastPacket(mdns::Minimal::ServerBase * server) } } +mdns::Minimal::Server<20> gMdnsServer; + } // namespace int main(int argc, char ** args) @@ -324,17 +326,16 @@ int main(int argc, char ** args) printf("Running...\n"); - mdns::Minimal::Server<20> mdnsServer; ReportDelegate reporter; CHIP_ERROR err; - mdnsServer.SetDelegate(&reporter); + gMdnsServer.SetDelegate(&reporter); { MdnsExample::AllInterfaces allInterfaces(gOptions.enableIpV4); - err = mdnsServer.Listen(chip::DeviceLayer::UDPEndPointManager(), &allInterfaces, gOptions.listenPort); + err = gMdnsServer.Listen(chip::DeviceLayer::UDPEndPointManager(), &allInterfaces, gOptions.listenPort); if (err != CHIP_NO_ERROR) { printf("Server failed to listen on all interfaces: %s\n", chip::ErrorStr(err)); @@ -342,11 +343,15 @@ int main(int argc, char ** args) } } - BroadcastPacket(&mdnsServer); + BroadcastPacket(&gMdnsServer); err = DeviceLayer::SystemLayer().StartTimer( chip::System::Clock::Milliseconds32(gOptions.runtimeMs), [](System::Layer *, void *) { + // Close all sockets BEFORE system layer is shut down, otherwise + // attempts to free UDP sockets with system layer down will segfault + gMdnsServer.Shutdown(); + DeviceLayer::PlatformMgr().StopEventLoopTask(); DeviceLayer::PlatformMgr().Shutdown(); }, diff --git a/src/lib/dnssd/minimal_mdns/Server.cpp b/src/lib/dnssd/minimal_mdns/Server.cpp index b58c60cb3e463f..01b881f39c78fb 100644 --- a/src/lib/dnssd/minimal_mdns/Server.cpp +++ b/src/lib/dnssd/minimal_mdns/Server.cpp @@ -189,10 +189,7 @@ ServerBase::~ServerBase() void ServerBase::Shutdown() { - mEndpoints.ForEachActiveObject([&](auto * endpoint) { - ShutdownEndpoint(*endpoint); - return chip::Loop::Continue; - }); + mEndpoints.ReleaseAll(); } void ServerBase::ShutdownEndpoint(EndpointInfo & aEndpoint) From 8bb1eef3aeb579fa427cca81ab55668de972f289 Mon Sep 17 00:00:00 2001 From: Wang Qixiang <43193572+wqx6@users.noreply.github.com> Date: Tue, 11 Jan 2022 22:57:53 +0800 Subject: [PATCH 33/64] ESP: Add ESP32 platform driver for full NetworkCommissioning cluster (#13283) * Add ESP32 platform driver for full NetworkCommissioning cluster * Restyled by whitespace * Restyled by clang-format * Add check for index when reorder network Co-authored-by: Restyled.io --- .../esp32/main/CMakeLists.txt | 1 + examples/all-clusters-app/esp32/main/main.cpp | 14 +- src/platform/ESP32/BUILD.gn | 4 +- .../ESP32/ConnectivityManagerImpl_WiFi.cpp | 7 +- .../DeviceNetworkProvisioningDelegateImpl.cpp | 4 +- .../ESP32/NetworkCommissioningDriver.h | 136 ++++++++ .../ESP32/NetworkCommissioningWiFiDriver.cpp | 326 ++++++++++++++++++ src/platform/ESP32/WiFiProvisioning.cpp | 56 --- src/platform/ESP32/WiFiProvisioning.h | 25 -- 9 files changed, 486 insertions(+), 87 deletions(-) create mode 100644 src/platform/ESP32/NetworkCommissioningDriver.h create mode 100644 src/platform/ESP32/NetworkCommissioningWiFiDriver.cpp delete mode 100644 src/platform/ESP32/WiFiProvisioning.cpp delete mode 100644 src/platform/ESP32/WiFiProvisioning.h diff --git a/examples/all-clusters-app/esp32/main/CMakeLists.txt b/examples/all-clusters-app/esp32/main/CMakeLists.txt index f45ffca624370a..0ab13536e5d807 100644 --- a/examples/all-clusters-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/main/CMakeLists.txt @@ -49,6 +49,7 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/window-covering-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general-commissioning-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/network-commissioning-old" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/network-commissioning" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/groups-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/color-control-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/content-launch-server" diff --git a/examples/all-clusters-app/esp32/main/main.cpp b/examples/all-clusters-app/esp32/main/main.cpp index a408493372edb3..93cabf8dbbaea2 100644 --- a/examples/all-clusters-app/esp32/main/main.cpp +++ b/examples/all-clusters-app/esp32/main/main.cpp @@ -51,6 +51,7 @@ #include #include #include +#include #include #include #include @@ -66,6 +67,7 @@ #include #include #include +#include #include #include #include @@ -143,6 +145,16 @@ typedef std::tuple Device; typedef std::vector Devices; Devices devices; +namespace { +app::Clusters::NetworkCommissioning::Instance + sWiFiNetworkCommissioningInstance(0 /* Endpoint Id */, &(NetworkCommissioning::ESPWiFiDriver::GetInstance())); +} // namespace + +void NetWorkCommissioningInstInit() +{ + sWiFiNetworkCommissioningInstance.Init(); +} + void AddAttribute(std::string name, std::string value) { Attribute attribute = std::make_tuple(std::move(name), std::move(value)); @@ -523,7 +535,7 @@ static void InitServer(intptr_t context) // Initialize device attestation config SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); - + NetWorkCommissioningInstInit(); SetupPretendDevices(); } diff --git a/src/platform/ESP32/BUILD.gn b/src/platform/ESP32/BUILD.gn index 3b13cfd87d9509..f15570aaf92c34 100644 --- a/src/platform/ESP32/BUILD.gn +++ b/src/platform/ESP32/BUILD.gn @@ -41,6 +41,7 @@ static_library("ESP32") { "KeyValueStoreManagerImpl.h", "Logging.cpp", "LwIPCoreLock.cpp", + "NetworkCommissioningDriver.h", "PlatformManagerImpl.cpp", "PlatformManagerImpl.h", "SystemTimeSupport.cpp", @@ -67,8 +68,7 @@ static_library("ESP32") { if (chip_enable_wifi) { sources += [ "ConnectivityManagerImpl_WiFi.cpp", - "WiFiProvisioning.cpp", - "WiFiProvisioning.h", + "NetworkCommissioningWiFiDriver.cpp", ] } diff --git a/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp b/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp index b053bd9e70e0c7..85e739e58cf524 100644 --- a/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp +++ b/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include "esp_event.h" @@ -441,6 +442,10 @@ void ConnectivityManagerImpl::OnWiFiPlatformEvent(const ChipDeviceEvent * event) { switch (event->Platform.ESPSystemEvent.Id) { + case WIFI_EVENT_SCAN_DONE: + ChipLogProgress(DeviceLayer, "WIFI_EVENT_SCAN_DONE"); + NetworkCommissioning::ESPWiFiDriver::GetInstance().OnScanWiFiNetworkDone(); + break; case WIFI_EVENT_STA_START: ChipLogProgress(DeviceLayer, "WIFI_EVENT_STA_START"); DriveStationState(); @@ -644,7 +649,7 @@ void ConnectivityManagerImpl::OnStationConnected() { ChipLogError(DeviceLayer, "esp_netif_create_ip6_linklocal() failed for WIFI_STA_DEF interface: %s", esp_err_to_name(err)); } - + NetworkCommissioning::ESPWiFiDriver::GetInstance().OnConnectWiFiNetwork(); // TODO Invoke WARM to perform actions that occur when the WiFi station interface comes up. // Alert other components of the new state. diff --git a/src/platform/ESP32/DeviceNetworkProvisioningDelegateImpl.cpp b/src/platform/ESP32/DeviceNetworkProvisioningDelegateImpl.cpp index 25461a06ca5606..aa2bef3b2fc6b8 100644 --- a/src/platform/ESP32/DeviceNetworkProvisioningDelegateImpl.cpp +++ b/src/platform/ESP32/DeviceNetworkProvisioningDelegateImpl.cpp @@ -19,7 +19,7 @@ #include #include "DeviceNetworkProvisioningDelegateImpl.h" -#include "WiFiProvisioning.h" +#include "NetworkCommissioningDriver.h" namespace chip { namespace DeviceLayer { @@ -29,7 +29,7 @@ CHIP_ERROR DeviceNetworkProvisioningDelegateImpl::_ProvisionWiFiNetwork(const ch #if CHIP_DEVICE_CONFIG_ENABLE_WIFI CHIP_ERROR err = CHIP_NO_ERROR; ChipLogProgress(NetworkProvisioning, "ESP32NetworkProvisioningDelegate: SSID: %s", ssid); - err = SetWiFiStationProvisioning(ssid, key); + err = NetworkCommissioning::ESPWiFiDriver::GetInstance().ConnectWiFiNetwork(ssid, strlen(ssid), key, strlen(key)); if (err != CHIP_NO_ERROR) { ChipLogError(NetworkProvisioning, "Failed to connect to WiFi network: %s", chip::ErrorStr(err)); diff --git a/src/platform/ESP32/NetworkCommissioningDriver.h b/src/platform/ESP32/NetworkCommissioningDriver.h new file mode 100644 index 00000000000000..c57080f7dbe431 --- /dev/null +++ b/src/platform/ESP32/NetworkCommissioningDriver.h @@ -0,0 +1,136 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once +#include +#include + +namespace chip { +namespace DeviceLayer { +namespace NetworkCommissioning { +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI +namespace { +constexpr uint8_t kMaxWiFiNetworks = 1; +constexpr uint8_t kWiFiScanNetworksTimeOutSeconds = 10; +constexpr uint8_t kWiFiConnectNetworkTimeoutSeconds = 20; +} // namespace + +class ESPScanResponseIterator : public Iterator +{ +public: + ESPScanResponseIterator(const size_t size, const wifi_ap_record_t * scanResults) : mSize(size), mpScanResults(scanResults) {} + size_t Count() override { return mSize; } + bool Next(WiFiScanResponse & item) override + { + if (mIternum >= mSize) + { + return false; + } + + item.security = mpScanResults[mIternum].authmode; + item.ssidLen = + strnlen(reinterpret_cast(mpScanResults[mIternum].ssid), chip::DeviceLayer::Internal::kMaxWiFiSSIDLength); + item.channel = mpScanResults[mIternum].primary; + item.wiFiBand = chip::DeviceLayer::NetworkCommissioning::WiFiBand::k2g4; + item.rssi = mpScanResults[mIternum].rssi; + memcpy(item.ssid, mpScanResults[mIternum].ssid, item.ssidLen); + memcpy(item.bssid, mpScanResults[mIternum].bssid, 6); + + mIternum++; + return true; + } + void Release() override {} + +private: + const size_t mSize; + const wifi_ap_record_t * mpScanResults; + size_t mIternum = 0; +}; + +class ESPWiFiDriver final : public WiFiDriver +{ +public: + class WiFiNetworkIterator final : public NetworkIterator + { + public: + WiFiNetworkIterator(ESPWiFiDriver * aDriver) : mDriver(aDriver) {} + size_t Count() override; + bool Next(Network & item) override; + void Release() override { delete this; } + ~WiFiNetworkIterator() = default; + + private: + ESPWiFiDriver * mDriver; + bool mExhausted = false; + }; + + struct WiFiNetwork + { + char ssid[DeviceLayer::Internal::kMaxWiFiSSIDLength]; + uint8_t ssidLen = 0; + char credentials[DeviceLayer::Internal::kMaxWiFiKeyLength]; + uint8_t credentialsLen = 0; + }; + + // BaseDriver + NetworkIterator * GetNetworks() override { return new WiFiNetworkIterator(this); } + CHIP_ERROR Init() override; + CHIP_ERROR Shutdown() override; + + // WirelessDriver + uint8_t GetMaxNetworks() override { return kMaxWiFiNetworks; } + uint8_t GetScanNetworkTimeoutSeconds() override { return kWiFiScanNetworksTimeOutSeconds; } + uint8_t GetConnectNetworkTimeoutSeconds() override { return kWiFiConnectNetworkTimeoutSeconds; } + + CHIP_ERROR CommitConfiguration() override; + CHIP_ERROR RevertConfiguration() override; + + Status RemoveNetwork(ByteSpan networkId) override; + Status ReorderNetwork(ByteSpan networkId, uint8_t index) override; + void ConnectNetwork(ByteSpan networkId, ConnectCallback * callback) override; + + // WiFiDriver + Status AddOrUpdateNetwork(ByteSpan ssid, ByteSpan credentials) override; + void ScanNetworks(ByteSpan ssid, ScanCallback * callback) override; + + CHIP_ERROR ConnectWiFiNetwork(const char * ssid, uint8_t ssidLen, const char * key, uint8_t keyLen); + void OnConnectWiFiNetwork(); + void OnScanWiFiNetworkDone(); + static ESPWiFiDriver & GetInstance() + { + static ESPWiFiDriver instance; + return instance; + } + +private: + bool NetworkMatch(const WiFiNetwork & network, ByteSpan networkId); + CHIP_ERROR StartScanWiFiNetworks(ByteSpan ssid); + + WiFiNetworkIterator mWiFiIterator = WiFiNetworkIterator(this); + WiFiNetwork mSavedNetwork; + WiFiNetwork mStagingNetwork; + ScanCallback * mpScanCallback; + ConnectCallback * mpConnectCallback; +}; +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD +// TODO: Add Thread Driver for ESP32H2 platform +#endif +} // namespace NetworkCommissioning +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/ESP32/NetworkCommissioningWiFiDriver.cpp b/src/platform/ESP32/NetworkCommissioningWiFiDriver.cpp new file mode 100644 index 00000000000000..9468143aabad64 --- /dev/null +++ b/src/platform/ESP32/NetworkCommissioningWiFiDriver.cpp @@ -0,0 +1,326 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include +#include + +#include "esp_wifi.h" + +#include +#include + +using namespace ::chip; +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI +namespace chip { +namespace DeviceLayer { +namespace NetworkCommissioning { + +namespace { +constexpr char kWiFiSSIDKeyName[] = "wifi-ssid"; +constexpr char kWiFiCredentialsKeyName[] = "wifi-pass"; +static uint8_t WiFiSSIDStr[DeviceLayer::Internal::kMaxWiFiSSIDLength]; +} // namespace + +CHIP_ERROR ESPWiFiDriver::Init() +{ + CHIP_ERROR err; + size_t ssidLen = 0; + size_t credentialsLen = 0; + + err = PersistedStorage::KeyValueStoreMgr().Get(kWiFiCredentialsKeyName, mSavedNetwork.credentials, + sizeof(mSavedNetwork.credentials), &credentialsLen); + if (err == CHIP_ERROR_NOT_FOUND) + { + return CHIP_NO_ERROR; + } + + err = PersistedStorage::KeyValueStoreMgr().Get(kWiFiSSIDKeyName, mSavedNetwork.ssid, sizeof(mSavedNetwork.ssid), &ssidLen); + if (err == CHIP_ERROR_NOT_FOUND) + { + return CHIP_NO_ERROR; + } + mSavedNetwork.credentialsLen = credentialsLen; + mSavedNetwork.ssidLen = ssidLen; + + mStagingNetwork = mSavedNetwork; + mpScanCallback = nullptr; + mpConnectCallback = nullptr; + return err; +} + +CHIP_ERROR ESPWiFiDriver::Shutdown() +{ + return CHIP_NO_ERROR; +} + +CHIP_ERROR ESPWiFiDriver::CommitConfiguration() +{ + ReturnErrorOnFailure(PersistedStorage::KeyValueStoreMgr().Put(kWiFiSSIDKeyName, mStagingNetwork.ssid, mStagingNetwork.ssidLen)); + ReturnErrorOnFailure(PersistedStorage::KeyValueStoreMgr().Put(kWiFiCredentialsKeyName, mStagingNetwork.credentials, + mStagingNetwork.credentialsLen)); + mSavedNetwork = mStagingNetwork; + return CHIP_NO_ERROR; +} + +CHIP_ERROR ESPWiFiDriver::RevertConfiguration() +{ + mStagingNetwork = mSavedNetwork; + return CHIP_NO_ERROR; +} + +bool ESPWiFiDriver::NetworkMatch(const WiFiNetwork & network, ByteSpan networkId) +{ + return networkId.size() == network.ssidLen && memcmp(networkId.data(), network.ssid, network.ssidLen) == 0; +} + +Status ESPWiFiDriver::AddOrUpdateNetwork(ByteSpan ssid, ByteSpan credentials) +{ + VerifyOrReturnError(mStagingNetwork.ssidLen == 0 || NetworkMatch(mStagingNetwork, ssid), Status::kBoundsExceeded); + VerifyOrReturnError(credentials.size() <= sizeof(mStagingNetwork.credentials), Status::kOutOfRange); + VerifyOrReturnError(ssid.size() <= sizeof(mStagingNetwork.ssid), Status::kOutOfRange); + + memcpy(mStagingNetwork.credentials, credentials.data(), credentials.size()); + mStagingNetwork.credentialsLen = static_cast(credentials.size()); + + memcpy(mStagingNetwork.ssid, ssid.data(), ssid.size()); + mStagingNetwork.ssidLen = static_cast(ssid.size()); + + return Status::kSuccess; +} + +Status ESPWiFiDriver::RemoveNetwork(ByteSpan networkId) +{ + VerifyOrReturnError(NetworkMatch(mStagingNetwork, networkId), Status::kNetworkIDNotFound); + + // Use empty ssid for representing invalid network + mStagingNetwork.ssidLen = 0; + return Status::kSuccess; +} + +Status ESPWiFiDriver::ReorderNetwork(ByteSpan networkId, uint8_t index) +{ + // Only one network is supported now + VerifyOrReturnError(index == 0, Status::kOutOfRange); + VerifyOrReturnError(NetworkMatch(mStagingNetwork, networkId), Status::kNetworkIDNotFound); + return Status::kSuccess; +} + +CHIP_ERROR ESPWiFiDriver::ConnectWiFiNetwork(const char * ssid, uint8_t ssidLen, const char * key, uint8_t keyLen) +{ + ReturnErrorOnFailure(ConnectivityMgr().SetWiFiStationMode(ConnectivityManager::kWiFiStationMode_Disabled)); + + wifi_config_t wifiConfig; + + // Set the wifi configuration + memset(&wifiConfig, 0, sizeof(wifiConfig)); + memcpy(wifiConfig.sta.ssid, ssid, std::min(ssidLen, static_cast(sizeof(wifiConfig.sta.ssid)))); + memcpy(wifiConfig.sta.password, key, std::min(keyLen, static_cast(sizeof(wifiConfig.sta.password)))); + wifiConfig.sta.scan_method = WIFI_ALL_CHANNEL_SCAN; + wifiConfig.sta.sort_method = WIFI_CONNECT_AP_BY_SIGNAL; + + // Configure the ESP WiFi interface. + esp_err_t err = esp_wifi_set_config(WIFI_IF_STA, &wifiConfig); + if (err != ESP_OK) + { + ChipLogError(DeviceLayer, "esp_wifi_set_config() failed: %s", esp_err_to_name(err)); + return chip::DeviceLayer::Internal::ESP32Utils::MapError(err); + } + + ReturnErrorOnFailure(ConnectivityMgr().SetWiFiStationMode(ConnectivityManager::kWiFiStationMode_Disabled)); + return ConnectivityMgr().SetWiFiStationMode(ConnectivityManager::kWiFiStationMode_Enabled); +} + +void ESPWiFiDriver::OnConnectWiFiNetwork() +{ + if (mpConnectCallback) + { + mpConnectCallback->OnResult(Status::kSuccess, CharSpan(), 0); + mpConnectCallback = nullptr; + } +} + +void ESPWiFiDriver::ConnectNetwork(ByteSpan networkId, ConnectCallback * callback) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + Status networkingStatus = Status::kSuccess; + + VerifyOrExit(NetworkMatch(mStagingNetwork, networkId), networkingStatus = Status::kNetworkIDNotFound); + VerifyOrExit(mpConnectCallback == nullptr, networkingStatus = Status::kUnknownError); + ChipLogProgress(NetworkProvisioning, "ESP NetworkCommissioningDelegate: SSID: %s", networkId.data()); + + err = ConnectWiFiNetwork(reinterpret_cast(mStagingNetwork.ssid), mStagingNetwork.ssidLen, + reinterpret_cast(mStagingNetwork.credentials), mStagingNetwork.credentialsLen); + mpConnectCallback = callback; +exit: + if (err != CHIP_NO_ERROR) + { + networkingStatus = Status::kUnknownError; + } + if (networkingStatus != Status::kSuccess) + { + ChipLogError(NetworkProvisioning, "Failed to connect to WiFi network:%s", chip::ErrorStr(err)); + mpConnectCallback = nullptr; + callback->OnResult(networkingStatus, CharSpan(), 0); + } +} + +CHIP_ERROR ESPWiFiDriver::StartScanWiFiNetworks(ByteSpan ssid) +{ + esp_err_t err = ESP_OK; + if (ssid.data()) + { + wifi_scan_config_t scan_config = { 0 }; + memset(WiFiSSIDStr, 0, sizeof(WiFiSSIDStr)); + memcpy(WiFiSSIDStr, ssid.data(), ssid.size()); + scan_config.ssid = WiFiSSIDStr; + err = esp_wifi_scan_start(&scan_config, false); + } + else + { + err = esp_wifi_scan_start(NULL, false); + } + if (err != ESP_OK) + { + return chip::DeviceLayer::Internal::ESP32Utils::MapError(err); + } + return CHIP_NO_ERROR; +} + +void ESPWiFiDriver::OnScanWiFiNetworkDone() +{ + uint16_t ap_number; + esp_wifi_scan_get_ap_num(&ap_number); + if (!ap_number) + { + ChipLogProgress(DeviceLayer, "No AP found"); + if (mpScanCallback != nullptr) + { + mpScanCallback->OnFinished(Status::kSuccess, CharSpan(), nullptr); + mpScanCallback = nullptr; + } + return; + } + std::unique_ptr ap_buffer_ptr(new wifi_ap_record_t[ap_number]); + if (ap_buffer_ptr == NULL) + { + ChipLogError(DeviceLayer, "can't malloc memory for ap_list_buffer"); + if (mpScanCallback) + { + mpScanCallback->OnFinished(Status::kUnknownError, CharSpan(), nullptr); + mpScanCallback = nullptr; + } + return; + } + wifi_ap_record_t * ap_list_buffer = ap_buffer_ptr.get(); + if (esp_wifi_scan_get_ap_records(&ap_number, ap_list_buffer) == ESP_OK) + { + if (CHIP_NO_ERROR == DeviceLayer::SystemLayer().ScheduleLambda([ap_number, ap_list_buffer]() { + std::unique_ptr auto_free(ap_list_buffer); + ESPScanResponseIterator iter(ap_number, ap_list_buffer); + if (GetInstance().mpScanCallback) + { + GetInstance().mpScanCallback->OnFinished(Status::kSuccess, CharSpan(), &iter); + GetInstance().mpScanCallback = nullptr; + } + else + { + ChipLogError(DeviceLayer, "can't find the ScanCallback function"); + } + })) + { + ap_buffer_ptr.release(); + } + } + else + { + ChipLogError(DeviceLayer, "can't get ap_records "); + if (mpScanCallback) + { + mpScanCallback->OnFinished(Status::kUnknownError, CharSpan(), nullptr); + mpScanCallback = nullptr; + } + } +} + +void ESPWiFiDriver::ScanNetworks(ByteSpan ssid, WiFiDriver::ScanCallback * callback) +{ + if (callback != nullptr) + { + mpScanCallback = callback; + if (StartScanWiFiNetworks(ssid) != CHIP_NO_ERROR) + { + mpScanCallback = nullptr; + callback->OnFinished(Status::kUnknownError, CharSpan(), nullptr); + } + } +} + +CHIP_ERROR GetConnectedNetwork(Network & network) +{ + wifi_ap_record_t ap_info; + esp_err_t err; + err = esp_wifi_sta_get_ap_info(&ap_info); + if (err != ESP_OK) + { + return chip::DeviceLayer::Internal::ESP32Utils::MapError(err); + } + uint8_t length = strnlen(reinterpret_cast(ap_info.ssid), DeviceLayer::Internal::kMaxWiFiSSIDLength); + if (length > sizeof(network.networkID)) + { + return CHIP_ERROR_INTERNAL; + } + memcpy(network.networkID, ap_info.ssid, length); + network.networkIDLen = length; + return CHIP_NO_ERROR; +} + +size_t ESPWiFiDriver::WiFiNetworkIterator::Count() +{ + return mDriver->mStagingNetwork.ssidLen == 0 ? 0 : 1; +} + +bool ESPWiFiDriver::WiFiNetworkIterator::Next(Network & item) +{ + if (mExhausted || mDriver->mStagingNetwork.ssidLen == 0) + { + return false; + } + memcpy(item.networkID, mDriver->mStagingNetwork.ssid, mDriver->mStagingNetwork.ssidLen); + item.networkIDLen = mDriver->mStagingNetwork.ssidLen; + item.connected = false; + mExhausted = true; + + Network connectedNetwork; + CHIP_ERROR err = GetConnectedNetwork(connectedNetwork); + if (err == CHIP_NO_ERROR) + { + if (connectedNetwork.networkIDLen == item.networkIDLen && + memcmp(connectedNetwork.networkID, item.networkID, item.networkIDLen) == 0) + { + item.connected = true; + } + } + return true; +} + +} // namespace NetworkCommissioning +} // namespace DeviceLayer +} // namespace chip +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI diff --git a/src/platform/ESP32/WiFiProvisioning.cpp b/src/platform/ESP32/WiFiProvisioning.cpp deleted file mode 100644 index 290c2b35a6be90..00000000000000 --- a/src/platform/ESP32/WiFiProvisioning.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include -#include -#include - -#include - -#include "esp_wifi.h" - -#include "WiFiProvisioning.h" - -using namespace ::chip::DeviceLayer; - -CHIP_ERROR SetWiFiStationProvisioning(const char * ssid, const char * key) -{ - ConnectivityMgr().SetWiFiStationMode(ConnectivityManager::kWiFiStationMode_Disabled); - - wifi_config_t wifiConfig; - - // Set the wifi configuration - memset(&wifiConfig, 0, sizeof(wifiConfig)); - memcpy(wifiConfig.sta.ssid, ssid, std::min(strlen(ssid) + 1, sizeof(wifiConfig.sta.ssid))); - memcpy(wifiConfig.sta.password, key, std::min(strlen(key) + 1, sizeof(wifiConfig.sta.password))); - wifiConfig.sta.scan_method = WIFI_ALL_CHANNEL_SCAN; - wifiConfig.sta.sort_method = WIFI_CONNECT_AP_BY_SIGNAL; - - // Configure the ESP WiFi interface. - esp_err_t err = esp_wifi_set_config(WIFI_IF_STA, &wifiConfig); - if (err != ESP_OK) - { - ChipLogError(DeviceLayer, "esp_wifi_set_config() failed: %s", esp_err_to_name(err)); - return chip::DeviceLayer::Internal::ESP32Utils::MapError(err); - } - - ConnectivityMgr().SetWiFiStationMode(ConnectivityManager::kWiFiStationMode_Disabled); - ConnectivityMgr().SetWiFiStationMode(ConnectivityManager::kWiFiStationMode_Enabled); - - return CHIP_NO_ERROR; -} diff --git a/src/platform/ESP32/WiFiProvisioning.h b/src/platform/ESP32/WiFiProvisioning.h deleted file mode 100644 index 109ec4ae33ea6c..00000000000000 --- a/src/platform/ESP32/WiFiProvisioning.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef _SERVICE_PROVISIONING_H -#define _SERVICE_PROVISIONING_H - -#include - -CHIP_ERROR SetWiFiStationProvisioning(const char * ssid, const char * key); - -#endif // _SERVICE_PROVISIONING_H From 79530ef746a6b5f14181d66da2a0b980939b7aea Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Tue, 11 Jan 2022 07:44:39 -0800 Subject: [PATCH 34/64] Add support for HourFormat & CalendarType in ConfigurationMgr. (#13433) --- src/include/platform/ConfigurationManager.h | 4 ++ .../GenericConfigurationManagerImpl.cpp | 46 +++++++++++++++++++ .../GenericConfigurationManagerImpl.h | 4 ++ src/platform/Ameba/AmebaConfig.cpp | 2 + src/platform/Ameba/AmebaConfig.h | 4 ++ src/platform/Darwin/PosixConfig.cpp | 2 + src/platform/Darwin/PosixConfig.h | 2 + src/platform/EFR32/EFR32Config.h | 8 ++-- src/platform/ESP32/ESP32Config.cpp | 2 + src/platform/ESP32/ESP32Config.h | 4 ++ src/platform/Linux/PosixConfig.cpp | 2 + src/platform/Linux/PosixConfig.h | 2 + src/platform/P6/P6Config.cpp | 10 ++-- src/platform/P6/P6Config.h | 4 ++ src/platform/Tizen/PosixConfig.cpp | 2 + src/platform/Tizen/PosixConfig.h | 2 + src/platform/Zephyr/ZephyrConfig.cpp | 5 +- src/platform/Zephyr/ZephyrConfig.h | 3 ++ src/platform/android/AndroidConfig.cpp | 2 + src/platform/android/AndroidConfig.h | 2 + .../chip/platform/ConfigurationManager.java | 2 + .../cc13x2_26x2/CC13X2_26X2Config.cpp | 8 +++- src/platform/cc13x2_26x2/CC13X2_26X2Config.h | 2 + src/platform/fake/ConfigurationManagerImpl.h | 4 ++ src/platform/mbed/MbedConfig.cpp | 2 + src/platform/mbed/MbedConfig.h | 2 + src/platform/nxp/k32w/k32w0/K32W0Config.h | 2 + src/platform/qpg/qpgConfig.h | 6 ++- src/platform/tests/TestConfigurationMgr.cpp | 30 ++++++++++++ 29 files changed, 158 insertions(+), 12 deletions(-) diff --git a/src/include/platform/ConfigurationManager.h b/src/include/platform/ConfigurationManager.h index 4488fdc4cc88d8..88a2c857cb4b1f 100644 --- a/src/include/platform/ConfigurationManager.h +++ b/src/include/platform/ConfigurationManager.h @@ -102,6 +102,8 @@ class ConfigurationManager virtual CHIP_ERROR GetCountryCode(char * buf, size_t bufSize, size_t & codeLen) = 0; virtual CHIP_ERROR GetActiveLocale(char * buf, size_t bufSize, size_t & codeLen) = 0; virtual CHIP_ERROR GetBreadcrumb(uint64_t & breadcrumb) = 0; + virtual CHIP_ERROR GetHourFormat(uint8_t & format) = 0; + virtual CHIP_ERROR GetCalendarType(uint8_t & type) = 0; virtual CHIP_ERROR StoreSerialNumber(const char * serialNum, size_t serialNumLen) = 0; virtual CHIP_ERROR StorePrimaryWiFiMACAddress(const uint8_t * buf) = 0; virtual CHIP_ERROR StorePrimary802154MACAddress(const uint8_t * buf) = 0; @@ -113,6 +115,8 @@ class ConfigurationManager virtual CHIP_ERROR StoreCountryCode(const char * code, size_t codeLen) = 0; virtual CHIP_ERROR StoreActiveLocale(const char * code, size_t codeLen) = 0; virtual CHIP_ERROR StoreBreadcrumb(uint64_t breadcrumb) = 0; + virtual CHIP_ERROR StoreHourFormat(uint8_t format) = 0; + virtual CHIP_ERROR StoreCalendarType(uint8_t type) = 0; virtual CHIP_ERROR GetRebootCount(uint32_t & rebootCount) = 0; virtual CHIP_ERROR StoreRebootCount(uint32_t rebootCount) = 0; virtual CHIP_ERROR GetTotalOperationalHours(uint32_t & totalOperationalHours) = 0; diff --git a/src/include/platform/internal/GenericConfigurationManagerImpl.cpp b/src/include/platform/internal/GenericConfigurationManagerImpl.cpp index 141c9bffead4f4..9108081aceabdf 100644 --- a/src/include/platform/internal/GenericConfigurationManagerImpl.cpp +++ b/src/include/platform/internal/GenericConfigurationManagerImpl.cpp @@ -321,6 +321,52 @@ CHIP_ERROR GenericConfigurationManagerImpl::StoreRegulatoryLocation return WriteConfigValue(ConfigClass::kConfigKey_RegulatoryLocation, value); } +template +CHIP_ERROR GenericConfigurationManagerImpl::GetHourFormat(uint8_t & format) +{ + uint32_t value = 0; + + CHIP_ERROR err = ReadConfigValue(ConfigClass::kConfigKey_HourFormat, value); + + if (err == CHIP_NO_ERROR) + { + VerifyOrReturnError(value <= UINT8_MAX, CHIP_ERROR_INVALID_INTEGER_VALUE); + format = static_cast(value); + } + + return err; +} + +template +CHIP_ERROR GenericConfigurationManagerImpl::StoreHourFormat(uint8_t format) +{ + uint32_t value = format; + return WriteConfigValue(ConfigClass::kConfigKey_HourFormat, value); +} + +template +CHIP_ERROR GenericConfigurationManagerImpl::GetCalendarType(uint8_t & type) +{ + uint32_t value = 0; + + CHIP_ERROR err = ReadConfigValue(ConfigClass::kConfigKey_CalendarType, value); + + if (err == CHIP_NO_ERROR) + { + VerifyOrReturnError(value <= UINT8_MAX, CHIP_ERROR_INVALID_INTEGER_VALUE); + type = static_cast(value); + } + + return err; +} + +template +CHIP_ERROR GenericConfigurationManagerImpl::StoreCalendarType(uint8_t type) +{ + uint32_t value = type; + return WriteConfigValue(ConfigClass::kConfigKey_CalendarType, value); +} + template CHIP_ERROR GenericConfigurationManagerImpl::GetCountryCode(char * buf, size_t bufSize, size_t & codeLen) { diff --git a/src/include/platform/internal/GenericConfigurationManagerImpl.h b/src/include/platform/internal/GenericConfigurationManagerImpl.h index 247a2ef1360826..8311dd3365e140 100644 --- a/src/include/platform/internal/GenericConfigurationManagerImpl.h +++ b/src/include/platform/internal/GenericConfigurationManagerImpl.h @@ -110,6 +110,10 @@ class GenericConfigurationManagerImpl : public ConfigurationManager CHIP_ERROR GetLocalConfigDisabled(bool & disabled) override; CHIP_ERROR GetReachable(bool & reachable) override; CHIP_ERROR GetUniqueId(char * buf, size_t bufSize) override; + CHIP_ERROR GetHourFormat(uint8_t & format) override; + CHIP_ERROR StoreHourFormat(uint8_t format) override; + CHIP_ERROR GetCalendarType(uint8_t & type) override; + CHIP_ERROR StoreCalendarType(uint8_t type) override; CHIP_ERROR RunUnitTests(void) override; bool IsFullyProvisioned() override; void InitiateFactoryReset() override; diff --git a/src/platform/Ameba/AmebaConfig.cpp b/src/platform/Ameba/AmebaConfig.cpp index 56de35a1e38b9b..4e23b7c115db21 100644 --- a/src/platform/Ameba/AmebaConfig.cpp +++ b/src/platform/Ameba/AmebaConfig.cpp @@ -74,6 +74,8 @@ const AmebaConfig::Key AmebaConfig::kConfigKey_RegulatoryLocation = { k const AmebaConfig::Key AmebaConfig::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; const AmebaConfig::Key AmebaConfig::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; const AmebaConfig::Key AmebaConfig::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; +const AmebaConfig::Key AmebaConfig::kConfigKey_HourFormat = { kConfigNamespace_ChipConfig, "hour-format" }; +const AmebaConfig::Key AmebaConfig::kConfigKey_CalendarType = { kConfigNamespace_ChipConfig, "calendar-type" }; // Keys stored in the Chip-counters namespace const AmebaConfig::Key AmebaConfig::kCounterKey_RebootCount = { kConfigNamespace_ChipCounters, "reboot-count" }; diff --git a/src/platform/Ameba/AmebaConfig.h b/src/platform/Ameba/AmebaConfig.h index af49048f9ace14..1ba6bf7c37a6f8 100755 --- a/src/platform/Ameba/AmebaConfig.h +++ b/src/platform/Ameba/AmebaConfig.h @@ -68,6 +68,10 @@ class AmebaConfig static const Key kConfigKey_CountryCode; static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; + static const Key kConfigKey_HourFormat; + static const Key kConfigKey_CalendarType; + + // Counter keys static const Key kCounterKey_RebootCount; static const Key kCounterKey_UpTime; static const Key kCounterKey_TotalOperationalHours; diff --git a/src/platform/Darwin/PosixConfig.cpp b/src/platform/Darwin/PosixConfig.cpp index 5ee3104038b4d4..ea815f11832a5c 100644 --- a/src/platform/Darwin/PosixConfig.cpp +++ b/src/platform/Darwin/PosixConfig.cpp @@ -67,6 +67,8 @@ const PosixConfig::Key PosixConfig::kConfigKey_RegulatoryLocation = { kConfigNam const PosixConfig::Key PosixConfig::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; const PosixConfig::Key PosixConfig::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; const PosixConfig::Key PosixConfig::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; +const PosixConfig::Key PosixConfig::kConfigKey_HourFormat = { kConfigNamespace_ChipConfig, "hour-format" }; +const PosixConfig::Key PosixConfig::kConfigKey_CalendarType = { kConfigNamespace_ChipConfig, "calendar-type" }; // Prefix used for NVS keys that contain Chip group encryption keys. const char PosixConfig::kGroupKeyNamePrefix[] = "gk-"; diff --git a/src/platform/Darwin/PosixConfig.h b/src/platform/Darwin/PosixConfig.h index 009433a91d4a5a..1d852822078c43 100644 --- a/src/platform/Darwin/PosixConfig.h +++ b/src/platform/Darwin/PosixConfig.h @@ -74,6 +74,8 @@ class PosixConfig static const Key kConfigKey_CountryCode; static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; + static const Key kConfigKey_HourFormat; + static const Key kConfigKey_CalendarType; static const char kGroupKeyNamePrefix[]; diff --git a/src/platform/EFR32/EFR32Config.h b/src/platform/EFR32/EFR32Config.h index 9879aeba72a374..c008db24251489 100644 --- a/src/platform/EFR32/EFR32Config.h +++ b/src/platform/EFR32/EFR32Config.h @@ -94,9 +94,11 @@ class EFR32Config static constexpr Key kConfigKey_RegulatoryLocation = EFR32ConfigKey(kChipConfig_KeyBase, 0x09); static constexpr Key kConfigKey_CountryCode = EFR32ConfigKey(kChipConfig_KeyBase, 0x0A); static constexpr Key kConfigKey_Breadcrumb = EFR32ConfigKey(kChipConfig_KeyBase, 0x0B); - static constexpr Key kConfigKey_GroupKeyBase = EFR32ConfigKey(kChipConfig_KeyBase, 0x0C); - static constexpr Key kConfigKey_ActiveLocale = EFR32ConfigKey(kChipConfig_KeyBase, 0x0D); - static constexpr Key kConfigKey_GroupKeyMax = EFR32ConfigKey(kChipConfig_KeyBase, 0x1B); // Allows 16 Group Keys to be created. + static constexpr Key kConfigKey_ActiveLocale = EFR32ConfigKey(kChipConfig_KeyBase, 0x0C); + static constexpr Key kConfigKey_HourFormat = EFR32ConfigKey(kChipConfig_KeyBase, 0x0D); + static constexpr Key kConfigKey_CalendarType = EFR32ConfigKey(kChipConfig_KeyBase, 0x0E); + static constexpr Key kConfigKey_GroupKeyBase = EFR32ConfigKey(kChipConfig_KeyBase, 0x0F); + static constexpr Key kConfigKey_GroupKeyMax = EFR32ConfigKey(kChipConfig_KeyBase, 0x1E); // Allows 16 Group Keys to be created. // CHIP Counter Keys static constexpr Key kConfigKey_BootCount = EFR32ConfigKey(kChipCounter_KeyBase, 0x00); diff --git a/src/platform/ESP32/ESP32Config.cpp b/src/platform/ESP32/ESP32Config.cpp index 5b2d6ea2f3073e..a41a86c0002b15 100644 --- a/src/platform/ESP32/ESP32Config.cpp +++ b/src/platform/ESP32/ESP32Config.cpp @@ -73,6 +73,8 @@ const ESP32Config::Key ESP32Config::kConfigKey_RegulatoryLocation = { kConfigNam const ESP32Config::Key ESP32Config::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; const ESP32Config::Key ESP32Config::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; const ESP32Config::Key ESP32Config::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; +const ESP32Config::Key ESP32Config::kConfigKey_HourFormat = { kConfigNamespace_ChipConfig, "hour-format" }; +const ESP32Config::Key ESP32Config::kConfigKey_CalendarType = { kConfigNamespace_ChipConfig, "calendar-type" }; // Keys stored in the Chip-counters namespace const ESP32Config::Key ESP32Config::kCounterKey_RebootCount = { kConfigNamespace_ChipCounters, "reboot-count" }; diff --git a/src/platform/ESP32/ESP32Config.h b/src/platform/ESP32/ESP32Config.h index dfd6f9a4151359..a16254d661579d 100644 --- a/src/platform/ESP32/ESP32Config.h +++ b/src/platform/ESP32/ESP32Config.h @@ -75,6 +75,10 @@ class ESP32Config static const Key kConfigKey_CountryCode; static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; + static const Key kConfigKey_HourFormat; + static const Key kConfigKey_CalendarType; + + // CHIP Counter keys static const Key kCounterKey_RebootCount; static const Key kCounterKey_UpTime; static const Key kCounterKey_TotalOperationalHours; diff --git a/src/platform/Linux/PosixConfig.cpp b/src/platform/Linux/PosixConfig.cpp index 3c09fa7b7a7808..7187070494043a 100644 --- a/src/platform/Linux/PosixConfig.cpp +++ b/src/platform/Linux/PosixConfig.cpp @@ -73,6 +73,8 @@ const PosixConfig::Key PosixConfig::kConfigKey_CountryCode = { kConfigNam const PosixConfig::Key PosixConfig::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; const PosixConfig::Key PosixConfig::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; const PosixConfig::Key PosixConfig::kConfigKey_LocationCapability = { kConfigNamespace_ChipConfig, "location-capability" }; +const PosixConfig::Key PosixConfig::kConfigKey_HourFormat = { kConfigNamespace_ChipConfig, "hour-format" }; +const PosixConfig::Key PosixConfig::kConfigKey_CalendarType = { kConfigNamespace_ChipConfig, "calendar-type" }; // Keys stored in the Chip-counters namespace const PosixConfig::Key PosixConfig::kCounterKey_RebootCount = { kConfigNamespace_ChipCounters, "reboot-count" }; diff --git a/src/platform/Linux/PosixConfig.h b/src/platform/Linux/PosixConfig.h index e4361af27e216e..4b38910fb65ea5 100644 --- a/src/platform/Linux/PosixConfig.h +++ b/src/platform/Linux/PosixConfig.h @@ -77,6 +77,8 @@ class PosixConfig static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; static const Key kConfigKey_LocationCapability; + static const Key kConfigKey_HourFormat; + static const Key kConfigKey_CalendarType; static const Key kCounterKey_RebootCount; static const Key kCounterKey_UpTime; diff --git a/src/platform/P6/P6Config.cpp b/src/platform/P6/P6Config.cpp index ee28b6718ba6f5..d2ad8c7c4e6416 100644 --- a/src/platform/P6/P6Config.cpp +++ b/src/platform/P6/P6Config.cpp @@ -57,10 +57,6 @@ const P6Config::Key P6Config::kConfigKey_HardwareVersion = { kConfigNamespac const P6Config::Key P6Config::kConfigKey_ManufacturingDate = { kConfigNamespace_ChipFactory, "mfg-date" }; const P6Config::Key P6Config::kConfigKey_SetupPinCode = { kConfigNamespace_ChipFactory, "pin-code" }; const P6Config::Key P6Config::kConfigKey_SetupDiscriminator = { kConfigNamespace_ChipFactory, "discriminator" }; -const P6Config::Key P6Config::kConfigKey_RegulatoryLocation = { kConfigNamespace_ChipConfig, "regulatory-location" }; -const P6Config::Key P6Config::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; -const P6Config::Key P6Config::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; -const P6Config::Key P6Config::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; // Keys stored in the chip-config namespace const P6Config::Key P6Config::kConfigKey_FabricId = { kConfigNamespace_ChipConfig, "fabric-id" }; @@ -71,6 +67,12 @@ const P6Config::Key P6Config::kConfigKey_GroupKeyIndex = { kConfigNamespace const P6Config::Key P6Config::kConfigKey_LastUsedEpochKeyId = { kConfigNamespace_ChipConfig, "last-ek-id" }; const P6Config::Key P6Config::kConfigKey_FailSafeArmed = { kConfigNamespace_ChipConfig, "fail-safe-armed" }; const P6Config::Key P6Config::kConfigKey_WiFiStationSecType = { kConfigNamespace_ChipConfig, "sta-sec-type" }; +const P6Config::Key P6Config::kConfigKey_RegulatoryLocation = { kConfigNamespace_ChipConfig, "regulatory-location" }; +const P6Config::Key P6Config::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; +const P6Config::Key P6Config::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; +const P6Config::Key P6Config::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; +const P6Config::Key P6Config::kConfigKey_HourFormat = { kConfigNamespace_ChipConfig, "hour-format" }; +const P6Config::Key P6Config::kConfigKey_CalendarType = { kConfigNamespace_ChipConfig, "calendar-type" }; // Keys stored in the Chip-counters namespace const P6Config::Key P6Config::kCounterKey_RebootCount = { kConfigNamespace_ChipCounters, "reboot-count" }; diff --git a/src/platform/P6/P6Config.h b/src/platform/P6/P6Config.h index 071f031de48f9a..3b9cffcfe96731 100644 --- a/src/platform/P6/P6Config.h +++ b/src/platform/P6/P6Config.h @@ -76,6 +76,10 @@ class P6Config static const Key kConfigKey_CountryCode; static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; + static const Key kConfigKey_HourFormat; + static const Key kConfigKey_CalendarType; + + // CHIP Counter keys static const Key kCounterKey_RebootCount; static const Key kCounterKey_UpTime; static const Key kCounterKey_TotalOperationalHours; diff --git a/src/platform/Tizen/PosixConfig.cpp b/src/platform/Tizen/PosixConfig.cpp index 92d0009356d685..fa8fce00810827 100644 --- a/src/platform/Tizen/PosixConfig.cpp +++ b/src/platform/Tizen/PosixConfig.cpp @@ -68,6 +68,8 @@ const PosixConfig::Key PosixConfig::kConfigKey_RegulatoryLocation = { kConfigNam const PosixConfig::Key PosixConfig::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; const PosixConfig::Key PosixConfig::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; const PosixConfig::Key PosixConfig::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; +const PosixConfig::Key PosixConfig::kConfigKey_HourFormat = { kConfigNamespace_ChipConfig, "hour-format" }; +const PosixConfig::Key PosixConfig::kConfigKey_CalendarType = { kConfigNamespace_ChipConfig, "calendar-type" }; // Prefix used for NVS keys that contain Chip group encryption keys. const char PosixConfig::kGroupKeyNamePrefix[] = "gk-"; diff --git a/src/platform/Tizen/PosixConfig.h b/src/platform/Tizen/PosixConfig.h index e4beca4391b5b7..37cdbcb1aea540 100644 --- a/src/platform/Tizen/PosixConfig.h +++ b/src/platform/Tizen/PosixConfig.h @@ -74,6 +74,8 @@ class PosixConfig static const Key kConfigKey_CountryCode; static const Key kConfigKey_Breadcrumb; static const Key kConfigKey_ActiveLocale; + static const Key kConfigKey_HourFormat; + static const Key kConfigKey_CalendarType; static const char kGroupKeyNamePrefix[]; diff --git a/src/platform/Zephyr/ZephyrConfig.cpp b/src/platform/Zephyr/ZephyrConfig.cpp index 9f95a2fd9b0cc8..c151ccb23ac32a 100644 --- a/src/platform/Zephyr/ZephyrConfig.cpp +++ b/src/platform/Zephyr/ZephyrConfig.cpp @@ -72,6 +72,8 @@ const ZephyrConfig::Key ZephyrConfig::kConfigKey_RegulatoryLocation = CONFIG_KEY const ZephyrConfig::Key ZephyrConfig::kConfigKey_CountryCode = CONFIG_KEY(NAMESPACE_CONFIG "country-code"); const ZephyrConfig::Key ZephyrConfig::kConfigKey_ActiveLocale = CONFIG_KEY(NAMESPACE_CONFIG "active-locale"); const ZephyrConfig::Key ZephyrConfig::kConfigKey_Breadcrumb = CONFIG_KEY(NAMESPACE_CONFIG "breadcrumb"); +const ZephyrConfig::Key ZephyrConfig::kConfigKey_HourFormat = CONFIG_KEY(NAMESPACE_CONFIG "hour-format"); +const ZephyrConfig::Key ZephyrConfig::kConfigKey_CalendarType = CONFIG_KEY(NAMESPACE_CONFIG "calendar-type"); // Keys stored in the counters namespace const ZephyrConfig::Key ZephyrConfig::kCounterKey_RebootCount = CONFIG_KEY(NAMESPACE_COUNTERS "reboot-count"); @@ -86,7 +88,8 @@ constexpr const char * sAllResettableConfigKeys[] = { ZephyrConfig::kConfigKey_FabricSecret, ZephyrConfig::kConfigKey_GroupKeyIndex, ZephyrConfig::kConfigKey_LastUsedEpochKeyId, ZephyrConfig::kConfigKey_FailSafeArmed, ZephyrConfig::kConfigKey_RegulatoryLocation, ZephyrConfig::kConfigKey_CountryCode, - ZephyrConfig::kConfigKey_ActiveLocale, ZephyrConfig::kConfigKey_Breadcrumb + ZephyrConfig::kConfigKey_ActiveLocale, ZephyrConfig::kConfigKey_Breadcrumb, + ZephyrConfig::kConfigKey_HourFormat, ZephyrConfig::kConfigKey_CalendarType, }; // Data structure to be passed as a parameter of Zephyr's settings_load_subtree_direct() function diff --git a/src/platform/Zephyr/ZephyrConfig.h b/src/platform/Zephyr/ZephyrConfig.h index 288addd657a0a6..7afffaccbf95ad 100644 --- a/src/platform/Zephyr/ZephyrConfig.h +++ b/src/platform/Zephyr/ZephyrConfig.h @@ -64,6 +64,9 @@ class ZephyrConfig static const Key kConfigKey_CountryCode; static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; + static const Key kConfigKey_HourFormat; + static const Key kConfigKey_CalendarType; + static const Key kCounterKey_RebootCount; static const Key kCounterKey_BootReason; static const Key kCounterKey_TotalOperationalHours; diff --git a/src/platform/android/AndroidConfig.cpp b/src/platform/android/AndroidConfig.cpp index cf6f4d506a9f8b..1488c56f2715ae 100644 --- a/src/platform/android/AndroidConfig.cpp +++ b/src/platform/android/AndroidConfig.cpp @@ -93,6 +93,8 @@ const AndroidConfig::Key AndroidConfig::kConfigKey_RegulatoryLocation = { kConfi const AndroidConfig::Key AndroidConfig::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; const AndroidConfig::Key AndroidConfig::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; const AndroidConfig::Key AndroidConfig::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; +const AndroidConfig::Key AndroidConfig::kConfigKey_HourFormat = { kConfigNamespace_ChipConfig, "hour-format" }; +const AndroidConfig::Key AndroidConfig::kConfigKey_CalendarType = { kConfigNamespace_ChipConfig, "calendar-type" }; // Prefix used for NVS keys that contain Chip group encryption keys. const char AndroidConfig::kGroupKeyNamePrefix[] = "gk-"; diff --git a/src/platform/android/AndroidConfig.h b/src/platform/android/AndroidConfig.h index 82687bb47e3240..a9db855ef49979 100644 --- a/src/platform/android/AndroidConfig.h +++ b/src/platform/android/AndroidConfig.h @@ -76,6 +76,8 @@ class AndroidConfig static const Key kConfigKey_CountryCode; static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; + static const Key kConfigKey_HourFormat; + static const Key kConfigKey_CalendarType; static const Key kConfigKey_ProductId; static const Key kConfigKey_ProductName; static const Key kConfigKey_SoftwareVersion; diff --git a/src/platform/android/java/chip/platform/ConfigurationManager.java b/src/platform/android/java/chip/platform/ConfigurationManager.java index a3aed3df257ecf..cd79a0c8fd3bd0 100644 --- a/src/platform/android/java/chip/platform/ConfigurationManager.java +++ b/src/platform/android/java/chip/platform/ConfigurationManager.java @@ -61,6 +61,8 @@ public interface ConfigurationManager { String kConfigKey_CountryCode = "country-code"; String kConfigKey_ActiveLocale = "active-locale"; String kConfigKey_Breadcrumb = "breadcrumb"; + String kConfigKey_HourFormat = "hour-format"; + String kConfigKey_CalendarType = "calendar-type"; // Prefix used for NVS keys that contain Chip group encryption keys. String kGroupKeyNamePrefix = "gk-"; diff --git a/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp b/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp index e39d73babc381e..a12c30fd6308f7 100644 --- a/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp +++ b/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp @@ -89,12 +89,16 @@ const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_Breadcrumb = .itemID = 0x001c } }; const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_ActiveLocale = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, .itemID = 0x001d } }; +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_HourFormat = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, + .itemID = 0x001e } }; +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_CalendarType = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, + .itemID = 0x001f } }; /* Internal for the KVS interface. */ const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_KVS_key = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, - .itemID = 0x001e } }; + .itemID = 0x0020 } }; const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_KVS_value = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, - .itemID = 0x001f } }; + .itemID = 0x0021 } }; /* Static local variables */ static NVINTF_nvFuncts_t sNvoctpFps = { 0 }; diff --git a/src/platform/cc13x2_26x2/CC13X2_26X2Config.h b/src/platform/cc13x2_26x2/CC13X2_26X2Config.h index 034a067906fc43..854a7692eaf212 100644 --- a/src/platform/cc13x2_26x2/CC13X2_26X2Config.h +++ b/src/platform/cc13x2_26x2/CC13X2_26X2Config.h @@ -67,6 +67,8 @@ class CC13X2_26X2Config static const Key kConfigKey_CountryCode; static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; + static const Key kConfigKey_HourFormat; + static const Key kConfigKey_CalendarType; static const Key kConfigKey_KVS_key; // special key for KVS system, key storage static const Key kConfigKey_KVS_value; // special key for KVS system, value storage diff --git a/src/platform/fake/ConfigurationManagerImpl.h b/src/platform/fake/ConfigurationManagerImpl.h index 18afa5923604b4..43faeb31e199c0 100644 --- a/src/platform/fake/ConfigurationManagerImpl.h +++ b/src/platform/fake/ConfigurationManagerImpl.h @@ -97,6 +97,10 @@ class ConfigurationManagerImpl : public ConfigurationManager CHIP_ERROR GetLocalConfigDisabled(bool & disabled) override { return CHIP_ERROR_NOT_IMPLEMENTED; } CHIP_ERROR GetReachable(bool & reachable) override { return CHIP_ERROR_NOT_IMPLEMENTED; } CHIP_ERROR GetUniqueId(char * buf, size_t bufSize) override { return CHIP_ERROR_NOT_IMPLEMENTED; } + CHIP_ERROR GetHourFormat(uint8_t & format) override { return CHIP_ERROR_NOT_IMPLEMENTED; }; + CHIP_ERROR StoreHourFormat(uint8_t format) override { return CHIP_ERROR_NOT_IMPLEMENTED; }; + CHIP_ERROR GetCalendarType(uint8_t & type) override { return CHIP_ERROR_NOT_IMPLEMENTED; }; + CHIP_ERROR StoreCalendarType(uint8_t type) override { return CHIP_ERROR_NOT_IMPLEMENTED; }; #if !defined(NDEBUG) CHIP_ERROR RunUnitTests(void) override { return CHIP_ERROR_NOT_IMPLEMENTED; } #endif diff --git a/src/platform/mbed/MbedConfig.cpp b/src/platform/mbed/MbedConfig.cpp index 608d732ce61425..aab9e6916ca9ed 100644 --- a/src/platform/mbed/MbedConfig.cpp +++ b/src/platform/mbed/MbedConfig.cpp @@ -82,6 +82,8 @@ const MbedConfig::Key MbedConfig::kConfigKey_RegulatoryLocation = { CONFIG_KEY(" const MbedConfig::Key MbedConfig::kConfigKey_CountryCode = { CONFIG_KEY("country-code") }; const MbedConfig::Key MbedConfig::kConfigKey_ActiveLocale = { CONFIG_KEY("active-locale") }; const MbedConfig::Key MbedConfig::kConfigKey_Breadcrumb = { CONFIG_KEY("breadcrumb") }; +const MbedConfig::Key MbedConfig::kConfigKey_HourFormat = { CONFIG_KEY("hour-format") }; +const MbedConfig::Key MbedConfig::kConfigKey_CalendarType = { CONFIG_KEY("calendar-type") }; CHIP_ERROR MbedConfig::ReadConfigValue(Key key, bool & val) { diff --git a/src/platform/mbed/MbedConfig.h b/src/platform/mbed/MbedConfig.h index 21d33df304e140..09ce576d1760d0 100644 --- a/src/platform/mbed/MbedConfig.h +++ b/src/platform/mbed/MbedConfig.h @@ -73,6 +73,8 @@ class MbedConfig static const Key kConfigKey_CountryCode; static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; + static const Key kConfigKey_HourFormat; + static const Key kConfigKey_CalendarType; // Config value accessors. static CHIP_ERROR ReadConfigValue(Key key, bool & val); diff --git a/src/platform/nxp/k32w/k32w0/K32W0Config.h b/src/platform/nxp/k32w/k32w0/K32W0Config.h index b5cf3c6e23c0c4..da73746d4d463c 100644 --- a/src/platform/nxp/k32w/k32w0/K32W0Config.h +++ b/src/platform/nxp/k32w/k32w0/K32W0Config.h @@ -89,6 +89,8 @@ class K32WConfig static constexpr Key kConfigKey_CountryCode = K32WConfigKey(kPDMId_ChipConfig, 0x08); static constexpr Key kConfigKey_Breadcrumb = K32WConfigKey(kPDMId_ChipConfig, 0x09); static constexpr Key kConfigKey_ActiveLocale = K32WConfigKey(kPDMId_ChipConfig, 0x0A); + static constexpr Key kConfigKey_HourFormat = K32WConfigKey(kPDMId_ChipConfig, 0x0B); + static constexpr Key kConfigKey_CalendarType = K32WConfigKey(kPDMId_ChipConfig, 0x0C); // CHIP Counter Keys static constexpr Key kCounterKey_RebootCount = K32WConfigKey(kPDMId_ChipCounter, 0x00); diff --git a/src/platform/qpg/qpgConfig.h b/src/platform/qpg/qpgConfig.h index 426fb431203590..9c5130537de218 100644 --- a/src/platform/qpg/qpgConfig.h +++ b/src/platform/qpg/qpgConfig.h @@ -86,9 +86,11 @@ class QPGConfig static constexpr Key kConfigKey_CountryCode = QorvoConfigKey(kFileId_ChipConfig, 0x0A); static constexpr Key kConfigKey_Breadcrumb = QorvoConfigKey(kFileId_ChipConfig, 0x0B); static constexpr Key kConfigKey_ActiveLocale = QorvoConfigKey(kFileId_ChipConfig, 0x0C); + static constexpr Key kConfigKey_HourFormat = QorvoConfigKey(kFileId_ChipConfig, 0x0D); + static constexpr Key kConfigKey_CalendarType = QorvoConfigKey(kFileId_ChipConfig, 0x0E); - static constexpr Key kConfigKey_GroupKeyBase = QorvoConfigKey(kFileId_ChipConfig, 0x0D); - static constexpr Key kConfigKey_GroupKeyMax = QorvoConfigKey(kFileId_ChipConfig, 0x1C); // Allows 16 Group Keys to be created. + static constexpr Key kConfigKey_GroupKeyBase = QorvoConfigKey(kFileId_ChipConfig, 0x0F); + static constexpr Key kConfigKey_GroupKeyMax = QorvoConfigKey(kFileId_ChipConfig, 0x1E); // Allows 16 Group Keys to be created. static constexpr Key kConfigKey_CounterKeyBase = QorvoConfigKey(kFileId_ChipCounter, 0x00); static constexpr Key kConfigKey_CounterKeyMax = diff --git a/src/platform/tests/TestConfigurationMgr.cpp b/src/platform/tests/TestConfigurationMgr.cpp index 04d8998271627b..450e7a15f8bbcc 100644 --- a/src/platform/tests/TestConfigurationMgr.cpp +++ b/src/platform/tests/TestConfigurationMgr.cpp @@ -245,6 +245,34 @@ static void TestConfigurationMgr_ActiveLocale(nlTestSuite * inSuite, void * inCo NL_TEST_ASSERT(inSuite, strcmp(buf, activeLocale) == 0); } +static void TestConfigurationMgr_HourFormat(nlTestSuite * inSuite, void * inContext) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + uint8_t format = 0; + + err = ConfigurationMgr().StoreHourFormat(3); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + err = ConfigurationMgr().GetHourFormat(format); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + NL_TEST_ASSERT(inSuite, format == 3); +} + +static void TestConfigurationMgr_CalendarType(nlTestSuite * inSuite, void * inContext) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + uint8_t type = 0; + + err = ConfigurationMgr().StoreCalendarType(3); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + err = ConfigurationMgr().GetCalendarType(type); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + NL_TEST_ASSERT(inSuite, type == 3); +} + /** * Test Suite. It lists all the test functions. */ @@ -263,6 +291,8 @@ static const nlTest sTests[] = { NL_TEST_DEF("Test ConfigurationMgr::Breadcrumb", TestConfigurationMgr_Breadcrumb), NL_TEST_DEF("Test ConfigurationMgr::GetPrimaryMACAddress", TestConfigurationMgr_GetPrimaryMACAddress), NL_TEST_DEF("Test ConfigurationMgr::ActiveLocale", TestConfigurationMgr_ActiveLocale), + NL_TEST_DEF("Test ConfigurationMgr::HourFormat", TestConfigurationMgr_HourFormat), + NL_TEST_DEF("Test ConfigurationMgr::CalendarType", TestConfigurationMgr_CalendarType), NL_TEST_SENTINEL() }; From b7afede14fb60e1201e5e187e95c42068b93f9dc Mon Sep 17 00:00:00 2001 From: Artur Tynecki <77382963+ATmobica@users.noreply.github.com> Date: Tue, 11 Jan 2022 17:28:46 +0100 Subject: [PATCH 35/64] [Mbed] Mbed-os and mbed-tools update (#13416) * Update mbed-os and mbed-tools versions * Remove MBED_CONF_LWIP_NETBUF_RECVINFO_ENABLED config flag --- examples/all-clusters-app/mbed/mbed_app.json | 3 +-- examples/lighting-app/mbed/mbed_app.json | 3 +-- examples/lock-app/mbed/mbed_app.json | 3 +-- examples/shell/mbed/mbed_app.json | 3 +-- scripts/constraints.txt | 2 +- scripts/requirements.mbed.txt | 2 +- third_party/mbed-os/repo | 2 +- 7 files changed, 7 insertions(+), 11 deletions(-) diff --git a/examples/all-clusters-app/mbed/mbed_app.json b/examples/all-clusters-app/mbed/mbed_app.json index be14989fe20fb1..6271cbc091cf58 100644 --- a/examples/all-clusters-app/mbed/mbed_app.json +++ b/examples/all-clusters-app/mbed/mbed_app.json @@ -18,8 +18,7 @@ "MXCRYPTO_DISABLED", "NL_ASSERT_LOG=NL_ASSERT_LOG_DEFAULT", "NL_ASSERT_EXPECT_FLAGS=NL_ASSERT_FLAG_LOG", - "WHD_PRINT_DISABLE", - "MBED_CONF_LWIP_NETBUF_RECVINFO_ENABLED" + "WHD_PRINT_DISABLE" ] } }, diff --git a/examples/lighting-app/mbed/mbed_app.json b/examples/lighting-app/mbed/mbed_app.json index aaad97efcdf73f..ae32541fccad62 100644 --- a/examples/lighting-app/mbed/mbed_app.json +++ b/examples/lighting-app/mbed/mbed_app.json @@ -18,8 +18,7 @@ "MXCRYPTO_DISABLED", "NL_ASSERT_LOG=NL_ASSERT_LOG_DEFAULT", "NL_ASSERT_EXPECT_FLAGS=NL_ASSERT_FLAG_LOG", - "WHD_PRINT_DISABLE", - "MBED_CONF_LWIP_NETBUF_RECVINFO_ENABLED" + "WHD_PRINT_DISABLE" ], "target.components_add": ["capsense"], "lighting-state-led": "P9_6", diff --git a/examples/lock-app/mbed/mbed_app.json b/examples/lock-app/mbed/mbed_app.json index 45a384f057cf72..27ec18a15a4763 100644 --- a/examples/lock-app/mbed/mbed_app.json +++ b/examples/lock-app/mbed/mbed_app.json @@ -18,8 +18,7 @@ "MXCRYPTO_DISABLED", "NL_ASSERT_LOG=NL_ASSERT_LOG_DEFAULT", "NL_ASSERT_EXPECT_FLAGS=NL_ASSERT_FLAG_LOG", - "WHD_PRINT_DISABLE", - "MBED_CONF_LWIP_NETBUF_RECVINFO_ENABLED" + "WHD_PRINT_DISABLE" ], "target.components_add": ["capsense"], "lock-state-led": "P9_6", diff --git a/examples/shell/mbed/mbed_app.json b/examples/shell/mbed/mbed_app.json index c7281d23ee5fc2..1a6b662db9abcf 100644 --- a/examples/shell/mbed/mbed_app.json +++ b/examples/shell/mbed/mbed_app.json @@ -18,8 +18,7 @@ "MXCRYPTO_DISABLED", "NL_ASSERT_LOG=NL_ASSERT_LOG_DEFAULT", "NL_ASSERT_EXPECT_FLAGS=NL_ASSERT_FLAG_LOG", - "WHD_PRINT_DISABLE", - "MBED_CONF_LWIP_NETBUF_RECVINFO_ENABLED" + "WHD_PRINT_DISABLE" ] } }, diff --git a/scripts/constraints.txt b/scripts/constraints.txt index 76a29a9a33ac95..02deb3991b06a7 100644 --- a/scripts/constraints.txt +++ b/scripts/constraints.txt @@ -134,7 +134,7 @@ mbed-ls==1.8.11 ; platform_machine != "aarch64" and sys_platform == "linux" # via -r requirements.mbed.txt mbed-os-tools==1.8.11 # via mbed-ls -mbed-tools==7.22.0 ; platform_machine != "aarch64" and sys_platform == "linux" +mbed-tools==7.49.1 ; platform_machine != "aarch64" and sys_platform == "linux" # via -r requirements.mbed.txt mobly==1.10.1 # via -r requirements.txt diff --git a/scripts/requirements.mbed.txt b/scripts/requirements.mbed.txt index 47907c083849eb..557c64af524fed 100644 --- a/scripts/requirements.mbed.txt +++ b/scripts/requirements.mbed.txt @@ -1,3 +1,3 @@ -mbed-tools>=7.0.0 ; platform_machine != 'aarch64' and sys_platform == 'linux' +mbed-tools>=7.49.1 ; platform_machine != 'aarch64' and sys_platform == 'linux' pytest==6.2.5 ; platform_machine != 'aarch64' and sys_platform == 'linux' mbed-ls==1.8.11 ; platform_machine != 'aarch64' and sys_platform == 'linux' diff --git a/third_party/mbed-os/repo b/third_party/mbed-os/repo index 4cfbea43cabe86..149c5b12fa8a6c 160000 --- a/third_party/mbed-os/repo +++ b/third_party/mbed-os/repo @@ -1 +1 @@ -Subproject commit 4cfbea43cabe86bc3ed7a5287cd464be7a218938 +Subproject commit 149c5b12fa8a6c84d340361975cb992f08367b43 From 1cbec521ae00a50e9e604ad90986e74ce33c0287 Mon Sep 17 00:00:00 2001 From: Jean-Francois Penven <67962328+jepenven-silabs@users.noreply.github.com> Date: Tue, 11 Jan 2022 11:54:40 -0500 Subject: [PATCH 36/64] [Group] Implement UDPEndPoint for OpenThread (to enable multicast) (#13127) * Add OT UDPEnPointImpl to enable multicast listening --- examples/lighting-app/efr32/args.gni | 1 + .../efr32/project_include/OpenThreadConfig.h | 3 + src/app/server/Server.cpp | 11 +- src/inet/BUILD.gn | 40 ++- src/inet/UDPEndPoint.h | 9 + src/inet/UDPEndPointImpl_OpenThread.cpp | 265 ++++++++++++++++++ src/inet/UDPEndPointImpl_OpenThread.h | 71 +++++ ...ThreadStackManagerImpl_OpenThread_LwIP.cpp | 38 +++ src/system/BUILD.gn | 1 + src/system/SystemPacketBuffer.h | 15 + src/system/system.gni | 3 + src/transport/raw/UDP.cpp | 9 +- src/transport/raw/UDP.h | 18 ++ 13 files changed, 473 insertions(+), 11 deletions(-) create mode 100644 src/inet/UDPEndPointImpl_OpenThread.cpp create mode 100644 src/inet/UDPEndPointImpl_OpenThread.h diff --git a/examples/lighting-app/efr32/args.gni b/examples/lighting-app/efr32/args.gni index 1b73ad66dcea58..0f2b60d59f6054 100644 --- a/examples/lighting-app/efr32/args.gni +++ b/examples/lighting-app/efr32/args.gni @@ -22,3 +22,4 @@ pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" pw_assert_BACKEND = "$dir_pw_assert_log" chip_enable_openthread = true chip_openthread_ftd = true +chip_system_config_use_open_thread_udp = true diff --git a/examples/platform/efr32/project_include/OpenThreadConfig.h b/examples/platform/efr32/project_include/OpenThreadConfig.h index eea8f866a14f8a..1e8721c6d24401 100644 --- a/examples/platform/efr32/project_include/OpenThreadConfig.h +++ b/examples/platform/efr32/project_include/OpenThreadConfig.h @@ -61,6 +61,9 @@ #define OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE 0 #define OPENTHREAD_CONFIG_TCP_ENABLE 0 +// Support udp multicast by enabling Multicast Listener Registration (MLR) +#define OPENTHREAD_CONFIG_MLR_ENABLE 1 + // Use the SiLabs-supplied default platform configuration for remainder // of OpenThread config options. // diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index 1364d11ecd956c..a4a39cbc246a01 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -133,6 +133,9 @@ CHIP_ERROR Server::Init(AppDelegate * delegate, uint16_t secureServicePort, uint err = mTransports.Init(UdpListenParameters(DeviceLayer::UDPEndPointManager()) .SetAddressType(IPAddressType::kIPv6) .SetListenPort(mSecuredServicePort) +#if CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_UDP + .SetNativeParams(chip::DeviceLayer::ThreadStackMgrImpl().OTInstance()) +#endif // CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_UDP #if INET_CONFIG_ENABLE_IPV4 , @@ -151,10 +154,10 @@ CHIP_ERROR Server::Init(AppDelegate * delegate, uint16_t secureServicePort, uint #endif SuccessOrExit(err); - // Enable Group Listening - // TODO : Fix this once GroupDataProvider is implemented #Issue 11075 - // for (iterate through all GroupDataProvider multicast Address) - // { +// Enable Group Listening +// TODO : Fix this once GroupDataProvider is implemented #Issue 11075 +// for (iterate through all GroupDataProvider multicast Address) +// { #ifdef CHIP_ENABLE_GROUP_MESSAGING_TESTS err = mTransports.MulticastGroupJoinLeave(Transport::PeerAddress::Multicast(1, 1234), true); SuccessOrExit(err); diff --git a/src/inet/BUILD.gn b/src/inet/BUILD.gn index fc94850e7e7f8d..164c0076c5a546 100644 --- a/src/inet/BUILD.gn +++ b/src/inet/BUILD.gn @@ -24,6 +24,10 @@ import("${chip_root}/src/lwip/lwip.gni") import("${chip_root}/src/platform/device.gni") import("inet.gni") +if (chip_system_config_use_open_thread_udp) { + import("//build_overrides/openthread.gni") +} + declare_args() { # Extra header to include in SystemConfig.h for project. chip_inet_project_config_include = "" @@ -50,10 +54,14 @@ buildconfig_header("inet_buildconfig") { [ "INET_PLATFORM_CONFIG_INCLUDE=${chip_inet_platform_config_include}" ] } - defines += [ - "INET_TCP_END_POINT_IMPL_CONFIG_FILE=", - "INET_UDP_END_POINT_IMPL_CONFIG_FILE=", - ] + defines += [ "INET_TCP_END_POINT_IMPL_CONFIG_FILE=" ] + if (chip_system_config_use_open_thread_udp) { + defines += [ + "INET_UDP_END_POINT_IMPL_CONFIG_FILE=", + ] + } else { + defines += [ "INET_UDP_END_POINT_IMPL_CONFIG_FILE=" ] + } } source_set("inet_config_header") { @@ -105,6 +113,16 @@ static_library("inet") { public_deps += [ "${chip_root}/src/lwip" ] } + if (chip_system_config_use_open_thread_udp) { + if (chip_openthread_ftd) { + public_deps += + [ "${chip_root}/third_party/openthread/repo:libopenthread-ftd" ] + } else { + public_deps += + [ "${chip_root}/third_party/openthread/repo:libopenthread-mtd" ] + } + } + if (chip_inet_config_enable_tcp_endpoint) { sources += [ "TCPEndPoint.cpp", @@ -119,10 +137,20 @@ static_library("inet") { sources += [ "UDPEndPoint.cpp", "UDPEndPoint.h", - "UDPEndPointImpl${chip_system_config_inet}.cpp", - "UDPEndPointImpl${chip_system_config_inet}.h", "UDPEndPointImpl.h", ] + + if (chip_system_config_use_open_thread_udp) { + sources += [ + "UDPEndPointImpl_OpenThread.cpp", + "UDPEndPointImpl_OpenThread.h", + ] + } else { + sources += [ + "UDPEndPointImpl${chip_system_config_inet}.cpp", + "UDPEndPointImpl${chip_system_config_inet}.h", + ] + } } if (chip_with_nlfaultinjection) { diff --git a/src/inet/UDPEndPoint.h b/src/inet/UDPEndPoint.h index 005dccf26eb8b5..9cea83fb3cbc88 100644 --- a/src/inet/UDPEndPoint.h +++ b/src/inet/UDPEndPoint.h @@ -37,6 +37,8 @@ #include #include +struct otInstance; + namespace chip { namespace Inet { @@ -245,6 +247,13 @@ class DLL_EXPORT UDPEndPoint : public EndPointBasis */ virtual void Free() = 0; + /** + * Set Network Native Parameters (optional) + * + * Some networking stack requires additionnal parameters + */ + virtual inline void SetNativeParams(void * params) { (void) params; } + protected: UDPEndPoint(EndPointManager & endPointManager) : EndPointBasis(endPointManager), mState(State::kReady), OnMessageReceived(nullptr), OnReceiveError(nullptr) diff --git a/src/inet/UDPEndPointImpl_OpenThread.cpp b/src/inet/UDPEndPointImpl_OpenThread.cpp new file mode 100644 index 00000000000000..7822c33f83aad2 --- /dev/null +++ b/src/inet/UDPEndPointImpl_OpenThread.cpp @@ -0,0 +1,265 @@ +/* + * + * Copyright (c) 2020-2021 Project CHIP Authors + * Copyright (c) 2018 Google LLC. + * Copyright (c) 2013-2018 Nest Labs, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#include +#include +#include + +#include + +#include + +namespace chip { +namespace Inet { + +void UDPEndPointImplOT::handleUdpReceive(void * aContext, otMessage * aMessage, const otMessageInfo * aMessageInfo) +{ + UDPEndPointImplOT * ep = static_cast(aContext); + IPPacketInfo pktInfo; + uint16_t msgLen = otMessageGetLength(aMessage); + System::PacketBufferHandle payload; +#if CHIP_DETAIL_LOGGING + static uint16_t msgReceivedCount = 0; + char sourceStr[Inet::IPAddress::kMaxStringLength]; + char destStr[Inet::IPAddress::kMaxStringLength]; +#endif + + if (msgLen > System::PacketBuffer::kMaxSizeWithoutReserve) + { + ChipLogError(Inet, "UDP message too long, discarding. Size received %d", msgLen); + return; + } + + pktInfo.SrcAddress = chip::DeviceLayer::Internal::ToIPAddress(aMessageInfo->mPeerAddr); + pktInfo.DestAddress = chip::DeviceLayer::Internal::ToIPAddress(aMessageInfo->mSockAddr); + pktInfo.SrcPort = aMessageInfo->mPeerPort; + pktInfo.DestPort = aMessageInfo->mSockPort; + + payload = System::PacketBufferHandle::New(msgLen, 0); + + if (payload.IsNull()) + { + ChipLogError(Inet, "Failed to allocate a System buffer of size %d for UDP Message reception.", msgLen); + return; + } + +#if CHIP_DETAIL_LOGGING + pktInfo.SrcAddress.ToString(sourceStr, Inet::IPAddress::kMaxStringLength); + pktInfo.DestAddress.ToString(destStr, Inet::IPAddress::kMaxStringLength); + + ChipLogDetail(Inet, + "UDP Message Received packet nb : %d with the following data :\r\nSrcAddr : %s\r\nSrc Port : %d\r\n\r\nDestAddr " + ": %s\r\nDest Port %d\r\nPayload Length %d", + ++msgReceivedCount, sourceStr, pktInfo.SrcPort, destStr, pktInfo.DestPort, msgLen); + +#endif + + memcpy(payload->Start(), &pktInfo, sizeof(IPPacketInfo)); + + if (otMessageRead(aMessage, 0, payload->Start() + sizeof(IPPacketInfo), msgLen) != msgLen) + { + ChipLogError(Inet, "Failed to copy OpenThread buffer into System Packet buffer"); + return; + } + payload->SetDataLength(msgLen + sizeof(IPPacketInfo)); + + ep->Retain(); + CHIP_ERROR err = ep->GetSystemLayer().ScheduleLambda([ep, p = System::LwIPPacketBufferView::UnsafeGetLwIPpbuf(payload)] { + ep->HandleDataReceived(System::PacketBufferHandle::Adopt(p)); + ep->Release(); + }); + if (err == CHIP_NO_ERROR) + { + // If ScheduleLambda() succeeded, it has ownership of the buffer, so we need to release it (without freeing it). + static_cast(std::move(payload).UnsafeRelease()); + } + else + { + ep->Release(); + } +} + +CHIP_ERROR UDPEndPointImplOT::IPv6Bind(otUdpSocket & socket, const IPAddress & address, uint16_t port, InterfaceId interface) +{ + (void) interface; + otError err = OT_ERROR_NONE; + otSockAddr listenSockAddr; + + memset(&socket, 0, sizeof(socket)); + memset(&listenSockAddr, 0, sizeof(listenSockAddr)); + + listenSockAddr.mPort = port; + listenSockAddr.mAddress = chip::DeviceLayer::Internal::ToOpenThreadIP6Address(address); + + otUdpOpen(mOTInstance, &socket, handleUdpReceive, this); + otUdpBind(mOTInstance, &socket, &listenSockAddr, OT_NETIF_THREAD); + + return chip::DeviceLayer::Internal::MapOpenThreadError(err); +} + +CHIP_ERROR UDPEndPointImplOT::BindImpl(IPAddressType addressType, const IPAddress & addr, uint16_t port, InterfaceId interface) +{ + + if (addressType != IPAddressType::kIPv6) + { + return INET_ERROR_WRONG_ADDRESS_TYPE; + } + + ReturnErrorOnFailure(IPv6Bind(mSocket, addr, port, interface)); + mBoundPort = port; + mBoundIntfId = interface; + + return CHIP_NO_ERROR; +} + +InterfaceId UDPEndPointImplOT::GetBoundInterface() const +{ + return mBoundIntfId; +} + +uint16_t UDPEndPointImplOT::GetBoundPort() const +{ + return mBoundPort; +} + +CHIP_ERROR UDPEndPointImplOT::ListenImpl() +{ + // Nothing to do. Callback was set upon Binding call. + return CHIP_NO_ERROR; +} + +void UDPEndPointImplOT::HandleDataReceived(System::PacketBufferHandle && msg) +{ + if ((mState == State::kListening) && (OnMessageReceived != nullptr)) + { + const IPPacketInfo * pktInfo = GetPacketInfo(msg); + + if (pktInfo != nullptr) + { + const IPPacketInfo pktInfoCopy = *pktInfo; // copy the address info so that the app can free the + // PacketBuffer without affecting access to address info. + + msg->ConsumeHead(sizeof(IPPacketInfo)); + OnMessageReceived(this, std::move(msg), &pktInfoCopy); + } + else + { + if (OnReceiveError != nullptr) + { + OnReceiveError(this, CHIP_ERROR_INBOUND_MESSAGE_TOO_BIG, nullptr); + } + } + } +} + +CHIP_ERROR UDPEndPointImplOT::SetMulticastLoopback(IPVersion aIPVersion, bool aLoopback) +{ + (void) aIPVersion; + (void) aLoopback; + // TODO + return CHIP_ERROR_NOT_IMPLEMENTED; +} + +CHIP_ERROR UDPEndPointImplOT::BindInterfaceImpl(IPAddressType addressType, InterfaceId interfaceId) +{ + (void) addressType; + (void) interfaceId; + return CHIP_NO_ERROR; +} + +CHIP_ERROR UDPEndPointImplOT::SendMsgImpl(const IPPacketInfo * aPktInfo, System::PacketBufferHandle && msg) +{ + otError error = OT_ERROR_NONE; + otMessage * message; + otMessageInfo messageInfo; + + // For now the entire message must fit within a single buffer. + VerifyOrReturnError(!msg->HasChainedBuffer(), CHIP_ERROR_MESSAGE_TOO_LONG); + + memset(&messageInfo, 0, sizeof(messageInfo)); + + messageInfo.mSockAddr = chip::DeviceLayer::Internal::ToOpenThreadIP6Address(aPktInfo->SrcAddress); + messageInfo.mPeerAddr = chip::DeviceLayer::Internal::ToOpenThreadIP6Address(aPktInfo->DestAddress); + messageInfo.mPeerPort = aPktInfo->DestPort; + + message = otUdpNewMessage(mOTInstance, NULL); + VerifyOrExit(message != NULL, error = OT_ERROR_NO_BUFS); + + error = otMessageAppend(message, msg->Start(), msg->DataLength()); + + if (error == OT_ERROR_NONE) + { + error = otUdpSend(mOTInstance, &mSocket, message, &messageInfo); + } + +exit: + if (error != OT_ERROR_NONE && message != NULL) + { + otMessageFree(message); + } + + return chip::DeviceLayer::Internal::MapOpenThreadError(error); +} + +void UDPEndPointImplOT::CloseImpl() +{ + if (otUdpIsOpen(mOTInstance, &mSocket)) + { + otUdpClose(mOTInstance, &mSocket); + } +} + +void UDPEndPointImplOT::Free() +{ + Close(); + Release(); +} + +CHIP_ERROR UDPEndPointImplOT::IPv6JoinLeaveMulticastGroupImpl(InterfaceId aInterfaceId, const IPAddress & aAddress, bool join) +{ + const otIp6Address otAddress = chip::DeviceLayer::Internal::ToOpenThreadIP6Address(aAddress); + + if (join) + { + return chip::DeviceLayer::Internal::MapOpenThreadError(otIp6SubscribeMulticastAddress(mOTInstance, &otAddress)); + } + else + { + return chip::DeviceLayer::Internal::MapOpenThreadError(otIp6UnsubscribeMulticastAddress(mOTInstance, &otAddress)); + } +} + +IPPacketInfo * UDPEndPointImplOT::GetPacketInfo(const System::PacketBufferHandle & aBuffer) +{ + if (!aBuffer->EnsureReservedSize(sizeof(IPPacketInfo))) + { + return nullptr; + } + + uintptr_t lStart = (uintptr_t) aBuffer->Start(); + uintptr_t lPacketInfoStart = lStart - sizeof(IPPacketInfo); + + // Align to a 4-byte boundary + return reinterpret_cast(lPacketInfoStart & ~(sizeof(uint32_t) - 1)); +} + +} // namespace Inet +} // namespace chip diff --git a/src/inet/UDPEndPointImpl_OpenThread.h b/src/inet/UDPEndPointImpl_OpenThread.h new file mode 100644 index 00000000000000..e6299c40c95ea8 --- /dev/null +++ b/src/inet/UDPEndPointImpl_OpenThread.h @@ -0,0 +1,71 @@ +/* + * + * Copyright (c) 2020-2021 Project CHIP Authors + * Copyright (c) 2018 Google LLC + * Copyright (c) 2013-2017 Nest Labs, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +#include +#include +#include +#include +#include +#include + +namespace chip { +namespace Inet { + +class UDPEndPointImplOT : public UDPEndPoint +{ +public: + UDPEndPointImplOT(EndPointManager & endPointManager) : + UDPEndPoint(endPointManager), mBoundIntfId(InterfaceId::Null()) + {} + + // UDPEndPoint overrides. + InterfaceId GetBoundInterface() const override; + uint16_t GetBoundPort() const override; + void Free() override; + void HandleDataReceived(System::PacketBufferHandle && msg); + inline void SetNativeParams(void * params) { mOTInstance = static_cast(params); } + CHIP_ERROR SetMulticastLoopback(IPVersion aIPVersion, bool aLoopback) override; + CHIP_ERROR BindInterfaceImpl(IPAddressType addressType, InterfaceId interfaceId) override; + +private: + // UDPEndPoint overrides. + CHIP_ERROR IPv6JoinLeaveMulticastGroupImpl(InterfaceId aInterfaceId, const IPAddress & aAddress, bool join) override; + CHIP_ERROR BindImpl(IPAddressType addressType, const IPAddress & address, uint16_t port, InterfaceId interfaceId) override; + CHIP_ERROR ListenImpl() override; + CHIP_ERROR SendMsgImpl(const IPPacketInfo * pktInfo, chip::System::PacketBufferHandle && msg) override; + void CloseImpl() override; + CHIP_ERROR IPv6Bind(otUdpSocket & socket, const IPAddress & address, uint16_t port, InterfaceId interface); + static IPPacketInfo * GetPacketInfo(const System::PacketBufferHandle & aBuffer); + + static void handleUdpReceive(void * aContext, otMessage * aMessage, const otMessageInfo * aMessageInfo); + + InterfaceId mBoundIntfId; + uint16_t mBoundPort; + otUdpSocket mSocket; + otInstance * mOTInstance = nullptr; +}; + +using UDPEndPointImpl = UDPEndPointImplOT; + +} // namespace Inet +} // namespace chip diff --git a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.cpp b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.cpp index 957dc20a05ab24..171751d58947e7 100644 --- a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.cpp +++ b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.cpp @@ -34,8 +34,13 @@ #include #include +#include + #include +#include +#include + namespace chip { namespace DeviceLayer { namespace Internal { @@ -225,6 +230,39 @@ void GenericThreadStackManagerImpl_OpenThread_LwIP::UpdateThreadInter addrAssigned[addrIdx] = true; } } + +// Multicast won't work with LWIP on top of OT +// Duplication of listeners, unecessary timers, buffer duplication, hardfault etc... +#if CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_UDP + // Refresh Multicast listening + if (GenericThreadStackManagerImpl_OpenThread::IsThreadAttachedNoLock()) + { + ChipLogDetail(DeviceLayer, "Thread Attached updating Multicast address"); + + Credentials::GroupDataProvider * provider = Credentials::GetGroupDataProvider(); + TransportMgrBase * transportMgr = &(chip::Server::GetInstance().GetTransportManager()); + Credentials::GroupDataProvider::GroupInfo group; + CHIP_ERROR err = CHIP_NO_ERROR; + for (const FabricInfo & fabricInfo : Server::GetInstance().GetFabricTable()) + { + auto it = provider->IterateGroupInfo(fabricInfo.GetFabricIndex()); + if (it) + { + while (it->Next(group)) + { + err = transportMgr->MulticastGroupJoinLeave( + Transport::PeerAddress::Multicast(fabricInfo.GetFabricIndex(), group.group_id), true); + if (err != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "Failed to Join Multicast Group: %s", err.AsString()); + break; + } + } + it->Release(); + } + } + } +#endif // CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_UDP } ChipLogDetail(DeviceLayer, "LwIP Thread interface addresses %s", isInterfaceUp ? "updated" : "cleared"); diff --git a/src/system/BUILD.gn b/src/system/BUILD.gn index 874bc3cdc0171d..8a60c03dbb9b56 100644 --- a/src/system/BUILD.gn +++ b/src/system/BUILD.gn @@ -59,6 +59,7 @@ buildconfig_header("system_buildconfig") { "CHIP_WITH_NLFAULTINJECTION=${chip_with_nlfaultinjection}", "CHIP_SYSTEM_CONFIG_USE_DISPATCH=${chip_system_config_use_dispatch}", "CHIP_SYSTEM_CONFIG_USE_LWIP=${chip_system_config_use_lwip}", + "CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_UDP=${chip_system_config_use_open_thread_udp}", "CHIP_SYSTEM_CONFIG_USE_SOCKETS=${chip_system_config_use_sockets}", "CHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK=false", "CHIP_SYSTEM_CONFIG_POSIX_LOCKING=${chip_system_config_posix_locking}", diff --git a/src/system/SystemPacketBuffer.h b/src/system/SystemPacketBuffer.h index 031a397c422bba..4f877afb0bf048 100644 --- a/src/system/SystemPacketBuffer.h +++ b/src/system/SystemPacketBuffer.h @@ -847,6 +847,15 @@ namespace Inet { class UDPEndPointImplLwIP; } // namespace Inet +#if CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_UDP +// TODO : Temp Implementation issue : 13085 +// Still use LwIP buffer even if using OpenThread UDP implementation +// since decoupling of LwIP from OpenThread is still in progress +namespace Inet { +class UDPEndPointImplOT; +} // namespace Inet +#endif + namespace System { /** @@ -864,6 +873,12 @@ class LwIPPacketBufferView : public PacketBufferHandle */ static struct pbuf * UnsafeGetLwIPpbuf(const PacketBufferHandle & handle) { return PacketBufferHandle::GetLwIPpbuf(handle); } friend class Inet::UDPEndPointImplLwIP; +#if CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_UDP + // TODO : Temp Implementation issue : 13085 + // Still use LwIP buffer even if using OpenThread UDP implementation + // since decoupling of LwIP from OpenThread is still in progress + friend class Inet::UDPEndPointImplOT; +#endif }; } // namespace System diff --git a/src/system/system.gni b/src/system/system.gni index 12e371a7c29d1b..71fb601192f99d 100644 --- a/src/system/system.gni +++ b/src/system/system.gni @@ -31,6 +31,9 @@ declare_args() { # Enable metrics collection. chip_system_config_provide_statistics = true + + # Use OpenThread UDP stack directly + chip_system_config_use_open_thread_udp = false } declare_args() { diff --git a/src/transport/raw/UDP.cpp b/src/transport/raw/UDP.cpp index d1d996fa6a2043..c27190ad7b1e6f 100644 --- a/src/transport/raw/UDP.cpp +++ b/src/transport/raw/UDP.cpp @@ -49,12 +49,14 @@ CHIP_ERROR UDP::Init(UdpListenParameters & params) err = params.GetEndPointManager()->NewEndPoint(&mUDPEndPoint); SuccessOrExit(err); + mUDPEndPoint->SetNativeParams(params.GetNativeParams()); + ChipLogDetail(Inet, "UDP::Init bind&listen port=%d", params.GetListenPort()); err = mUDPEndPoint->Bind(params.GetAddressType(), Inet::IPAddress::Any, params.GetListenPort(), params.GetInterfaceId()); SuccessOrExit(err); - err = mUDPEndPoint->Listen(OnUdpReceive, nullptr /*onReceiveError*/, this); + err = mUDPEndPoint->Listen(OnUdpReceive, OnUdpError, this); SuccessOrExit(err); mUDPEndpointType = params.GetAddressType(); @@ -125,6 +127,11 @@ void UDP::OnUdpReceive(Inet::UDPEndPoint * endPoint, System::PacketBufferHandle } } +void UDP::OnUdpError(Inet::UDPEndPoint * endPoint, CHIP_ERROR err, const Inet::IPPacketInfo * pktInfo) +{ + ChipLogError(Inet, "Failed to receive UDP message: %s", ErrorStr(err)); +} + CHIP_ERROR UDP::MulticastGroupJoinLeave(const Transport::PeerAddress & address, bool join) { char addressStr[Transport::PeerAddress::kMaxToStringSize]; diff --git a/src/transport/raw/UDP.h b/src/transport/raw/UDP.h index fcdc624eb06d81..25fb5f3ed71839 100644 --- a/src/transport/raw/UDP.h +++ b/src/transport/raw/UDP.h @@ -34,6 +34,10 @@ #include #include +#if CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_UDP +struct otInstance; +#endif // CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_UDP + namespace chip { namespace Transport { @@ -71,11 +75,23 @@ class UdpListenParameters return *this; } + /** + * Networking Stack Native parameter (optional) + */ + void * GetNativeParams() const { return mNativeParams; } + UdpListenParameters & SetNativeParams(void * params) + { + mNativeParams = params; + + return *this; + } + private: Inet::EndPointManager * mEndPointManager; ///< Associated endpoint factory Inet::IPAddressType mAddressType = Inet::IPAddressType::kIPv6; ///< type of listening socket uint16_t mListenPort = CHIP_PORT; ///< UDP listen port Inet::InterfaceId mInterfaceId = Inet::InterfaceId::Null(); ///< Interface to listen on + void * mNativeParams = nullptr; }; /** Implements a transport using UDP. */ @@ -133,6 +149,8 @@ class DLL_EXPORT UDP : public Base static void OnUdpReceive(Inet::UDPEndPoint * endPoint, System::PacketBufferHandle && buffer, const Inet::IPPacketInfo * pktInfo); + static void OnUdpError(Inet::UDPEndPoint * endPoint, CHIP_ERROR err, const Inet::IPPacketInfo * pktInfo); + Inet::UDPEndPoint * mUDPEndPoint = nullptr; ///< UDP socket used by the transport Inet::IPAddressType mUDPEndpointType = Inet::IPAddressType::kUnknown; ///< Socket listening type State mState = State::kNotReady; ///< State of the UDP transport From 5b5d6c10ac5b1e8c6068db57b49fde591a87f897 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Tue, 11 Jan 2022 09:30:52 -0800 Subject: [PATCH 37/64] Fix wrong configuration namespace for cc13x2 (#13456) --- .../cc13x2_26x2/CC13X2_26X2Config.cpp | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp b/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp index a12c30fd6308f7..b379581b9252a8 100644 --- a/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp +++ b/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp @@ -43,51 +43,51 @@ namespace Internal { /* itemID and subID are limited to 10 bits, even though their types are uint16_t */ // Keys stored in the Chip-factory namespace -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_SerialNum = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_SerialNum = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, .itemID = 0x0001 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_MfrDeviceId = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_MfrDeviceId = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, .itemID = 0x0002 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_MfrDeviceCert = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_MfrDeviceCert = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, .itemID = 0x0003 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_MfrDeviceICACerts = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_MfrDeviceICACerts = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, .itemID = 0x0004 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_MfrDevicePrivateKey = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_MfrDevicePrivateKey = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, .itemID = 0x0005 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_HardwareVersion = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_HardwareVersion = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, .itemID = 0x0006 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_ManufacturingDate = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_ManufacturingDate = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, .itemID = 0x0007 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_SetupPinCode = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_SetupPinCode = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, .itemID = 0x0008 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_SetupDiscriminator = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_SetupDiscriminator = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, .itemID = 0x0009 } }; // Keys stored in the Chip-config namespace -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_FabricId = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_FabricId = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, .itemID = 0x0011 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_ServiceConfig = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_ServiceConfig = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, .itemID = 0x0012 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_PairedAccountId = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_PairedAccountId = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, .itemID = 0x0013 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_ServiceId = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_ServiceId = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, .itemID = 0x0014 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_FabricSecret = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_FabricSecret = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, .itemID = 0x0015 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_GroupKeyIndex = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_GroupKeyIndex = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, .itemID = 0x0016 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_LastUsedEpochKeyId = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_LastUsedEpochKeyId = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, .itemID = 0x0017 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_FailSafeArmed = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_FailSafeArmed = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, .itemID = 0x0018 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_WiFiStationSecType = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_WiFiStationSecType = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, .itemID = 0x0019 } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_RegulatoryLocation = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_RegulatoryLocation = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, .itemID = 0x001a } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_CountryCode = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_CountryCode = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, .itemID = 0x001b } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_Breadcrumb = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_Breadcrumb = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, .itemID = 0x001c } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_ActiveLocale = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, +const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_ActiveLocale = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, .itemID = 0x001d } }; const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_HourFormat = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, .itemID = 0x001e } }; From a40c300437b5b3e8cc3d4c7879181154c4f308d0 Mon Sep 17 00:00:00 2001 From: Kevin Coppock <47542933+g-coppock@users.noreply.github.com> Date: Tue, 11 Jan 2022 12:28:38 -0600 Subject: [PATCH 38/64] Add additional commissioning bindings to support BLE/IP auto-commissioning (#13427) 1. Fixes a bug in ApplyNetworkCredentials, where the Wi-Fi objects were being referenced instead of the Thread objects. Additionally, added an exit block and ensured this method passes successfully before continuing on to Commission(). 2. Added a binding for establishPaseSession to support IP commissioning. 3. Added a binding for Commission, which is in addition to the existing PairDevice binding. This is needed when PASE establishment happens separately from commissioning initiation. --- .../java/AndroidDeviceControllerWrapper.cpp | 4 +- .../java/CHIPDeviceController-JNI.cpp | 52 +++++++++++++++++++ .../ChipDeviceController.java | 48 +++++++++++++++++ 3 files changed, 102 insertions(+), 2 deletions(-) diff --git a/src/controller/java/AndroidDeviceControllerWrapper.cpp b/src/controller/java/AndroidDeviceControllerWrapper.cpp index 6478bc2a0bece8..abc783119beced 100644 --- a/src/controller/java/AndroidDeviceControllerWrapper.cpp +++ b/src/controller/java/AndroidDeviceControllerWrapper.cpp @@ -330,12 +330,12 @@ CHIP_ERROR AndroidDeviceControllerWrapper::ApplyNetworkCredentials(chip::Control else if (threadCredentialsJava != nullptr) { jmethodID getOperationalDataset; - err = chip::JniReferences::GetInstance().FindMethod(env, wifiCredentialsJava, "getOperationalDataset", "()[B", + err = chip::JniReferences::GetInstance().FindMethod(env, threadCredentialsJava, "getOperationalDataset", "()[B", &getOperationalDataset); VerifyOrReturnError(err == CHIP_NO_ERROR, err); operationalDatasetBytes = static_cast(env->NewGlobalRef(env->CallObjectMethod(threadCredentialsJava, getOperationalDataset))); - VerifyOrReturnError(ssidStr != nullptr && !env->ExceptionCheck(), CHIP_JNI_ERROR_EXCEPTION_THROWN); + VerifyOrReturnError(operationalDatasetBytes != nullptr && !env->ExceptionCheck(), CHIP_JNI_ERROR_EXCEPTION_THROWN); operationalDataset = env->GetByteArrayElements(operationalDatasetBytes, nullptr); jsize length = env->GetArrayLength(operationalDatasetBytes); diff --git a/src/controller/java/CHIPDeviceController-JNI.cpp b/src/controller/java/CHIPDeviceController-JNI.cpp index cbb592bdde4d6e..f80a21896e327d 100644 --- a/src/controller/java/CHIPDeviceController-JNI.cpp +++ b/src/controller/java/CHIPDeviceController-JNI.cpp @@ -177,6 +177,33 @@ JNI_METHOD(jlong, newDeviceController)(JNIEnv * env, jobject self) return result; } +JNI_METHOD(void, commissionDevice) +(JNIEnv * env, jobject self, jlong handle, jlong deviceId, jbyteArray csrNonce, jobject networkCredentials) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + AndroidDeviceControllerWrapper * wrapper = AndroidDeviceControllerWrapper::FromJNIHandle(handle); + + ChipLogProgress(Controller, "commissionDevice() called"); + + CommissioningParameters commissioningParams = CommissioningParameters(); + err = wrapper->ApplyNetworkCredentials(commissioningParams, networkCredentials); + VerifyOrExit(err == CHIP_NO_ERROR, err = CHIP_ERROR_INVALID_ARGUMENT); + + if (csrNonce != nullptr) + { + JniByteArray jniCsrNonce(env, csrNonce); + commissioningParams.SetCSRNonce(jniCsrNonce.byteSpan()); + } + err = wrapper->Controller()->Commission(deviceId, commissioningParams); +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(Controller, "Failed to commission the device."); + JniReferences::GetInstance().ThrowError(env, sChipDeviceControllerExceptionCls, err); + } +} + JNI_METHOD(void, pairDevice) (JNIEnv * env, jobject self, jlong handle, jlong deviceId, jint connObj, jlong pinCode, jbyteArray csrNonce, jobject networkCredentials) @@ -268,6 +295,31 @@ JNI_METHOD(void, establishPaseConnection)(JNIEnv * env, jobject self, jlong hand } } +JNI_METHOD(void, establishPaseConnectionByAddress) +(JNIEnv * env, jobject self, jlong handle, jlong deviceId, jstring address, jint port, jlong pinCode) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + AndroidDeviceControllerWrapper * wrapper = AndroidDeviceControllerWrapper::FromJNIHandle(handle); + + Inet::IPAddress addr; + JniUtfString addrJniString(env, address); + VerifyOrReturn(Inet::IPAddress::FromString(addrJniString.c_str(), addr), + ChipLogError(Controller, "Failed to parse IP address."), + JniReferences::GetInstance().ThrowError(env, sChipDeviceControllerExceptionCls, CHIP_ERROR_INVALID_ARGUMENT)); + + RendezvousParameters rendezvousParams = + RendezvousParameters().SetSetupPINCode(pinCode).SetPeerAddress(Transport::PeerAddress::UDP(addr, port)); + + err = wrapper->Controller()->EstablishPASEConnection(deviceId, rendezvousParams); + + if (err != CHIP_NO_ERROR) + { + ChipLogError(Controller, "Failed to establish PASE connection."); + JniReferences::GetInstance().ThrowError(env, sChipDeviceControllerExceptionCls, err); + } +} + JNI_METHOD(void, unpairDevice)(JNIEnv * env, jobject self, jlong handle, jlong deviceId) { chip::DeviceLayer::StackLock lock; diff --git a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java index 82cb82fd31126f..477e47058bf5ac 100644 --- a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java +++ b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java @@ -120,6 +120,45 @@ public void establishPaseConnection(long deviceId, int connId, long setupPincode } } + /** + * Establish a secure PASE connection to the given device via IP address. + * + * @param deviceId the ID of the node to connect to + * @param address the IP address at which the node is located + * @param port the port at which the node is located + * @param setupPincode the pincode for this node + */ + public void establishPaseConnection(long deviceId, String address, int port, long setupPincode) { + Log.d(TAG, "Establishing PASE connection with ID: " + deviceId); + establishPaseConnectionByAddress(deviceControllerPtr, deviceId, address, port, setupPincode); + } + + /** + * Initiates the automatic commissioning flow using the specified network credentials. It is + * expected that a secure session has already been established via {@link + * #establishPaseConnection(long, int, long)}. + * + * @param deviceId the ID of the node to be commissioned + * @param networkCredentials the credentials (Wi-Fi or Thread) to be provisioned + */ + public void commissionDevice(long deviceId, NetworkCredentials networkCredentials) { + commissionDevice(deviceControllerPtr, deviceId, /* csrNonce= */ null, networkCredentials); + } + + /** + * Initiates the automatic commissioning flow using the specified network credentials. It is + * expected that a secure session has already been established via {@link + * #establishPaseConnection(long, int, long)}. + * + * @param deviceId the ID of the node to be commissioned + * @param csrNonce a nonce to be used for the CSR request + * @param networkCredentials the credentials (Wi-Fi or Thread) to be provisioned + */ + public void commissionDevice( + long deviceId, @Nullable byte[] csrNonce, NetworkCredentials networkCredentials) { + commissionDevice(deviceControllerPtr, deviceId, csrNonce, networkCredentials); + } + public void unpairDevice(long deviceId) { unpairDevice(deviceControllerPtr, deviceId); } @@ -285,6 +324,15 @@ private native void pairDeviceWithAddress( private native void establishPaseConnection( long deviceControllerPtr, long deviceId, int connId, long setupPincode); + private native void establishPaseConnectionByAddress( + long deviceControllerPtr, long deviceId, String address, int port, long setupPincode); + + private native void commissionDevice( + long deviceControllerPtr, + long deviceId, + @Nullable byte[] csrNonce, + NetworkCredentials networkCredentials); + private native void unpairDevice(long deviceControllerPtr, long deviceId); private native long getDeviceBeingCommissionedPointer(long deviceControllerPtr, long nodeId); From 68df85c67b3ef033609d9fbe2450da220edcb1ac Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 11 Jan 2022 13:36:07 -0500 Subject: [PATCH 39/64] Fix unsafe use of strncpy in OpenThread dns-sd code. (#13392) For the three uses where we are copying data of some computed size into a buffer, add checks that the size is not too big for the buffer (and in particular that we will be able to null-terminate after copying). For the one use where we are copying the entire buffer between two identical-sized buffers: 1) Assert that the target buffer us not smaller than the source buffer. 2) Use CopyString to ensure null-termination even if the source is not null-terminated. --- ...GenericThreadStackManagerImpl_OpenThread.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp index 950bb04f01574c..134cca16c7bcb2 100644 --- a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp +++ b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp @@ -47,6 +47,7 @@ #include #include +#include #include #include #include @@ -2073,6 +2074,10 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::FromOtDnsRespons // Extract from the .. the part. size_t substringSize = strchr(serviceInfo.mHostNameBuffer, '.') - serviceInfo.mHostNameBuffer; + if (substringSize >= ArraySize(mdnsService.mHostName)) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } strncpy(mdnsService.mHostName, serviceInfo.mHostNameBuffer, substringSize); // Append string terminating character. mdnsService.mHostName[substringSize] = '\0'; @@ -2082,6 +2087,10 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::FromOtDnsRespons // Extract from the ... the part. substringSize = strchr(serviceType, '.') - serviceType; + if (substringSize >= ArraySize(mdnsService.mType)) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } strncpy(mdnsService.mType, serviceType, substringSize); // Append string terminating character. mdnsService.mType[substringSize] = '\0'; @@ -2093,6 +2102,10 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::FromOtDnsRespons return CHIP_ERROR_INVALID_ARGUMENT; substringSize = strchr(protocolSubstringStart, '.') - protocolSubstringStart; + if (substringSize >= ArraySize(protocol)) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } strncpy(protocol, protocolSubstringStart, substringSize); // Append string terminating character. protocol[substringSize] = '\0'; @@ -2211,7 +2224,9 @@ void GenericThreadStackManagerImpl_OpenThread::OnDnsBrowseResult(otEr // Invoke callback for every service one by one instead of for the whole list due to large memory size needed to // allocate on // stack. - strncpy(dnsResult->mMdnsService.mName, serviceName, sizeof(serviceName)); + static_assert(ArraySize(dnsResult->mMdnsService.mName) >= ArraySize(serviceName), + "The target buffer must be big enough"); + Platform::CopyString(dnsResult->mMdnsService.mName, serviceName); DeviceLayer::PlatformMgr().ScheduleWork(DispatchBrowse, reinterpret_cast(dnsResult)); wasAnythingBrowsed = true; } From 9f3493dee83eea9871d42f5b7a3c224e80575598 Mon Sep 17 00:00:00 2001 From: Song GUO Date: Wed, 12 Jan 2022 03:07:53 +0800 Subject: [PATCH 40/64] [python] Add timed request support (#13318) * [python] Add timed request support * Run Codegen --- src/app/CommandSender.h | 4 +- src/controller/python/chip/ChipDeviceCtrl.py | 11 ++-- .../python/chip/clusters/Attribute.py | 9 ++- .../python/chip/clusters/ClusterObjects.py | 8 +++ .../python/chip/clusters/Command.py | 11 +++- .../python/chip/clusters/Objects.py | 20 +++++++ .../python/chip/clusters/attribute.cpp | 10 +++- .../python/chip/clusters/command.cpp | 23 ++++---- .../templates/python-cluster-Objects-py.zapt | 12 ++++ .../test/test_scripts/cluster_objects.py | 58 +++++++++++++++++++ 10 files changed, 138 insertions(+), 28 deletions(-) diff --git a/src/app/CommandSender.h b/src/app/CommandSender.h index 8409694ea290f1..8d9064fa4b603c 100644 --- a/src/app/CommandSender.h +++ b/src/app/CommandSender.h @@ -170,6 +170,8 @@ class CommandSender final : public Messaging::ExchangeDelegate return AddRequestDataInternal(aCommandPath, aData, aTimedInvokeTimeoutMs); } + CHIP_ERROR FinishCommand(const Optional & aTimedInvokeTimeoutMs); + #if CONFIG_IM_BUILD_FOR_UNIT_TEST /** * Version of AddRequestData that allows sending a message that is @@ -278,8 +280,6 @@ class CommandSender final : public Messaging::ExchangeDelegate // and mPendingInvokeData is populated. CHIP_ERROR SendInvokeRequest(); - CHIP_ERROR FinishCommand(const Optional & aTimedInvokeTimeoutMs); - CHIP_ERROR Finalize(System::PacketBufferHandle & commandPacket); Messaging::ExchangeContext * mpExchangeCtx = nullptr; diff --git a/src/controller/python/chip/ChipDeviceCtrl.py b/src/controller/python/chip/ChipDeviceCtrl.py index 811e19003090cd..fc8e9ce780308e 100644 --- a/src/controller/python/chip/ChipDeviceCtrl.py +++ b/src/controller/python/chip/ChipDeviceCtrl.py @@ -400,11 +400,13 @@ def DeviceAvailableCallback(device, err): raise self._ChipStack.ErrorToException(CHIP_ERROR_INTERNAL) return returnDevice - async def SendCommand(self, nodeid: int, endpoint: int, payload: ClusterObjects.ClusterCommand, responseType=None): + async def SendCommand(self, nodeid: int, endpoint: int, payload: ClusterObjects.ClusterCommand, responseType=None, timedRequestTimeoutMs: int = None): ''' Send a cluster-object encapsulated command to a node and get returned a future that can be awaited upon to receive the response. If a valid responseType is passed in, that will be used to deserialize the object. If not, the type will be automatically deduced from the metadata received over the wire. + + timedWriteTimeoutMs: Timeout for a timed invoke request. Omit or set to 'None' to indicate a non-timed request. ''' eventLoop = asyncio.get_running_loop() @@ -417,17 +419,18 @@ async def SendCommand(self, nodeid: int, endpoint: int, payload: ClusterObjects. EndpointId=endpoint, ClusterId=payload.cluster_id, CommandId=payload.command_id, - ), payload) + ), payload, timedRequestTimeoutMs=timedRequestTimeoutMs) ) if res != 0: future.set_exception(self._ChipStack.ErrorToException(res)) return await future - async def WriteAttribute(self, nodeid: int, attributes: typing.List[typing.Tuple[int, ClusterObjects.ClusterAttributeDescriptor]]): + async def WriteAttribute(self, nodeid: int, attributes: typing.List[typing.Tuple[int, ClusterObjects.ClusterAttributeDescriptor]], timedRequestTimeoutMs: int = None): ''' Write a list of attributes on a target node. nodeId: Target's Node ID + timedWriteTimeoutMs: Timeout for a timed write request. Omit or set to 'None' to indicate a non-timed request. attributes: A list of tuples of type (endpoint, cluster-object): E.g @@ -445,7 +448,7 @@ async def WriteAttribute(self, nodeid: int, attributes: typing.List[typing.Tuple res = self._ChipStack.Call( lambda: ClusterAttribute.WriteAttributes( - future, eventLoop, device, attrs) + future, eventLoop, device, attrs, timedRequestTimeoutMs=timedRequestTimeoutMs) ) if res != 0: raise self._ChipStack.ErrorToException(res) diff --git a/src/controller/python/chip/clusters/Attribute.py b/src/controller/python/chip/clusters/Attribute.py index f49fb670eadf7e..b926c6fc4f735f 100644 --- a/src/controller/python/chip/clusters/Attribute.py +++ b/src/controller/python/chip/clusters/Attribute.py @@ -763,12 +763,14 @@ def _OnWriteDoneCallback(closure): ctypes.pythonapi.Py_DecRef(ctypes.py_object(closure)) -def WriteAttributes(future: Future, eventLoop, device, attributes: List[AttributeWriteRequest]) -> int: +def WriteAttributes(future: Future, eventLoop, device, attributes: List[AttributeWriteRequest], timedRequestTimeoutMs: int = None) -> int: handle = chip.native.GetLibraryHandle() - transaction = AsyncWriteTransaction(future, eventLoop) writeargs = [] for attr in attributes: + if attr.Attribute.must_use_timed_write and timedRequestTimeoutMs is None or timedRequestTimeoutMs == 0: + raise ValueError( + f"Attribute {attr.__class__} must use timed write, please specify a valid timedRequestTimeoutMs value.") path = chip.interaction_model.AttributePathIBstruct.parse( b'\x00' * chip.interaction_model.AttributePathIBstruct.sizeof()) path.EndpointId = attr.EndpointId @@ -780,9 +782,10 @@ def WriteAttributes(future: Future, eventLoop, device, attributes: List[Attribut writeargs.append(ctypes.c_char_p(bytes(tlv))) writeargs.append(ctypes.c_int(len(tlv))) + transaction = AsyncWriteTransaction(future, eventLoop) ctypes.pythonapi.Py_IncRef(ctypes.py_object(transaction)) res = handle.pychip_WriteClient_WriteAttributes( - ctypes.py_object(transaction), device, ctypes.c_size_t(len(attributes)), *writeargs) + ctypes.py_object(transaction), device, ctypes.c_uint16(0 if timedRequestTimeoutMs is None else timedRequestTimeoutMs), ctypes.c_size_t(len(attributes)), *writeargs) if res != 0: ctypes.pythonapi.Py_DecRef(ctypes.py_object(transaction)) return res diff --git a/src/controller/python/chip/clusters/ClusterObjects.py b/src/controller/python/chip/clusters/ClusterObjects.py index 7b00bcad58cca1..bcac3fd14b838d 100644 --- a/src/controller/python/chip/clusters/ClusterObjects.py +++ b/src/controller/python/chip/clusters/ClusterObjects.py @@ -213,6 +213,10 @@ def cluster_id(self) -> int: def command_id(self) -> int: raise NotImplementedError() + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return False + class Cluster(ClusterObject): ''' This class does nothing, but a convenient class that generated clusters can inherit from. @@ -259,6 +263,10 @@ def attribute_id(self) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: raise NotImplementedError() + @ChipUtility.classproperty + def must_use_timed_write(cls) -> bool: + return False + @ChipUtility.classproperty def _cluster_object(cls) -> ClusterObject: return make_dataclass('InternalClass', diff --git a/src/controller/python/chip/clusters/Command.py b/src/controller/python/chip/clusters/Command.py index e097184297b518..4c7185be38ef1f 100644 --- a/src/controller/python/chip/clusters/Command.py +++ b/src/controller/python/chip/clusters/Command.py @@ -21,6 +21,8 @@ from typing import Type from ctypes import CFUNCTYPE, c_char_p, c_size_t, c_void_p, c_uint32, c_uint16, c_uint8, py_object +from construct.core import ValidationError + from .ClusterObjects import ClusterCommand import chip.exceptions import chip.interaction_model @@ -137,7 +139,7 @@ def _OnCommandSenderDoneCallback(closure): ctypes.pythonapi.Py_DecRef(ctypes.py_object(closure)) -def SendCommand(future: Future, eventLoop, responseType: Type, device, commandPath: CommandPath, payload: ClusterCommand) -> int: +def SendCommand(future: Future, eventLoop, responseType: Type, device, commandPath: CommandPath, payload: ClusterCommand, timedRequestTimeoutMs: int = None) -> int: ''' Send a cluster-object encapsulated command to a device and does the following: - On receipt of a successful data response, returns the cluster-object equivalent through the provided future. - None (on a successful response containing no data) @@ -147,6 +149,9 @@ def SendCommand(future: Future, eventLoop, responseType: Type, device, commandPa ''' if (responseType is not None) and (not issubclass(responseType, ClusterCommand)): raise ValueError("responseType must be a ClusterCommand or None") + if payload.must_use_timed_invoke and timedRequestTimeoutMs is None or timedRequestTimeoutMs == 0: + raise ValueError( + f"Command {payload.__class__} must use timed invoke, please specify a valid timedRequestTimeoutMs value") handle = chip.native.GetLibraryHandle() transaction = AsyncCommandTransaction(future, eventLoop, responseType) @@ -154,7 +159,7 @@ def SendCommand(future: Future, eventLoop, responseType: Type, device, commandPa payloadTLV = payload.ToTLV() ctypes.pythonapi.Py_IncRef(ctypes.py_object(transaction)) return handle.pychip_CommandSender_SendCommand(ctypes.py_object( - transaction), device, commandPath.EndpointId, commandPath.ClusterId, commandPath.CommandId, payloadTLV, len(payloadTLV)) + transaction), device, c_uint16(0 if timedRequestTimeoutMs is None else timedRequestTimeoutMs), commandPath.EndpointId, commandPath.ClusterId, commandPath.CommandId, payloadTLV, len(payloadTLV)) _deviceController = None @@ -180,7 +185,7 @@ def Init(devCtrl): setter = chip.native.NativeLibraryHandleMethodArguments(handle) setter.Set('pychip_CommandSender_SendCommand', - c_uint32, [py_object, c_void_p, c_uint16, c_uint32, c_uint32, c_char_p, c_size_t]) + c_uint32, [py_object, c_void_p, c_uint16, c_uint32, c_uint32, c_char_p, c_size_t, c_uint16]) setter.Set('pychip_CommandSender_InitCallbacks', None, [ _OnCommandSenderResponseCallbackFunct, _OnCommandSenderErrorCallbackFunct, _OnCommandSenderDoneCallbackFunct]) diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 7404421eb2201c..17211fb6a1b470 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -29672,6 +29672,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="tempAccountIdentifier", Tag=0, Type=str), ]) + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + tempAccountIdentifier: 'str' = "" @dataclass @@ -29687,6 +29691,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="setupPIN", Tag=0, Type=str), ]) + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + setupPIN: 'str' = "" @dataclass @@ -29718,6 +29726,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields = [ ]) + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + class Attributes: @@ -30623,6 +30635,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields = [ ]) + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + @dataclass class TestSimpleOptionalArgumentRequest(ClusterCommand): @@ -31358,6 +31374,10 @@ def cluster_id(cls) -> int: def attribute_id(cls) -> int: return 0x00000030 + @ChipUtility.classproperty + def must_use_timed_write(cls) -> bool: + return True + @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=bool) diff --git a/src/controller/python/chip/clusters/attribute.cpp b/src/controller/python/chip/clusters/attribute.cpp index 065aff5f701cf5..2953ae06651270 100644 --- a/src/controller/python/chip/clusters/attribute.cpp +++ b/src/controller/python/chip/clusters/attribute.cpp @@ -176,7 +176,8 @@ class ReadClientCallback : public ReadClient::Callback extern "C" { // Encodes n attribute write requests, follows 3 * n arguments, in the (AttributeWritePath*=void *, uint8_t*, size_t) order. -chip::ChipError::StorageType pychip_WriteClient_WriteAttributes(void * appContext, DeviceProxy * device, size_t n, ...); +chip::ChipError::StorageType pychip_WriteClient_WriteAttributes(void * appContext, DeviceProxy * device, + uint16_t timedWriteTimeoutMs, size_t n, ...); chip::ChipError::StorageType pychip_ReadClient_ReadAttributes(void * appContext, ReadClient ** pReadClient, ReadClientCallback ** pCallback, DeviceProxy * device, bool isSubscription, uint32_t minInterval, uint32_t maxInterval, @@ -249,7 +250,8 @@ void pychip_ReadClient_InitCallbacks(OnReadAttributeDataCallback onReadAttribute gOnReportEndCallback = onReportEndCallback; } -chip::ChipError::StorageType pychip_WriteClient_WriteAttributes(void * appContext, DeviceProxy * device, size_t n, ...) +chip::ChipError::StorageType pychip_WriteClient_WriteAttributes(void * appContext, DeviceProxy * device, + uint16_t timedWriteTimeoutMs, size_t n, ...) { CHIP_ERROR err = CHIP_NO_ERROR; @@ -259,7 +261,9 @@ chip::ChipError::StorageType pychip_WriteClient_WriteAttributes(void * appContex va_list args; va_start(args, n); - SuccessOrExit(err = app::InteractionModelEngine::GetInstance()->NewWriteClient(client, callback.get())); + SuccessOrExit(err = app::InteractionModelEngine::GetInstance()->NewWriteClient( + client, callback.get(), + timedWriteTimeoutMs != 0 ? Optional(timedWriteTimeoutMs) : Optional::Missing())); { for (size_t i = 0; i < n; i++) diff --git a/src/controller/python/chip/clusters/command.cpp b/src/controller/python/chip/clusters/command.cpp index 666dc7599d7a23..b3247b7042f3b6 100644 --- a/src/controller/python/chip/clusters/command.cpp +++ b/src/controller/python/chip/clusters/command.cpp @@ -32,7 +32,8 @@ using namespace chip::app; using PyObject = void *; extern "C" { -chip::ChipError::StorageType pychip_CommandSender_SendCommand(void * appContext, DeviceProxy * device, chip::EndpointId endpointId, +chip::ChipError::StorageType pychip_CommandSender_SendCommand(void * appContext, DeviceProxy * device, + uint16_t timedRequestTimeoutMs, chip::EndpointId endpointId, chip::ClusterId clusterId, chip::CommandId commandId, const uint8_t * payload, size_t length); } @@ -121,37 +122,33 @@ void pychip_CommandSender_InitCallbacks(OnCommandSenderResponseCallback onComman gOnCommandSenderDoneCallback = onCommandSenderDoneCallback; } -chip::ChipError::StorageType pychip_CommandSender_SendCommand(void * appContext, DeviceProxy * device, chip::EndpointId endpointId, +chip::ChipError::StorageType pychip_CommandSender_SendCommand(void * appContext, DeviceProxy * device, + uint16_t timedRequestTimeoutMs, chip::EndpointId endpointId, chip::ClusterId clusterId, chip::CommandId commandId, const uint8_t * payload, size_t length) { CHIP_ERROR err = CHIP_NO_ERROR; std::unique_ptr callback = std::make_unique(appContext); - std::unique_ptr sender = std::make_unique(callback.get(), device->GetExchangeManager()); + std::unique_ptr sender = std::make_unique(callback.get(), device->GetExchangeManager(), + /* is timed request */ timedRequestTimeoutMs != 0); app::CommandPathParams cmdParams = { endpointId, /* group id */ 0, clusterId, commandId, (app::CommandPathFlags::kEndpointIdValid) }; - SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + SuccessOrExit(err = sender->PrepareCommand(cmdParams, false)); { auto writer = sender->GetCommandDataIBTLVWriter(); TLV::TLVReader reader; - TLV::TLVType type; VerifyOrExit(writer != nullptr, err = CHIP_ERROR_INCORRECT_STATE); reader.Init(payload, length); reader.Next(); - reader.EnterContainer(type); - while (reader.Next() == CHIP_NO_ERROR) - { - TLV::TLVReader tReader; - tReader.Init(reader); - writer->CopyElement(tReader); - } + SuccessOrExit(writer->CopyContainer(TLV::ContextTag(to_underlying(CommandDataIB::Tag::kData)), reader)); } - SuccessOrExit(err = sender->FinishCommand()); + SuccessOrExit(err = sender->FinishCommand(timedRequestTimeoutMs != 0 ? Optional(timedRequestTimeoutMs) + : Optional::Missing())); SuccessOrExit(err = device->SendCommands(sender.get())); sender.release(); diff --git a/src/controller/python/templates/python-cluster-Objects-py.zapt b/src/controller/python/templates/python-cluster-Objects-py.zapt index 1ac8fff93b0706..d641797265d0ec 100644 --- a/src/controller/python/templates/python-cluster-Objects-py.zapt +++ b/src/controller/python/templates/python-cluster-Objects-py.zapt @@ -99,6 +99,12 @@ class {{asUpperCamelCase name}}(Cluster): {{/zcl_command_arguments}} ]) + {{#if mustUseTimedInvoke}} + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + + {{/if}} {{#zcl_command_arguments}} {{ asLowerCamelCase label }}: '{{zapTypeToPythonClusterObjectType type ns=(asUpperCamelCase parent.parent.name)}}' = {{getPythonFieldDefault type ns=(asUpperCamelCase parent.parent.name)}} {{/zcl_command_arguments}} @@ -119,6 +125,12 @@ class {{asUpperCamelCase name}}(Cluster): def attribute_id(cls) -> int: return {{ asMEI manufacturerCode code }} + {{#if mustUseTimedWrite}} + @ChipUtility.classproperty + def must_use_timed_write(cls) -> bool: + return True + + {{/if}} @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: {{#if entryType}} diff --git a/src/controller/python/test/test_scripts/cluster_objects.py b/src/controller/python/test/test_scripts/cluster_objects.py index bad51d2a0cab44..b328fac2f2fcf5 100644 --- a/src/controller/python/test/test_scripts/cluster_objects.py +++ b/src/controller/python/test/test_scripts/cluster_objects.py @@ -17,6 +17,7 @@ import chip.clusters as Clusters +import chip.exceptions import logging from chip.clusters.Attribute import AttributePath, AttributeReadResult, AttributeStatus, ValueDecodeFailure, TypedAttributePath, SubscriptionTransaction import chip.interaction_model @@ -260,6 +261,62 @@ async def TestReadEventRequests(cls, devCtrl, expectEventsNum): # TODO: Add more wildcard test for IM events. + @classmethod + async def TestTimedRequest(cls, devCtrl): + logger.info("1: Send Timed Command Request") + req = Clusters.TestCluster.Commands.TimedInvokeRequest() + await devCtrl.SendCommand(nodeid=NODE_ID, endpoint=1, payload=req, timedRequestTimeoutMs=1000) + + logger.info("2: Send Timed Write Request") + await devCtrl.WriteAttribute(nodeid=NODE_ID, + attributes=[ + (1, Clusters.TestCluster.Attributes.TimedWriteBoolean( + True)), + ], + timedRequestTimeoutMs=1000) + + logger.info("3: Send Timed Command Request -- Timeout") + try: + req = Clusters.TestCluster.Commands.TimedInvokeRequest() + # 10ms is a pretty short timeout, RTT is 400ms in simulated network on CI, so this test should fail. + await devCtrl.SendCommand(nodeid=NODE_ID, endpoint=1, payload=req, timedRequestTimeoutMs=10) + raise AssertionError("Timeout expected!") + except chip.exceptions.ChipStackException: + pass + + logger.info("4: Send Timed Write Request -- Timeout") + try: + await devCtrl.WriteAttribute(nodeid=NODE_ID, + attributes=[ + (1, Clusters.TestCluster.Attributes.TimedWriteBoolean( + True)), + ], + timedRequestTimeoutMs=10) + raise AssertionError("Timeout expected!") + except chip.exceptions.ChipStackException: + pass + + logger.info( + "5: Sending TestCluster-TimedInvokeRequest without timedRequestTimeoutMs should be rejected") + try: + req = Clusters.TestCluster.Commands.TimedInvokeRequest() + await devCtrl.SendCommand(nodeid=NODE_ID, endpoint=1, payload=req) + raise AssertionError("The command invoke should be rejected.") + except ValueError: + pass + + logger.info( + "6: Writing TestCluster-TimedWriteBoolean without timedRequestTimeoutMs should be rejected") + try: + await devCtrl.WriteAttribute(nodeid=NODE_ID, + attributes=[ + (1, Clusters.TestCluster.Attributes.TimedWriteBoolean( + True)), + ]) + raise AssertionError("The write request should be rejected.") + except ValueError: + pass + @classmethod async def RunTest(cls, devCtrl): try: @@ -271,6 +328,7 @@ async def RunTest(cls, devCtrl): await cls.SendWriteRequest(devCtrl) await cls.TestReadAttributeRequests(devCtrl) await cls.TestSubscribeAttribute(devCtrl) + await cls.TestTimedRequest(devCtrl) except Exception as ex: logger.error( f"Unexpected error occurred when running tests: {ex}") From ed95611a2d4a2b62b4e99c533b899442baad1894 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Tue, 11 Jan 2022 21:06:45 +0100 Subject: [PATCH 41/64] Share more code between examples/chip-tool and examples/placeholder (#13452) * [chip-tool] Create ValueChecker.h and ConstraintsChecker.h from methods signature living into TestCommand.h Use CharSpan instead of Span and add a few const prefix * Move ValueChecker.h and ConstraintsChecker.h to src/app/tests/suites/include * [chip-tool] Create LogCommands class and move it under src/app/tests/suites/commands/log * Use LogCommands from src/app/tests/suites/commands/log into examples/placeholder instead of a custom implementation * [chip-tool] Add src/app/tests/suites/include/PICSChecker.h and use it into examples/chip-tool and examples/placeholder * Update generated test content --- examples/chip-tool/BUILD.gn | 4 + .../chip-tool/commands/tests/TestCommand.cpp | 114 -- .../chip-tool/commands/tests/TestCommand.h | 231 +-- .../templates/partials/test_cluster.zapt | 9 +- examples/placeholder/linux/BUILD.gn | 1 + .../placeholder/linux/include/TestCommand.h | 36 +- src/app/tests/suites/commands/log/BUILD.gn | 29 + .../tests/suites/commands/log/LogCommands.cpp | 33 + .../tests/suites/commands/log/LogCommands.h | 33 + .../tests/suites/include/ConstraintsChecker.h | 180 +++ src/app/tests/suites/include/PICSChecker.h | 49 + src/app/tests/suites/include/ValueChecker.h | 172 ++ .../chip-tool/zap-generated/test/Commands.h | 1433 +++++++++++++---- 13 files changed, 1674 insertions(+), 650 deletions(-) create mode 100644 src/app/tests/suites/commands/log/BUILD.gn create mode 100644 src/app/tests/suites/commands/log/LogCommands.cpp create mode 100644 src/app/tests/suites/commands/log/LogCommands.h create mode 100644 src/app/tests/suites/include/ConstraintsChecker.h create mode 100644 src/app/tests/suites/include/PICSChecker.h create mode 100644 src/app/tests/suites/include/ValueChecker.h diff --git a/examples/chip-tool/BUILD.gn b/examples/chip-tool/BUILD.gn index 4b06c0eaba8589..7b2fb7081f1d00 100644 --- a/examples/chip-tool/BUILD.gn +++ b/examples/chip-tool/BUILD.gn @@ -37,6 +37,8 @@ config("config") { static_library("chip-tool-utils") { sources = [ + "${chip_root}/src/app/tests/suites/include/ConstraintsChecker.h", + "${chip_root}/src/app/tests/suites/include/ValueChecker.h", "commands/clusters/ModelCommand.cpp", "commands/common/CHIPCommand.cpp", "commands/common/CHIPCommand.h", @@ -63,6 +65,7 @@ static_library("chip-tool-utils") { deps = [ "${chip_root}/src/app/server", + "${chip_root}/src/app/tests/suites/commands/log", "${chip_root}/src/app/tests/suites/pics", "${chip_root}/src/controller/data_model", "${chip_root}/src/lib", @@ -87,6 +90,7 @@ executable("chip-tool") { deps = [ ":chip-tool-utils", "${chip_root}/src/app/server", + "${chip_root}/src/app/tests/suites/commands/log", "${chip_root}/src/app/tests/suites/pics", "${chip_root}/src/controller/data_model", "${chip_root}/src/lib", diff --git a/examples/chip-tool/commands/tests/TestCommand.cpp b/examples/chip-tool/commands/tests/TestCommand.cpp index 70af22f64663cb..72d4fdc870d40d 100644 --- a/examples/chip-tool/commands/tests/TestCommand.cpp +++ b/examples/chip-tool/commands/tests/TestCommand.cpp @@ -65,20 +65,6 @@ CHIP_ERROR TestCommand::Wait(chip::System::Clock::Timeout duration) return chip::DeviceLayer::SystemLayer().StartTimer(duration, OnWaitForMsFn, this); } -CHIP_ERROR TestCommand::Log(const char * message) -{ - ChipLogDetail(chipTool, "%s", message); - ReturnErrorOnFailure(ContinueOnChipMainThread()); - return CHIP_NO_ERROR; -} - -CHIP_ERROR TestCommand::UserPrompt(const char * message) -{ - ChipLogDetail(chipTool, "USER_PROMPT: %s", message); - ReturnErrorOnFailure(ContinueOnChipMainThread()); - return CHIP_NO_ERROR; -} - void TestCommand::Exit(std::string message) { ChipLogError(chipTool, " ***** Test Failure: %s\n", message.c_str()); @@ -94,103 +80,3 @@ void TestCommand::ThrowSuccessResponse() { Exit("Expecting failure response but got a success response"); } - -bool TestCommand::CheckConstraintType(const char * itemName, const char * current, const char * expected) -{ - ChipLogError(chipTool, "Warning: %s type checking is not implemented yet. Expected type: '%s'", itemName, expected); - return true; -} - -bool TestCommand::CheckConstraintFormat(const char * itemName, const char * current, const char * expected) -{ - ChipLogError(chipTool, "Warning: %s format checking is not implemented yet. Expected format: '%s'", itemName, expected); - return true; -} - -bool TestCommand::CheckConstraintStartsWith(const char * itemName, const chip::Span current, const char * expected) -{ - std::string value(current.data(), current.size()); - if (value.rfind(expected, 0) != 0) - { - Exit(std::string(itemName) + " (\"" + value + "\") does not starts with: \"" + std::string(expected) + "\""); - return false; - } - - return true; -} - -bool TestCommand::CheckConstraintEndsWith(const char * itemName, const chip::Span current, const char * expected) -{ - std::string value(current.data(), current.size()); - if (value.find(expected, value.size() - strlen(expected)) == std::string::npos) - { - Exit(std::string(itemName) + " (\"" + value + "\") does not ends with: \"" + std::string(expected) + "\""); - return false; - } - - return true; -} - -bool TestCommand::CheckConstraintMinLength(const char * itemName, uint64_t current, uint64_t expected) -{ - if (current < expected) - { - Exit(std::string(itemName) + " length < minLength: " + std::to_string(current) + " < " + std::to_string(expected)); - return false; - } - - return true; -} - -bool TestCommand::CheckConstraintMaxLength(const char * itemName, uint64_t current, uint64_t expected) -{ - if (current > expected) - { - Exit(std::string(itemName) + " length > minLength: " + std::to_string(current) + " > " + std::to_string(expected)); - return false; - } - - return true; -} - -bool TestCommand::CheckValueAsString(const char * itemName, chip::ByteSpan current, chip::ByteSpan expected) -{ - if (!current.data_equal(expected)) - { - Exit(std::string(itemName) + " value mismatch, expecting " + - std::string(chip::Uint8::to_const_char(expected.data()), expected.size())); - return false; - } - - return true; -} - -bool TestCommand::CheckValueAsString(const char * itemName, chip::CharSpan current, chip::CharSpan expected) -{ - if (!current.data_equal(expected)) - { - Exit(std::string(itemName) + " value mismatch, expected '" + std::string(expected.data(), expected.size()) + "' but got '" + - std::string(current.data(), current.size()) + "'"); - return false; - } - - return true; -} - -bool TestCommand::ShouldSkip(const char * expression) -{ - // If there is no PICS configuration file, considers that nothing should be skipped. - if (!PICS.HasValue()) - { - return false; - } - - std::map pics(PICS.Value()); - bool shouldSkip = !PICSBooleanExpressionParser::Eval(expression, pics); - if (shouldSkip) - { - ChipLogProgress(chipTool, " **** Skipping: %s == false\n", expression); - ContinueOnChipMainThread(); - } - return shouldSkip; -} diff --git a/examples/chip-tool/commands/tests/TestCommand.h b/examples/chip-tool/commands/tests/TestCommand.h index acaff9a8335859..28e203b9139ace 100644 --- a/examples/chip-tool/commands/tests/TestCommand.h +++ b/examples/chip-tool/commands/tests/TestCommand.h @@ -19,19 +19,16 @@ #pragma once #include "../common/CHIPCommand.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include #include -#include #include constexpr uint16_t kTimeoutInSeconds = 90; -class TestCommand : public CHIPCommand +class TestCommand : public CHIPCommand, public ValueChecker, public ConstraintsChecker, public PICSChecker, public LogCommands { public: TestCommand(const char * commandName) : @@ -43,6 +40,8 @@ class TestCommand : public CHIPCommand AddArgument("PICS", &mPICSFilePath); } + ~TestCommand(){}; + /////////// CHIPCommand Interface ///////// CHIP_ERROR RunCommand() override; chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(kTimeoutInSeconds); } @@ -53,8 +52,6 @@ class TestCommand : public CHIPCommand CHIP_ERROR Wait(chip::System::Clock::Timeout ms); CHIP_ERROR WaitForMs(uint16_t ms) { return Wait(chip::System::Clock::Milliseconds32(ms)); } CHIP_ERROR WaitForCommissionee(); - CHIP_ERROR Log(const char * message); - CHIP_ERROR UserPrompt(const char * message); protected: std::map mDevices; @@ -64,224 +61,15 @@ class TestCommand : public CHIPCommand static void OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR error); static void OnWaitForMsFn(chip::System::Layer * systemLayer, void * context); - CHIP_ERROR ContinueOnChipMainThread() { return WaitForMs(0); }; + CHIP_ERROR ContinueOnChipMainThread() override { return WaitForMs(0); }; - void Exit(std::string message); + void Exit(std::string message) override; void ThrowFailureResponse(); void ThrowSuccessResponse(); - bool CheckConstraintType(const char * itemName, const char * current, const char * expected); - bool CheckConstraintFormat(const char * itemName, const char * current, const char * expected); - bool CheckConstraintMinLength(const char * itemName, uint64_t current, uint64_t expected); - bool CheckConstraintMaxLength(const char * itemName, uint64_t current, uint64_t expected); - bool CheckConstraintStartsWith(const char * itemName, const chip::Span current, const char * expected); - bool CheckConstraintEndsWith(const char * itemName, const chip::Span current, const char * expected); - template - bool CheckConstraintMinValue(const char * itemName, T current, T expected) - { - if (current < expected) - { - Exit(std::string(itemName) + " value < minValue: " + std::to_string(current) + " < " + std::to_string(expected)); - return false; - } - - return true; - } - template - bool CheckConstraintMinValue(const char * itemName, const chip::app::DataModel::Nullable & current, U expected) - { - if (current.IsNull()) - { - return true; - } - return CheckConstraintMinValue(itemName, current.Value(), static_cast(expected)); - } - template - bool CheckConstraintMaxValue(const char * itemName, T current, T expected) - { - if (current > expected) - { - Exit(std::string(itemName) + " value > maxValue: " + std::to_string(current) + " > " + std::to_string(expected)); - return false; - } - - return true; - } - template - bool CheckConstraintMaxValue(const char * itemName, const chip::app::DataModel::Nullable & current, U expected) - { - if (current.IsNull()) - { - return true; - } - return CheckConstraintMaxValue(itemName, current.Value(), static_cast(expected)); - } - template - bool CheckConstraintNotValue(const char * itemName, T current, U expected) - { - if (current == expected) - { - Exit(std::string(itemName) + " got unexpected value: " + std::to_string(current)); - return false; - } - - return true; - } - template - bool CheckConstraintNotValue(const char * itemName, const chip::app::DataModel::Nullable & current, U expected) - { - if (current.IsNull()) - { - return true; - } - return CheckConstraintNotValue(itemName, current.Value(), expected); - } - - bool CheckConstraintNotValue(const char * itemName, chip::CharSpan current, chip::CharSpan expected) - { - if (current.data_equal(expected)) - { - Exit(std::string(itemName) + " got unexpected value: " + std::string(current.data(), current.size())); - return false; - } - - return true; - } - - bool CheckConstraintNotValue(const char * itemName, chip::ByteSpan current, chip::ByteSpan expected) - { - if (current.data_equal(expected)) - { - Exit(std::string(itemName) + " got unexpected value of size: " + std::to_string(current.size())); - return false; - } - - return true; - } - - // Allow a different expected type from the actual value type, because if T - // is short the literal we are using is not short-typed. - template ::value, int> = 0> - bool CheckValue(const char * itemName, T current, U expected) - { - if (current != expected) - { - Exit(std::string(itemName) + " value mismatch: expected " + std::to_string(expected) + " but got " + - std::to_string(current)); - return false; - } - - return true; - } - - template - bool CheckValue(const char * itemName, chip::BitFlags current, U expected) - { - return CheckValue(itemName, current.Raw(), expected); - } - - template ::value, int> = 0> - bool CheckValue(const char * itemName, T current, U expected) - { - return CheckValue(itemName, chip::to_underlying(current), expected); - } - - /** - * Check that the next list item, which is at index "index", exists and - * decodes properly. - */ - template - bool CheckNextListItemDecodes(const char * listName, typename std::remove_reference_t::Iterator & iter, size_t index) - { - bool hasValue = iter.Next(); - if (iter.GetStatus() != CHIP_NO_ERROR) - { - Exit(std::string(listName) + " value mismatch: error '" + iter.GetStatus().AsString() + "'decoding item at index " + - std::to_string(index)); - return false; - } - - if (hasValue) - { - return true; - } - - Exit(std::string(listName) + " value mismatch: should have value at index " + std::to_string(index) + - " but doesn't (actual value too short)"); - return false; - } - - /** - * Check that there are no more list items now that we have seen - * "expectedCount" of them. - */ - template - bool CheckNoMoreListItems(const char * listName, typename std::remove_reference_t::Iterator & iter, - size_t expectedCount) - { - bool hasValue = iter.Next(); - if (iter.GetStatus() != CHIP_NO_ERROR) - { - Exit(std::string(listName) + " value mismatch: error '" + iter.GetStatus().AsString() + - "'decoding item after we have seen " + std::to_string(expectedCount) + " items"); - return false; - } - - if (!hasValue) - { - return true; - } - - Exit(std::string(listName) + " value mismatch: expected only " + std::to_string(expectedCount) + - " items, but have more than that (actual value too long)"); - return false; - } - - bool CheckValueAsString(const char * itemName, chip::ByteSpan current, chip::ByteSpan expected); - - bool CheckValueAsString(const char * itemName, chip::CharSpan current, chip::CharSpan expected); - - template - bool CheckValuePresent(const char * itemName, const chip::Optional & value) - { - if (value.HasValue()) - { - return true; - } - - Exit(std::string(itemName) + " expected to have value but doesn't"); - return false; - } - - template - bool CheckValueNull(const char * itemName, const chip::app::DataModel::Nullable & value) - { - if (value.IsNull()) - { - return true; - } - - Exit(std::string(itemName) + " expected to be null but isn't"); - return false; - } - - template - bool CheckValueNonNull(const char * itemName, const chip::app::DataModel::Nullable & value) - { - if (!value.IsNull()) - { - return true; - } - - Exit(std::string(itemName) + " expected to not be null but is"); - return false; - } - chip::Callback::Callback mOnDeviceConnectedCallback; chip::Callback::Callback mOnDeviceConnectionFailureCallback; - bool ShouldSkip(const char * expression); - void Wait() { if (mDelayInMs.HasValue()) @@ -293,5 +81,4 @@ class TestCommand : public CHIPCommand chip::Optional mPICSFilePath; chip::Optional mEndpointId; chip::Optional mTimeout; - chip::Optional> PICS; }; diff --git a/examples/chip-tool/templates/partials/test_cluster.zapt b/examples/chip-tool/templates/partials/test_cluster.zapt index 0a0a24fdf81835..311b21326b4a2d 100644 --- a/examples/chip-tool/templates/partials/test_cluster.zapt +++ b/examples/chip-tool/templates/partials/test_cluster.zapt @@ -41,7 +41,14 @@ class {{filename}}: public TestCommand {{#chip_tests_items}} case {{index}}: ChipLogProgress(chipTool, " ***** Test Step {{index}} : {{label}}\n"); - err = {{#if PICS}}ShouldSkip("{{PICS}}") ? CHIP_NO_ERROR : {{/if}}Test{{asUpperCamelCase label}}_{{index}}(); + {{#if PICS}} + if (ShouldSkip("{{PICS}}")) + { + NextTest(); + return; + } + {{/if}} + err = Test{{asUpperCamelCase label}}_{{index}}(); break; {{/chip_tests_items}} } diff --git a/examples/placeholder/linux/BUILD.gn b/examples/placeholder/linux/BUILD.gn index 3ca3b3adef5096..1917652769dc64 100644 --- a/examples/placeholder/linux/BUILD.gn +++ b/examples/placeholder/linux/BUILD.gn @@ -41,6 +41,7 @@ executable("chip-${chip_tests_zap_config}") { deps = [ ":configuration", "${chip_root}/examples/platform/linux:app-main", + "${chip_root}/src/app/tests/suites/commands/log", "${chip_root}/src/app/tests/suites/pics", "${chip_root}/src/lib", ] diff --git a/examples/placeholder/linux/include/TestCommand.h b/examples/placeholder/linux/include/TestCommand.h index f3032560f48cb9..40e111fc3cd737 100644 --- a/examples/placeholder/linux/include/TestCommand.h +++ b/examples/placeholder/linux/include/TestCommand.h @@ -23,8 +23,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -34,7 +34,7 @@ constexpr const char kIdentityAlpha[] = ""; constexpr const char kIdentityBeta[] = ""; constexpr const char kIdentityGamma[] = ""; -class TestCommand +class TestCommand : public PICSChecker, public LogCommands { public: TestCommand(const char * commandName) : mCommandPath(0, 0, 0), mAttributePath(0, 0, 0) {} @@ -60,16 +60,8 @@ class TestCommand return 0; } - CHIP_ERROR Log(const char * message) + CHIP_ERROR ContinueOnChipMainThread() override { - ChipLogProgress(chipTool, "%s", message); - NextTest(); - return CHIP_NO_ERROR; - } - - CHIP_ERROR UserPrompt(const char * message) - { - ChipLogProgress(chipTool, "USER_PROMPT: %s", message); NextTest(); return CHIP_NO_ERROR; } @@ -125,26 +117,6 @@ class TestCommand mAttributePath = chip::app::ConcreteAttributePath(0, 0, 0); } - bool ShouldSkip(const char * expression) - { - // If there is no PICS configuration file, considers that nothing should be skipped. - if (!PICS.HasValue()) - { - return false; - } - - std::map pics(PICS.Value()); - bool shouldSkip = !PICSBooleanExpressionParser::Eval(expression, pics); - if (shouldSkip) - { - ChipLogProgress(chipTool, " **** Skipping: %s == false\n", expression); - NextTest(); - } - return shouldSkip; - } - - chip::Optional> PICS; - std::atomic_bool isRunning{ true }; protected: diff --git a/src/app/tests/suites/commands/log/BUILD.gn b/src/app/tests/suites/commands/log/BUILD.gn new file mode 100644 index 00000000000000..c0f2ffa3eb6b55 --- /dev/null +++ b/src/app/tests/suites/commands/log/BUILD.gn @@ -0,0 +1,29 @@ +# Copyright (c) 2022 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") + +static_library("log") { + output_name = "libLogCommands" + + sources = [ + "LogCommands.cpp", + "LogCommands.h", + ] + + cflags = [ "-Wconversion" ] + + public_deps = [ "${chip_root}/src/lib/support" ] +} diff --git a/src/app/tests/suites/commands/log/LogCommands.cpp b/src/app/tests/suites/commands/log/LogCommands.cpp new file mode 100644 index 00000000000000..ffc0bd3e874e9c --- /dev/null +++ b/src/app/tests/suites/commands/log/LogCommands.cpp @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "LogCommands.h" + +CHIP_ERROR LogCommands::Log(const char * message) +{ + ChipLogDetail(chipTool, "%s", message); + ReturnErrorOnFailure(ContinueOnChipMainThread()); + return CHIP_NO_ERROR; +} + +CHIP_ERROR LogCommands::UserPrompt(const char * message) +{ + ChipLogDetail(chipTool, "USER_PROMPT: %s", message); + ReturnErrorOnFailure(ContinueOnChipMainThread()); + return CHIP_NO_ERROR; +} diff --git a/src/app/tests/suites/commands/log/LogCommands.h b/src/app/tests/suites/commands/log/LogCommands.h new file mode 100644 index 00000000000000..f301fcadf3c420 --- /dev/null +++ b/src/app/tests/suites/commands/log/LogCommands.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#pragma once + +#include + +class LogCommands +{ +public: + LogCommands(){}; + virtual ~LogCommands(){}; + + virtual CHIP_ERROR ContinueOnChipMainThread() = 0; + + CHIP_ERROR Log(const char * message); + CHIP_ERROR UserPrompt(const char * message); +}; diff --git a/src/app/tests/suites/include/ConstraintsChecker.h b/src/app/tests/suites/include/ConstraintsChecker.h new file mode 100644 index 00000000000000..0c44c8b3bbe5d9 --- /dev/null +++ b/src/app/tests/suites/include/ConstraintsChecker.h @@ -0,0 +1,180 @@ +/* + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#pragma once + +#include + +#include +#include + +class ConstraintsChecker +{ +public: + ConstraintsChecker(){}; + virtual ~ConstraintsChecker(){}; + +protected: + virtual void Exit(std::string message) = 0; + + bool CheckConstraintType(const char * itemName, const char * current, const char * expected) + { + ChipLogError(chipTool, "Warning: %s type checking is not implemented yet. Expected type: '%s'", itemName, expected); + return true; + } + + bool CheckConstraintFormat(const char * itemName, const char * current, const char * expected) + { + ChipLogError(chipTool, "Warning: %s format checking is not implemented yet. Expected format: '%s'", itemName, expected); + return true; + } + + bool CheckConstraintMinLength(const char * itemName, uint64_t current, uint64_t expected) + { + if (current < expected) + { + Exit(std::string(itemName) + " length < minLength: " + std::to_string(current) + " < " + std::to_string(expected)); + return false; + } + + return true; + } + + bool CheckConstraintMaxLength(const char * itemName, uint64_t current, uint64_t expected) + { + if (current > expected) + { + Exit(std::string(itemName) + " length > minLength: " + std::to_string(current) + " > " + std::to_string(expected)); + return false; + } + + return true; + } + + bool CheckConstraintStartsWith(const char * itemName, const chip::CharSpan current, const char * expected) + { + std::string value(current.data(), current.size()); + if (value.rfind(expected, 0) != 0) + { + Exit(std::string(itemName) + " (\"" + value + "\") does not starts with: \"" + std::string(expected) + "\""); + return false; + } + + return true; + } + + bool CheckConstraintEndsWith(const char * itemName, const chip::CharSpan current, const char * expected) + { + std::string value(current.data(), current.size()); + if (value.find(expected, value.size() - strlen(expected)) == std::string::npos) + { + Exit(std::string(itemName) + " (\"" + value + "\") does not ends with: \"" + std::string(expected) + "\""); + return false; + } + + return true; + } + + template + bool CheckConstraintMinValue(const char * itemName, T current, T expected) + { + if (current < expected) + { + Exit(std::string(itemName) + " value < minValue: " + std::to_string(current) + " < " + std::to_string(expected)); + return false; + } + + return true; + } + + template + bool CheckConstraintMinValue(const char * itemName, const chip::app::DataModel::Nullable & current, U expected) + { + if (current.IsNull()) + { + return true; + } + return CheckConstraintMinValue(itemName, current.Value(), static_cast(expected)); + } + + template + bool CheckConstraintMaxValue(const char * itemName, T current, T expected) + { + if (current > expected) + { + Exit(std::string(itemName) + " value > maxValue: " + std::to_string(current) + " > " + std::to_string(expected)); + return false; + } + + return true; + } + + template + bool CheckConstraintMaxValue(const char * itemName, const chip::app::DataModel::Nullable & current, U expected) + { + if (current.IsNull()) + { + return true; + } + return CheckConstraintMaxValue(itemName, current.Value(), static_cast(expected)); + } + + template + bool CheckConstraintNotValue(const char * itemName, T current, U expected) + { + if (current == expected) + { + Exit(std::string(itemName) + " got unexpected value: " + std::to_string(current)); + return false; + } + + return true; + } + + template + bool CheckConstraintNotValue(const char * itemName, const chip::app::DataModel::Nullable & current, U expected) + { + if (current.IsNull()) + { + return true; + } + return CheckConstraintNotValue(itemName, current.Value(), expected); + } + + bool CheckConstraintNotValue(const char * itemName, const chip::CharSpan current, const chip::CharSpan expected) + { + if (current.data_equal(expected)) + { + Exit(std::string(itemName) + " got unexpected value: " + std::string(current.data(), current.size())); + return false; + } + + return true; + } + + bool CheckConstraintNotValue(const char * itemName, const chip::ByteSpan current, const chip::ByteSpan expected) + { + if (current.data_equal(expected)) + { + Exit(std::string(itemName) + " got unexpected value of size: " + std::to_string(current.size())); + return false; + } + + return true; + } +}; diff --git a/src/app/tests/suites/include/PICSChecker.h b/src/app/tests/suites/include/PICSChecker.h new file mode 100644 index 00000000000000..28c07af5a94482 --- /dev/null +++ b/src/app/tests/suites/include/PICSChecker.h @@ -0,0 +1,49 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +#include +#include + +#include + +class PICSChecker +{ +public: + bool ShouldSkip(const char * expression) + { + // If there is no PICS configuration file, considers that nothing should be skipped. + if (!PICS.HasValue()) + { + return false; + } + + std::map pics(PICS.Value()); + bool shouldSkip = !PICSBooleanExpressionParser::Eval(expression, pics); + if (shouldSkip) + { + ChipLogProgress(chipTool, " **** Skipping: %s == false\n", expression); + } + return shouldSkip; + } + + chip::Optional> PICS; +}; diff --git a/src/app/tests/suites/include/ValueChecker.h b/src/app/tests/suites/include/ValueChecker.h new file mode 100644 index 00000000000000..8c6ea93e64a157 --- /dev/null +++ b/src/app/tests/suites/include/ValueChecker.h @@ -0,0 +1,172 @@ +/* + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#pragma once + +#include + +#include +#include + +class ValueChecker +{ +public: + ValueChecker(){}; + virtual ~ValueChecker(){}; + +protected: + virtual void Exit(std::string message) = 0; + + bool CheckValueAsString(const char * itemName, chip::ByteSpan current, chip::ByteSpan expected) + { + if (!current.data_equal(expected)) + { + Exit(std::string(itemName) + " value mismatch, expecting " + + std::string(chip::Uint8::to_const_char(expected.data()), expected.size())); + return false; + } + + return true; + } + + bool CheckValueAsString(const char * itemName, chip::CharSpan current, chip::CharSpan expected) + { + if (!current.data_equal(expected)) + { + Exit(std::string(itemName) + " value mismatch, expected '" + std::string(expected.data(), expected.size()) + + "' but got '" + std::string(current.data(), current.size()) + "'"); + return false; + } + + return true; + } + + // Allow a different expected type from the actual value type, because if T + // is short the literal we are using is not short-typed. + template ::value, int> = 0> + bool CheckValue(const char * itemName, T current, U expected) + { + if (current != expected) + { + Exit(std::string(itemName) + " value mismatch: expected " + std::to_string(expected) + " but got " + + std::to_string(current)); + return false; + } + + return true; + } + + template ::value, int> = 0> + bool CheckValue(const char * itemName, T current, U expected) + { + return CheckValue(itemName, chip::to_underlying(current), expected); + } + + template + bool CheckValue(const char * itemName, chip::BitFlags current, U expected) + { + return CheckValue(itemName, current.Raw(), expected); + } + + template + bool CheckValuePresent(const char * itemName, const chip::Optional & value) + { + if (value.HasValue()) + { + return true; + } + + Exit(std::string(itemName) + " expected to have value but doesn't"); + return false; + } + + template + bool CheckValueNull(const char * itemName, const chip::app::DataModel::Nullable & value) + { + if (value.IsNull()) + { + return true; + } + + Exit(std::string(itemName) + " expected to be null but isn't"); + return false; + } + + template + bool CheckValueNonNull(const char * itemName, const chip::app::DataModel::Nullable & value) + { + if (!value.IsNull()) + { + return true; + } + + Exit(std::string(itemName) + " expected to not be null but is"); + return false; + } + + /** + * Check that the next list item, which is at index "index", exists and + * decodes properly. + */ + template + bool CheckNextListItemDecodes(const char * listName, typename std::remove_reference_t::Iterator & iter, size_t index) + { + bool hasValue = iter.Next(); + if (iter.GetStatus() != CHIP_NO_ERROR) + { + Exit(std::string(listName) + " value mismatch: error '" + iter.GetStatus().AsString() + "'decoding item at index " + + std::to_string(index)); + return false; + } + + if (hasValue) + { + return true; + } + + Exit(std::string(listName) + " value mismatch: should have value at index " + std::to_string(index) + + " but doesn't (actual value too short)"); + return false; + } + + /** + * Check that there are no more list items now that we have seen + * "expectedCount" of them. + */ + template + bool CheckNoMoreListItems(const char * listName, typename std::remove_reference_t::Iterator & iter, + size_t expectedCount) + { + bool hasValue = iter.Next(); + if (iter.GetStatus() != CHIP_NO_ERROR) + { + Exit(std::string(listName) + " value mismatch: error '" + iter.GetStatus().AsString() + + "'decoding item after we have seen " + std::to_string(expectedCount) + " items"); + return false; + } + + if (!hasValue) + { + return true; + } + + Exit(std::string(listName) + " value mismatch: expected only " + std::to_string(expectedCount) + + " items, but have more than that (actual value too long)"); + return false; + } +}; diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 11bde29340c432..8169cedb2573b5 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -830,35 +830,75 @@ class Test_TC_BI_2_2 : public TestCommand break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Reads PresentValue attribute from DUT\n"); - err = ShouldSkip("A_PRESENTVALUE") ? CHIP_NO_ERROR : TestReadsPresentValueAttributeFromDut_1(); + if (ShouldSkip("A_PRESENTVALUE")) + { + NextTest(); + return; + } + err = TestReadsPresentValueAttributeFromDut_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Reads OutOfService attribute from DUT\n"); - err = ShouldSkip("A_OUTOFSERVICE") ? CHIP_NO_ERROR : TestReadsOutOfServiceAttributeFromDut_2(); + if (ShouldSkip("A_OUTOFSERVICE")) + { + NextTest(); + return; + } + err = TestReadsOutOfServiceAttributeFromDut_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Reads StatusFlags attribute from DUT\n"); - err = ShouldSkip("A_STATUSFLAGS") ? CHIP_NO_ERROR : TestReadsStatusFlagsAttributeFromDut_3(); + if (ShouldSkip("A_STATUSFLAGS")) + { + NextTest(); + return; + } + err = TestReadsStatusFlagsAttributeFromDut_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Reads PresentValue attribute from DUT\n"); - err = ShouldSkip("A_PRESENTVALUE") ? CHIP_NO_ERROR : TestReadsPresentValueAttributeFromDut_4(); + if (ShouldSkip("A_PRESENTVALUE")) + { + NextTest(); + return; + } + err = TestReadsPresentValueAttributeFromDut_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Reads OutOfService attribute from DUT\n"); - err = ShouldSkip("A_OUTOFSERVICE") ? CHIP_NO_ERROR : TestReadsOutOfServiceAttributeFromDut_5(); + if (ShouldSkip("A_OUTOFSERVICE")) + { + NextTest(); + return; + } + err = TestReadsOutOfServiceAttributeFromDut_5(); break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Reads StatusFlags attribute from DUT\n"); - err = ShouldSkip("A_STATUSFLAGS") ? CHIP_NO_ERROR : TestReadsStatusFlagsAttributeFromDut_6(); + if (ShouldSkip("A_STATUSFLAGS")) + { + NextTest(); + return; + } + err = TestReadsStatusFlagsAttributeFromDut_6(); break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Reads StatusFlags attribute from DUT\n"); - err = ShouldSkip("A_STATUSFLAGS") ? CHIP_NO_ERROR : TestReadsStatusFlagsAttributeFromDut_7(); + if (ShouldSkip("A_STATUSFLAGS")) + { + NextTest(); + return; + } + err = TestReadsStatusFlagsAttributeFromDut_7(); break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Reads StatusFlags attribute from DUT\n"); - err = ShouldSkip("A_STATUSFLAGS") ? CHIP_NO_ERROR : TestReadsStatusFlagsAttributeFromDut_8(); + if (ShouldSkip("A_STATUSFLAGS")) + { + NextTest(); + return; + } + err = TestReadsStatusFlagsAttributeFromDut_8(); break; } @@ -12032,80 +12072,174 @@ class Test_TC_CC_9_1 : public TestCommand break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_3(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Read ColorLoopActive attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPACTIVE") ? CHIP_NO_ERROR : TestReadColorLoopActiveAttributeFromDut_4(); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_5(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_5(); break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Read ColorLoopDirection attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPDIRECTION") ? CHIP_NO_ERROR : TestReadColorLoopDirectionAttributeFromDut_6(); + if (ShouldSkip("A_COLORLOOPDIRECTION")) + { + NextTest(); + return; + } + err = TestReadColorLoopDirectionAttributeFromDut_6(); break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_7(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_7(); break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Read ColorLoopTime attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPTIME") ? CHIP_NO_ERROR : TestReadColorLoopTimeAttributeFromDut_8(); + if (ShouldSkip("A_COLORLOOPTIME")) + { + NextTest(); + return; + } + err = TestReadColorLoopTimeAttributeFromDut_8(); break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_9(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_9(); break; case 10: ChipLogProgress(chipTool, " ***** Test Step 10 : Read ColorLoopStartEnhancedHue attribute from DUT\n"); - err = - ShouldSkip("A_COLORLOOPSTARTENHANCEDHUE") ? CHIP_NO_ERROR : TestReadColorLoopStartEnhancedHueAttributeFromDut_10(); + if (ShouldSkip("A_COLORLOOPSTARTENHANCEDHUE")) + { + NextTest(); + return; + } + err = TestReadColorLoopStartEnhancedHueAttributeFromDut_10(); break; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_11(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_11(); break; case 12: ChipLogProgress(chipTool, " ***** Test Step 12 : Read ColorLoopActive attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPACTIVE") ? CHIP_NO_ERROR : TestReadColorLoopActiveAttributeFromDut_12(); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_12(); break; case 13: ChipLogProgress(chipTool, " ***** Test Step 13 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_13(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_13(); break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : Read ColorLoopActive attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPACTIVE") ? CHIP_NO_ERROR : TestReadColorLoopActiveAttributeFromDut_14(); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_14(); break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_15(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_15(); break; case 16: ChipLogProgress(chipTool, " ***** Test Step 16 : Read ColorLoopDirection attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPDIRECTION") ? CHIP_NO_ERROR : TestReadColorLoopDirectionAttributeFromDut_16(); + if (ShouldSkip("A_COLORLOOPDIRECTION")) + { + NextTest(); + return; + } + err = TestReadColorLoopDirectionAttributeFromDut_16(); break; case 17: ChipLogProgress(chipTool, " ***** Test Step 17 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_17(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_17(); break; case 18: ChipLogProgress(chipTool, " ***** Test Step 18 : Read ColorLoopActive attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPACTIVE") ? CHIP_NO_ERROR : TestReadColorLoopActiveAttributeFromDut_18(); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_18(); break; case 19: ChipLogProgress(chipTool, " ***** Test Step 19 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_19(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_19(); break; case 20: ChipLogProgress(chipTool, " ***** Test Step 20 : Read ColorLoopActive attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPACTIVE") ? CHIP_NO_ERROR : TestReadColorLoopActiveAttributeFromDut_20(); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_20(); break; case 21: ChipLogProgress(chipTool, " ***** Test Step 21 : Enhanced Move To Hue command 10\n"); - err = ShouldSkip("CR_ENHANCEDMOVETOHUE") ? CHIP_NO_ERROR : TestEnhancedMoveToHueCommand10_21(); + if (ShouldSkip("CR_ENHANCEDMOVETOHUE")) + { + NextTest(); + return; + } + err = TestEnhancedMoveToHueCommand10_21(); break; case 22: ChipLogProgress(chipTool, " ***** Test Step 22 : Wait 2000ms\n"); @@ -12113,55 +12247,120 @@ class Test_TC_CC_9_1 : public TestCommand break; case 23: ChipLogProgress(chipTool, " ***** Test Step 23 : Read EnhancedCurrentHue attribute from DUT\n"); - err = ShouldSkip("A_ENHANCEDCURRENTHUE") ? CHIP_NO_ERROR : TestReadEnhancedCurrentHueAttributeFromDut_23(); + if (ShouldSkip("A_ENHANCEDCURRENTHUE")) + { + NextTest(); + return; + } + err = TestReadEnhancedCurrentHueAttributeFromDut_23(); break; case 24: ChipLogProgress(chipTool, " ***** Test Step 24 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_24(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_24(); break; case 25: ChipLogProgress(chipTool, " ***** Test Step 25 : Read ColorLoopDirection attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPDIRECTION") ? CHIP_NO_ERROR : TestReadColorLoopDirectionAttributeFromDut_25(); + if (ShouldSkip("A_COLORLOOPDIRECTION")) + { + NextTest(); + return; + } + err = TestReadColorLoopDirectionAttributeFromDut_25(); break; case 26: ChipLogProgress(chipTool, " ***** Test Step 26 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_26(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_26(); break; case 27: ChipLogProgress(chipTool, " ***** Test Step 27 : Read ColorLoopActive attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPACTIVE") ? CHIP_NO_ERROR : TestReadColorLoopActiveAttributeFromDut_27(); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_27(); break; case 28: ChipLogProgress(chipTool, " ***** Test Step 28 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_28(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_28(); break; case 29: ChipLogProgress(chipTool, " ***** Test Step 29 : Read ColorLoopActive attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPACTIVE") ? CHIP_NO_ERROR : TestReadColorLoopActiveAttributeFromDut_29(); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_29(); break; case 30: ChipLogProgress(chipTool, " ***** Test Step 30 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_30(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_30(); break; case 31: ChipLogProgress(chipTool, " ***** Test Step 31 : Read ColorLoopDirection attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPDIRECTION") ? CHIP_NO_ERROR : TestReadColorLoopDirectionAttributeFromDut_31(); + if (ShouldSkip("A_COLORLOOPDIRECTION")) + { + NextTest(); + return; + } + err = TestReadColorLoopDirectionAttributeFromDut_31(); break; case 32: ChipLogProgress(chipTool, " ***** Test Step 32 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_32(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_32(); break; case 33: ChipLogProgress(chipTool, " ***** Test Step 33 : Read ColorLoopActive attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPACTIVE") ? CHIP_NO_ERROR : TestReadColorLoopActiveAttributeFromDut_33(); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_33(); break; case 34: ChipLogProgress(chipTool, " ***** Test Step 34 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_34(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_34(); break; case 35: ChipLogProgress(chipTool, " ***** Test Step 35 : Read ColorLoopActive attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPACTIVE") ? CHIP_NO_ERROR : TestReadColorLoopActiveAttributeFromDut_35(); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_35(); break; case 36: ChipLogProgress(chipTool, " ***** Test Step 36 : Turn Off light for color control tests\n"); @@ -13283,47 +13482,102 @@ class Test_TC_CC_9_2 : public TestCommand break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_3(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Read ColorLoopActive attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPACTIVE") ? CHIP_NO_ERROR : TestReadColorLoopActiveAttributeFromDut_4(); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Read ColorLoopDirection attribute from DUT.\n"); - err = ShouldSkip("A_COLORLOOPDIRECTION") ? CHIP_NO_ERROR : TestReadColorLoopDirectionAttributeFromDut_5(); + if (ShouldSkip("A_COLORLOOPDIRECTION")) + { + NextTest(); + return; + } + err = TestReadColorLoopDirectionAttributeFromDut_5(); break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Read ColorLoopTime attribute from DUT.\n"); - err = ShouldSkip("A_COLORLOOPTIME") ? CHIP_NO_ERROR : TestReadColorLoopTimeAttributeFromDut_6(); + if (ShouldSkip("A_COLORLOOPTIME")) + { + NextTest(); + return; + } + err = TestReadColorLoopTimeAttributeFromDut_6(); break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Read ColorLoopStartEnhancedHue attribute from DUT.\n"); - err = ShouldSkip("A_COLORLOOPSTARTENHANCEDHUE") ? CHIP_NO_ERROR : TestReadColorLoopStartEnhancedHueAttributeFromDut_7(); + if (ShouldSkip("A_COLORLOOPSTARTENHANCEDHUE")) + { + NextTest(); + return; + } + err = TestReadColorLoopStartEnhancedHueAttributeFromDut_7(); break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Color Loop Set Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestColorLoopSetCommandSetAllAttributes_8(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestColorLoopSetCommandSetAllAttributes_8(); break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Read ColorLoopActive attribute from DUT.\n"); - err = ShouldSkip("A_COLORLOOPACTIVE") ? CHIP_NO_ERROR : TestReadColorLoopActiveAttributeFromDut_9(); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_9(); break; case 10: ChipLogProgress(chipTool, " ***** Test Step 10 : Color Loop Set Command - Start Color Loop\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestColorLoopSetCommandStartColorLoop_10(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestColorLoopSetCommandStartColorLoop_10(); break; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : Read ColorLoopDirection attribute from DUT.\n"); - err = ShouldSkip("A_COLORLOOPDIRECTION") ? CHIP_NO_ERROR : TestReadColorLoopDirectionAttributeFromDut_11(); + if (ShouldSkip("A_COLORLOOPDIRECTION")) + { + NextTest(); + return; + } + err = TestReadColorLoopDirectionAttributeFromDut_11(); break; case 12: ChipLogProgress(chipTool, " ***** Test Step 12 : Color Loop Set Command - Start Color Loop\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestColorLoopSetCommandStartColorLoop_12(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestColorLoopSetCommandStartColorLoop_12(); break; case 13: ChipLogProgress(chipTool, " ***** Test Step 13 : Read ColorLoopActive attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPACTIVE") ? CHIP_NO_ERROR : TestReadColorLoopActiveAttributeFromDut_13(); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_13(); break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : Turn off light for color control tests\n"); @@ -13811,47 +14065,102 @@ class Test_TC_CC_9_3 : public TestCommand break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Sends ColorLoopSet Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestSendsColorLoopSetCommandSetAllAttributes_3(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Read ColorLoopActive attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPACTIVE") ? CHIP_NO_ERROR : TestReadColorLoopActiveAttributeFromDut_4(); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Read ColorLoopDirection attribute from DUT.\n"); - err = ShouldSkip("A_COLORLOOPDIRECTION") ? CHIP_NO_ERROR : TestReadColorLoopDirectionAttributeFromDut_5(); + if (ShouldSkip("A_COLORLOOPDIRECTION")) + { + NextTest(); + return; + } + err = TestReadColorLoopDirectionAttributeFromDut_5(); break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Read ColorLoopTime attribute from DUT.\n"); - err = ShouldSkip("A_COLORLOOPTIME") ? CHIP_NO_ERROR : TestReadColorLoopTimeAttributeFromDut_6(); + if (ShouldSkip("A_COLORLOOPTIME")) + { + NextTest(); + return; + } + err = TestReadColorLoopTimeAttributeFromDut_6(); break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Read ColorLoopStartEnhancedHue attribute from DUT.\n"); - err = ShouldSkip("A_COLORLOOPSTARTENHANCEDHUE") ? CHIP_NO_ERROR : TestReadColorLoopStartEnhancedHueAttributeFromDut_7(); + if (ShouldSkip("A_COLORLOOPSTARTENHANCEDHUE")) + { + NextTest(); + return; + } + err = TestReadColorLoopStartEnhancedHueAttributeFromDut_7(); break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Color Loop Set Command - Set all Attributes\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestColorLoopSetCommandSetAllAttributes_8(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestColorLoopSetCommandSetAllAttributes_8(); break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Read ColorLoopActive attribute from DUT.\n"); - err = ShouldSkip("A_COLORLOOPACTIVE") ? CHIP_NO_ERROR : TestReadColorLoopActiveAttributeFromDut_9(); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_9(); break; case 10: ChipLogProgress(chipTool, " ***** Test Step 10 : Color Loop Set Command - Start Color Loop\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestColorLoopSetCommandStartColorLoop_10(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestColorLoopSetCommandStartColorLoop_10(); break; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : Read ColorLoopTime attribute from DUT.\n"); - err = ShouldSkip("A_COLORLOOPTIME") ? CHIP_NO_ERROR : TestReadColorLoopTimeAttributeFromDut_11(); + if (ShouldSkip("A_COLORLOOPTIME")) + { + NextTest(); + return; + } + err = TestReadColorLoopTimeAttributeFromDut_11(); break; case 12: ChipLogProgress(chipTool, " ***** Test Step 12 : Color Loop Set Command - Start Color Loop\n"); - err = ShouldSkip("CR_COLORLOOPSET") ? CHIP_NO_ERROR : TestColorLoopSetCommandStartColorLoop_12(); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestColorLoopSetCommandStartColorLoop_12(); break; case 13: ChipLogProgress(chipTool, " ***** Test Step 13 : Read ColorLoopActive attribute from DUT\n"); - err = ShouldSkip("A_COLORLOOPACTIVE") ? CHIP_NO_ERROR : TestReadColorLoopActiveAttributeFromDut_13(); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_13(); break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : Turn off light for color control tests\n"); @@ -14765,11 +15074,21 @@ class Test_TC_DM_1_1 : public TestCommand break; case 12: ChipLogProgress(chipTool, " ***** Test Step 12 : Query ManufacturingDate\n"); - err = ShouldSkip("MANF_DATE") ? CHIP_NO_ERROR : TestQueryManufacturingDate_12(); + if (ShouldSkip("MANF_DATE")) + { + NextTest(); + return; + } + err = TestQueryManufacturingDate_12(); break; case 13: ChipLogProgress(chipTool, " ***** Test Step 13 : Query PartNumber\n"); - err = ShouldSkip("PART_NUM") ? CHIP_NO_ERROR : TestQueryPartNumber_13(); + if (ShouldSkip("PART_NUM")) + { + NextTest(); + return; + } + err = TestQueryPartNumber_13(); break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : Query ProductURL\n"); @@ -20002,11 +20321,21 @@ class Test_TC_OCC_2_2 : public TestCommand break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Reads Occupancy attribute from DUT\n"); - err = ShouldSkip("A_OCCUPANCY") ? CHIP_NO_ERROR : TestReadsOccupancyAttributeFromDut_1(); + if (ShouldSkip("A_OCCUPANCY")) + { + NextTest(); + return; + } + err = TestReadsOccupancyAttributeFromDut_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Reads Occupancy attribute from DUT\n"); - err = ShouldSkip("A_OCCUPANCY") ? CHIP_NO_ERROR : TestReadsOccupancyAttributeFromDut_2(); + if (ShouldSkip("A_OCCUPANCY")) + { + NextTest(); + return; + } + err = TestReadsOccupancyAttributeFromDut_2(); break; } @@ -21527,7 +21856,12 @@ class Test_TC_OO_2_3 : public TestCommand break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Send On Command\n"); - err = ShouldSkip("CR_ON") ? CHIP_NO_ERROR : TestSendOnCommand_1(); + if (ShouldSkip("CR_ON")) + { + NextTest(); + return; + } + err = TestSendOnCommand_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Wait 1000ms\n"); @@ -21535,15 +21869,30 @@ class Test_TC_OO_2_3 : public TestCommand break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Reads OnOff attribute from DUT\n"); - err = ShouldSkip("A_ONOFF") ? CHIP_NO_ERROR : TestReadsOnOffAttributeFromDut_3(); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Reads GlobalSceneControl attribute from DUT\n"); - err = ShouldSkip("A_GLOBALSCENECONTROL") ? CHIP_NO_ERROR : TestReadsGlobalSceneControlAttributeFromDut_4(); + if (ShouldSkip("A_GLOBALSCENECONTROL")) + { + NextTest(); + return; + } + err = TestReadsGlobalSceneControlAttributeFromDut_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Send On Command\n"); - err = ShouldSkip("CR_ON") ? CHIP_NO_ERROR : TestSendOnCommand_5(); + if (ShouldSkip("CR_ON")) + { + NextTest(); + return; + } + err = TestSendOnCommand_5(); break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1000ms\n"); @@ -21551,15 +21900,30 @@ class Test_TC_OO_2_3 : public TestCommand break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Reads OnOff attribute from DUT\n"); - err = ShouldSkip("A_ONOFF") ? CHIP_NO_ERROR : TestReadsOnOffAttributeFromDut_7(); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_7(); break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Reads GlobalSceneControl attribute from DUT\n"); - err = ShouldSkip("A_GLOBALSCENECONTROL") ? CHIP_NO_ERROR : TestReadsGlobalSceneControlAttributeFromDut_8(); + if (ShouldSkip("A_GLOBALSCENECONTROL")) + { + NextTest(); + return; + } + err = TestReadsGlobalSceneControlAttributeFromDut_8(); break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Send On Command\n"); - err = ShouldSkip("CR_ON") ? CHIP_NO_ERROR : TestSendOnCommand_9(); + if (ShouldSkip("CR_ON")) + { + NextTest(); + return; + } + err = TestSendOnCommand_9(); break; case 10: ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 1000ms\n"); @@ -21567,147 +21931,327 @@ class Test_TC_OO_2_3 : public TestCommand break; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : Reads OnOff attribute from DUT\n"); - err = ShouldSkip("A_ONOFF") ? CHIP_NO_ERROR : TestReadsOnOffAttributeFromDut_11(); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_11(); break; case 12: ChipLogProgress(chipTool, " ***** Test Step 12 : Reads GlobalSceneControl attribute from DUT\n"); - err = ShouldSkip("A_GLOBALSCENECONTROL") ? CHIP_NO_ERROR : TestReadsGlobalSceneControlAttributeFromDut_12(); + if (ShouldSkip("A_GLOBALSCENECONTROL")) + { + NextTest(); + return; + } + err = TestReadsGlobalSceneControlAttributeFromDut_12(); break; case 13: ChipLogProgress(chipTool, " ***** Test Step 13 : Reads OnTime attribute from DUT\n"); - err = ShouldSkip("A_ONTIME") ? CHIP_NO_ERROR : TestReadsOnTimeAttributeFromDut_13(); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_13(); break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : Reads OffWaitTime attribute from DUT\n"); - err = ShouldSkip("A_OFFWAITTIME") ? CHIP_NO_ERROR : TestReadsOffWaitTimeAttributeFromDut_14(); + if (ShouldSkip("A_OFFWAITTIME")) + { + NextTest(); + return; + } + err = TestReadsOffWaitTimeAttributeFromDut_14(); break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Send On Command\n"); - err = ShouldSkip("CR_ON") ? CHIP_NO_ERROR : TestSendOnCommand_15(); + if (ShouldSkip("CR_ON")) + { + NextTest(); + return; + } + err = TestSendOnCommand_15(); break; case 16: ChipLogProgress(chipTool, " ***** Test Step 16 : Reads OnOff attribute from DUT\n"); - err = ShouldSkip("A_ONOFF") ? CHIP_NO_ERROR : TestReadsOnOffAttributeFromDut_16(); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_16(); break; case 17: ChipLogProgress(chipTool, " ***** Test Step 17 : Reads OnTime attribute from DUT\n"); - err = ShouldSkip("A_ONTIME") ? CHIP_NO_ERROR : TestReadsOnTimeAttributeFromDut_17(); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_17(); break; case 18: ChipLogProgress(chipTool, " ***** Test Step 18 : Reads OffWaitTime attribute from DUT\n"); - err = ShouldSkip("A_OFFWAITTIME") ? CHIP_NO_ERROR : TestReadsOffWaitTimeAttributeFromDut_18(); + if (ShouldSkip("A_OFFWAITTIME")) + { + NextTest(); + return; + } + err = TestReadsOffWaitTimeAttributeFromDut_18(); break; case 19: ChipLogProgress(chipTool, " ***** Test Step 19 : Send Off Command\n"); - err = ShouldSkip("CR_OFF") ? CHIP_NO_ERROR : TestSendOffCommand_19(); + if (ShouldSkip("CR_OFF")) + { + NextTest(); + return; + } + err = TestSendOffCommand_19(); break; case 20: ChipLogProgress(chipTool, " ***** Test Step 20 : Reads OnOff attribute from DUT\n"); - err = ShouldSkip("A_ONOFF") ? CHIP_NO_ERROR : TestReadsOnOffAttributeFromDut_20(); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_20(); break; case 21: ChipLogProgress(chipTool, " ***** Test Step 21 : Reads OnTime attribute from DUT\n"); - err = ShouldSkip("A_ONTIME") ? CHIP_NO_ERROR : TestReadsOnTimeAttributeFromDut_21(); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_21(); break; case 22: ChipLogProgress(chipTool, " ***** Test Step 22 : Reads OnOff attribute from DUT\n"); - err = ShouldSkip("A_ONOFF") ? CHIP_NO_ERROR : TestReadsOnOffAttributeFromDut_22(); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_22(); break; case 23: ChipLogProgress(chipTool, " ***** Test Step 23 : Reads OnTime attribute from DUT\n"); - err = ShouldSkip("A_ONTIME") ? CHIP_NO_ERROR : TestReadsOnTimeAttributeFromDut_23(); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_23(); break; case 24: ChipLogProgress(chipTool, " ***** Test Step 24 : Reads OffWaitTime attribute from DUT\n"); - err = ShouldSkip("A_OFFWAITTIME") ? CHIP_NO_ERROR : TestReadsOffWaitTimeAttributeFromDut_24(); + if (ShouldSkip("A_OFFWAITTIME")) + { + NextTest(); + return; + } + err = TestReadsOffWaitTimeAttributeFromDut_24(); break; case 25: ChipLogProgress(chipTool, " ***** Test Step 25 : Send On Command\n"); - err = ShouldSkip("CR_ON") ? CHIP_NO_ERROR : TestSendOnCommand_25(); + if (ShouldSkip("CR_ON")) + { + NextTest(); + return; + } + err = TestSendOnCommand_25(); break; case 26: ChipLogProgress(chipTool, " ***** Test Step 26 : Reads OnTime attribute from DUT\n"); - err = ShouldSkip("A_ONTIME") ? CHIP_NO_ERROR : TestReadsOnTimeAttributeFromDut_26(); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_26(); break; case 27: ChipLogProgress(chipTool, " ***** Test Step 27 : Reads OffWaitTime attribute from DUT\n"); - err = ShouldSkip("A_OFFWAITTIME") ? CHIP_NO_ERROR : TestReadsOffWaitTimeAttributeFromDut_27(); + if (ShouldSkip("A_OFFWAITTIME")) + { + NextTest(); + return; + } + err = TestReadsOffWaitTimeAttributeFromDut_27(); break; case 28: ChipLogProgress(chipTool, " ***** Test Step 28 : Send Off Command\n"); - err = ShouldSkip("CR_OFF") ? CHIP_NO_ERROR : TestSendOffCommand_28(); + if (ShouldSkip("CR_OFF")) + { + NextTest(); + return; + } + err = TestSendOffCommand_28(); break; case 29: ChipLogProgress(chipTool, " ***** Test Step 29 : Reads OnOff attribute from DUT\n"); - err = ShouldSkip("A_ONOFF") ? CHIP_NO_ERROR : TestReadsOnOffAttributeFromDut_29(); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_29(); break; case 30: ChipLogProgress(chipTool, " ***** Test Step 30 : Reads OnTime attribute from DUT\n"); - err = ShouldSkip("A_ONTIME") ? CHIP_NO_ERROR : TestReadsOnTimeAttributeFromDut_30(); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_30(); break; case 31: ChipLogProgress(chipTool, " ***** Test Step 31 : Reads OnOff attribute from DUT\n"); - err = ShouldSkip("A_ONOFF") ? CHIP_NO_ERROR : TestReadsOnOffAttributeFromDut_31(); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_31(); break; case 32: ChipLogProgress(chipTool, " ***** Test Step 32 : Reads OnTime attribute from DUT\n"); - err = ShouldSkip("A_ONTIME") ? CHIP_NO_ERROR : TestReadsOnTimeAttributeFromDut_32(); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_32(); break; case 33: ChipLogProgress(chipTool, " ***** Test Step 33 : Send On Command\n"); - err = ShouldSkip("CR_ON") ? CHIP_NO_ERROR : TestSendOnCommand_33(); + if (ShouldSkip("CR_ON")) + { + NextTest(); + return; + } + err = TestSendOnCommand_33(); break; case 34: ChipLogProgress(chipTool, " ***** Test Step 34 : Reads OnOff attribute from DUT\n"); - err = ShouldSkip("A_ONOFF") ? CHIP_NO_ERROR : TestReadsOnOffAttributeFromDut_34(); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_34(); break; case 35: ChipLogProgress(chipTool, " ***** Test Step 35 : Reads OnTime attribute from DUT\n"); - err = ShouldSkip("A_ONTIME") ? CHIP_NO_ERROR : TestReadsOnTimeAttributeFromDut_35(); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_35(); break; case 36: ChipLogProgress(chipTool, " ***** Test Step 36 : Reads OffWaitTime attribute from DUT\n"); - err = ShouldSkip("A_OFFWAITTIME") ? CHIP_NO_ERROR : TestReadsOffWaitTimeAttributeFromDut_36(); + if (ShouldSkip("A_OFFWAITTIME")) + { + NextTest(); + return; + } + err = TestReadsOffWaitTimeAttributeFromDut_36(); break; case 37: ChipLogProgress(chipTool, " ***** Test Step 37 : Send Off Command\n"); - err = ShouldSkip("CR_OFF") ? CHIP_NO_ERROR : TestSendOffCommand_37(); + if (ShouldSkip("CR_OFF")) + { + NextTest(); + return; + } + err = TestSendOffCommand_37(); break; case 38: ChipLogProgress(chipTool, " ***** Test Step 38 : Reads OnOff attribute from DUT\n"); - err = ShouldSkip("A_ONOFF") ? CHIP_NO_ERROR : TestReadsOnOffAttributeFromDut_38(); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_38(); break; case 39: ChipLogProgress(chipTool, " ***** Test Step 39 : Reads OnTime attribute from DUT\n"); - err = ShouldSkip("A_ONTIME") ? CHIP_NO_ERROR : TestReadsOnTimeAttributeFromDut_39(); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_39(); break; case 40: ChipLogProgress(chipTool, " ***** Test Step 40 : Reads OnOff attribute from DUT\n"); - err = ShouldSkip("A_ONOFF") ? CHIP_NO_ERROR : TestReadsOnOffAttributeFromDut_40(); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_40(); break; case 41: ChipLogProgress(chipTool, " ***** Test Step 41 : Reads OnTime attribute from DUT\n"); - err = ShouldSkip("A_ONTIME") ? CHIP_NO_ERROR : TestReadsOnTimeAttributeFromDut_41(); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_41(); break; case 42: ChipLogProgress(chipTool, " ***** Test Step 42 : Reads OffWaitTime attribute from DUT\n"); - err = ShouldSkip("A_OFFWAITTIME") ? CHIP_NO_ERROR : TestReadsOffWaitTimeAttributeFromDut_42(); + if (ShouldSkip("A_OFFWAITTIME")) + { + NextTest(); + return; + } + err = TestReadsOffWaitTimeAttributeFromDut_42(); break; case 43: ChipLogProgress(chipTool, " ***** Test Step 43 : Reads OnOff attribute from DUT\n"); - err = ShouldSkip("A_ONOFF") ? CHIP_NO_ERROR : TestReadsOnOffAttributeFromDut_43(); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_43(); break; case 44: ChipLogProgress(chipTool, " ***** Test Step 44 : Reads OnTime attribute from DUT\n"); - err = ShouldSkip("A_ONTIME") ? CHIP_NO_ERROR : TestReadsOnTimeAttributeFromDut_44(); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_44(); break; case 45: ChipLogProgress(chipTool, " ***** Test Step 45 : Reads OffWaitTime attribute from DUT\n"); - err = ShouldSkip("A_OFFWAITTIME") ? CHIP_NO_ERROR : TestReadsOffWaitTimeAttributeFromDut_45(); + if (ShouldSkip("A_OFFWAITTIME")) + { + NextTest(); + return; + } + err = TestReadsOffWaitTimeAttributeFromDut_45(); break; case 46: ChipLogProgress(chipTool, " ***** Test Step 46 : Send Off Command\n"); - err = ShouldSkip("CR_OFF") ? CHIP_NO_ERROR : TestSendOffCommand_46(); + if (ShouldSkip("CR_OFF")) + { + NextTest(); + return; + } + err = TestSendOffCommand_46(); break; } @@ -25530,15 +26074,30 @@ class Test_TC_PCC_2_2 : public TestCommand break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Write 1 to the OperationMode attribute to DUT: OperationMode\n"); - err = ShouldSkip("A_OPERATIONMODE") ? CHIP_NO_ERROR : TestWrite1ToTheOperationModeAttributeToDutOperationMode_1(); + if (ShouldSkip("A_OPERATIONMODE")) + { + NextTest(); + return; + } + err = TestWrite1ToTheOperationModeAttributeToDutOperationMode_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Write 2 to the OperationMode attribute to DUT: OperationMode\n"); - err = ShouldSkip("A_OPERATIONMODE") ? CHIP_NO_ERROR : TestWrite2ToTheOperationModeAttributeToDutOperationMode_2(); + if (ShouldSkip("A_OPERATIONMODE")) + { + NextTest(); + return; + } + err = TestWrite2ToTheOperationModeAttributeToDutOperationMode_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Write 3 to the OperationMode attribute to DUT: OperationMode\n"); - err = ShouldSkip("A_OPERATIONMODE") ? CHIP_NO_ERROR : TestWrite3ToTheOperationModeAttributeToDutOperationMode_3(); + if (ShouldSkip("A_OPERATIONMODE")) + { + NextTest(); + return; + } + err = TestWrite3ToTheOperationModeAttributeToDutOperationMode_3(); break; } @@ -25685,39 +26244,84 @@ class Test_TC_PCC_2_3 : public TestCommand break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Write 0 to the OperationMode attribute to DUT\n"); - err = ShouldSkip("A_OPERATIONMODE") ? CHIP_NO_ERROR : TestWrite0ToTheOperationModeAttributeToDut_1(); + if (ShouldSkip("A_OPERATIONMODE")) + { + NextTest(); + return; + } + err = TestWrite0ToTheOperationModeAttributeToDut_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the attribute: EffectiveOperationMode\n"); - err = ShouldSkip("A_EFFECTIVEOPERATIONMODE") ? CHIP_NO_ERROR : TestReadsTheAttributeEffectiveOperationMode_2(); + if (ShouldSkip("A_EFFECTIVEOPERATIONMODE")) + { + NextTest(); + return; + } + err = TestReadsTheAttributeEffectiveOperationMode_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Write 0 to the ControlMode attribute to DUT\n"); - err = ShouldSkip("A_CONTROLMODE") ? CHIP_NO_ERROR : TestWrite0ToTheControlModeAttributeToDut_3(); + if (ShouldSkip("A_CONTROLMODE")) + { + NextTest(); + return; + } + err = TestWrite0ToTheControlModeAttributeToDut_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the attribute: EffectiveControlMode\n"); - err = ShouldSkip("A_EFFECTIVECONTROLMODE") ? CHIP_NO_ERROR : TestReadsTheAttributeEffectiveControlMode_4(); + if (ShouldSkip("A_EFFECTIVECONTROLMODE")) + { + NextTest(); + return; + } + err = TestReadsTheAttributeEffectiveControlMode_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Write 1 to the ControlMode attribute to DUT\n"); - err = ShouldSkip("A_CONTROLMODE") ? CHIP_NO_ERROR : TestWrite1ToTheControlModeAttributeToDut_5(); + if (ShouldSkip("A_CONTROLMODE")) + { + NextTest(); + return; + } + err = TestWrite1ToTheControlModeAttributeToDut_5(); break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Write 2 to the ControlMode attribute to DUT\n"); - err = ShouldSkip("A_CONTROLMODE") ? CHIP_NO_ERROR : TestWrite2ToTheControlModeAttributeToDut_6(); + if (ShouldSkip("A_CONTROLMODE")) + { + NextTest(); + return; + } + err = TestWrite2ToTheControlModeAttributeToDut_6(); break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Write 3 to the ControlMode attribute to DUT\n"); - err = ShouldSkip("A_CONTROLMODE") ? CHIP_NO_ERROR : TestWrite3ToTheControlModeAttributeToDut_7(); + if (ShouldSkip("A_CONTROLMODE")) + { + NextTest(); + return; + } + err = TestWrite3ToTheControlModeAttributeToDut_7(); break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Write 5 to the ControlMode attribute to DUT\n"); - err = ShouldSkip("A_CONTROLMODE") ? CHIP_NO_ERROR : TestWrite5ToTheControlModeAttributeToDut_8(); + if (ShouldSkip("A_CONTROLMODE")) + { + NextTest(); + return; + } + err = TestWrite5ToTheControlModeAttributeToDut_8(); break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Write 7 to the ControlMode attribute to DUT\n"); - err = ShouldSkip("A_CONTROLMODE") ? CHIP_NO_ERROR : TestWrite7ToTheControlModeAttributeToDut_9(); + if (ShouldSkip("A_CONTROLMODE")) + { + NextTest(); + return; + } + err = TestWrite7ToTheControlModeAttributeToDut_9(); break; } @@ -26374,11 +26978,21 @@ class Test_TC_RH_2_2 : public TestCommand break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Reads MeasuredValue attribute from DUT\n"); - err = ShouldSkip("A_RELATIVEHUMIDITY") ? CHIP_NO_ERROR : TestReadsMeasuredValueAttributeFromDut_1(); + if (ShouldSkip("A_RELATIVEHUMIDITY")) + { + NextTest(); + return; + } + err = TestReadsMeasuredValueAttributeFromDut_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Read the mandatory attribute: MeasuredValue\n"); - err = ShouldSkip("A_RELATIVEHUMIDITY") ? CHIP_NO_ERROR : TestReadTheMandatoryAttributeMeasuredValue_2(); + if (ShouldSkip("A_RELATIVEHUMIDITY")) + { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributeMeasuredValue_2(); break; } @@ -26847,11 +27461,21 @@ class Test_TC_TM_2_2 : public TestCommand break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Reads MeasuredValue attribute from DUT\n"); - err = ShouldSkip("A_TEMPERATURE") ? CHIP_NO_ERROR : TestReadsMeasuredValueAttributeFromDut_1(); + if (ShouldSkip("A_TEMPERATURE")) + { + NextTest(); + return; + } + err = TestReadsMeasuredValueAttributeFromDut_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Read the mandatory attribute: MeasuredValue\n"); - err = ShouldSkip("A_TEMPERATURE") ? CHIP_NO_ERROR : TestReadTheMandatoryAttributeMeasuredValue_2(); + if (ShouldSkip("A_TEMPERATURE")) + { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributeMeasuredValue_2(); break; } @@ -29284,344 +29908,509 @@ class Test_TC_TSTAT_2_2 : public TestCommand ChipLogProgress(chipTool, " ***** Test Step 1 : Reads OccupiedCoolingSetpoint attribute from Server DUT and verifies that the " "value is within range\n"); - err = ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT") - ? CHIP_NO_ERROR - : TestReadsOccupiedCoolingSetpointAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_1(); + if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) + { + NextTest(); + return; + } + err = TestReadsOccupiedCoolingSetpointAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_1(); break; case 2: ChipLogProgress( chipTool, " ***** Test Step 2 : Writes a value back that is different but valid for OccupiedCoolingSetpoint attribute\n"); - err = ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT") - ? CHIP_NO_ERROR - : TestWritesAValueBackThatIsDifferentButValidForOccupiedCoolingSetpointAttribute_2(); + if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) + { + NextTest(); + return; + } + err = TestWritesAValueBackThatIsDifferentButValidForOccupiedCoolingSetpointAttribute_2(); break; case 3: ChipLogProgress( chipTool, " ***** Test Step 3 : Reads it back again to confirm the successful write of OccupiedCoolingSetpoint attribute\n"); - err = ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT") - ? CHIP_NO_ERROR - : TestReadsItBackAgainToConfirmTheSuccessfulWriteOfOccupiedCoolingSetpointAttribute_3(); + if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) + { + NextTest(); + return; + } + err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfOccupiedCoolingSetpointAttribute_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Writes the limit of MinCoolSetpointLimit to OccupiedCoolingSetpoint attribute\n"); - err = ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT") - ? CHIP_NO_ERROR - : TestWritesTheLimitOfMinCoolSetpointLimitToOccupiedCoolingSetpointAttribute_4(); + if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfMinCoolSetpointLimitToOccupiedCoolingSetpointAttribute_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Writes the limit of MaxCoolSetpointLimit to OccupiedCoolingSetpoint attribute\n"); - err = ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT") - ? CHIP_NO_ERROR - : TestWritesTheLimitOfMaxCoolSetpointLimitToOccupiedCoolingSetpointAttribute_5(); + if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfMaxCoolSetpointLimitToOccupiedCoolingSetpointAttribute_5(); break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Reads OccupiedHeatingSetpoint attribute from Server DUT and verifies that the " "value is within range\n"); - err = ShouldSkip("A_OCCUPIEDHEATINGSETPOINT") - ? CHIP_NO_ERROR - : TestReadsOccupiedHeatingSetpointAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_6(); + if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) + { + NextTest(); + return; + } + err = TestReadsOccupiedHeatingSetpointAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_6(); break; case 7: ChipLogProgress( chipTool, " ***** Test Step 7 : Writes a value back that is different but valid for OccupiedHeatingSetpoint attribute\n"); - err = ShouldSkip("A_OCCUPIEDHEATINGSETPOINT") - ? CHIP_NO_ERROR - : TestWritesAValueBackThatIsDifferentButValidForOccupiedHeatingSetpointAttribute_7(); + if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) + { + NextTest(); + return; + } + err = TestWritesAValueBackThatIsDifferentButValidForOccupiedHeatingSetpointAttribute_7(); break; case 8: ChipLogProgress( chipTool, " ***** Test Step 8 : Reads it back again to confirm the successful write of OccupiedHeatingSetpoint attribute\n"); - err = ShouldSkip("A_OCCUPIEDHEATINGSETPOINT") - ? CHIP_NO_ERROR - : TestReadsItBackAgainToConfirmTheSuccessfulWriteOfOccupiedHeatingSetpointAttribute_8(); + if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) + { + NextTest(); + return; + } + err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfOccupiedHeatingSetpointAttribute_8(); break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Writes the limit of MinHeatSetpointLimit to OccupiedHeatingSetpoint attribute\n"); - err = ShouldSkip("A_OCCUPIEDHEATINGSETPOINT") - ? CHIP_NO_ERROR - : TestWritesTheLimitOfMinHeatSetpointLimitToOccupiedHeatingSetpointAttribute_9(); + if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfMinHeatSetpointLimitToOccupiedHeatingSetpointAttribute_9(); break; case 10: ChipLogProgress( chipTool, " ***** Test Step 10 : Writes the limit of MaxHeatSetpointLimit to OccupiedHeatingSetpoint attribute\n"); - err = ShouldSkip("A_OCCUPIEDHEATINGSETPOINT") - ? CHIP_NO_ERROR - : TestWritesTheLimitOfMaxHeatSetpointLimitToOccupiedHeatingSetpointAttribute_10(); + if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfMaxHeatSetpointLimitToOccupiedHeatingSetpointAttribute_10(); break; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : Reads MinHeatSetpointLimit attribute from Server DUT and verifies that the " "value is within range\n"); - err = ShouldSkip("A_MINHEATSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestReadsMinHeatSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_11(); + if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestReadsMinHeatSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_11(); break; case 12: ChipLogProgress( chipTool, " ***** Test Step 12 : Writes a value back that is different but valid for MinHeatSetpointLimit attribute\n"); - err = ShouldSkip("A_MINHEATSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesAValueBackThatIsDifferentButValidForMinHeatSetpointLimitAttribute_12(); + if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesAValueBackThatIsDifferentButValidForMinHeatSetpointLimitAttribute_12(); break; case 13: ChipLogProgress( chipTool, " ***** Test Step 13 : Reads it back again to confirm the successful write of MinHeatSetpointLimit attribute\n"); - err = ShouldSkip("A_MINHEATSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinHeatSetpointLimitAttribute_13(); + if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinHeatSetpointLimitAttribute_13(); break; case 14: ChipLogProgress( chipTool, " ***** Test Step 14 : Writes the limit of AbsMinHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); - err = ShouldSkip("A_MINHEATSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesTheLimitOfAbsMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_14(); + if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfAbsMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_14(); break; case 15: ChipLogProgress( chipTool, " ***** Test Step 15 : Writes the limit of AbsMaxHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); - err = ShouldSkip("A_MINHEATSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_15(); + if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_15(); break; case 16: ChipLogProgress(chipTool, " ***** Test Step 16 : Reads MaxHeatSetpointLimit attribute from Server DUT and verifies that the " "value is within range\n"); - err = ShouldSkip("A_MAXHEATSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestReadsMaxHeatSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_16(); + if (ShouldSkip("A_MAXHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestReadsMaxHeatSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_16(); break; case 17: ChipLogProgress( chipTool, " ***** Test Step 17 : Writes a value back that is different but valid for MaxHeatSetpointLimit attribute\n"); - err = ShouldSkip("A_MAXHEATSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesAValueBackThatIsDifferentButValidForMaxHeatSetpointLimitAttribute_17(); + if (ShouldSkip("A_MAXHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesAValueBackThatIsDifferentButValidForMaxHeatSetpointLimitAttribute_17(); break; case 18: ChipLogProgress( chipTool, " ***** Test Step 18 : Reads it back again to confirm the successful write of MaxHeatSetpointLimit attribute\n"); - err = ShouldSkip("A_MAXHEATSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxHeatSetpointLimitAttribute_18(); + if (ShouldSkip("A_MAXHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxHeatSetpointLimitAttribute_18(); break; case 19: ChipLogProgress( chipTool, " ***** Test Step 19 : Writes the limit of AbsMinHeatSetpointLimit to MaxHeatSetpointLimit attribute\n"); - err = ShouldSkip("A_MAXHEATSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesTheLimitOfAbsMinHeatSetpointLimitToMaxHeatSetpointLimitAttribute_19(); + if (ShouldSkip("A_MAXHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfAbsMinHeatSetpointLimitToMaxHeatSetpointLimitAttribute_19(); break; case 20: ChipLogProgress( chipTool, " ***** Test Step 20 : Writes the limit of AbsMaxHeatSetpointLimit to MaxHeatSetpointLimit attribute\n"); - err = ShouldSkip("A_MAXHEATSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMaxHeatSetpointLimitAttribute_20(); + if (ShouldSkip("A_MAXHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMaxHeatSetpointLimitAttribute_20(); break; case 21: ChipLogProgress(chipTool, " ***** Test Step 21 : Reads MinCoolSetpointLimit attribute from Server DUT and verifies that the " "value is within range\n"); - err = ShouldSkip("A_MINCOOLSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestReadsMinCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_21(); + if (ShouldSkip("A_MINCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestReadsMinCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_21(); break; case 22: ChipLogProgress( chipTool, " ***** Test Step 22 : Writes a value back that is different but valid for MinCoolSetpointLimit attribute\n"); - err = ShouldSkip("A_MINCOOLSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesAValueBackThatIsDifferentButValidForMinCoolSetpointLimitAttribute_22(); + if (ShouldSkip("A_MINCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesAValueBackThatIsDifferentButValidForMinCoolSetpointLimitAttribute_22(); break; case 23: ChipLogProgress( chipTool, " ***** Test Step 23 : Reads it back again to confirm the successful write of MinCoolSetpointLimit attribute\n"); - err = ShouldSkip("A_MINCOOLSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinCoolSetpointLimitAttribute_23(); + if (ShouldSkip("A_MINCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinCoolSetpointLimitAttribute_23(); break; case 24: ChipLogProgress( chipTool, " ***** Test Step 24 : Writes the limit of AbsMinCoolSetpointLimit to MinCoolSetpointLimit attribute\n"); - err = ShouldSkip("A_MINCOOLSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesTheLimitOfAbsMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_24(); + if (ShouldSkip("A_MINCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfAbsMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_24(); break; case 25: ChipLogProgress(chipTool, " ***** Test Step 25 : Writes the limit of MaxCoolSetpointLimit to MinCoolSetpointLimit attribute\n"); - err = ShouldSkip("A_MINCOOLSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesTheLimitOfMaxCoolSetpointLimitToMinCoolSetpointLimitAttribute_25(); + if (ShouldSkip("A_MINCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfMaxCoolSetpointLimitToMinCoolSetpointLimitAttribute_25(); break; case 26: ChipLogProgress(chipTool, " ***** Test Step 26 : Reads MaxCoolSetpointLimit attribute from Server DUT and verifies that the " "value is within range\n"); - err = ShouldSkip("A_MAXCOOLSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestReadsMaxCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_26(); + if (ShouldSkip("A_MAXCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestReadsMaxCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_26(); break; case 27: ChipLogProgress( chipTool, " ***** Test Step 27 : Writes a value back that is different but valid for MaxCoolSetpointLimit attribute\n"); - err = ShouldSkip("A_MAXCOOLSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesAValueBackThatIsDifferentButValidForMaxCoolSetpointLimitAttribute_27(); + if (ShouldSkip("A_MAXCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesAValueBackThatIsDifferentButValidForMaxCoolSetpointLimitAttribute_27(); break; case 28: ChipLogProgress( chipTool, " ***** Test Step 28 : Reads it back again to confirm the successful write of MaxCoolSetpointLimit attribute\n"); - err = ShouldSkip("A_MAXCOOLSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxCoolSetpointLimitAttribute_28(); + if (ShouldSkip("A_MAXCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxCoolSetpointLimitAttribute_28(); break; case 29: ChipLogProgress( chipTool, " ***** Test Step 29 : Writes the limit of AbsMinCoolSetpointLimit to MaxCoolSetpointLimit attribute\n"); - err = ShouldSkip("A_MAXCOOLSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesTheLimitOfAbsMinCoolSetpointLimitToMaxCoolSetpointLimitAttribute_29(); + if (ShouldSkip("A_MAXCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfAbsMinCoolSetpointLimitToMaxCoolSetpointLimitAttribute_29(); break; case 30: ChipLogProgress(chipTool, " ***** Test Step 30 : Writes the limit of MaxCoolSetpointLimit to MaxCoolSetpointLimit attribute\n"); - err = ShouldSkip("A_MAXCOOLSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesTheLimitOfMaxCoolSetpointLimitToMaxCoolSetpointLimitAttribute_30(); + if (ShouldSkip("A_MAXCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfMaxCoolSetpointLimitToMaxCoolSetpointLimitAttribute_30(); break; case 31: ChipLogProgress( chipTool, " ***** Test Step 31 : Writes (sets back) the limit of MinHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); - err = ShouldSkip("A_MINHEATSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesSetsBackTheLimitOfMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_31(); + if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesSetsBackTheLimitOfMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_31(); break; case 32: ChipLogProgress( chipTool, " ***** Test Step 32 : Writes (sets back) the limit of MaxHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); - err = ShouldSkip("A_MINHEATSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesSetsBackTheLimitOfMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_32(); + if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesSetsBackTheLimitOfMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_32(); break; case 33: ChipLogProgress( chipTool, " ***** Test Step 33 : Writes (sets back) the limit of MinHeatSetpointLimit to MaxHeatSetpointLimit attribute\n"); - err = ShouldSkip("A_MINHEATSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesSetsBackTheLimitOfMinHeatSetpointLimitToMaxHeatSetpointLimitAttribute_33(); + if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesSetsBackTheLimitOfMinHeatSetpointLimitToMaxHeatSetpointLimitAttribute_33(); break; case 34: ChipLogProgress( chipTool, " ***** Test Step 34 : Writes (sets back) the limit of MaxHeatSetpointLimit to MaxHeatSetpointLimit attribute\n"); - err = ShouldSkip("A_MINHEATSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesSetsBackTheLimitOfMaxHeatSetpointLimitToMaxHeatSetpointLimitAttribute_34(); + if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesSetsBackTheLimitOfMaxHeatSetpointLimitToMaxHeatSetpointLimitAttribute_34(); break; case 35: ChipLogProgress( chipTool, " ***** Test Step 35 : Writes (sets back) the limit of MinCoolSetpointLimit to MinCoolSetpointLimit attribute\n"); - err = ShouldSkip("A_MINCOOLSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesSetsBackTheLimitOfMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_35(); + if (ShouldSkip("A_MINCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesSetsBackTheLimitOfMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_35(); break; case 36: ChipLogProgress( chipTool, " ***** Test Step 36 : Writes (sets back) the limit of MaxCoolSetpointLimit to MinCoolSetpointLimit attribute\n"); - err = ShouldSkip("A_MINCOOLSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesSetsBackTheLimitOfMaxCoolSetpointLimitToMinCoolSetpointLimitAttribute_36(); + if (ShouldSkip("A_MINCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesSetsBackTheLimitOfMaxCoolSetpointLimitToMinCoolSetpointLimitAttribute_36(); break; case 37: ChipLogProgress( chipTool, " ***** Test Step 37 : Writes (sets back) the limit of MinCoolSetpointLimit to MaxCoolSetpointLimit attribute\n"); - err = ShouldSkip("A_MAXCOOLSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesSetsBackTheLimitOfMinCoolSetpointLimitToMaxCoolSetpointLimitAttribute_37(); + if (ShouldSkip("A_MAXCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesSetsBackTheLimitOfMinCoolSetpointLimitToMaxCoolSetpointLimitAttribute_37(); break; case 38: ChipLogProgress( chipTool, " ***** Test Step 38 : Writes (sets back) the limit of MaxCoolSetpointLimit to MaxCoolSetpointLimit attribute\n"); - err = ShouldSkip("A_MAXCOOLSETPOINTLIMIT") - ? CHIP_NO_ERROR - : TestWritesSetsBackTheLimitOfMaxCoolSetpointLimitToMaxCoolSetpointLimitAttribute_38(); + if (ShouldSkip("A_MAXCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesSetsBackTheLimitOfMaxCoolSetpointLimitToMaxCoolSetpointLimitAttribute_38(); break; case 39: ChipLogProgress( chipTool, " ***** Test Step 39 : Reads ControlSequenceOfOperation from Server DUT and verifies that the value is valid\n"); - err = ShouldSkip("A_CONTROLSEQUENCEOFOPERATION") - ? CHIP_NO_ERROR - : TestReadsControlSequenceOfOperationFromServerDutAndVerifiesThatTheValueIsValid_39(); + if (ShouldSkip("A_CONTROLSEQUENCEOFOPERATION")) + { + NextTest(); + return; + } + err = TestReadsControlSequenceOfOperationFromServerDutAndVerifiesThatTheValueIsValid_39(); break; case 40: ChipLogProgress( chipTool, " ***** Test Step 40 : Write Attribute command for ControlSequenceOfOperation with a new valid value\n"); - err = ShouldSkip("A_CONTROLSEQUENCEOFOPERATION") - ? CHIP_NO_ERROR - : TestWriteAttributeCommandForControlSequenceOfOperationWithANewValidValue_40(); + if (ShouldSkip("A_CONTROLSEQUENCEOFOPERATION")) + { + NextTest(); + return; + } + err = TestWriteAttributeCommandForControlSequenceOfOperationWithANewValidValue_40(); break; case 41: ChipLogProgress(chipTool, " ***** Test Step 41 : Read it back again to confirm the successful write\n"); - err = ShouldSkip("A_CONTROLSEQUENCEOFOPERATION") ? CHIP_NO_ERROR : TestReadItBackAgainToConfirmTheSuccessfulWrite_41(); + if (ShouldSkip("A_CONTROLSEQUENCEOFOPERATION")) + { + NextTest(); + return; + } + err = TestReadItBackAgainToConfirmTheSuccessfulWrite_41(); break; case 42: ChipLogProgress(chipTool, " ***** Test Step 42 : Sets OccupiedHeatingSetpoint to default value\n"); - err = ShouldSkip("A_OCCUPIEDHEATINGSETPOINT") ? CHIP_NO_ERROR : TestSetsOccupiedHeatingSetpointToDefaultValue_42(); + if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) + { + NextTest(); + return; + } + err = TestSetsOccupiedHeatingSetpointToDefaultValue_42(); break; case 43: ChipLogProgress(chipTool, " ***** Test Step 43 : Sets OccupiedHeatingSetpoint to default value\n"); - err = ShouldSkip("A_OCCUPIEDHEATINGSETPOINT") ? CHIP_NO_ERROR : TestSetsOccupiedHeatingSetpointToDefaultValue_43(); + if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) + { + NextTest(); + return; + } + err = TestSetsOccupiedHeatingSetpointToDefaultValue_43(); break; case 44: ChipLogProgress(chipTool, " ***** Test Step 44 : Sets OccupiedCoolingSetpoint to default value\n"); - err = ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT") ? CHIP_NO_ERROR : TestSetsOccupiedCoolingSetpointToDefaultValue_44(); + if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) + { + NextTest(); + return; + } + err = TestSetsOccupiedCoolingSetpointToDefaultValue_44(); break; case 45: ChipLogProgress(chipTool, " ***** Test Step 45 : Sets OccupiedCoolingSetpoint to default value\n"); - err = ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT") ? CHIP_NO_ERROR : TestSetsOccupiedCoolingSetpointToDefaultValue_45(); + if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) + { + NextTest(); + return; + } + err = TestSetsOccupiedCoolingSetpointToDefaultValue_45(); break; case 46: ChipLogProgress(chipTool, " ***** Test Step 46 : Sets OccupiedCoolingSetpoint to default value\n"); - err = ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT") ? CHIP_NO_ERROR : TestSetsOccupiedCoolingSetpointToDefaultValue_46(); + if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) + { + NextTest(); + return; + } + err = TestSetsOccupiedCoolingSetpointToDefaultValue_46(); break; case 47: ChipLogProgress(chipTool, " ***** Test Step 47 : Sets OccupiedHeatingSetpoint to default value\n"); - err = ShouldSkip("A_OCCUPIEDHEATINGSETPOINT") ? CHIP_NO_ERROR : TestSetsOccupiedHeatingSetpointToDefaultValue_47(); + if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) + { + NextTest(); + return; + } + err = TestSetsOccupiedHeatingSetpointToDefaultValue_47(); break; case 48: ChipLogProgress(chipTool, " ***** Test Step 48 : Sets OccupiedCoolingSetpoint to default value\n"); - err = ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT") ? CHIP_NO_ERROR : TestSetsOccupiedCoolingSetpointToDefaultValue_48(); + if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) + { + NextTest(); + return; + } + err = TestSetsOccupiedCoolingSetpointToDefaultValue_48(); break; case 49: ChipLogProgress(chipTool, " ***** Test Step 49 : Sets OccupiedHeatingSetpoint to default value\n"); - err = ShouldSkip("A_OCCUPIEDHEATINGSETPOINT") ? CHIP_NO_ERROR : TestSetsOccupiedHeatingSetpointToDefaultValue_49(); + if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) + { + NextTest(); + return; + } + err = TestSetsOccupiedHeatingSetpointToDefaultValue_49(); break; } @@ -31702,51 +32491,95 @@ class Test_TC_TSUIC_2_2 : public TestCommand break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Writes a value of 0 to TemperatureDisplayMode attribute of DUT\n"); - err = ShouldSkip("A_TEMPERATURE_DISPLAY_MODE") ? CHIP_NO_ERROR - : TestWritesAValueOf0ToTemperatureDisplayModeAttributeOfDut_1(); + if (ShouldSkip("A_TEMPERATURE_DISPLAY_MODE")) + { + NextTest(); + return; + } + err = TestWritesAValueOf0ToTemperatureDisplayModeAttributeOfDut_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Writes a value of 1 to TemperatureDisplayMode attribute of DUT\n"); - err = ShouldSkip("A_TEMPERATURE_DISPLAY_MODE") ? CHIP_NO_ERROR - : TestWritesAValueOf1ToTemperatureDisplayModeAttributeOfDut_2(); + if (ShouldSkip("A_TEMPERATURE_DISPLAY_MODE")) + { + NextTest(); + return; + } + err = TestWritesAValueOf1ToTemperatureDisplayModeAttributeOfDut_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Writes a value of 0 to KeypadLockout attribute of DUT\n"); - err = ShouldSkip("A_KEYPAD_LOCKOUT") ? CHIP_NO_ERROR : TestWritesAValueOf0ToKeypadLockoutAttributeOfDut_3(); + if (ShouldSkip("A_KEYPAD_LOCKOUT")) + { + NextTest(); + return; + } + err = TestWritesAValueOf0ToKeypadLockoutAttributeOfDut_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Writes a value of 1 to KeypadLockout attribute of DUT\n"); - err = ShouldSkip("A_KEYPAD_LOCKOUT") ? CHIP_NO_ERROR : TestWritesAValueOf1ToKeypadLockoutAttributeOfDut_4(); + if (ShouldSkip("A_KEYPAD_LOCKOUT")) + { + NextTest(); + return; + } + err = TestWritesAValueOf1ToKeypadLockoutAttributeOfDut_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Writes a value of 2 to KeypadLockout attribute of DUT\n"); - err = ShouldSkip("A_KEYPAD_LOCKOUT") ? CHIP_NO_ERROR : TestWritesAValueOf2ToKeypadLockoutAttributeOfDut_5(); + if (ShouldSkip("A_KEYPAD_LOCKOUT")) + { + NextTest(); + return; + } + err = TestWritesAValueOf2ToKeypadLockoutAttributeOfDut_5(); break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Writes a value of 3 to KeypadLockout attribute of DUT\n"); - err = ShouldSkip("A_KEYPAD_LOCKOUT") ? CHIP_NO_ERROR : TestWritesAValueOf3ToKeypadLockoutAttributeOfDut_6(); + if (ShouldSkip("A_KEYPAD_LOCKOUT")) + { + NextTest(); + return; + } + err = TestWritesAValueOf3ToKeypadLockoutAttributeOfDut_6(); break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Writes a value of 4 to KeypadLockout attribute of DUT\n"); - err = ShouldSkip("A_KEYPAD_LOCKOUT") ? CHIP_NO_ERROR : TestWritesAValueOf4ToKeypadLockoutAttributeOfDut_7(); + if (ShouldSkip("A_KEYPAD_LOCKOUT")) + { + NextTest(); + return; + } + err = TestWritesAValueOf4ToKeypadLockoutAttributeOfDut_7(); break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Writes a value of 5 to KeypadLockout attribute of DUT\n"); - err = ShouldSkip("A_KEYPAD_LOCKOUT") ? CHIP_NO_ERROR : TestWritesAValueOf5ToKeypadLockoutAttributeOfDut_8(); + if (ShouldSkip("A_KEYPAD_LOCKOUT")) + { + NextTest(); + return; + } + err = TestWritesAValueOf5ToKeypadLockoutAttributeOfDut_8(); break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Writes a value of 0 to ScheduleProgrammingVisibility attribute of DUT\n"); - err = ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY") - ? CHIP_NO_ERROR - : TestWritesAValueOf0ToScheduleProgrammingVisibilityAttributeOfDut_9(); + if (ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY")) + { + NextTest(); + return; + } + err = TestWritesAValueOf0ToScheduleProgrammingVisibilityAttributeOfDut_9(); break; case 10: ChipLogProgress(chipTool, " ***** Test Step 10 : Writes a value of 1 to ScheduleProgrammingVisibility attribute of DUT\n"); - err = ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY") - ? CHIP_NO_ERROR - : TestWritesAValueOf1ToScheduleProgrammingVisibilityAttributeOfDut_10(); + if (ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY")) + { + NextTest(); + return; + } + err = TestWritesAValueOf1ToScheduleProgrammingVisibilityAttributeOfDut_10(); break; } @@ -34597,11 +35430,21 @@ class Test_TC_WNCV_2_4 : public TestCommand break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Reads Type attribute from DUT\n"); - err = ShouldSkip("A_TYPE") ? CHIP_NO_ERROR : TestReadsTypeAttributeFromDut_1(); + if (ShouldSkip("A_TYPE")) + { + NextTest(); + return; + } + err = TestReadsTypeAttributeFromDut_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Reads Type attribute constraints\n"); - err = ShouldSkip("A_TYPE") ? CHIP_NO_ERROR : TestReadsTypeAttributeConstraints_2(); + if (ShouldSkip("A_TYPE")) + { + NextTest(); + return; + } + err = TestReadsTypeAttributeConstraints_2(); break; } @@ -34730,11 +35573,21 @@ class Test_TC_WNCV_2_5 : public TestCommand break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Reads EndProductType attribute from DUT\n"); - err = ShouldSkip("A_ENDPRODUCTTYPE") ? CHIP_NO_ERROR : TestReadsEndProductTypeAttributeFromDut_1(); + if (ShouldSkip("A_ENDPRODUCTTYPE")) + { + NextTest(); + return; + } + err = TestReadsEndProductTypeAttributeFromDut_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Reads EndProductType attribute constraints from DUT\n"); - err = ShouldSkip("A_ENDPRODUCTTYPE") ? CHIP_NO_ERROR : TestReadsEndProductTypeAttributeConstraintsFromDut_2(); + if (ShouldSkip("A_ENDPRODUCTTYPE")) + { + NextTest(); + return; + } + err = TestReadsEndProductTypeAttributeConstraintsFromDut_2(); break; } @@ -60857,12 +61710,21 @@ class Test_TC_SWDIAG_1_1 : public TestCommand break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Reads CurrentHeapUsed non-global attribute value from DUT\n"); - err = ShouldSkip("A_CURRENTHEAPUSED") ? CHIP_NO_ERROR : TestReadsCurrentHeapUsedNonGlobalAttributeValueFromDut_2(); + if (ShouldSkip("A_CURRENTHEAPUSED")) + { + NextTest(); + return; + } + err = TestReadsCurrentHeapUsedNonGlobalAttributeValueFromDut_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Reads CurrentHeapHighWaterMark non-global attribute value from DUT\n"); - err = ShouldSkip("A_CURRENTHEAPHIGHWATERMARK") ? CHIP_NO_ERROR - : TestReadsCurrentHeapHighWaterMarkNonGlobalAttributeValueFromDut_3(); + if (ShouldSkip("A_CURRENTHEAPHIGHWATERMARK")) + { + NextTest(); + return; + } + err = TestReadsCurrentHeapHighWaterMarkNonGlobalAttributeValueFromDut_3(); break; } @@ -61083,12 +61945,21 @@ class Test_TC_SWDIAG_3_1 : public TestCommand break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Reads CurrentHeapUsed attribute value from DUT\n"); - err = ShouldSkip("A_CURRENTHEAPUSED") ? CHIP_NO_ERROR : TestReadsCurrentHeapUsedAttributeValueFromDut_1(); + if (ShouldSkip("A_CURRENTHEAPUSED")) + { + NextTest(); + return; + } + err = TestReadsCurrentHeapUsedAttributeValueFromDut_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Reads CurrentHeapHighWaterMark attribute value from DUT\n"); - err = ShouldSkip("A_CURRENTHEAPHIGHWATERMARK") ? CHIP_NO_ERROR - : TestReadsCurrentHeapHighWaterMarkAttributeValueFromDut_2(); + if (ShouldSkip("A_CURRENTHEAPHIGHWATERMARK")) + { + NextTest(); + return; + } + err = TestReadsCurrentHeapHighWaterMarkAttributeValueFromDut_2(); break; } From 781f5405b2cdf099ec70ce16b8bf3f139832dbac Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 11 Jan 2022 15:49:49 -0500 Subject: [PATCH 42/64] Add shell to build_examples for host (#13426) * Add shell to build_examples for host * Update unit tests * Fix naming for app: chip-shell instead of chip-shell-app --- scripts/build/build/targets.py | 1 + scripts/build/builders/host.py | 6 ++++ scripts/build/testdata/build_linux_on_x64.txt | 28 +++++++++++++++++++ 3 files changed, 35 insertions(+) diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index 2ea91ae749ff8b..6cb91e05cd2cd2 100644 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -152,6 +152,7 @@ def HostTargets(): app_targets.append(target.Extend('thermostat', app=HostApp.THERMOSTAT)) app_targets.append(target.Extend('minmdns', app=HostApp.MIN_MDNS)) app_targets.append(target.Extend('door-lock', app=HostApp.LOCK)) + app_targets.append(target.Extend('shell', app=HostApp.SHELL)) # Possible build variants. Note that number of potential # builds is exponential here diff --git a/scripts/build/builders/host.py b/scripts/build/builders/host.py index 061f671222cb35..047d7a2a959fef 100644 --- a/scripts/build/builders/host.py +++ b/scripts/build/builders/host.py @@ -29,6 +29,7 @@ class HostApp(Enum): TV_APP = auto() LOCK = auto() TESTS = auto() + SHELL = auto() def ExamplePath(self): if self == HostApp.ALL_CLUSTERS: @@ -47,6 +48,8 @@ def ExamplePath(self): return 'door-lock-app/linux' elif self == HostApp.TESTS: return '../' + elif self == HostApp.SHELL: + return 'shell/standalone' else: raise Exception('Unknown app type: %r' % self) @@ -77,6 +80,9 @@ def OutputNames(self): yield 'chip-door-lock-app.map' elif self == HostApp.TESTS: pass + elif self == HostApp.SHELL: + yield 'chip-shell' + yield 'chip-shell.map' else: raise Exception('Unknown app type: %r' % self) diff --git a/scripts/build/testdata/build_linux_on_x64.txt b/scripts/build/testdata/build_linux_on_x64.txt index 343a8a4c38eff6..3b2b4c3f4b49e4 100644 --- a/scripts/build/testdata/build_linux_on_x64.txt +++ b/scripts/build/testdata/build_linux_on_x64.txt @@ -41,6 +41,16 @@ bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/minimal-mdns '"'"'--args=chip_inet_config_enable_ipv4=false target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-minmdns-ipv6only' +# Generating linux-arm64-shell +bash -c ' +PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/shell/standalone '"'"'--args=target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-shell' + +# Generating linux-arm64-shell-ipv6only +bash -c ' +PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/shell/standalone '"'"'--args=chip_inet_config_enable_ipv4=false target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-shell-ipv6only' + # Generating linux-arm64-thermostat bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ @@ -81,6 +91,12 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/exa # Generating linux-x64-rpc-console gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/common/pigweed/rpc_console {out}/linux-x64-rpc-console +# Generating linux-x64-shell +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/shell/standalone {out}/linux-x64-shell + +# Generating linux-x64-shell-ipv6only +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/shell/standalone --args=chip_inet_config_enable_ipv4=false {out}/linux-x64-shell-ipv6only + # Generating linux-x64-tests gn gen --check --fail-on-unused-args --export-compile-commands --root={root} --args=chip_build_tests=true {out}/linux-x64-tests @@ -120,6 +136,12 @@ ninja -C {out}/linux-arm64-minmdns # Building linux-arm64-minmdns-ipv6only ninja -C {out}/linux-arm64-minmdns-ipv6only +# Building linux-arm64-shell +ninja -C {out}/linux-arm64-shell + +# Building linux-arm64-shell-ipv6only +ninja -C {out}/linux-arm64-shell-ipv6only + # Building linux-arm64-thermostat ninja -C {out}/linux-arm64-thermostat @@ -156,6 +178,12 @@ ninja -C {out}/linux-x64-minmdns-ipv6only # Building linux-x64-rpc-console ninja -C {out}/linux-x64-rpc-console +# Building linux-x64-shell +ninja -C {out}/linux-x64-shell + +# Building linux-x64-shell-ipv6only +ninja -C {out}/linux-x64-shell-ipv6only + # Building linux-x64-tests ninja -C {out}/linux-x64-tests check From f334c274459fc042b920399759d97488d078253a Mon Sep 17 00:00:00 2001 From: Zang MingJie Date: Wed, 12 Jan 2022 05:44:03 +0800 Subject: [PATCH 43/64] Close exchange when session is released (#13448) * Close exchange when session is released * Add clearRetransTable parameter to DoClose call Co-authored-by: Andrei Litvin --- src/messaging/ExchangeContext.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/messaging/ExchangeContext.cpp b/src/messaging/ExchangeContext.cpp index 3a5cfb477ee7c7..8ec3b67989aff8 100644 --- a/src/messaging/ExchangeContext.cpp +++ b/src/messaging/ExchangeContext.cpp @@ -317,17 +317,18 @@ bool ExchangeContext::MatchExchange(const SessionHandle & session, const PacketH void ExchangeContext::OnSessionReleased() { - if (!IsResponseExpected()) + ExchangeHandle ref(*this); + + if (IsResponseExpected()) { - // Nothing to do in this case - return; + // If we're waiting on a response, we now know it's never going to show up + // and we should notify our delegate accordingly. + CancelResponseTimer(); + SetResponseExpected(false); + NotifyResponseTimeout(); } - // If we're waiting on a response, we now know it's never going to show up - // and we should notify our delegate accordingly. - CancelResponseTimer(); - SetResponseExpected(false); - NotifyResponseTimeout(); + DoClose(true /* clearRetransTable */); } CHIP_ERROR ExchangeContext::StartResponseTimer() From 535a7d8cde7da05227384e9a0ea822fa103eb742 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 11 Jan 2022 17:00:30 -0500 Subject: [PATCH 44/64] Change InteractionModel::Status to be 8-bit. (#13463) This change is happening on the spec side in https://github.com/CHIP-Specifications/connectedhomeip-spec/pull/4814 --- src/app/CommandSender.cpp | 2 +- src/app/StatusResponse.cpp | 2 +- src/app/tests/TestCommandInteraction.cpp | 2 +- src/app/util/im-client-callbacks.cpp | 84 +++++++++---------- .../python/chip/interaction_model/Delegate.h | 6 +- .../python/chip/interaction_model/delegate.py | 5 +- src/protocols/interaction_model/Constants.h | 2 +- 7 files changed, 53 insertions(+), 50 deletions(-) diff --git a/src/app/CommandSender.cpp b/src/app/CommandSender.cpp index c9174d78b62eaa..e3b82bfa09cd60 100644 --- a/src/app/CommandSender.cpp +++ b/src/app/CommandSender.cpp @@ -282,7 +282,7 @@ CHIP_ERROR CommandSender::ProcessInvokeResponseIB(InvokeResponseIB::Parser & aIn { ChipLogProgress(DataManagement, "Received Command Response Status for Endpoint=%" PRIu16 " Cluster=" ChipLogFormatMEI - " Command=" ChipLogFormatMEI " Status=0x%" PRIx16, + " Command=" ChipLogFormatMEI " Status=0x%" PRIx8, endpointId, ChipLogValueMEI(clusterId), ChipLogValueMEI(commandId), to_underlying(statusIB.mStatus)); } diff --git a/src/app/StatusResponse.cpp b/src/app/StatusResponse.cpp index f6f5335b50de79..3ae368137a90a7 100644 --- a/src/app/StatusResponse.cpp +++ b/src/app/StatusResponse.cpp @@ -54,7 +54,7 @@ CHIP_ERROR StatusResponse::ProcessStatusResponse(System::PacketBufferHandle && a ReturnErrorOnFailure(response.CheckSchemaValidity()); #endif ReturnErrorOnFailure(response.GetStatus(aStatus.mStatus)); - ChipLogProgress(InteractionModel, "Received status response, status is %" PRIu16, to_underlying(aStatus.mStatus)); + ChipLogProgress(InteractionModel, "Received status response, status is %" PRIu8, to_underlying(aStatus.mStatus)); if (aStatus.mStatus == Protocols::InteractionModel::Status::Success) { diff --git a/src/app/tests/TestCommandInteraction.cpp b/src/app/tests/TestCommandInteraction.cpp index 23a54ecb993aca..2af13c597ce36e 100644 --- a/src/app/tests/TestCommandInteraction.cpp +++ b/src/app/tests/TestCommandInteraction.cpp @@ -126,7 +126,7 @@ class MockCommandSenderCallback : public CommandSender::Callback } void OnError(const chip::app::CommandSender * apCommandSender, const chip::app::StatusIB & aStatus, CHIP_ERROR aError) override { - ChipLogError(Controller, "OnError happens with %" PRIx16 " %" CHIP_ERROR_FORMAT, to_underlying(aStatus.mStatus), + ChipLogError(Controller, "OnError happens with %" PRIx8 " %" CHIP_ERROR_FORMAT, to_underlying(aStatus.mStatus), aError.Format()); onErrorCalledTimes++; } diff --git a/src/app/util/im-client-callbacks.cpp b/src/app/util/im-client-callbacks.cpp index ec50dd0fb31e05..c9e6985722962a 100644 --- a/src/app/util/im-client-callbacks.cpp +++ b/src/app/util/im-client-callbacks.cpp @@ -145,130 +145,130 @@ static void LogIMStatus(Protocols::InteractionModel::Status status) switch (status) { case Protocols::InteractionModel::Status::Success: - ChipLogProgress(Zcl, " status: Success (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Success (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Failure: - ChipLogProgress(Zcl, " status: Failure (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Failure (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::InvalidSubscription: - ChipLogProgress(Zcl, " status: InvalidSubscription (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: InvalidSubscription (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::UnsupportedAccess: - ChipLogProgress(Zcl, " status: UnsupportedAccess (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: UnsupportedAccess (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::UnsupportedEndpoint: - ChipLogProgress(Zcl, " status: UnsupportedEndpoint (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: UnsupportedEndpoint (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::InvalidAction: - ChipLogProgress(Zcl, " status: InvalidAction (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: InvalidAction (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::UnsupportedCommand: - ChipLogProgress(Zcl, " status: UnsupportedCommand (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: UnsupportedCommand (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Deprecated82: - ChipLogProgress(Zcl, " status: Deprecated82 (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Deprecated82 (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Deprecated83: - ChipLogProgress(Zcl, " status: Deprecated83 (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Deprecated83 (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Deprecated84: - ChipLogProgress(Zcl, " status: Deprecated84 (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Deprecated84 (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::InvalidCommand: - ChipLogProgress(Zcl, " status: InvalidCommand (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: InvalidCommand (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::UnsupportedAttribute: - ChipLogProgress(Zcl, " status: UnsupportedAttribute (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: UnsupportedAttribute (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::InvalidValue: - ChipLogProgress(Zcl, " status: InvalidValue (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: InvalidValue (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::UnsupportedWrite: - ChipLogProgress(Zcl, " status: UnsupportedWrite (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: UnsupportedWrite (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::ResourceExhausted: - ChipLogProgress(Zcl, " status: ResourceExhausted (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: ResourceExhausted (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Deprecated8a: - ChipLogProgress(Zcl, " status: Deprecated8a (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Deprecated8a (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::NotFound: - ChipLogProgress(Zcl, " status: NotFound (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: NotFound (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::UnreportableAttribute: - ChipLogProgress(Zcl, " status: UnreportableAttribute (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: UnreportableAttribute (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::InvalidDataType: - ChipLogProgress(Zcl, " status: InvalidDataType (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: InvalidDataType (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Deprecated8e: - ChipLogProgress(Zcl, " status: Deprecated8e (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Deprecated8e (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::UnsupportedRead: - ChipLogProgress(Zcl, " status: UnsupportedRead (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: UnsupportedRead (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Deprecated90: - ChipLogProgress(Zcl, " status: Deprecated90 (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Deprecated90 (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Deprecated91: - ChipLogProgress(Zcl, " status: Deprecated91 (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Deprecated91 (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Reserved92: - ChipLogProgress(Zcl, " status: Reserved92 (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Reserved92 (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Deprecated93: - ChipLogProgress(Zcl, " status: Deprecated93 (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Deprecated93 (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Timeout: - ChipLogProgress(Zcl, " status: Timeout (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Timeout (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Reserved95: - ChipLogProgress(Zcl, " status: Reserved95 (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Reserved95 (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Reserved96: - ChipLogProgress(Zcl, " status: Reserved96 (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Reserved96 (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Reserved97: - ChipLogProgress(Zcl, " status: Reserved97 (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Reserved97 (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Reserved98: - ChipLogProgress(Zcl, " status: Reserved98 (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Reserved98 (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Reserved99: - ChipLogProgress(Zcl, " status: Reserved99 (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Reserved99 (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Reserved9a: - ChipLogProgress(Zcl, " status: Reserved9a (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Reserved9a (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::ConstraintError: - ChipLogProgress(Zcl, " status: ConstraintError (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: ConstraintError (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Busy: - ChipLogProgress(Zcl, " status: Busy (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Busy (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Deprecatedc0: - ChipLogProgress(Zcl, " status: Deprecatedc0 (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Deprecatedc0 (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Deprecatedc1: - ChipLogProgress(Zcl, " status: Deprecatedc1 (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Deprecatedc1 (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Deprecatedc2: - ChipLogProgress(Zcl, " status: Deprecatedc2 (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Deprecatedc2 (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::UnsupportedCluster: - ChipLogProgress(Zcl, " status: UnsupportedCluster (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: UnsupportedCluster (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::Deprecatedc4: - ChipLogProgress(Zcl, " status: Deprecatedc4 (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: Deprecatedc4 (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::NoUpstreamSubscription: - ChipLogProgress(Zcl, " status: NoUpstreamSubscription (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: NoUpstreamSubscription (0x%02" PRIx8 ")", to_underlying(status)); break; case Protocols::InteractionModel::Status::NeedsTimedInteraction: - ChipLogProgress(Zcl, " status: NeedsTimedInteraction (0x%04" PRIx16 ")", to_underlying(status)); + ChipLogProgress(Zcl, " status: NeedsTimedInteraction (0x%02" PRIx8 ")", to_underlying(status)); break; default: - ChipLogError(Zcl, "Unknown status: 0x%04" PRIx16, to_underlying(status)); + ChipLogError(Zcl, "Unknown status: 0x%02" PRIx8, to_underlying(status)); break; } } diff --git a/src/controller/python/chip/interaction_model/Delegate.h b/src/controller/python/chip/interaction_model/Delegate.h index 4f878e764680e6..9807e320562a38 100644 --- a/src/controller/python/chip/interaction_model/Delegate.h +++ b/src/controller/python/chip/interaction_model/Delegate.h @@ -30,6 +30,7 @@ namespace Controller { // The command status will be used for python script. // use packed attribute so we can unpack it from python and no need to worry about padding. +// This struct needs to match the IMCommandStatus definition in delegate.py struct __attribute__((packed)) CommandStatus { Protocols::InteractionModel::Status status; @@ -43,7 +44,7 @@ struct __attribute__((packed)) CommandStatus static_assert(std::is_same::value && std::is_same::value && std::is_same::value, "Members in CommandStatus does not match interaction_model/delegate.py"); -static_assert(sizeof(CommandStatus) == 2 + 1 + 2 + 4 + 4 + 1, "Size of CommandStatus might contain padding"); +static_assert(sizeof(CommandStatus) == 1 + 1 + 2 + 4 + 4 + 1, "Size of CommandStatus might contain padding"); struct __attribute__((packed)) AttributePath { @@ -57,6 +58,7 @@ static_assert(std::is_same::value && std::is_same::value && std::is_same::value && std::is_same::value, "Members in AttributeWriteStatus does not match interaction_model/delegate.py"); -static_assert(sizeof(AttributeWriteStatus) == 8 + 8 + 2 + 2 + 4 + 4, "Size of AttributeWriteStatus might contain padding"); +static_assert(sizeof(AttributeWriteStatus) == 8 + 8 + 1 + 2 + 4 + 4, "Size of AttributeWriteStatus might contain padding"); extern "C" { typedef void (*PythonInteractionModelDelegate_OnCommandResponseStatusCodeReceivedFunct)(uint64_t commandSenderPtr, diff --git a/src/controller/python/chip/interaction_model/delegate.py b/src/controller/python/chip/interaction_model/delegate.py index 106c1a4a310888..6ad6bd5a5785d4 100644 --- a/src/controller/python/chip/interaction_model/delegate.py +++ b/src/controller/python/chip/interaction_model/delegate.py @@ -28,7 +28,7 @@ # The type should match CommandStatus in interaction_model/Delegate.h # CommandStatus should not contain padding IMCommandStatus = Struct( - "Status" / Int16ul, + "Status" / Int8ul, "ClusterStatus" / Int8ul, "EndpointId" / Int16ul, "ClusterId" / Int32ul, @@ -36,10 +36,11 @@ "CommandIndex" / Int8ul, ) +# The type should match WriteStatus in interaction_model/Delegate.h IMWriteStatus = Struct( "NodeId" / Int64ul, "AppIdentifier" / Int64ul, - "Status" / Int16ul, + "Status" / Int8ul, "EndpointId" / Int16ul, "ClusterId" / Int32ul, "AttributeId" / Int32ul, diff --git a/src/protocols/interaction_model/Constants.h b/src/protocols/interaction_model/Constants.h index b662b47324a876..5be5cb36a7df7f 100644 --- a/src/protocols/interaction_model/Constants.h +++ b/src/protocols/interaction_model/Constants.h @@ -66,7 +66,7 @@ enum class MsgType : uint8_t }; // This table comes from the IM's "Status Code Table" section from the Interaction Model spec. -enum class Status : uint16_t +enum class Status : uint8_t { Success = 0x0, Failure = 0x01, From f9c4df8e0e025e975bb52d913fc12abd0ec88a54 Mon Sep 17 00:00:00 2001 From: Marc Lepage <67919234+mlepage-google@users.noreply.github.com> Date: Tue, 11 Jan 2022 17:12:01 -0500 Subject: [PATCH 45/64] Allow list fields to be null when written (#13089) When access control cluster is decoding TLV to write entries, if subjects or targets are explicitly null, treat them as empty lists. --- .../access-control-server.cpp | 96 ++++++++++--------- 1 file changed, 51 insertions(+), 45 deletions(-) diff --git a/src/app/clusters/access-control-server/access-control-server.cpp b/src/app/clusters/access-control-server/access-control-server.cpp index b8927fbf9ff4b3..e89a1c7845b8fa 100644 --- a/src/app/clusters/access-control-server/access-control-server.cpp +++ b/src/app/clusters/access-control-server/access-control-server.cpp @@ -243,66 +243,72 @@ struct AccessControlEntryCodec break; } case to_underlying(Fields::kSubjects): { - TLV::TLVType subjectsContainer; - VerifyOrReturnError(TLV::kTLVType_Array == aReader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); - ReturnErrorOnFailure(aReader.EnterContainer(subjectsContainer)); - while ((err = aReader.Next()) == CHIP_NO_ERROR) + if (aReader.GetType() != TLV::kTLVType_Null) { - NodeId subject = kUndefinedNodeId; - ReturnErrorOnFailure(DataModel::Decode(aReader, subject)); - ReturnErrorOnFailure(entry.AddSubject(nullptr, subject)); + TLV::TLVType subjectsContainer; + VerifyOrReturnError(TLV::kTLVType_Array == aReader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(aReader.EnterContainer(subjectsContainer)); + while ((err = aReader.Next()) == CHIP_NO_ERROR) + { + NodeId subject = kUndefinedNodeId; + ReturnErrorOnFailure(DataModel::Decode(aReader, subject)); + ReturnErrorOnFailure(entry.AddSubject(nullptr, subject)); + } + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(aReader.ExitContainer(subjectsContainer)); } - VerifyOrReturnError(err == CHIP_END_OF_TLV, err); - ReturnErrorOnFailure(aReader.ExitContainer(subjectsContainer)); break; } case to_underlying(Fields::kTargets): { - TLV::TLVType targetsContainer; - VerifyOrReturnError(TLV::kTLVType_Array == aReader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); - ReturnErrorOnFailure(aReader.EnterContainer(targetsContainer)); - while ((err = aReader.Next()) == CHIP_NO_ERROR) + if (aReader.GetType() != TLV::kTLVType_Null) { - AccessControl::Entry::Target target; - TLV::TLVType targetContainer; - VerifyOrReturnError(TLV::kTLVType_Structure == aReader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); - ReturnErrorOnFailure(aReader.EnterContainer(targetContainer)); - using TargetFields = AccessControlCluster::Structs::Target::Fields; + TLV::TLVType targetsContainer; + VerifyOrReturnError(TLV::kTLVType_Array == aReader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(aReader.EnterContainer(targetsContainer)); while ((err = aReader.Next()) == CHIP_NO_ERROR) { - VerifyOrReturnError(TLV::IsContextTag(aReader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); - switch (TLV::TagNumFromTag(aReader.GetTag())) + AccessControl::Entry::Target target; + TLV::TLVType targetContainer; + VerifyOrReturnError(TLV::kTLVType_Structure == aReader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(aReader.EnterContainer(targetContainer)); + using TargetFields = AccessControlCluster::Structs::Target::Fields; + while ((err = aReader.Next()) == CHIP_NO_ERROR) { - case to_underlying(TargetFields::kCluster): - if (aReader.GetType() != TLV::kTLVType_Null) - { - ReturnErrorOnFailure(DataModel::Decode(aReader, target.cluster)); - target.flags |= target.kCluster; - } - break; - case to_underlying(TargetFields::kEndpoint): - if (aReader.GetType() != TLV::kTLVType_Null) - { - ReturnErrorOnFailure(DataModel::Decode(aReader, target.endpoint)); - target.flags |= target.kEndpoint; - } - break; - case to_underlying(TargetFields::kDeviceType): - if (aReader.GetType() != TLV::kTLVType_Null) + VerifyOrReturnError(TLV::IsContextTag(aReader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (TLV::TagNumFromTag(aReader.GetTag())) { - ReturnErrorOnFailure(DataModel::Decode(aReader, target.deviceType)); - target.flags |= target.kDeviceType; + case to_underlying(TargetFields::kCluster): + if (aReader.GetType() != TLV::kTLVType_Null) + { + ReturnErrorOnFailure(DataModel::Decode(aReader, target.cluster)); + target.flags |= target.kCluster; + } + break; + case to_underlying(TargetFields::kEndpoint): + if (aReader.GetType() != TLV::kTLVType_Null) + { + ReturnErrorOnFailure(DataModel::Decode(aReader, target.endpoint)); + target.flags |= target.kEndpoint; + } + break; + case to_underlying(TargetFields::kDeviceType): + if (aReader.GetType() != TLV::kTLVType_Null) + { + ReturnErrorOnFailure(DataModel::Decode(aReader, target.deviceType)); + target.flags |= target.kDeviceType; + } + break; + default: + break; } - break; - default: - break; } + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(aReader.ExitContainer(targetContainer)); + ReturnErrorOnFailure(entry.AddTarget(nullptr, target)); } VerifyOrReturnError(err == CHIP_END_OF_TLV, err); - ReturnErrorOnFailure(aReader.ExitContainer(targetContainer)); - ReturnErrorOnFailure(entry.AddTarget(nullptr, target)); + ReturnErrorOnFailure(aReader.ExitContainer(targetsContainer)); } - VerifyOrReturnError(err == CHIP_END_OF_TLV, err); - ReturnErrorOnFailure(aReader.ExitContainer(targetsContainer)); break; } default: From f878e4a4c48068b93918674ea385b368a213ae4c Mon Sep 17 00:00:00 2001 From: Austin Hsieh <77706079+austinh0@users.noreply.github.com> Date: Tue, 11 Jan 2022 14:17:17 -0800 Subject: [PATCH 46/64] [Android] Support timed invoke and write (#13352) * Support timed invoke and write for Android * Use unless helper * Regenerate --- .../java/templates/CHIPClusters-JNI.zapt | 27 +- .../java/templates/ChipClusters-java.zapt | 22 +- .../java/templates/ClusterInfo-java.zapt | 3 + .../ClusterInfo-write-interaction.zapt | 1 + .../java/zap-generated/CHIPClusters-JNI.cpp | 3788 ++++++++++++--- .../chip/devicecontroller/ChipClusters.java | 4223 ++++++++++++++--- .../devicecontroller/ClusterInfoMapping.java | 7 +- .../devicecontroller/ClusterWriteMapping.java | 4 +- 8 files changed, 6831 insertions(+), 1244 deletions(-) diff --git a/src/controller/java/templates/CHIPClusters-JNI.zapt b/src/controller/java/templates/CHIPClusters-JNI.zapt index ef79115b3c2e99..7ae507f0d7e56a 100644 --- a/src/controller/java/templates/CHIPClusters-JNI.zapt +++ b/src/controller/java/templates/CHIPClusters-JNI.zapt @@ -44,7 +44,7 @@ JNI_METHOD(jlong, {{asUpperCamelCase name}}Cluster, initWithDevice)(JNIEnv * env } {{#chip_cluster_commands}} -JNI_METHOD(void, {{asUpperCamelCase ../name}}Cluster, {{asLowerCamelCase name}})(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback{{#chip_cluster_command_arguments_with_structs_expanded}}, {{asJniBasicType type true}} {{asLowerCamelCase label}}{{/chip_cluster_command_arguments_with_structs_expanded}}) +JNI_METHOD(void, {{asUpperCamelCase ../name}}Cluster, {{asLowerCamelCase name}})(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback{{#chip_cluster_command_arguments_with_structs_expanded}}, {{asJniBasicType type true}} {{asLowerCamelCase label}}{{/chip_cluster_command_arguments_with_structs_expanded}}, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -70,12 +70,15 @@ JNI_METHOD(void, {{asUpperCamelCase ../name}}Cluster, {{asLowerCamelCase name}}) auto successFn = chip::Callback::CallbackcallbackName}}CallbackType>::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall {{#if mustUseTimedInvoke}} - {{!TODO Fix Java API to pass in this information. For now, 10 seconds.}} - , 10000 + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + {{else}} + if (timedInvokeTimeoutMs == nullptr) { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } else { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } {{/if}} - ); VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); @@ -88,7 +91,7 @@ JNI_METHOD(void, {{asUpperCamelCase ../name}}Cluster, {{asLowerCamelCase name}}) {{! TODO: Lists not supported in attribute writes yet. }} {{#unless isList}} -JNI_METHOD(void, {{asUpperCamelCase ../name}}Cluster, write{{asUpperCamelCase name}}Attribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, {{asJniBasicType type true}} value) +JNI_METHOD(void, {{asUpperCamelCase ../name}}Cluster, write{{asUpperCamelCase name}}Attribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, {{asJniBasicType type true}} value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::{{asUpperCamelCase parent.name}}::Attributes::{{asUpperCamelCase name}}::TypeInfo; @@ -108,12 +111,16 @@ JNI_METHOD(void, {{asUpperCamelCase ../name}}Cluster, write{{asUpperCamelCase na auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall + {{#if mustUseTimedWrite}} - {{!TODO Fix Java API to pass in this information. For now, 10 seconds.}} - , 10000 + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + {{else}} + if (timedWriteTimeoutMs == nullptr) { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } else { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } {{/if}} - ); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); onSuccess.release(); diff --git a/src/controller/java/templates/ChipClusters-java.zapt b/src/controller/java/templates/ChipClusters-java.zapt index 7d330d4eb30e70..4c54d8926c9c6f 100644 --- a/src/controller/java/templates/ChipClusters-java.zapt +++ b/src/controller/java/templates/ChipClusters-java.zapt @@ -95,15 +95,22 @@ public class ChipClusters { public native long initWithDevice(long devicePtr, int endpointId); {{#chip_cluster_commands}} + {{#unless mustUseTimedInvoke}} public void {{asLowerCamelCase name}}({{#if hasSpecificResponse}}{{asUpperCamelCase responseName}}Callback{{else}}DefaultClusterCallback{{/if}} callback {{#chip_cluster_command_arguments_with_structs_expanded}}{{#if_is_struct type}}{{else}}{{>java_type_for_argument}} {{asLowerCamelCase label}}{{/if_is_struct}}{{/chip_cluster_command_arguments_with_structs_expanded}}) { - {{asLowerCamelCase name}}(chipClusterPtr, callback{{#chip_cluster_command_arguments_with_structs_expanded}}{{#if_is_struct type}}{{else}}, {{asLowerCamelCase label}}{{/if_is_struct}}{{/chip_cluster_command_arguments_with_structs_expanded}}); + {{asLowerCamelCase name}}(chipClusterPtr, callback{{#chip_cluster_command_arguments_with_structs_expanded}}{{#if_is_struct type}}{{else}}, {{asLowerCamelCase label}}{{/if_is_struct}}{{/chip_cluster_command_arguments_with_structs_expanded}}, null); } + {{/unless}} + public void {{asLowerCamelCase name}}({{#if hasSpecificResponse}}{{asUpperCamelCase responseName}}Callback{{else}}DefaultClusterCallback{{/if}} callback + {{#chip_cluster_command_arguments_with_structs_expanded}}{{#if_is_struct type}}{{else}}{{>java_type_for_argument}} {{asLowerCamelCase label}}{{/if_is_struct}}{{/chip_cluster_command_arguments_with_structs_expanded}}, int timedInvokeTimeoutMs) { + {{asLowerCamelCase name}}(chipClusterPtr, callback{{#chip_cluster_command_arguments_with_structs_expanded}}{{#if_is_struct type}}{{else}}, {{asLowerCamelCase label}}{{/if_is_struct}}{{/chip_cluster_command_arguments_with_structs_expanded}}, timedInvokeTimeoutMs); + } {{/chip_cluster_commands}} {{#chip_cluster_commands}} private native void {{asLowerCamelCase name}}(long chipClusterPtr, {{#if hasSpecificResponse}}{{asUpperCamelCase responseName}}Callback{{else}}DefaultClusterCallback{{/if}} Callback - {{#chip_cluster_command_arguments_with_structs_expanded}}{{#if_is_struct type}}{{else}}{{>java_type_for_argument}} {{asLowerCamelCase label}}{{/if_is_struct}}{{/chip_cluster_command_arguments_with_structs_expanded}}); + {{#chip_cluster_command_arguments_with_structs_expanded}}{{#if_is_struct type}}{{else}}{{>java_type_for_argument}} {{asLowerCamelCase label}}{{/if_is_struct}}{{/chip_cluster_command_arguments_with_structs_expanded}} + , @Nullable Integer timedInvokeTimeoutMs); {{/chip_cluster_commands}} {{#chip_cluster_responses}} public interface {{asUpperCamelCase name}}Callback { @@ -242,9 +249,14 @@ public class ChipClusters { {{#if isWritableAttribute}} {{! TODO: Lists not supported in attribute writes yet. }} {{#unless isList}} - + {{#unless mustUseTimedWrite}} public void write{{asUpperCamelCase name}}Attribute(DefaultClusterCallback callback{{>java_type_for_argument}} value) { - write{{asUpperCamelCase name}}Attribute(chipClusterPtr, callback, value); + write{{asUpperCamelCase name}}Attribute(chipClusterPtr, callback, value, null); + } + {{/unless}} + + public void write{{asUpperCamelCase name}}Attribute(DefaultClusterCallback callback{{>java_type_for_argument}} value, int timedWriteTimeoutMs) { + write{{asUpperCamelCase name}}Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } {{/unless}} {{/if}} @@ -278,7 +290,7 @@ public class ChipClusters { {{! TODO: Lists not supported in attribute writes yet. }} {{#unless isList}} - private native void write{{asUpperCamelCase name}}Attribute(long chipClusterPtr, DefaultClusterCallback callback{{>java_type_for_argument}} value); + private native void write{{asUpperCamelCase name}}Attribute(long chipClusterPtr, DefaultClusterCallback callback{{>java_type_for_argument}} value, @Nullable Integer timedWriteTimeoutMs); {{/unless}} {{/if}} {{#if isReportableAttribute}} diff --git a/src/controller/java/templates/ClusterInfo-java.zapt b/src/controller/java/templates/ClusterInfo-java.zapt index f2b5a8e1590e49..2951811eac7c0c 100644 --- a/src/controller/java/templates/ClusterInfo-java.zapt +++ b/src/controller/java/templates/ClusterInfo-java.zapt @@ -336,6 +336,8 @@ public class ClusterInfoMapping { commandArguments.get("{{asLowerCamelCase label}}") {{/if_is_struct}} {{/chip_cluster_command_arguments_with_structs_expanded}} + {{! TODO: Allow timeout to be passed from client for this and timed write. }} + {{#if mustUseTimedInvoke}}, 10000{{/if}} ); }, () -> new Delegated{{asUpperCamelCase responseName}}Callback(), @@ -350,6 +352,7 @@ public class ClusterInfoMapping { ({{#if isOptional}}Optional<{{/if}}{{asJavaBoxedType type}}{{#if isOptional}}>{{/if}}) commandArguments.get("{{asLowerCamelCase label}}") {{/chip_cluster_command_arguments_with_structs_expanded}} + {{#if mustUseTimedInvoke}}, 10000{{/if}} ); }, () -> new DelegatedDefaultClusterCallback(), diff --git a/src/controller/java/templates/ClusterInfo-write-interaction.zapt b/src/controller/java/templates/ClusterInfo-write-interaction.zapt index 96907cae0a7381..7cf4b5e4162033 100644 --- a/src/controller/java/templates/ClusterInfo-write-interaction.zapt +++ b/src/controller/java/templates/ClusterInfo-write-interaction.zapt @@ -29,6 +29,7 @@ public class ClusterWriteMapping { (DefaultClusterCallback) callback, ({{asJavaBoxedType type}}) commandArguments.get("value") + {{#if mustUseTimedWrite}}, 10000{{/if}} ); }, () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), diff --git a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp index a3ca7427bcf524..2f3a632261a8f1 100644 --- a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp @@ -69,7 +69,7 @@ JNI_METHOD(jlong, AccountLoginCluster, initWithDevice)(JNIEnv * env, jobject sel } JNI_METHOD(void, AccountLoginCluster, getSetupPINRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring tempAccountIdentifier) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring tempAccountIdentifier, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -101,7 +101,8 @@ JNI_METHOD(void, AccountLoginCluster, getSetupPINRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, 10000); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -110,7 +111,8 @@ JNI_METHOD(void, AccountLoginCluster, getSetupPINRequest) onFailure.release(); } JNI_METHOD(void, AccountLoginCluster, loginRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring tempAccountIdentifier, jstring setupPIN) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring tempAccountIdentifier, jstring setupPIN, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -140,7 +142,15 @@ JNI_METHOD(void, AccountLoginCluster, loginRequest) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -148,7 +158,8 @@ JNI_METHOD(void, AccountLoginCluster, loginRequest) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, AccountLoginCluster, logoutRequest)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, AccountLoginCluster, logoutRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -175,7 +186,8 @@ JNI_METHOD(void, AccountLoginCluster, logoutRequest)(JNIEnv * env, jobject self, auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, 10000); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -230,7 +242,7 @@ JNI_METHOD(jlong, AdministratorCommissioningCluster, initWithDevice)(JNIEnv * en } JNI_METHOD(void, AdministratorCommissioningCluster, openBasicCommissioningWindow) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject commissioningTimeout) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject commissioningTimeout, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -260,7 +272,15 @@ JNI_METHOD(void, AdministratorCommissioningCluster, openBasicCommissioningWindow auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -270,7 +290,7 @@ JNI_METHOD(void, AdministratorCommissioningCluster, openBasicCommissioningWindow } JNI_METHOD(void, AdministratorCommissioningCluster, openCommissioningWindow) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject commissioningTimeout, jbyteArray PAKEVerifier, - jobject discriminator, jobject iterations, jbyteArray salt, jobject passcodeID) + jobject discriminator, jobject iterations, jbyteArray salt, jobject passcodeID, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -307,7 +327,15 @@ JNI_METHOD(void, AdministratorCommissioningCluster, openCommissioningWindow) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -316,7 +344,7 @@ JNI_METHOD(void, AdministratorCommissioningCluster, openCommissioningWindow) onFailure.release(); } JNI_METHOD(void, AdministratorCommissioningCluster, revokeCommissioning) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -343,7 +371,15 @@ JNI_METHOD(void, AdministratorCommissioningCluster, revokeCommissioning) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -667,7 +703,8 @@ JNI_METHOD(jlong, ApplicationLauncherCluster, initWithDevice)(JNIEnv * env, jobj } JNI_METHOD(void, ApplicationLauncherCluster, hideAppRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject catalogVendorId, jstring applicationId) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject catalogVendorId, jstring applicationId, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -699,7 +736,15 @@ JNI_METHOD(void, ApplicationLauncherCluster, hideAppRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -708,7 +753,8 @@ JNI_METHOD(void, ApplicationLauncherCluster, hideAppRequest) onFailure.release(); } JNI_METHOD(void, ApplicationLauncherCluster, launchAppRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring data, jobject catalogVendorId, jstring applicationId) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring data, jobject catalogVendorId, jstring applicationId, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -741,7 +787,15 @@ JNI_METHOD(void, ApplicationLauncherCluster, launchAppRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -750,7 +804,8 @@ JNI_METHOD(void, ApplicationLauncherCluster, launchAppRequest) onFailure.release(); } JNI_METHOD(void, ApplicationLauncherCluster, stopAppRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject catalogVendorId, jstring applicationId) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject catalogVendorId, jstring applicationId, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -782,7 +837,15 @@ JNI_METHOD(void, ApplicationLauncherCluster, stopAppRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -837,7 +900,7 @@ JNI_METHOD(jlong, AudioOutputCluster, initWithDevice)(JNIEnv * env, jobject self } JNI_METHOD(void, AudioOutputCluster, renameOutputRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject index, jstring name) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject index, jstring name, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -867,7 +930,15 @@ JNI_METHOD(void, AudioOutputCluster, renameOutputRequest) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -876,7 +947,7 @@ JNI_METHOD(void, AudioOutputCluster, renameOutputRequest) onFailure.release(); } JNI_METHOD(void, AudioOutputCluster, selectOutputRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject index) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject index, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -905,7 +976,15 @@ JNI_METHOD(void, AudioOutputCluster, selectOutputRequest) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -997,7 +1076,7 @@ JNI_METHOD(jlong, BarrierControlCluster, initWithDevice)(JNIEnv * env, jobject s } JNI_METHOD(void, BarrierControlCluster, barrierControlGoToPercent) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject percentOpen) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject percentOpen, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1027,7 +1106,15 @@ JNI_METHOD(void, BarrierControlCluster, barrierControlGoToPercent) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -1035,7 +1122,8 @@ JNI_METHOD(void, BarrierControlCluster, barrierControlGoToPercent) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, BarrierControlCluster, barrierControlStop)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, BarrierControlCluster, barrierControlStop) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1062,7 +1150,15 @@ JNI_METHOD(void, BarrierControlCluster, barrierControlStop)(JNIEnv * env, jobjec auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -1264,7 +1360,8 @@ JNI_METHOD(jlong, BasicCluster, initWithDevice)(JNIEnv * env, jobject self, jlon return reinterpret_cast(cppCluster); } -JNI_METHOD(void, BasicCluster, mfgSpecificPing)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, BasicCluster, mfgSpecificPing) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1291,7 +1388,15 @@ JNI_METHOD(void, BasicCluster, mfgSpecificPing)(JNIEnv * env, jobject self, jlon auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -1484,7 +1589,7 @@ JNI_METHOD(void, BasicCluster, subscribeProductIDAttribute) } JNI_METHOD(void, BasicCluster, writeNodeLabelAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::Basic::Attributes::NodeLabel::TypeInfo; @@ -1512,7 +1617,16 @@ JNI_METHOD(void, BasicCluster, writeNodeLabelAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -1558,7 +1672,7 @@ JNI_METHOD(void, BasicCluster, subscribeNodeLabelAttribute) } JNI_METHOD(void, BasicCluster, writeLocationAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::Basic::Attributes::Location::TypeInfo; @@ -1586,7 +1700,16 @@ JNI_METHOD(void, BasicCluster, writeLocationAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -1963,7 +2086,7 @@ JNI_METHOD(void, BasicCluster, subscribeSerialNumberAttribute) } JNI_METHOD(void, BasicCluster, writeLocalConfigDisabledAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::Basic::Attributes::LocalConfigDisabled::TypeInfo; @@ -1991,7 +2114,16 @@ JNI_METHOD(void, BasicCluster, writeLocalConfigDisabledAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -2119,7 +2251,7 @@ JNI_METHOD(jlong, BinaryInputBasicCluster, initWithDevice)(JNIEnv * env, jobject } JNI_METHOD(void, BinaryInputBasicCluster, writeOutOfServiceAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::BinaryInputBasic::Attributes::OutOfService::TypeInfo; @@ -2147,7 +2279,16 @@ JNI_METHOD(void, BinaryInputBasicCluster, writeOutOfServiceAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -2194,7 +2335,7 @@ JNI_METHOD(void, BinaryInputBasicCluster, subscribeOutOfServiceAttribute) } JNI_METHOD(void, BinaryInputBasicCluster, writePresentValueAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::BinaryInputBasic::Attributes::PresentValue::TypeInfo; @@ -2222,7 +2363,16 @@ JNI_METHOD(void, BinaryInputBasicCluster, writePresentValueAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -2352,7 +2502,7 @@ JNI_METHOD(jlong, BindingCluster, initWithDevice)(JNIEnv * env, jobject self, jl JNI_METHOD(void, BindingCluster, bind) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject nodeId, jobject groupId, jobject endpointId, - jobject clusterId) + jobject clusterId, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2385,7 +2535,15 @@ JNI_METHOD(void, BindingCluster, bind) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -2395,7 +2553,7 @@ JNI_METHOD(void, BindingCluster, bind) } JNI_METHOD(void, BindingCluster, unbind) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject nodeId, jobject groupId, jobject endpointId, - jobject clusterId) + jobject clusterId, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2428,7 +2586,15 @@ JNI_METHOD(void, BindingCluster, unbind) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -2566,7 +2732,7 @@ JNI_METHOD(jlong, BridgedActionsCluster, initWithDevice)(JNIEnv * env, jobject s } JNI_METHOD(void, BridgedActionsCluster, disableAction) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2598,7 +2764,15 @@ JNI_METHOD(void, BridgedActionsCluster, disableAction) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -2607,7 +2781,8 @@ JNI_METHOD(void, BridgedActionsCluster, disableAction) onFailure.release(); } JNI_METHOD(void, BridgedActionsCluster, disableActionWithDuration) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject duration) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject duration, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2640,7 +2815,15 @@ JNI_METHOD(void, BridgedActionsCluster, disableActionWithDuration) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -2649,7 +2832,7 @@ JNI_METHOD(void, BridgedActionsCluster, disableActionWithDuration) onFailure.release(); } JNI_METHOD(void, BridgedActionsCluster, enableAction) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2681,7 +2864,15 @@ JNI_METHOD(void, BridgedActionsCluster, enableAction) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -2690,7 +2881,8 @@ JNI_METHOD(void, BridgedActionsCluster, enableAction) onFailure.release(); } JNI_METHOD(void, BridgedActionsCluster, enableActionWithDuration) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject duration) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject duration, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2723,7 +2915,15 @@ JNI_METHOD(void, BridgedActionsCluster, enableActionWithDuration) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -2732,7 +2932,7 @@ JNI_METHOD(void, BridgedActionsCluster, enableActionWithDuration) onFailure.release(); } JNI_METHOD(void, BridgedActionsCluster, instantAction) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2764,7 +2964,15 @@ JNI_METHOD(void, BridgedActionsCluster, instantAction) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -2773,7 +2981,8 @@ JNI_METHOD(void, BridgedActionsCluster, instantAction) onFailure.release(); } JNI_METHOD(void, BridgedActionsCluster, instantActionWithTransition) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject transitionTime) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject transitionTime, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2807,7 +3016,15 @@ JNI_METHOD(void, BridgedActionsCluster, instantActionWithTransition) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -2816,7 +3033,7 @@ JNI_METHOD(void, BridgedActionsCluster, instantActionWithTransition) onFailure.release(); } JNI_METHOD(void, BridgedActionsCluster, pauseAction) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2848,7 +3065,15 @@ JNI_METHOD(void, BridgedActionsCluster, pauseAction) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -2857,7 +3082,8 @@ JNI_METHOD(void, BridgedActionsCluster, pauseAction) onFailure.release(); } JNI_METHOD(void, BridgedActionsCluster, pauseActionWithDuration) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject duration) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject duration, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2890,7 +3116,15 @@ JNI_METHOD(void, BridgedActionsCluster, pauseActionWithDuration) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -2899,7 +3133,7 @@ JNI_METHOD(void, BridgedActionsCluster, pauseActionWithDuration) onFailure.release(); } JNI_METHOD(void, BridgedActionsCluster, resumeAction) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2931,7 +3165,15 @@ JNI_METHOD(void, BridgedActionsCluster, resumeAction) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -2940,7 +3182,7 @@ JNI_METHOD(void, BridgedActionsCluster, resumeAction) onFailure.release(); } JNI_METHOD(void, BridgedActionsCluster, startAction) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2972,7 +3214,15 @@ JNI_METHOD(void, BridgedActionsCluster, startAction) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -2981,7 +3231,8 @@ JNI_METHOD(void, BridgedActionsCluster, startAction) onFailure.release(); } JNI_METHOD(void, BridgedActionsCluster, startActionWithDuration) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject duration) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject duration, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3014,7 +3265,15 @@ JNI_METHOD(void, BridgedActionsCluster, startActionWithDuration) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3023,7 +3282,7 @@ JNI_METHOD(void, BridgedActionsCluster, startActionWithDuration) onFailure.release(); } JNI_METHOD(void, BridgedActionsCluster, stopAction) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject actionID, jobject invokeID, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3055,7 +3314,15 @@ JNI_METHOD(void, BridgedActionsCluster, stopAction) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3193,7 +3460,8 @@ JNI_METHOD(jlong, ChannelCluster, initWithDevice)(JNIEnv * env, jobject self, jl } JNI_METHOD(void, ChannelCluster, changeChannelByNumberRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject majorNumber, jobject minorNumber) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject majorNumber, jobject minorNumber, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3225,7 +3493,15 @@ JNI_METHOD(void, ChannelCluster, changeChannelByNumberRequest) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3234,7 +3510,7 @@ JNI_METHOD(void, ChannelCluster, changeChannelByNumberRequest) onFailure.release(); } JNI_METHOD(void, ChannelCluster, changeChannelRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring match) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring match, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3265,7 +3541,15 @@ JNI_METHOD(void, ChannelCluster, changeChannelRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3273,7 +3557,8 @@ JNI_METHOD(void, ChannelCluster, changeChannelRequest) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ChannelCluster, skipChannelRequest)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject count) +JNI_METHOD(void, ChannelCluster, skipChannelRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject count, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3302,7 +3587,15 @@ JNI_METHOD(void, ChannelCluster, skipChannelRequest)(JNIEnv * env, jobject self, auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3358,7 +3651,7 @@ JNI_METHOD(jlong, ColorControlCluster, initWithDevice)(JNIEnv * env, jobject sel JNI_METHOD(void, ColorControlCluster, colorLoopSet) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject updateFlags, jobject action, jobject direction, - jobject time, jobject startHue, jobject optionsMask, jobject optionsOverride) + jobject time, jobject startHue, jobject optionsMask, jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3396,7 +3689,15 @@ JNI_METHOD(void, ColorControlCluster, colorLoopSet) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3406,7 +3707,7 @@ JNI_METHOD(void, ColorControlCluster, colorLoopSet) } JNI_METHOD(void, ColorControlCluster, enhancedMoveHue) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject moveMode, jobject rate, jobject optionsMask, - jobject optionsOverride) + jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3440,7 +3741,15 @@ JNI_METHOD(void, ColorControlCluster, enhancedMoveHue) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3450,7 +3759,7 @@ JNI_METHOD(void, ColorControlCluster, enhancedMoveHue) } JNI_METHOD(void, ColorControlCluster, enhancedMoveToHue) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject enhancedHue, jobject direction, jobject transitionTime, - jobject optionsMask, jobject optionsOverride) + jobject optionsMask, jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3487,7 +3796,15 @@ JNI_METHOD(void, ColorControlCluster, enhancedMoveToHue) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3497,7 +3814,7 @@ JNI_METHOD(void, ColorControlCluster, enhancedMoveToHue) } JNI_METHOD(void, ColorControlCluster, enhancedMoveToHueAndSaturation) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject enhancedHue, jobject saturation, jobject transitionTime, - jobject optionsMask, jobject optionsOverride) + jobject optionsMask, jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3535,7 +3852,15 @@ JNI_METHOD(void, ColorControlCluster, enhancedMoveToHueAndSaturation) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3545,7 +3870,7 @@ JNI_METHOD(void, ColorControlCluster, enhancedMoveToHueAndSaturation) } JNI_METHOD(void, ColorControlCluster, enhancedStepHue) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject stepMode, jobject stepSize, jobject transitionTime, - jobject optionsMask, jobject optionsOverride) + jobject optionsMask, jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3581,7 +3906,15 @@ JNI_METHOD(void, ColorControlCluster, enhancedStepHue) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3591,7 +3924,7 @@ JNI_METHOD(void, ColorControlCluster, enhancedStepHue) } JNI_METHOD(void, ColorControlCluster, moveColor) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject rateX, jobject rateY, jobject optionsMask, - jobject optionsOverride) + jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3625,7 +3958,15 @@ JNI_METHOD(void, ColorControlCluster, moveColor) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3635,7 +3976,7 @@ JNI_METHOD(void, ColorControlCluster, moveColor) } JNI_METHOD(void, ColorControlCluster, moveColorTemperature) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject moveMode, jobject rate, jobject colorTemperatureMinimum, - jobject colorTemperatureMaximum, jobject optionsMask, jobject optionsOverride) + jobject colorTemperatureMaximum, jobject optionsMask, jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3673,7 +4014,15 @@ JNI_METHOD(void, ColorControlCluster, moveColorTemperature) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3683,7 +4032,7 @@ JNI_METHOD(void, ColorControlCluster, moveColorTemperature) } JNI_METHOD(void, ColorControlCluster, moveHue) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject moveMode, jobject rate, jobject optionsMask, - jobject optionsOverride) + jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3717,7 +4066,15 @@ JNI_METHOD(void, ColorControlCluster, moveHue) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3727,7 +4084,7 @@ JNI_METHOD(void, ColorControlCluster, moveHue) } JNI_METHOD(void, ColorControlCluster, moveSaturation) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject moveMode, jobject rate, jobject optionsMask, - jobject optionsOverride) + jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3761,7 +4118,15 @@ JNI_METHOD(void, ColorControlCluster, moveSaturation) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3771,7 +4136,7 @@ JNI_METHOD(void, ColorControlCluster, moveSaturation) } JNI_METHOD(void, ColorControlCluster, moveToColor) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject colorX, jobject colorY, jobject transitionTime, - jobject optionsMask, jobject optionsOverride) + jobject optionsMask, jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3807,7 +4172,15 @@ JNI_METHOD(void, ColorControlCluster, moveToColor) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3817,7 +4190,7 @@ JNI_METHOD(void, ColorControlCluster, moveToColor) } JNI_METHOD(void, ColorControlCluster, moveToColorTemperature) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject colorTemperature, jobject transitionTime, - jobject optionsMask, jobject optionsOverride) + jobject optionsMask, jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3853,7 +4226,15 @@ JNI_METHOD(void, ColorControlCluster, moveToColorTemperature) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3863,7 +4244,7 @@ JNI_METHOD(void, ColorControlCluster, moveToColorTemperature) } JNI_METHOD(void, ColorControlCluster, moveToHue) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject hue, jobject direction, jobject transitionTime, - jobject optionsMask, jobject optionsOverride) + jobject optionsMask, jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3899,7 +4280,15 @@ JNI_METHOD(void, ColorControlCluster, moveToHue) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3909,7 +4298,7 @@ JNI_METHOD(void, ColorControlCluster, moveToHue) } JNI_METHOD(void, ColorControlCluster, moveToHueAndSaturation) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject hue, jobject saturation, jobject transitionTime, - jobject optionsMask, jobject optionsOverride) + jobject optionsMask, jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3946,7 +4335,15 @@ JNI_METHOD(void, ColorControlCluster, moveToHueAndSaturation) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -3956,7 +4353,7 @@ JNI_METHOD(void, ColorControlCluster, moveToHueAndSaturation) } JNI_METHOD(void, ColorControlCluster, moveToSaturation) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject saturation, jobject transitionTime, jobject optionsMask, - jobject optionsOverride) + jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3992,7 +4389,15 @@ JNI_METHOD(void, ColorControlCluster, moveToSaturation) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -4002,7 +4407,7 @@ JNI_METHOD(void, ColorControlCluster, moveToSaturation) } JNI_METHOD(void, ColorControlCluster, stepColor) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject stepX, jobject stepY, jobject transitionTime, - jobject optionsMask, jobject optionsOverride) + jobject optionsMask, jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -4038,7 +4443,15 @@ JNI_METHOD(void, ColorControlCluster, stepColor) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -4048,7 +4461,8 @@ JNI_METHOD(void, ColorControlCluster, stepColor) } JNI_METHOD(void, ColorControlCluster, stepColorTemperature) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject stepMode, jobject stepSize, jobject transitionTime, - jobject colorTemperatureMinimum, jobject colorTemperatureMaximum, jobject optionsMask, jobject optionsOverride) + jobject colorTemperatureMinimum, jobject colorTemperatureMaximum, jobject optionsMask, jobject optionsOverride, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -4088,7 +4502,15 @@ JNI_METHOD(void, ColorControlCluster, stepColorTemperature) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -4098,7 +4520,7 @@ JNI_METHOD(void, ColorControlCluster, stepColorTemperature) } JNI_METHOD(void, ColorControlCluster, stepHue) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject stepMode, jobject stepSize, jobject transitionTime, - jobject optionsMask, jobject optionsOverride) + jobject optionsMask, jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -4134,7 +4556,15 @@ JNI_METHOD(void, ColorControlCluster, stepHue) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -4144,7 +4574,7 @@ JNI_METHOD(void, ColorControlCluster, stepHue) } JNI_METHOD(void, ColorControlCluster, stepSaturation) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject stepMode, jobject stepSize, jobject transitionTime, - jobject optionsMask, jobject optionsOverride) + jobject optionsMask, jobject optionsOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -4180,7 +4610,15 @@ JNI_METHOD(void, ColorControlCluster, stepSaturation) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -4189,7 +4627,8 @@ JNI_METHOD(void, ColorControlCluster, stepSaturation) onFailure.release(); } JNI_METHOD(void, ColorControlCluster, stopMoveStep) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject optionsMask, jobject optionsOverride) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject optionsMask, jobject optionsOverride, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -4221,7 +4660,15 @@ JNI_METHOD(void, ColorControlCluster, stopMoveStep) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -4564,7 +5011,7 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorModeAttribute) } JNI_METHOD(void, ColorControlCluster, writeColorControlOptionsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorControlOptions::TypeInfo; @@ -4592,7 +5039,16 @@ JNI_METHOD(void, ColorControlCluster, writeColorControlOptionsAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -5342,7 +5798,7 @@ JNI_METHOD(void, ColorControlCluster, subscribePrimary6IntensityAttribute) } JNI_METHOD(void, ColorControlCluster, writeWhitePointXAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::WhitePointX::TypeInfo; @@ -5370,7 +5826,16 @@ JNI_METHOD(void, ColorControlCluster, writeWhitePointXAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -5417,7 +5882,7 @@ JNI_METHOD(void, ColorControlCluster, subscribeWhitePointXAttribute) } JNI_METHOD(void, ColorControlCluster, writeWhitePointYAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::WhitePointY::TypeInfo; @@ -5445,7 +5910,16 @@ JNI_METHOD(void, ColorControlCluster, writeWhitePointYAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -5492,7 +5966,7 @@ JNI_METHOD(void, ColorControlCluster, subscribeWhitePointYAttribute) } JNI_METHOD(void, ColorControlCluster, writeColorPointRXAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointRX::TypeInfo; @@ -5520,7 +5994,16 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointRXAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -5567,7 +6050,7 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointRXAttribute) } JNI_METHOD(void, ColorControlCluster, writeColorPointRYAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointRY::TypeInfo; @@ -5595,7 +6078,16 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointRYAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -5642,7 +6134,7 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointRYAttribute) } JNI_METHOD(void, ColorControlCluster, writeColorPointRIntensityAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointRIntensity::TypeInfo; @@ -5670,7 +6162,16 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointRIntensityAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -5717,7 +6218,7 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointRIntensityAttribute) } JNI_METHOD(void, ColorControlCluster, writeColorPointGXAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointGX::TypeInfo; @@ -5745,7 +6246,16 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointGXAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -5792,7 +6302,7 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointGXAttribute) } JNI_METHOD(void, ColorControlCluster, writeColorPointGYAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointGY::TypeInfo; @@ -5820,12 +6330,21 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointGYAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - onSuccess.release(); + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); onFailure.release(); } JNI_METHOD(void, ColorControlCluster, subscribeColorPointGYAttribute) @@ -5867,7 +6386,7 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointGYAttribute) } JNI_METHOD(void, ColorControlCluster, writeColorPointGIntensityAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointGIntensity::TypeInfo; @@ -5895,7 +6414,16 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointGIntensityAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -5942,7 +6470,7 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointGIntensityAttribute) } JNI_METHOD(void, ColorControlCluster, writeColorPointBXAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointBX::TypeInfo; @@ -5970,7 +6498,16 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointBXAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -6017,7 +6554,7 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointBXAttribute) } JNI_METHOD(void, ColorControlCluster, writeColorPointBYAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointBY::TypeInfo; @@ -6045,7 +6582,16 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointBYAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -6092,7 +6638,7 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointBYAttribute) } JNI_METHOD(void, ColorControlCluster, writeColorPointBIntensityAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointBIntensity::TypeInfo; @@ -6120,7 +6666,16 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointBIntensityAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -6577,7 +7132,7 @@ JNI_METHOD(void, ColorControlCluster, subscribeCoupleColorTempToLevelMinMiredsAt } JNI_METHOD(void, ColorControlCluster, writeStartUpColorTemperatureMiredsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; @@ -6605,7 +7160,16 @@ JNI_METHOD(void, ColorControlCluster, writeStartUpColorTemperatureMiredsAttribut auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -6698,7 +7262,8 @@ JNI_METHOD(jlong, ContentLauncherCluster, initWithDevice)(JNIEnv * env, jobject } JNI_METHOD(void, ContentLauncherCluster, launchContentRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject autoPlay, jstring data, jobject parameterList) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject autoPlay, jstring data, jobject parameterList, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6731,7 +7296,15 @@ JNI_METHOD(void, ContentLauncherCluster, launchContentRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -6741,7 +7314,7 @@ JNI_METHOD(void, ContentLauncherCluster, launchContentRequest) } JNI_METHOD(void, ContentLauncherCluster, launchURLRequest) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring contentURL, jstring displayString, jstring providerName, - jobject background, jobject logo, jobject progressBar, jobject splash, jobject waterMark) + jobject background, jobject logo, jobject progressBar, jobject splash, jobject waterMark, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6774,7 +7347,15 @@ JNI_METHOD(void, ContentLauncherCluster, launchURLRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -6784,7 +7365,7 @@ JNI_METHOD(void, ContentLauncherCluster, launchURLRequest) } JNI_METHOD(void, ContentLauncherCluster, writeSupportedStreamingProtocolsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; @@ -6812,7 +7393,16 @@ JNI_METHOD(void, ContentLauncherCluster, writeSupportedStreamingProtocolsAttribu auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -6952,7 +7542,7 @@ JNI_METHOD(jlong, DiagnosticLogsCluster, initWithDevice)(JNIEnv * env, jobject s JNI_METHOD(void, DiagnosticLogsCluster, retrieveLogsRequest) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject intent, jobject requestedProtocol, - jbyteArray transferFileDesignator) + jbyteArray transferFileDesignator, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6987,7 +7577,15 @@ JNI_METHOD(void, DiagnosticLogsCluster, retrieveLogsRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -7005,7 +7603,8 @@ JNI_METHOD(jlong, DoorLockCluster, initWithDevice)(JNIEnv * env, jobject self, j } JNI_METHOD(void, DoorLockCluster, clearCredential) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject credentialType, jobject credentialIndex) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject credentialType, jobject credentialIndex, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7034,7 +7633,15 @@ JNI_METHOD(void, DoorLockCluster, clearCredential) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -7042,7 +7649,8 @@ JNI_METHOD(void, DoorLockCluster, clearCredential) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, DoorLockCluster, clearUser)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject userIndex) +JNI_METHOD(void, DoorLockCluster, clearUser) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject userIndex, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7071,7 +7679,15 @@ JNI_METHOD(void, DoorLockCluster, clearUser)(JNIEnv * env, jobject self, jlong c auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -7080,7 +7696,8 @@ JNI_METHOD(void, DoorLockCluster, clearUser)(JNIEnv * env, jobject self, jlong c onFailure.release(); } JNI_METHOD(void, DoorLockCluster, getCredentialStatus) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject credentialType, jobject credentialIndex) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject credentialType, jobject credentialIndex, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7112,7 +7729,15 @@ JNI_METHOD(void, DoorLockCluster, getCredentialStatus) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -7120,7 +7745,8 @@ JNI_METHOD(void, DoorLockCluster, getCredentialStatus) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, DoorLockCluster, getUser)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject userIndex) +JNI_METHOD(void, DoorLockCluster, getUser) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject userIndex, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7150,7 +7776,15 @@ JNI_METHOD(void, DoorLockCluster, getUser)(JNIEnv * env, jobject self, jlong clu auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -7158,7 +7792,8 @@ JNI_METHOD(void, DoorLockCluster, getUser)(JNIEnv * env, jobject self, jlong clu onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, DoorLockCluster, lockDoor)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject pinCode) +JNI_METHOD(void, DoorLockCluster, lockDoor) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject pinCode, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7188,7 +7823,15 @@ JNI_METHOD(void, DoorLockCluster, lockDoor)(JNIEnv * env, jobject self, jlong cl auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -7198,7 +7841,7 @@ JNI_METHOD(void, DoorLockCluster, lockDoor)(JNIEnv * env, jobject self, jlong cl } JNI_METHOD(void, DoorLockCluster, setCredential) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject operationType, jobject credentialType, - jobject credentialIndex, jbyteArray credentialData, jobject userIndex, jobject userStatus) + jobject credentialIndex, jbyteArray credentialData, jobject userIndex, jobject userStatus, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7235,7 +7878,15 @@ JNI_METHOD(void, DoorLockCluster, setCredential) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -7245,7 +7896,7 @@ JNI_METHOD(void, DoorLockCluster, setCredential) } JNI_METHOD(void, DoorLockCluster, setUser) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject operationType, jobject userIndex, jstring userName, - jobject userUniqueId, jobject userStatus, jobject userType, jobject credentialRule) + jobject userUniqueId, jobject userStatus, jobject userType, jobject credentialRule, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7295,7 +7946,15 @@ JNI_METHOD(void, DoorLockCluster, setUser) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -7303,7 +7962,8 @@ JNI_METHOD(void, DoorLockCluster, setUser) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, DoorLockCluster, unlockDoor)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject pinCode) +JNI_METHOD(void, DoorLockCluster, unlockDoor) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject pinCode, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7333,7 +7993,15 @@ JNI_METHOD(void, DoorLockCluster, unlockDoor)(JNIEnv * env, jobject self, jlong auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -7493,7 +8161,7 @@ JNI_METHOD(void, DoorLockCluster, subscribeDoorStateAttribute) } JNI_METHOD(void, DoorLockCluster, writeLanguageAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::DoorLock::Attributes::Language::TypeInfo; @@ -7521,7 +8189,16 @@ JNI_METHOD(void, DoorLockCluster, writeLanguageAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -7568,7 +8245,7 @@ JNI_METHOD(void, DoorLockCluster, subscribeLanguageAttribute) } JNI_METHOD(void, DoorLockCluster, writeAutoRelockTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::DoorLock::Attributes::AutoRelockTime::TypeInfo; @@ -7596,7 +8273,16 @@ JNI_METHOD(void, DoorLockCluster, writeAutoRelockTimeAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -7643,7 +8329,7 @@ JNI_METHOD(void, DoorLockCluster, subscribeAutoRelockTimeAttribute) } JNI_METHOD(void, DoorLockCluster, writeSoundVolumeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::DoorLock::Attributes::SoundVolume::TypeInfo; @@ -7671,7 +8357,16 @@ JNI_METHOD(void, DoorLockCluster, writeSoundVolumeAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -7718,7 +8413,7 @@ JNI_METHOD(void, DoorLockCluster, subscribeSoundVolumeAttribute) } JNI_METHOD(void, DoorLockCluster, writeOperatingModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::DoorLock::Attributes::OperatingMode::TypeInfo; @@ -7746,7 +8441,16 @@ JNI_METHOD(void, DoorLockCluster, writeOperatingModeAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -7793,7 +8497,7 @@ JNI_METHOD(void, DoorLockCluster, subscribeOperatingModeAttribute) } JNI_METHOD(void, DoorLockCluster, writeEnableOneTouchLockingAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; @@ -7821,7 +8525,16 @@ JNI_METHOD(void, DoorLockCluster, writeEnableOneTouchLockingAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -7868,7 +8581,7 @@ JNI_METHOD(void, DoorLockCluster, subscribeEnableOneTouchLockingAttribute) } JNI_METHOD(void, DoorLockCluster, writeEnablePrivacyModeButtonAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; @@ -7896,7 +8609,16 @@ JNI_METHOD(void, DoorLockCluster, writeEnablePrivacyModeButtonAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -7943,7 +8665,7 @@ JNI_METHOD(void, DoorLockCluster, subscribeEnablePrivacyModeButtonAttribute) } JNI_METHOD(void, DoorLockCluster, writeWrongCodeEntryLimitAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; @@ -7971,7 +8693,16 @@ JNI_METHOD(void, DoorLockCluster, writeWrongCodeEntryLimitAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -8516,7 +9247,8 @@ JNI_METHOD(jlong, EthernetNetworkDiagnosticsCluster, initWithDevice)(JNIEnv * en return reinterpret_cast(cppCluster); } -JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, resetCounts)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, resetCounts) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -8543,7 +9275,15 @@ JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, resetCounts)(JNIEnv * env, j auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -9178,7 +9918,8 @@ JNI_METHOD(jlong, GeneralCommissioningCluster, initWithDevice)(JNIEnv * env, job } JNI_METHOD(void, GeneralCommissioningCluster, armFailSafe) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject expiryLengthSeconds, jobject breadcrumb, jobject timeoutMs) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject expiryLengthSeconds, jobject breadcrumb, jobject timeoutMs, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -9213,7 +9954,15 @@ JNI_METHOD(void, GeneralCommissioningCluster, armFailSafe) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -9221,7 +9970,8 @@ JNI_METHOD(void, GeneralCommissioningCluster, armFailSafe) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, GeneralCommissioningCluster, commissioningComplete)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, GeneralCommissioningCluster, commissioningComplete) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -9252,7 +10002,15 @@ JNI_METHOD(void, GeneralCommissioningCluster, commissioningComplete)(JNIEnv * en onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -9262,7 +10020,7 @@ JNI_METHOD(void, GeneralCommissioningCluster, commissioningComplete)(JNIEnv * en } JNI_METHOD(void, GeneralCommissioningCluster, setRegulatoryConfig) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject location, jstring countryCode, jobject breadcrumb, - jobject timeoutMs) + jobject timeoutMs, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -9298,7 +10056,15 @@ JNI_METHOD(void, GeneralCommissioningCluster, setRegulatoryConfig) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -9308,7 +10074,7 @@ JNI_METHOD(void, GeneralCommissioningCluster, setRegulatoryConfig) } JNI_METHOD(void, GeneralCommissioningCluster, writeBreadcrumbAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; @@ -9336,7 +10102,16 @@ JNI_METHOD(void, GeneralCommissioningCluster, writeBreadcrumbAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -9623,7 +10398,7 @@ JNI_METHOD(jlong, GroupKeyManagementCluster, initWithDevice)(JNIEnv * env, jobje } JNI_METHOD(void, GroupKeyManagementCluster, keySetRead) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupKeySetID) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupKeySetID, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -9656,7 +10431,15 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetRead) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -9665,7 +10448,7 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetRead) onFailure.release(); } JNI_METHOD(void, GroupKeyManagementCluster, keySetReadAllIndices) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupKeySetIDs) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupKeySetIDs, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -9698,7 +10481,15 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetReadAllIndices) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -9707,7 +10498,7 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetReadAllIndices) onFailure.release(); } JNI_METHOD(void, GroupKeyManagementCluster, keySetRemove) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupKeySetID) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupKeySetID, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -9737,7 +10528,15 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetRemove) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -9748,7 +10547,7 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetRemove) JNI_METHOD(void, GroupKeyManagementCluster, keySetWrite) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupKeySetID, jobject securityPolicy, jbyteArray epochKey0, jobject epochStartTime0, jbyteArray epochKey1, jobject epochStartTime1, jbyteArray epochKey2, - jobject epochStartTime2) + jobject epochStartTime2, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -9777,7 +10576,15 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetWrite) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -9832,7 +10639,7 @@ JNI_METHOD(jlong, GroupsCluster, initWithDevice)(JNIEnv * env, jobject self, jlo } JNI_METHOD(void, GroupsCluster, addGroup) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jstring groupName) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jstring groupName, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -9863,7 +10670,15 @@ JNI_METHOD(void, GroupsCluster, addGroup) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -9872,7 +10687,7 @@ JNI_METHOD(void, GroupsCluster, addGroup) onFailure.release(); } JNI_METHOD(void, GroupsCluster, addGroupIfIdentifying) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jstring groupName) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jstring groupName, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -9902,7 +10717,15 @@ JNI_METHOD(void, GroupsCluster, addGroupIfIdentifying) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -9911,7 +10734,7 @@ JNI_METHOD(void, GroupsCluster, addGroupIfIdentifying) onFailure.release(); } JNI_METHOD(void, GroupsCluster, getGroupMembership) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupList) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupList, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -9943,7 +10766,15 @@ JNI_METHOD(void, GroupsCluster, getGroupMembership) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -9951,7 +10782,8 @@ JNI_METHOD(void, GroupsCluster, getGroupMembership) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, GroupsCluster, removeAllGroups)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, GroupsCluster, removeAllGroups) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -9978,7 +10810,15 @@ JNI_METHOD(void, GroupsCluster, removeAllGroups)(JNIEnv * env, jobject self, jlo auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -9986,7 +10826,8 @@ JNI_METHOD(void, GroupsCluster, removeAllGroups)(JNIEnv * env, jobject self, jlo onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, GroupsCluster, removeGroup)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId) +JNI_METHOD(void, GroupsCluster, removeGroup) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10017,7 +10858,15 @@ JNI_METHOD(void, GroupsCluster, removeGroup)(JNIEnv * env, jobject self, jlong c chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -10025,7 +10874,8 @@ JNI_METHOD(void, GroupsCluster, removeGroup)(JNIEnv * env, jobject self, jlong c onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, GroupsCluster, viewGroup)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId) +JNI_METHOD(void, GroupsCluster, viewGroup) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10055,7 +10905,15 @@ JNI_METHOD(void, GroupsCluster, viewGroup)(JNIEnv * env, jobject self, jlong clu auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -10146,7 +11004,8 @@ JNI_METHOD(jlong, IdentifyCluster, initWithDevice)(JNIEnv * env, jobject self, j return reinterpret_cast(cppCluster); } -JNI_METHOD(void, IdentifyCluster, identify)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject identifyTime) +JNI_METHOD(void, IdentifyCluster, identify) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject identifyTime, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10176,7 +11035,15 @@ JNI_METHOD(void, IdentifyCluster, identify)(JNIEnv * env, jobject self, jlong cl auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -10184,7 +11051,8 @@ JNI_METHOD(void, IdentifyCluster, identify)(JNIEnv * env, jobject self, jlong cl onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, IdentifyCluster, identifyQuery)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, IdentifyCluster, identifyQuery) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10213,7 +11081,15 @@ JNI_METHOD(void, IdentifyCluster, identifyQuery)(JNIEnv * env, jobject self, jlo chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -10222,7 +11098,8 @@ JNI_METHOD(void, IdentifyCluster, identifyQuery)(JNIEnv * env, jobject self, jlo onFailure.release(); } JNI_METHOD(void, IdentifyCluster, triggerEffect) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject effectIdentifier, jobject effectVariant) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject effectIdentifier, jobject effectVariant, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10254,7 +11131,15 @@ JNI_METHOD(void, IdentifyCluster, triggerEffect) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -10264,7 +11149,7 @@ JNI_METHOD(void, IdentifyCluster, triggerEffect) } JNI_METHOD(void, IdentifyCluster, writeIdentifyTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::Identify::Attributes::IdentifyTime::TypeInfo; @@ -10292,7 +11177,16 @@ JNI_METHOD(void, IdentifyCluster, writeIdentifyTimeAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -10664,7 +11558,7 @@ JNI_METHOD(jlong, KeypadInputCluster, initWithDevice)(JNIEnv * env, jobject self } JNI_METHOD(void, KeypadInputCluster, sendKeyRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject keyCode) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject keyCode, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10695,7 +11589,15 @@ JNI_METHOD(void, KeypadInputCluster, sendKeyRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -10751,7 +11653,7 @@ JNI_METHOD(jlong, LevelControlCluster, initWithDevice)(JNIEnv * env, jobject sel JNI_METHOD(void, LevelControlCluster, move) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject moveMode, jobject rate, jobject optionMask, - jobject optionOverride) + jobject optionOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10785,7 +11687,15 @@ JNI_METHOD(void, LevelControlCluster, move) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -10795,7 +11705,7 @@ JNI_METHOD(void, LevelControlCluster, move) } JNI_METHOD(void, LevelControlCluster, moveToLevel) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject level, jobject transitionTime, jobject optionMask, - jobject optionOverride) + jobject optionOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10830,7 +11740,15 @@ JNI_METHOD(void, LevelControlCluster, moveToLevel) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -10839,7 +11757,8 @@ JNI_METHOD(void, LevelControlCluster, moveToLevel) onFailure.release(); } JNI_METHOD(void, LevelControlCluster, moveToLevelWithOnOff) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject level, jobject transitionTime) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject level, jobject transitionTime, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10870,7 +11789,15 @@ JNI_METHOD(void, LevelControlCluster, moveToLevelWithOnOff) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -10879,7 +11806,7 @@ JNI_METHOD(void, LevelControlCluster, moveToLevelWithOnOff) onFailure.release(); } JNI_METHOD(void, LevelControlCluster, moveWithOnOff) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject moveMode, jobject rate) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject moveMode, jobject rate, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10909,7 +11836,15 @@ JNI_METHOD(void, LevelControlCluster, moveWithOnOff) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -10919,7 +11854,7 @@ JNI_METHOD(void, LevelControlCluster, moveWithOnOff) } JNI_METHOD(void, LevelControlCluster, step) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject stepMode, jobject stepSize, jobject transitionTime, - jobject optionMask, jobject optionOverride) + jobject optionMask, jobject optionOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10955,7 +11890,15 @@ JNI_METHOD(void, LevelControlCluster, step) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -10964,7 +11907,8 @@ JNI_METHOD(void, LevelControlCluster, step) onFailure.release(); } JNI_METHOD(void, LevelControlCluster, stepWithOnOff) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject stepMode, jobject stepSize, jobject transitionTime) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject stepMode, jobject stepSize, jobject transitionTime, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10996,7 +11940,15 @@ JNI_METHOD(void, LevelControlCluster, stepWithOnOff) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -11005,7 +11957,8 @@ JNI_METHOD(void, LevelControlCluster, stepWithOnOff) onFailure.release(); } JNI_METHOD(void, LevelControlCluster, stop) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject optionMask, jobject optionOverride) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject optionMask, jobject optionOverride, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -11037,7 +11990,15 @@ JNI_METHOD(void, LevelControlCluster, stop) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -11045,7 +12006,8 @@ JNI_METHOD(void, LevelControlCluster, stop) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, LevelControlCluster, stopWithOnOff)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, LevelControlCluster, stopWithOnOff) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -11072,7 +12034,15 @@ JNI_METHOD(void, LevelControlCluster, stopWithOnOff)(JNIEnv * env, jobject self, auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -11341,7 +12311,7 @@ JNI_METHOD(void, LevelControlCluster, subscribeMaxFrequencyAttribute) } JNI_METHOD(void, LevelControlCluster, writeOptionsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::LevelControl::Attributes::Options::TypeInfo; @@ -11369,7 +12339,16 @@ JNI_METHOD(void, LevelControlCluster, writeOptionsAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -11416,7 +12395,7 @@ JNI_METHOD(void, LevelControlCluster, subscribeOptionsAttribute) } JNI_METHOD(void, LevelControlCluster, writeOnOffTransitionTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnOffTransitionTime::TypeInfo; @@ -11444,7 +12423,16 @@ JNI_METHOD(void, LevelControlCluster, writeOnOffTransitionTimeAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -11491,7 +12479,7 @@ JNI_METHOD(void, LevelControlCluster, subscribeOnOffTransitionTimeAttribute) } JNI_METHOD(void, LevelControlCluster, writeOnLevelAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnLevel::TypeInfo; @@ -11524,7 +12512,16 @@ JNI_METHOD(void, LevelControlCluster, writeOnLevelAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -11572,7 +12569,7 @@ JNI_METHOD(void, LevelControlCluster, subscribeOnLevelAttribute) } JNI_METHOD(void, LevelControlCluster, writeOnTransitionTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnTransitionTime::TypeInfo; @@ -11605,7 +12602,16 @@ JNI_METHOD(void, LevelControlCluster, writeOnTransitionTimeAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -11654,7 +12660,7 @@ JNI_METHOD(void, LevelControlCluster, subscribeOnTransitionTimeAttribute) } JNI_METHOD(void, LevelControlCluster, writeOffTransitionTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OffTransitionTime::TypeInfo; @@ -11687,10 +12693,19 @@ JNI_METHOD(void, LevelControlCluster, writeOffTransitionTimeAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); onSuccess.release(); onFailure.release(); @@ -11736,7 +12751,7 @@ JNI_METHOD(void, LevelControlCluster, subscribeOffTransitionTimeAttribute) } JNI_METHOD(void, LevelControlCluster, writeDefaultMoveRateAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::LevelControl::Attributes::DefaultMoveRate::TypeInfo; @@ -11769,7 +12784,16 @@ JNI_METHOD(void, LevelControlCluster, writeDefaultMoveRateAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -11817,7 +12841,7 @@ JNI_METHOD(void, LevelControlCluster, subscribeDefaultMoveRateAttribute) } JNI_METHOD(void, LevelControlCluster, writeStartUpCurrentLevelAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; @@ -11845,7 +12869,16 @@ JNI_METHOD(void, LevelControlCluster, writeStartUpCurrentLevelAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -11937,7 +12970,7 @@ JNI_METHOD(jlong, LocalizationConfigurationCluster, initWithDevice)(JNIEnv * env } JNI_METHOD(void, LocalizationConfigurationCluster, writeActiveLocaleAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; @@ -11965,7 +12998,16 @@ JNI_METHOD(void, LocalizationConfigurationCluster, writeActiveLocaleAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -11982,7 +13024,8 @@ JNI_METHOD(jlong, LowPowerCluster, initWithDevice)(JNIEnv * env, jobject self, j return reinterpret_cast(cppCluster); } -JNI_METHOD(void, LowPowerCluster, sleep)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, LowPowerCluster, sleep) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12009,7 +13052,15 @@ JNI_METHOD(void, LowPowerCluster, sleep)(JNIEnv * env, jobject self, jlong clust auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12063,7 +13114,8 @@ JNI_METHOD(jlong, MediaInputCluster, initWithDevice)(JNIEnv * env, jobject self, return reinterpret_cast(cppCluster); } -JNI_METHOD(void, MediaInputCluster, hideInputStatusRequest)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, MediaInputCluster, hideInputStatusRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12090,7 +13142,15 @@ JNI_METHOD(void, MediaInputCluster, hideInputStatusRequest)(JNIEnv * env, jobjec auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12099,7 +13159,7 @@ JNI_METHOD(void, MediaInputCluster, hideInputStatusRequest)(JNIEnv * env, jobjec onFailure.release(); } JNI_METHOD(void, MediaInputCluster, renameInputRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject index, jstring name) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject index, jstring name, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12129,7 +13189,15 @@ JNI_METHOD(void, MediaInputCluster, renameInputRequest) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12138,7 +13206,7 @@ JNI_METHOD(void, MediaInputCluster, renameInputRequest) onFailure.release(); } JNI_METHOD(void, MediaInputCluster, selectInputRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject index) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject index, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12167,7 +13235,15 @@ JNI_METHOD(void, MediaInputCluster, selectInputRequest) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12175,7 +13251,8 @@ JNI_METHOD(void, MediaInputCluster, selectInputRequest) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaInputCluster, showInputStatusRequest)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, MediaInputCluster, showInputStatusRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12202,7 +13279,15 @@ JNI_METHOD(void, MediaInputCluster, showInputStatusRequest)(JNIEnv * env, jobjec auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12293,7 +13378,8 @@ JNI_METHOD(jlong, MediaPlaybackCluster, initWithDevice)(JNIEnv * env, jobject se return reinterpret_cast(cppCluster); } -JNI_METHOD(void, MediaPlaybackCluster, fastForwardRequest)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, MediaPlaybackCluster, fastForwardRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12322,7 +13408,15 @@ JNI_METHOD(void, MediaPlaybackCluster, fastForwardRequest)(JNIEnv * env, jobject chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12330,7 +13424,8 @@ JNI_METHOD(void, MediaPlaybackCluster, fastForwardRequest)(JNIEnv * env, jobject onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, nextRequest)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, MediaPlaybackCluster, nextRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12359,7 +13454,15 @@ JNI_METHOD(void, MediaPlaybackCluster, nextRequest)(JNIEnv * env, jobject self, chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12367,7 +13470,8 @@ JNI_METHOD(void, MediaPlaybackCluster, nextRequest)(JNIEnv * env, jobject self, onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, pauseRequest)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, MediaPlaybackCluster, pauseRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12396,7 +13500,15 @@ JNI_METHOD(void, MediaPlaybackCluster, pauseRequest)(JNIEnv * env, jobject self, chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12404,7 +13516,8 @@ JNI_METHOD(void, MediaPlaybackCluster, pauseRequest)(JNIEnv * env, jobject self, onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, playRequest)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, MediaPlaybackCluster, playRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12433,7 +13546,15 @@ JNI_METHOD(void, MediaPlaybackCluster, playRequest)(JNIEnv * env, jobject self, chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12441,7 +13562,8 @@ JNI_METHOD(void, MediaPlaybackCluster, playRequest)(JNIEnv * env, jobject self, onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, previousRequest)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, MediaPlaybackCluster, previousRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12470,7 +13592,15 @@ JNI_METHOD(void, MediaPlaybackCluster, previousRequest)(JNIEnv * env, jobject se chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12478,7 +13608,8 @@ JNI_METHOD(void, MediaPlaybackCluster, previousRequest)(JNIEnv * env, jobject se onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, rewindRequest)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, MediaPlaybackCluster, rewindRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12507,7 +13638,15 @@ JNI_METHOD(void, MediaPlaybackCluster, rewindRequest)(JNIEnv * env, jobject self chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12516,7 +13655,7 @@ JNI_METHOD(void, MediaPlaybackCluster, rewindRequest)(JNIEnv * env, jobject self onFailure.release(); } JNI_METHOD(void, MediaPlaybackCluster, seekRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject position) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject position, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12547,7 +13686,15 @@ JNI_METHOD(void, MediaPlaybackCluster, seekRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12556,7 +13703,7 @@ JNI_METHOD(void, MediaPlaybackCluster, seekRequest) onFailure.release(); } JNI_METHOD(void, MediaPlaybackCluster, skipBackwardRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject deltaPositionMilliseconds) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject deltaPositionMilliseconds, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12588,7 +13735,15 @@ JNI_METHOD(void, MediaPlaybackCluster, skipBackwardRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12597,7 +13752,7 @@ JNI_METHOD(void, MediaPlaybackCluster, skipBackwardRequest) onFailure.release(); } JNI_METHOD(void, MediaPlaybackCluster, skipForwardRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject deltaPositionMilliseconds) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject deltaPositionMilliseconds, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12629,7 +13784,15 @@ JNI_METHOD(void, MediaPlaybackCluster, skipForwardRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12637,7 +13800,8 @@ JNI_METHOD(void, MediaPlaybackCluster, skipForwardRequest) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, startOverRequest)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, MediaPlaybackCluster, startOverRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12666,7 +13830,15 @@ JNI_METHOD(void, MediaPlaybackCluster, startOverRequest)(JNIEnv * env, jobject s chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12674,7 +13846,8 @@ JNI_METHOD(void, MediaPlaybackCluster, startOverRequest)(JNIEnv * env, jobject s onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, stopRequest)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, MediaPlaybackCluster, stopRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12703,7 +13876,15 @@ JNI_METHOD(void, MediaPlaybackCluster, stopRequest)(JNIEnv * env, jobject self, chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -12942,7 +14123,8 @@ JNI_METHOD(jlong, ModeSelectCluster, initWithDevice)(JNIEnv * env, jobject self, return reinterpret_cast(cppCluster); } -JNI_METHOD(void, ModeSelectCluster, changeToMode)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject newMode) +JNI_METHOD(void, ModeSelectCluster, changeToMode) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject newMode, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12971,7 +14153,15 @@ JNI_METHOD(void, ModeSelectCluster, changeToMode)(JNIEnv * env, jobject self, jl auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -13018,7 +14208,7 @@ JNI_METHOD(void, ModeSelectCluster, subscribeCurrentModeAttribute) } JNI_METHOD(void, ModeSelectCluster, writeOnModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ModeSelect::Attributes::OnMode::TypeInfo; @@ -13046,7 +14236,16 @@ JNI_METHOD(void, ModeSelectCluster, writeOnModeAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -13212,7 +14411,8 @@ JNI_METHOD(jlong, NetworkCommissioningCluster, initWithDevice)(JNIEnv * env, job } JNI_METHOD(void, NetworkCommissioningCluster, addOrUpdateThreadNetwork) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray operationalDataset, jobject breadcrumb) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray operationalDataset, jobject breadcrumb, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -13245,7 +14445,15 @@ JNI_METHOD(void, NetworkCommissioningCluster, addOrUpdateThreadNetwork) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -13254,7 +14462,8 @@ JNI_METHOD(void, NetworkCommissioningCluster, addOrUpdateThreadNetwork) onFailure.release(); } JNI_METHOD(void, NetworkCommissioningCluster, addOrUpdateWiFiNetwork) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray ssid, jbyteArray credentials, jobject breadcrumb) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray ssid, jbyteArray credentials, jobject breadcrumb, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -13288,7 +14497,15 @@ JNI_METHOD(void, NetworkCommissioningCluster, addOrUpdateWiFiNetwork) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -13297,7 +14514,8 @@ JNI_METHOD(void, NetworkCommissioningCluster, addOrUpdateWiFiNetwork) onFailure.release(); } JNI_METHOD(void, NetworkCommissioningCluster, connectNetwork) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray networkID, jobject breadcrumb) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray networkID, jobject breadcrumb, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -13330,7 +14548,15 @@ JNI_METHOD(void, NetworkCommissioningCluster, connectNetwork) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -13339,7 +14565,8 @@ JNI_METHOD(void, NetworkCommissioningCluster, connectNetwork) onFailure.release(); } JNI_METHOD(void, NetworkCommissioningCluster, removeNetwork) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray networkID, jobject breadcrumb) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray networkID, jobject breadcrumb, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -13372,7 +14599,15 @@ JNI_METHOD(void, NetworkCommissioningCluster, removeNetwork) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -13381,7 +14616,8 @@ JNI_METHOD(void, NetworkCommissioningCluster, removeNetwork) onFailure.release(); } JNI_METHOD(void, NetworkCommissioningCluster, reorderNetwork) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray networkID, jobject networkIndex, jobject breadcrumb) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray networkID, jobject networkIndex, jobject breadcrumb, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -13416,7 +14652,15 @@ JNI_METHOD(void, NetworkCommissioningCluster, reorderNetwork) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -13425,7 +14669,7 @@ JNI_METHOD(void, NetworkCommissioningCluster, reorderNetwork) onFailure.release(); } JNI_METHOD(void, NetworkCommissioningCluster, scanNetworks) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray ssid, jobject breadcrumb) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray ssid, jobject breadcrumb, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -13458,7 +14702,15 @@ JNI_METHOD(void, NetworkCommissioningCluster, scanNetworks) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -13468,7 +14720,7 @@ JNI_METHOD(void, NetworkCommissioningCluster, scanNetworks) } JNI_METHOD(void, NetworkCommissioningCluster, writeInterfaceEnabledAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; @@ -13496,7 +14748,16 @@ JNI_METHOD(void, NetworkCommissioningCluster, writeInterfaceEnabledAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -13588,7 +14849,8 @@ JNI_METHOD(jlong, OtaSoftwareUpdateProviderCluster, initWithDevice)(JNIEnv * env } JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, applyUpdateRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray updateToken, jobject newVersion) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray updateToken, jobject newVersion, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -13621,7 +14883,15 @@ JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, applyUpdateRequest) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -13630,7 +14900,8 @@ JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, applyUpdateRequest) onFailure.release(); } JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, notifyUpdateApplied) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray updateToken, jobject softwareVersion) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray updateToken, jobject softwareVersion, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -13661,7 +14932,15 @@ JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, notifyUpdateApplied) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -13671,7 +14950,8 @@ JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, notifyUpdateApplied) } JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, queryImage) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject vendorId, jobject productId, jobject softwareVersion, - jobject protocolsSupported, jobject hardwareVersion, jobject location, jobject requestorCanConsent, jobject metadataForProvider) + jobject protocolsSupported, jobject hardwareVersion, jobject location, jobject requestorCanConsent, jobject metadataForProvider, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -13719,7 +14999,15 @@ JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, queryImage) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -13776,7 +15064,7 @@ JNI_METHOD(jlong, OtaSoftwareUpdateRequestorCluster, initWithDevice)(JNIEnv * en JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, announceOtaProvider) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject providerNodeId, jobject vendorId, - jobject announcementReason, jobject metadataForNode, jobject endpoint) + jobject announcementReason, jobject metadataForNode, jobject endpoint, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -13813,7 +15101,15 @@ JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, announceOtaProvider) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -14143,7 +15439,7 @@ JNI_METHOD(jlong, OnOffCluster, initWithDevice)(JNIEnv * env, jobject self, jlon return reinterpret_cast(cppCluster); } -JNI_METHOD(void, OnOffCluster, off)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, OnOffCluster, off)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14170,7 +15466,15 @@ JNI_METHOD(void, OnOffCluster, off)(JNIEnv * env, jobject self, jlong clusterPtr auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -14179,7 +15483,8 @@ JNI_METHOD(void, OnOffCluster, off)(JNIEnv * env, jobject self, jlong clusterPtr onFailure.release(); } JNI_METHOD(void, OnOffCluster, offWithEffect) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject effectId, jobject effectVariant) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject effectId, jobject effectVariant, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14210,7 +15515,15 @@ JNI_METHOD(void, OnOffCluster, offWithEffect) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -14218,7 +15531,7 @@ JNI_METHOD(void, OnOffCluster, offWithEffect) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OnOffCluster, on)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, OnOffCluster, on)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14245,7 +15558,15 @@ JNI_METHOD(void, OnOffCluster, on)(JNIEnv * env, jobject self, jlong clusterPtr, auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -14253,7 +15574,8 @@ JNI_METHOD(void, OnOffCluster, on)(JNIEnv * env, jobject self, jlong clusterPtr, onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OnOffCluster, onWithRecallGlobalScene)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, OnOffCluster, onWithRecallGlobalScene) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14280,7 +15602,15 @@ JNI_METHOD(void, OnOffCluster, onWithRecallGlobalScene)(JNIEnv * env, jobject se auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -14289,7 +15619,8 @@ JNI_METHOD(void, OnOffCluster, onWithRecallGlobalScene)(JNIEnv * env, jobject se onFailure.release(); } JNI_METHOD(void, OnOffCluster, onWithTimedOff) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject onOffControl, jobject onTime, jobject offWaitTime) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject onOffControl, jobject onTime, jobject offWaitTime, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14322,7 +15653,15 @@ JNI_METHOD(void, OnOffCluster, onWithTimedOff) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -14330,7 +15669,7 @@ JNI_METHOD(void, OnOffCluster, onWithTimedOff) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OnOffCluster, toggle)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, OnOffCluster, toggle)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14357,7 +15696,15 @@ JNI_METHOD(void, OnOffCluster, toggle)(JNIEnv * env, jobject self, jlong cluster auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -14439,7 +15786,8 @@ JNI_METHOD(void, OnOffCluster, subscribeGlobalSceneControlAttribute) onFailure.release(); } -JNI_METHOD(void, OnOffCluster, writeOnTimeAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +JNI_METHOD(void, OnOffCluster, writeOnTimeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::OnOff::Attributes::OnTime::TypeInfo; @@ -14467,7 +15815,16 @@ JNI_METHOD(void, OnOffCluster, writeOnTimeAttribute)(JNIEnv * env, jobject self, auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -14513,7 +15870,7 @@ JNI_METHOD(void, OnOffCluster, subscribeOnTimeAttribute) } JNI_METHOD(void, OnOffCluster, writeOffWaitTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::OnOff::Attributes::OffWaitTime::TypeInfo; @@ -14541,7 +15898,16 @@ JNI_METHOD(void, OnOffCluster, writeOffWaitTimeAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -14588,7 +15954,7 @@ JNI_METHOD(void, OnOffCluster, subscribeOffWaitTimeAttribute) } JNI_METHOD(void, OnOffCluster, writeStartUpOnOffAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::OnOff::Attributes::StartUpOnOff::TypeInfo; @@ -14616,7 +15982,16 @@ JNI_METHOD(void, OnOffCluster, writeStartUpOnOffAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -14782,7 +16157,7 @@ JNI_METHOD(void, OnOffSwitchConfigurationCluster, subscribeSwitchTypeAttribute) } JNI_METHOD(void, OnOffSwitchConfigurationCluster, writeSwitchActionsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; @@ -14810,7 +16185,16 @@ JNI_METHOD(void, OnOffSwitchConfigurationCluster, writeSwitchActionsAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -14905,7 +16289,7 @@ JNI_METHOD(jlong, OperationalCredentialsCluster, initWithDevice)(JNIEnv * env, j JNI_METHOD(void, OperationalCredentialsCluster, addNOC) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray NOCValue, jobject ICACValue, jbyteArray IPKValue, - jobject caseAdminNode, jobject adminVendorId) + jobject caseAdminNode, jobject adminVendorId, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14944,7 +16328,15 @@ JNI_METHOD(void, OperationalCredentialsCluster, addNOC) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -14953,7 +16345,7 @@ JNI_METHOD(void, OperationalCredentialsCluster, addNOC) onFailure.release(); } JNI_METHOD(void, OperationalCredentialsCluster, addTrustedRootCertificate) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray rootCertificate) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray rootCertificate, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14982,7 +16374,15 @@ JNI_METHOD(void, OperationalCredentialsCluster, addTrustedRootCertificate) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -14991,7 +16391,7 @@ JNI_METHOD(void, OperationalCredentialsCluster, addTrustedRootCertificate) onFailure.release(); } JNI_METHOD(void, OperationalCredentialsCluster, attestationRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray attestationNonce) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray attestationNonce, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15023,7 +16423,15 @@ JNI_METHOD(void, OperationalCredentialsCluster, attestationRequest) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -15032,7 +16440,7 @@ JNI_METHOD(void, OperationalCredentialsCluster, attestationRequest) onFailure.release(); } JNI_METHOD(void, OperationalCredentialsCluster, certificateChainRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject certificateType) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject certificateType, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15066,7 +16474,15 @@ JNI_METHOD(void, OperationalCredentialsCluster, certificateChainRequest) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -15075,7 +16491,7 @@ JNI_METHOD(void, OperationalCredentialsCluster, certificateChainRequest) onFailure.release(); } JNI_METHOD(void, OperationalCredentialsCluster, opCSRRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray CSRNonce) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray CSRNonce, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15107,7 +16523,15 @@ JNI_METHOD(void, OperationalCredentialsCluster, opCSRRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -15116,7 +16540,7 @@ JNI_METHOD(void, OperationalCredentialsCluster, opCSRRequest) onFailure.release(); } JNI_METHOD(void, OperationalCredentialsCluster, removeFabric) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject fabricIndex) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject fabricIndex, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15149,7 +16573,15 @@ JNI_METHOD(void, OperationalCredentialsCluster, removeFabric) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -15158,7 +16590,7 @@ JNI_METHOD(void, OperationalCredentialsCluster, removeFabric) onFailure.release(); } JNI_METHOD(void, OperationalCredentialsCluster, removeTrustedRootCertificate) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray trustedRootIdentifier) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray trustedRootIdentifier, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15187,7 +16619,15 @@ JNI_METHOD(void, OperationalCredentialsCluster, removeTrustedRootCertificate) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -15196,7 +16636,7 @@ JNI_METHOD(void, OperationalCredentialsCluster, removeTrustedRootCertificate) onFailure.release(); } JNI_METHOD(void, OperationalCredentialsCluster, updateFabricLabel) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring label) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring label, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15228,7 +16668,15 @@ JNI_METHOD(void, OperationalCredentialsCluster, updateFabricLabel) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -15237,7 +16685,8 @@ JNI_METHOD(void, OperationalCredentialsCluster, updateFabricLabel) onFailure.release(); } JNI_METHOD(void, OperationalCredentialsCluster, updateNOC) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray NOCValue, jobject ICACValue) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray NOCValue, jobject ICACValue, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15271,7 +16720,15 @@ JNI_METHOD(void, OperationalCredentialsCluster, updateNOC) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -16670,7 +18127,7 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeSpeedAttribute) } JNI_METHOD(void, PumpConfigurationAndControlCluster, writeLifetimeRunningHoursAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; @@ -16703,7 +18160,16 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeLifetimeRunningHoursAt auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -16791,7 +18257,7 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribePowerAttribute) } JNI_METHOD(void, PumpConfigurationAndControlCluster, writeLifetimeEnergyConsumedAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; @@ -16824,7 +18290,16 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeLifetimeEnergyConsumed auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -16875,7 +18350,7 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeLifetimeEnergyCons } JNI_METHOD(void, PumpConfigurationAndControlCluster, writeOperationModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; @@ -16903,7 +18378,16 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeOperationModeAttribute auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -16951,7 +18435,7 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeOperationModeAttri } JNI_METHOD(void, PumpConfigurationAndControlCluster, writeControlModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; @@ -16979,7 +18463,16 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeControlModeAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -17347,7 +18840,7 @@ JNI_METHOD(jlong, ScenesCluster, initWithDevice)(JNIEnv * env, jobject self, jlo JNI_METHOD(void, ScenesCluster, addScene) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject sceneId, jobject transitionTime, - jstring sceneName, jobject clusterId, jobject length, jobject value) + jstring sceneName, jobject clusterId, jobject length, jobject value, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17383,7 +18876,15 @@ JNI_METHOD(void, ScenesCluster, addScene) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -17391,7 +18892,8 @@ JNI_METHOD(void, ScenesCluster, addScene) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ScenesCluster, getSceneMembership)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId) +JNI_METHOD(void, ScenesCluster, getSceneMembership) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17423,7 +18925,15 @@ JNI_METHOD(void, ScenesCluster, getSceneMembership)(JNIEnv * env, jobject self, chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -17432,7 +18942,8 @@ JNI_METHOD(void, ScenesCluster, getSceneMembership)(JNIEnv * env, jobject self, onFailure.release(); } JNI_METHOD(void, ScenesCluster, recallScene) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject sceneId, jobject transitionTime) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject sceneId, jobject transitionTime, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17464,7 +18975,15 @@ JNI_METHOD(void, ScenesCluster, recallScene) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -17472,7 +18991,8 @@ JNI_METHOD(void, ScenesCluster, recallScene) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ScenesCluster, removeAllScenes)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId) +JNI_METHOD(void, ScenesCluster, removeAllScenes) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17503,16 +19023,24 @@ JNI_METHOD(void, ScenesCluster, removeAllScenes)(JNIEnv * env, jobject self, jlo chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } + VerifyOrReturn(err == CHIP_NO_ERROR, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } JNI_METHOD(void, ScenesCluster, removeScene) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject sceneId) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject sceneId, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17544,7 +19072,15 @@ JNI_METHOD(void, ScenesCluster, removeScene) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -17553,7 +19089,7 @@ JNI_METHOD(void, ScenesCluster, removeScene) onFailure.release(); } JNI_METHOD(void, ScenesCluster, storeScene) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject sceneId) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject sceneId, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17584,7 +19120,15 @@ JNI_METHOD(void, ScenesCluster, storeScene) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -17593,7 +19137,7 @@ JNI_METHOD(void, ScenesCluster, storeScene) onFailure.release(); } JNI_METHOD(void, ScenesCluster, viewScene) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject sceneId) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject sceneId, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17624,7 +19168,15 @@ JNI_METHOD(void, ScenesCluster, viewScene) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -17863,7 +19415,8 @@ JNI_METHOD(jlong, SoftwareDiagnosticsCluster, initWithDevice)(JNIEnv * env, jobj return reinterpret_cast(cppCluster); } -JNI_METHOD(void, SoftwareDiagnosticsCluster, resetWatermarks)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, SoftwareDiagnosticsCluster, resetWatermarks) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17890,7 +19443,15 @@ JNI_METHOD(void, SoftwareDiagnosticsCluster, resetWatermarks)(JNIEnv * env, jobj auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -18251,7 +19812,7 @@ JNI_METHOD(jlong, TargetNavigatorCluster, initWithDevice)(JNIEnv * env, jobject } JNI_METHOD(void, TargetNavigatorCluster, navigateTargetRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject target, jstring data) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject target, jstring data, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18284,7 +19845,15 @@ JNI_METHOD(void, TargetNavigatorCluster, navigateTargetRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -18575,7 +20144,7 @@ JNI_METHOD(jlong, TestClusterCluster, initWithDevice)(JNIEnv * env, jobject self JNI_METHOD(void, TestClusterCluster, simpleStructEchoRequest) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jbyteArray d, jstring e, - jobject f, jobject g, jobject h) + jobject f, jobject g, jobject h, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18607,7 +20176,15 @@ JNI_METHOD(void, TestClusterCluster, simpleStructEchoRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -18615,7 +20192,8 @@ JNI_METHOD(void, TestClusterCluster, simpleStructEchoRequest) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, test)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, TestClusterCluster, test) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18642,7 +20220,15 @@ JNI_METHOD(void, TestClusterCluster, test)(JNIEnv * env, jobject self, jlong clu auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -18651,7 +20237,7 @@ JNI_METHOD(void, TestClusterCluster, test)(JNIEnv * env, jobject self, jlong clu onFailure.release(); } JNI_METHOD(void, TestClusterCluster, testAddArguments) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject arg2) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject arg2, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18684,7 +20270,15 @@ JNI_METHOD(void, TestClusterCluster, testAddArguments) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -18693,7 +20287,7 @@ JNI_METHOD(void, TestClusterCluster, testAddArguments) onFailure.release(); } JNI_METHOD(void, TestClusterCluster, testEnumsRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject arg2) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject arg2, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18725,7 +20319,15 @@ JNI_METHOD(void, TestClusterCluster, testEnumsRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -18734,7 +20336,7 @@ JNI_METHOD(void, TestClusterCluster, testEnumsRequest) onFailure.release(); } JNI_METHOD(void, TestClusterCluster, testListInt8UArgumentRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18765,7 +20367,15 @@ JNI_METHOD(void, TestClusterCluster, testListInt8UArgumentRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -18774,7 +20384,7 @@ JNI_METHOD(void, TestClusterCluster, testListInt8UArgumentRequest) onFailure.release(); } JNI_METHOD(void, TestClusterCluster, testListInt8UReverseRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18806,7 +20416,15 @@ JNI_METHOD(void, TestClusterCluster, testListInt8UReverseRequest) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -18816,7 +20434,7 @@ JNI_METHOD(void, TestClusterCluster, testListInt8UReverseRequest) } JNI_METHOD(void, TestClusterCluster, testListNestedStructListArgumentRequest) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jobject d, jobject e, - jbyteArray f, jobject g) + jbyteArray f, jobject g, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18847,7 +20465,15 @@ JNI_METHOD(void, TestClusterCluster, testListNestedStructListArgumentRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -18857,7 +20483,7 @@ JNI_METHOD(void, TestClusterCluster, testListNestedStructListArgumentRequest) } JNI_METHOD(void, TestClusterCluster, testListStructArgumentRequest) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jbyteArray d, jstring e, - jobject f, jobject g, jobject h) + jobject f, jobject g, jobject h, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18888,7 +20514,15 @@ JNI_METHOD(void, TestClusterCluster, testListStructArgumentRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -18897,7 +20531,7 @@ JNI_METHOD(void, TestClusterCluster, testListStructArgumentRequest) onFailure.release(); } JNI_METHOD(void, TestClusterCluster, testNestedStructArgumentRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18928,7 +20562,15 @@ JNI_METHOD(void, TestClusterCluster, testNestedStructArgumentRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -18938,7 +20580,7 @@ JNI_METHOD(void, TestClusterCluster, testNestedStructArgumentRequest) } JNI_METHOD(void, TestClusterCluster, testNestedStructListArgumentRequest) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jobject d, jobject e, - jbyteArray f, jobject g) + jbyteArray f, jobject g, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18969,7 +20611,15 @@ JNI_METHOD(void, TestClusterCluster, testNestedStructListArgumentRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -18977,7 +20627,8 @@ JNI_METHOD(void, TestClusterCluster, testNestedStructListArgumentRequest) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, testNotHandled)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, TestClusterCluster, testNotHandled) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19004,7 +20655,15 @@ JNI_METHOD(void, TestClusterCluster, testNotHandled)(JNIEnv * env, jobject self, auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -19013,7 +20672,7 @@ JNI_METHOD(void, TestClusterCluster, testNotHandled)(JNIEnv * env, jobject self, onFailure.release(); } JNI_METHOD(void, TestClusterCluster, testNullableOptionalRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19052,7 +20711,15 @@ JNI_METHOD(void, TestClusterCluster, testNullableOptionalRequest) onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -19061,7 +20728,7 @@ JNI_METHOD(void, TestClusterCluster, testNullableOptionalRequest) onFailure.release(); } JNI_METHOD(void, TestClusterCluster, testSimpleOptionalArgumentRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19092,7 +20759,15 @@ JNI_METHOD(void, TestClusterCluster, testSimpleOptionalArgumentRequest) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -19100,7 +20775,8 @@ JNI_METHOD(void, TestClusterCluster, testSimpleOptionalArgumentRequest) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, testSpecific)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, TestClusterCluster, testSpecific) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19130,7 +20806,15 @@ JNI_METHOD(void, TestClusterCluster, testSpecific)(JNIEnv * env, jobject self, j chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -19140,7 +20824,7 @@ JNI_METHOD(void, TestClusterCluster, testSpecific)(JNIEnv * env, jobject self, j } JNI_METHOD(void, TestClusterCluster, testStructArgumentRequest) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jbyteArray d, jstring e, - jobject f, jobject g, jobject h) + jobject f, jobject g, jobject h, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19171,7 +20855,15 @@ JNI_METHOD(void, TestClusterCluster, testStructArgumentRequest) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -19179,7 +20871,8 @@ JNI_METHOD(void, TestClusterCluster, testStructArgumentRequest) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, testUnknownCommand)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, TestClusterCluster, testUnknownCommand) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19206,7 +20899,15 @@ JNI_METHOD(void, TestClusterCluster, testUnknownCommand)(JNIEnv * env, jobject s auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -19214,7 +20915,8 @@ JNI_METHOD(void, TestClusterCluster, testUnknownCommand)(JNIEnv * env, jobject s onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, timedInvokeRequest)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, TestClusterCluster, timedInvokeRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19241,7 +20943,8 @@ JNI_METHOD(void, TestClusterCluster, timedInvokeRequest)(JNIEnv * env, jobject s auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, 10000); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -19251,7 +20954,7 @@ JNI_METHOD(void, TestClusterCluster, timedInvokeRequest)(JNIEnv * env, jobject s } JNI_METHOD(void, TestClusterCluster, writeBooleanAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Boolean::TypeInfo; @@ -19279,7 +20982,16 @@ JNI_METHOD(void, TestClusterCluster, writeBooleanAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -19326,7 +21038,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeBooleanAttribute) } JNI_METHOD(void, TestClusterCluster, writeBitmap8Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap8::TypeInfo; @@ -19354,7 +21066,16 @@ JNI_METHOD(void, TestClusterCluster, writeBitmap8Attribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -19401,7 +21122,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeBitmap8Attribute) } JNI_METHOD(void, TestClusterCluster, writeBitmap16Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap16::TypeInfo; @@ -19429,7 +21150,16 @@ JNI_METHOD(void, TestClusterCluster, writeBitmap16Attribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -19476,7 +21206,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeBitmap16Attribute) } JNI_METHOD(void, TestClusterCluster, writeBitmap32Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap32::TypeInfo; @@ -19504,7 +21234,16 @@ JNI_METHOD(void, TestClusterCluster, writeBitmap32Attribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -19551,7 +21290,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeBitmap32Attribute) } JNI_METHOD(void, TestClusterCluster, writeBitmap64Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap64::TypeInfo; @@ -19579,7 +21318,16 @@ JNI_METHOD(void, TestClusterCluster, writeBitmap64Attribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -19626,7 +21374,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeBitmap64Attribute) } JNI_METHOD(void, TestClusterCluster, writeInt8uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int8u::TypeInfo; @@ -19654,7 +21402,16 @@ JNI_METHOD(void, TestClusterCluster, writeInt8uAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -19701,7 +21458,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt8uAttribute) } JNI_METHOD(void, TestClusterCluster, writeInt16uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int16u::TypeInfo; @@ -19729,7 +21486,16 @@ JNI_METHOD(void, TestClusterCluster, writeInt16uAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -19776,7 +21542,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt16uAttribute) } JNI_METHOD(void, TestClusterCluster, writeInt24uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int24u::TypeInfo; @@ -19804,7 +21570,16 @@ JNI_METHOD(void, TestClusterCluster, writeInt24uAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -19851,7 +21626,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt24uAttribute) } JNI_METHOD(void, TestClusterCluster, writeInt32uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int32u::TypeInfo; @@ -19879,7 +21654,16 @@ JNI_METHOD(void, TestClusterCluster, writeInt32uAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -19926,7 +21710,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt32uAttribute) } JNI_METHOD(void, TestClusterCluster, writeInt40uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int40u::TypeInfo; @@ -19954,7 +21738,16 @@ JNI_METHOD(void, TestClusterCluster, writeInt40uAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -20001,7 +21794,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt40uAttribute) } JNI_METHOD(void, TestClusterCluster, writeInt48uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int48u::TypeInfo; @@ -20029,7 +21822,16 @@ JNI_METHOD(void, TestClusterCluster, writeInt48uAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -20076,7 +21878,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt48uAttribute) } JNI_METHOD(void, TestClusterCluster, writeInt56uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int56u::TypeInfo; @@ -20104,7 +21906,16 @@ JNI_METHOD(void, TestClusterCluster, writeInt56uAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -20151,7 +21962,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt56uAttribute) } JNI_METHOD(void, TestClusterCluster, writeInt64uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int64u::TypeInfo; @@ -20179,7 +21990,16 @@ JNI_METHOD(void, TestClusterCluster, writeInt64uAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -20226,7 +22046,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt64uAttribute) } JNI_METHOD(void, TestClusterCluster, writeInt8sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int8s::TypeInfo; @@ -20254,7 +22074,16 @@ JNI_METHOD(void, TestClusterCluster, writeInt8sAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -20301,7 +22130,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt8sAttribute) } JNI_METHOD(void, TestClusterCluster, writeInt16sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int16s::TypeInfo; @@ -20329,7 +22158,16 @@ JNI_METHOD(void, TestClusterCluster, writeInt16sAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -20376,7 +22214,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt16sAttribute) } JNI_METHOD(void, TestClusterCluster, writeInt24sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int24s::TypeInfo; @@ -20404,7 +22242,16 @@ JNI_METHOD(void, TestClusterCluster, writeInt24sAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -20451,7 +22298,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt24sAttribute) } JNI_METHOD(void, TestClusterCluster, writeInt32sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int32s::TypeInfo; @@ -20479,7 +22326,16 @@ JNI_METHOD(void, TestClusterCluster, writeInt32sAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -20526,7 +22382,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt32sAttribute) } JNI_METHOD(void, TestClusterCluster, writeInt40sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int40s::TypeInfo; @@ -20554,7 +22410,16 @@ JNI_METHOD(void, TestClusterCluster, writeInt40sAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -20601,7 +22466,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt40sAttribute) } JNI_METHOD(void, TestClusterCluster, writeInt48sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int48s::TypeInfo; @@ -20629,7 +22494,16 @@ JNI_METHOD(void, TestClusterCluster, writeInt48sAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -20676,7 +22550,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt48sAttribute) } JNI_METHOD(void, TestClusterCluster, writeInt56sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int56s::TypeInfo; @@ -20704,7 +22578,16 @@ JNI_METHOD(void, TestClusterCluster, writeInt56sAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -20751,7 +22634,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt56sAttribute) } JNI_METHOD(void, TestClusterCluster, writeInt64sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int64s::TypeInfo; @@ -20779,7 +22662,16 @@ JNI_METHOD(void, TestClusterCluster, writeInt64sAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -20826,7 +22718,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt64sAttribute) } JNI_METHOD(void, TestClusterCluster, writeEnum8Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Enum8::TypeInfo; @@ -20854,7 +22746,16 @@ JNI_METHOD(void, TestClusterCluster, writeEnum8Attribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -20901,7 +22802,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeEnum8Attribute) } JNI_METHOD(void, TestClusterCluster, writeEnum16Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Enum16::TypeInfo; @@ -20929,7 +22830,16 @@ JNI_METHOD(void, TestClusterCluster, writeEnum16Attribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -20976,7 +22886,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeEnum16Attribute) } JNI_METHOD(void, TestClusterCluster, writeFloatSingleAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::FloatSingle::TypeInfo; @@ -21004,7 +22914,16 @@ JNI_METHOD(void, TestClusterCluster, writeFloatSingleAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -21051,7 +22970,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeFloatSingleAttribute) } JNI_METHOD(void, TestClusterCluster, writeFloatDoubleAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::FloatDouble::TypeInfo; @@ -21079,7 +22998,16 @@ JNI_METHOD(void, TestClusterCluster, writeFloatDoubleAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -21126,7 +23054,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeFloatDoubleAttribute) } JNI_METHOD(void, TestClusterCluster, writeOctetStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::OctetString::TypeInfo; @@ -21154,7 +23082,16 @@ JNI_METHOD(void, TestClusterCluster, writeOctetStringAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -21201,7 +23138,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeOctetStringAttribute) } JNI_METHOD(void, TestClusterCluster, writeLongOctetStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::LongOctetString::TypeInfo; @@ -21229,7 +23166,16 @@ JNI_METHOD(void, TestClusterCluster, writeLongOctetStringAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -21276,7 +23222,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeLongOctetStringAttribute) } JNI_METHOD(void, TestClusterCluster, writeCharStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::CharString::TypeInfo; @@ -21304,7 +23250,16 @@ JNI_METHOD(void, TestClusterCluster, writeCharStringAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -21351,7 +23306,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeCharStringAttribute) } JNI_METHOD(void, TestClusterCluster, writeLongCharStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::LongCharString::TypeInfo; @@ -21379,7 +23334,16 @@ JNI_METHOD(void, TestClusterCluster, writeLongCharStringAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -21426,7 +23390,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeLongCharStringAttribute) } JNI_METHOD(void, TestClusterCluster, writeEpochUsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::EpochUs::TypeInfo; @@ -21454,7 +23418,16 @@ JNI_METHOD(void, TestClusterCluster, writeEpochUsAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -21501,7 +23474,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeEpochUsAttribute) } JNI_METHOD(void, TestClusterCluster, writeEpochSAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::EpochS::TypeInfo; @@ -21529,7 +23502,16 @@ JNI_METHOD(void, TestClusterCluster, writeEpochSAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -21576,7 +23558,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeEpochSAttribute) } JNI_METHOD(void, TestClusterCluster, writeVendorIdAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::VendorId::TypeInfo; @@ -21604,7 +23586,16 @@ JNI_METHOD(void, TestClusterCluster, writeVendorIdAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -21652,7 +23643,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeVendorIdAttribute) } JNI_METHOD(void, TestClusterCluster, writeEnumAttrAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::EnumAttr::TypeInfo; @@ -21680,7 +23671,16 @@ JNI_METHOD(void, TestClusterCluster, writeEnumAttrAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -21727,7 +23727,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeEnumAttrAttribute) } JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt8uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; @@ -21755,7 +23755,16 @@ JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt8uAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -21802,7 +23811,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeRangeRestrictedInt8uAttribute) } JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt8sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; @@ -21830,7 +23839,16 @@ JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt8sAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -21877,7 +23895,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeRangeRestrictedInt8sAttribute) } JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt16uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; @@ -21905,7 +23923,16 @@ JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt16uAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -21952,7 +23979,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeRangeRestrictedInt16uAttribute) } JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt16sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo; @@ -21980,7 +24007,16 @@ JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt16sAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -22027,7 +24063,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeRangeRestrictedInt16sAttribute) } JNI_METHOD(void, TestClusterCluster, writeTimedWriteBooleanAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::TimedWriteBoolean::TypeInfo; @@ -22055,7 +24091,9 @@ JNI_METHOD(void, TestClusterCluster, writeTimedWriteBooleanAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, 10000); + + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -22065,7 +24103,7 @@ JNI_METHOD(void, TestClusterCluster, writeTimedWriteBooleanAttribute) } JNI_METHOD(void, TestClusterCluster, writeUnsupportedAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Unsupported::TypeInfo; @@ -22093,7 +24131,16 @@ JNI_METHOD(void, TestClusterCluster, writeUnsupportedAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -22140,7 +24187,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeUnsupportedAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableBooleanAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBoolean::TypeInfo; @@ -22173,7 +24220,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableBooleanAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -22221,7 +24277,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableBooleanAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableBitmap8Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBitmap8::TypeInfo; @@ -22254,7 +24310,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableBitmap8Attribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -22302,7 +24367,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableBitmap8Attribute) } JNI_METHOD(void, TestClusterCluster, writeNullableBitmap16Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBitmap16::TypeInfo; @@ -22335,7 +24400,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableBitmap16Attribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -22383,7 +24457,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableBitmap16Attribute) } JNI_METHOD(void, TestClusterCluster, writeNullableBitmap32Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBitmap32::TypeInfo; @@ -22416,7 +24490,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableBitmap32Attribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -22464,7 +24547,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableBitmap32Attribute) } JNI_METHOD(void, TestClusterCluster, writeNullableBitmap64Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBitmap64::TypeInfo; @@ -22497,7 +24580,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableBitmap64Attribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -22545,7 +24637,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableBitmap64Attribute) } JNI_METHOD(void, TestClusterCluster, writeNullableInt8uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt8u::TypeInfo; @@ -22578,7 +24670,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt8uAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -22626,7 +24727,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableInt8uAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableInt16uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt16u::TypeInfo; @@ -22659,7 +24760,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt16uAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -22707,7 +24817,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableInt16uAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableInt24uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt24u::TypeInfo; @@ -22740,7 +24850,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt24uAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -22788,7 +24907,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableInt24uAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableInt32uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt32u::TypeInfo; @@ -22821,7 +24940,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt32uAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -22869,7 +24997,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableInt32uAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableInt40uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt40u::TypeInfo; @@ -22902,7 +25030,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt40uAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -22950,7 +25087,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableInt40uAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableInt48uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt48u::TypeInfo; @@ -22983,7 +25120,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt48uAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -23031,7 +25177,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableInt48uAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableInt56uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt56u::TypeInfo; @@ -23064,7 +25210,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt56uAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -23112,7 +25267,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableInt56uAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableInt64uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt64u::TypeInfo; @@ -23145,7 +25300,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt64uAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -23193,7 +25357,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableInt64uAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableInt8sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt8s::TypeInfo; @@ -23226,7 +25390,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt8sAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -23274,7 +25447,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableInt8sAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableInt16sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt16s::TypeInfo; @@ -23307,7 +25480,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt16sAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -23355,7 +25537,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableInt16sAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableInt24sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt24s::TypeInfo; @@ -23388,7 +25570,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt24sAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -23436,7 +25627,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableInt24sAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableInt32sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt32s::TypeInfo; @@ -23469,7 +25660,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt32sAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -23517,7 +25717,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableInt32sAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableInt40sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt40s::TypeInfo; @@ -23550,7 +25750,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt40sAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -23598,7 +25807,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableInt40sAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableInt48sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt48s::TypeInfo; @@ -23631,7 +25840,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt48sAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -23679,7 +25897,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableInt48sAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableInt56sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt56s::TypeInfo; @@ -23712,7 +25930,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt56sAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -23760,7 +25987,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableInt56sAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableInt64sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt64s::TypeInfo; @@ -23793,7 +26020,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt64sAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -23841,7 +26077,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableInt64sAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableEnum8Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableEnum8::TypeInfo; @@ -23874,7 +26110,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableEnum8Attribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -23922,7 +26167,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableEnum8Attribute) } JNI_METHOD(void, TestClusterCluster, writeNullableEnum16Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableEnum16::TypeInfo; @@ -23955,7 +26200,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableEnum16Attribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -24003,7 +26257,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableEnum16Attribute) } JNI_METHOD(void, TestClusterCluster, writeNullableFloatSingleAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableFloatSingle::TypeInfo; @@ -24036,7 +26290,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableFloatSingleAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -24085,7 +26348,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableFloatSingleAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableFloatDoubleAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableFloatDouble::TypeInfo; @@ -24118,7 +26381,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableFloatDoubleAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -24167,7 +26439,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableFloatDoubleAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableOctetStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableOctetString::TypeInfo; @@ -24201,7 +26473,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableOctetStringAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -24250,7 +26531,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableOctetStringAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableCharStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableCharString::TypeInfo; @@ -24284,7 +26565,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableCharStringAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -24333,7 +26623,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableCharStringAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableEnumAttrAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableEnumAttr::TypeInfo; @@ -24367,7 +26657,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableEnumAttrAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -24415,7 +26714,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableEnumAttrAttribute) } JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt8uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; @@ -24448,7 +26747,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt8uAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -24499,7 +26807,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableRangeRestrictedInt8uAttrib } JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt8sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; @@ -24532,7 +26840,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt8sAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -24583,7 +26900,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableRangeRestrictedInt8sAttrib } JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt16uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; @@ -24616,7 +26933,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt16uAttribute auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -24667,7 +26993,7 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableRangeRestrictedInt16uAttri } JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt16sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; @@ -24700,7 +27026,16 @@ JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt16sAttribute auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -24795,7 +27130,8 @@ JNI_METHOD(jlong, ThermostatCluster, initWithDevice)(JNIEnv * env, jobject self, return reinterpret_cast(cppCluster); } -JNI_METHOD(void, ThermostatCluster, clearWeeklySchedule)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, ThermostatCluster, clearWeeklySchedule) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24822,7 +27158,15 @@ JNI_METHOD(void, ThermostatCluster, clearWeeklySchedule)(JNIEnv * env, jobject s auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -24830,7 +27174,8 @@ JNI_METHOD(void, ThermostatCluster, clearWeeklySchedule)(JNIEnv * env, jobject s onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ThermostatCluster, getRelayStatusLog)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, ThermostatCluster, getRelayStatusLog) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24860,7 +27205,15 @@ JNI_METHOD(void, ThermostatCluster, getRelayStatusLog)(JNIEnv * env, jobject sel chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -24869,7 +27222,8 @@ JNI_METHOD(void, ThermostatCluster, getRelayStatusLog)(JNIEnv * env, jobject sel onFailure.release(); } JNI_METHOD(void, ThermostatCluster, getWeeklySchedule) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject daysToReturn, jobject modeToReturn) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject daysToReturn, jobject modeToReturn, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24904,7 +27258,15 @@ JNI_METHOD(void, ThermostatCluster, getWeeklySchedule) chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -24914,7 +27276,7 @@ JNI_METHOD(void, ThermostatCluster, getWeeklySchedule) } JNI_METHOD(void, ThermostatCluster, setWeeklySchedule) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject numberOfTransitionsForSequence, - jobject dayOfWeekForSequence, jobject modeForSequence, jobject payload) + jobject dayOfWeekForSequence, jobject modeForSequence, jobject payload, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24949,7 +27311,15 @@ JNI_METHOD(void, ThermostatCluster, setWeeklySchedule) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -24958,7 +27328,7 @@ JNI_METHOD(void, ThermostatCluster, setWeeklySchedule) onFailure.release(); } JNI_METHOD(void, ThermostatCluster, setpointRaiseLower) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject mode, jobject amount) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject mode, jobject amount, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24988,7 +27358,15 @@ JNI_METHOD(void, ThermostatCluster, setpointRaiseLower) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -25183,7 +27561,7 @@ JNI_METHOD(void, ThermostatCluster, subscribeAbsMaxCoolSetpointLimitAttribute) } JNI_METHOD(void, ThermostatCluster, writeOccupiedCoolingSetpointAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; @@ -25211,7 +27589,16 @@ JNI_METHOD(void, ThermostatCluster, writeOccupiedCoolingSetpointAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -25258,7 +27645,7 @@ JNI_METHOD(void, ThermostatCluster, subscribeOccupiedCoolingSetpointAttribute) } JNI_METHOD(void, ThermostatCluster, writeOccupiedHeatingSetpointAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; @@ -25286,7 +27673,16 @@ JNI_METHOD(void, ThermostatCluster, writeOccupiedHeatingSetpointAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -25333,7 +27729,7 @@ JNI_METHOD(void, ThermostatCluster, subscribeOccupiedHeatingSetpointAttribute) } JNI_METHOD(void, ThermostatCluster, writeMinHeatSetpointLimitAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; @@ -25361,7 +27757,16 @@ JNI_METHOD(void, ThermostatCluster, writeMinHeatSetpointLimitAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -25408,7 +27813,7 @@ JNI_METHOD(void, ThermostatCluster, subscribeMinHeatSetpointLimitAttribute) } JNI_METHOD(void, ThermostatCluster, writeMaxHeatSetpointLimitAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; @@ -25436,7 +27841,16 @@ JNI_METHOD(void, ThermostatCluster, writeMaxHeatSetpointLimitAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -25483,7 +27897,7 @@ JNI_METHOD(void, ThermostatCluster, subscribeMaxHeatSetpointLimitAttribute) } JNI_METHOD(void, ThermostatCluster, writeMinCoolSetpointLimitAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; @@ -25511,7 +27925,16 @@ JNI_METHOD(void, ThermostatCluster, writeMinCoolSetpointLimitAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -25558,7 +27981,7 @@ JNI_METHOD(void, ThermostatCluster, subscribeMinCoolSetpointLimitAttribute) } JNI_METHOD(void, ThermostatCluster, writeMaxCoolSetpointLimitAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; @@ -25586,7 +28009,16 @@ JNI_METHOD(void, ThermostatCluster, writeMaxCoolSetpointLimitAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -25633,7 +28065,7 @@ JNI_METHOD(void, ThermostatCluster, subscribeMaxCoolSetpointLimitAttribute) } JNI_METHOD(void, ThermostatCluster, writeMinSetpointDeadBandAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; @@ -25661,7 +28093,16 @@ JNI_METHOD(void, ThermostatCluster, writeMinSetpointDeadBandAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -25708,7 +28149,7 @@ JNI_METHOD(void, ThermostatCluster, subscribeMinSetpointDeadBandAttribute) } JNI_METHOD(void, ThermostatCluster, writeControlSequenceOfOperationAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; @@ -25736,7 +28177,16 @@ JNI_METHOD(void, ThermostatCluster, writeControlSequenceOfOperationAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -25783,7 +28233,7 @@ JNI_METHOD(void, ThermostatCluster, subscribeControlSequenceOfOperationAttribute } JNI_METHOD(void, ThermostatCluster, writeSystemModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::Thermostat::Attributes::SystemMode::TypeInfo; @@ -25811,7 +28261,16 @@ JNI_METHOD(void, ThermostatCluster, writeSystemModeAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -26052,7 +28511,7 @@ JNI_METHOD(jlong, ThermostatUserInterfaceConfigurationCluster, initWithDevice) } JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, writeTemperatureDisplayModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; @@ -26081,7 +28540,16 @@ JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, writeTemperatureDi auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -26130,7 +28598,7 @@ JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, subscribeTemperatu } JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, writeKeypadLockoutAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; @@ -26159,7 +28627,16 @@ JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, writeKeypadLockout auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -26208,7 +28685,7 @@ JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, subscribeKeypadLoc } JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, writeScheduleProgrammingVisibilityAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; @@ -26237,7 +28714,16 @@ JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, writeScheduleProgr auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); @@ -26331,7 +28817,8 @@ JNI_METHOD(jlong, ThreadNetworkDiagnosticsCluster, initWithDevice)(JNIEnv * env, return reinterpret_cast(cppCluster); } -JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, resetCounts)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, resetCounts) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26358,7 +28845,15 @@ JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, resetCounts)(JNIEnv * env, job auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -28689,7 +31184,8 @@ JNI_METHOD(jlong, WiFiNetworkDiagnosticsCluster, initWithDevice)(JNIEnv * env, j return reinterpret_cast(cppCluster); } -JNI_METHOD(void, WiFiNetworkDiagnosticsCluster, resetCounts)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, WiFiNetworkDiagnosticsCluster, resetCounts) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28716,7 +31212,15 @@ JNI_METHOD(void, WiFiNetworkDiagnosticsCluster, resetCounts)(JNIEnv * env, jobje auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -29257,7 +31761,8 @@ JNI_METHOD(jlong, WindowCoveringCluster, initWithDevice)(JNIEnv * env, jobject s return reinterpret_cast(cppCluster); } -JNI_METHOD(void, WindowCoveringCluster, downOrClose)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, WindowCoveringCluster, downOrClose) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29284,7 +31789,15 @@ JNI_METHOD(void, WindowCoveringCluster, downOrClose)(JNIEnv * env, jobject self, auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -29293,7 +31806,8 @@ JNI_METHOD(void, WindowCoveringCluster, downOrClose)(JNIEnv * env, jobject self, onFailure.release(); } JNI_METHOD(void, WindowCoveringCluster, goToLiftPercentage) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject liftPercentageValue, jobject liftPercent100thsValue) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject liftPercentageValue, jobject liftPercent100thsValue, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29325,7 +31839,15 @@ JNI_METHOD(void, WindowCoveringCluster, goToLiftPercentage) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -29334,7 +31856,7 @@ JNI_METHOD(void, WindowCoveringCluster, goToLiftPercentage) onFailure.release(); } JNI_METHOD(void, WindowCoveringCluster, goToLiftValue) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject liftValue) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject liftValue, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29363,7 +31885,15 @@ JNI_METHOD(void, WindowCoveringCluster, goToLiftValue) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -29372,7 +31902,8 @@ JNI_METHOD(void, WindowCoveringCluster, goToLiftValue) onFailure.release(); } JNI_METHOD(void, WindowCoveringCluster, goToTiltPercentage) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject tiltPercentageValue, jobject tiltPercent100thsValue) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject tiltPercentageValue, jobject tiltPercent100thsValue, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29404,7 +31935,15 @@ JNI_METHOD(void, WindowCoveringCluster, goToTiltPercentage) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -29413,7 +31952,7 @@ JNI_METHOD(void, WindowCoveringCluster, goToTiltPercentage) onFailure.release(); } JNI_METHOD(void, WindowCoveringCluster, goToTiltValue) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject tiltValue) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject tiltValue, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29442,7 +31981,15 @@ JNI_METHOD(void, WindowCoveringCluster, goToTiltValue) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -29450,7 +31997,8 @@ JNI_METHOD(void, WindowCoveringCluster, goToTiltValue) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, WindowCoveringCluster, stopMotion)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, WindowCoveringCluster, stopMotion) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29477,7 +32025,15 @@ JNI_METHOD(void, WindowCoveringCluster, stopMotion)(JNIEnv * env, jobject self, auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -29485,7 +32041,8 @@ JNI_METHOD(void, WindowCoveringCluster, stopMotion)(JNIEnv * env, jobject self, onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, WindowCoveringCluster, upOrOpen)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, WindowCoveringCluster, upOrOpen) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29512,7 +32069,15 @@ JNI_METHOD(void, WindowCoveringCluster, upOrOpen)(JNIEnv * env, jobject self, jl auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); @@ -30144,7 +32709,7 @@ JNI_METHOD(void, WindowCoveringCluster, subscribeInstalledClosedLimitTiltAttribu } JNI_METHOD(void, WindowCoveringCluster, writeModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::WindowCovering::Attributes::Mode::TypeInfo; @@ -30172,7 +32737,16 @@ JNI_METHOD(void, WindowCoveringCluster, writeModeAttribute) auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } VerifyOrReturn( err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 5a49c6f38638e6..b3dacb534f2601 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -243,29 +243,46 @@ public static long clusterId() { public native long initWithDevice(long devicePtr, int endpointId); public void getSetupPINRequest( - GetSetupPINResponseCallback callback, String tempAccountIdentifier) { - getSetupPINRequest(chipClusterPtr, callback, tempAccountIdentifier); + GetSetupPINResponseCallback callback, + String tempAccountIdentifier, + int timedInvokeTimeoutMs) { + getSetupPINRequest(chipClusterPtr, callback, tempAccountIdentifier, timedInvokeTimeoutMs); } public void loginRequest( DefaultClusterCallback callback, String tempAccountIdentifier, String setupPIN) { - loginRequest(chipClusterPtr, callback, tempAccountIdentifier, setupPIN); + loginRequest(chipClusterPtr, callback, tempAccountIdentifier, setupPIN, null); + } + + public void loginRequest( + DefaultClusterCallback callback, + String tempAccountIdentifier, + String setupPIN, + int timedInvokeTimeoutMs) { + loginRequest(chipClusterPtr, callback, tempAccountIdentifier, setupPIN, timedInvokeTimeoutMs); } - public void logoutRequest(DefaultClusterCallback callback) { - logoutRequest(chipClusterPtr, callback); + public void logoutRequest(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + logoutRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } private native void getSetupPINRequest( - long chipClusterPtr, GetSetupPINResponseCallback Callback, String tempAccountIdentifier); + long chipClusterPtr, + GetSetupPINResponseCallback Callback, + String tempAccountIdentifier, + @Nullable Integer timedInvokeTimeoutMs); private native void loginRequest( long chipClusterPtr, DefaultClusterCallback Callback, String tempAccountIdentifier, - String setupPIN); + String setupPIN, + @Nullable Integer timedInvokeTimeoutMs); - private native void logoutRequest(long chipClusterPtr, DefaultClusterCallback Callback); + private native void logoutRequest( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); public interface GetSetupPINResponseCallback { void onSuccess(String setupPIN); @@ -318,7 +335,13 @@ public static long clusterId() { public void openBasicCommissioningWindow( DefaultClusterCallback callback, Integer commissioningTimeout) { - openBasicCommissioningWindow(chipClusterPtr, callback, commissioningTimeout); + openBasicCommissioningWindow(chipClusterPtr, callback, commissioningTimeout, null); + } + + public void openBasicCommissioningWindow( + DefaultClusterCallback callback, Integer commissioningTimeout, int timedInvokeTimeoutMs) { + openBasicCommissioningWindow( + chipClusterPtr, callback, commissioningTimeout, timedInvokeTimeoutMs); } public void openCommissioningWindow( @@ -337,15 +360,44 @@ public void openCommissioningWindow( discriminator, iterations, salt, - passcodeID); + passcodeID, + null); + } + + public void openCommissioningWindow( + DefaultClusterCallback callback, + Integer commissioningTimeout, + byte[] PAKEVerifier, + Integer discriminator, + Long iterations, + byte[] salt, + Integer passcodeID, + int timedInvokeTimeoutMs) { + openCommissioningWindow( + chipClusterPtr, + callback, + commissioningTimeout, + PAKEVerifier, + discriminator, + iterations, + salt, + passcodeID, + timedInvokeTimeoutMs); } public void revokeCommissioning(DefaultClusterCallback callback) { - revokeCommissioning(chipClusterPtr, callback); + revokeCommissioning(chipClusterPtr, callback, null); + } + + public void revokeCommissioning(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + revokeCommissioning(chipClusterPtr, callback, timedInvokeTimeoutMs); } private native void openBasicCommissioningWindow( - long chipClusterPtr, DefaultClusterCallback Callback, Integer commissioningTimeout); + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer commissioningTimeout, + @Nullable Integer timedInvokeTimeoutMs); private native void openCommissioningWindow( long chipClusterPtr, @@ -355,9 +407,13 @@ private native void openCommissioningWindow( Integer discriminator, Long iterations, byte[] salt, - Integer passcodeID); + Integer passcodeID, + @Nullable Integer timedInvokeTimeoutMs); - private native void revokeCommissioning(long chipClusterPtr, DefaultClusterCallback Callback); + private native void revokeCommissioning( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); public interface AdminFabricIndexAttributeCallback { void onSuccess(Integer value); @@ -590,7 +646,16 @@ public static long clusterId() { public void hideAppRequest( LauncherResponseCallback callback, Integer catalogVendorId, String applicationId) { - hideAppRequest(chipClusterPtr, callback, catalogVendorId, applicationId); + hideAppRequest(chipClusterPtr, callback, catalogVendorId, applicationId, null); + } + + public void hideAppRequest( + LauncherResponseCallback callback, + Integer catalogVendorId, + String applicationId, + int timedInvokeTimeoutMs) { + hideAppRequest( + chipClusterPtr, callback, catalogVendorId, applicationId, timedInvokeTimeoutMs); } public void launchAppRequest( @@ -598,32 +663,54 @@ public void launchAppRequest( String data, Integer catalogVendorId, String applicationId) { - launchAppRequest(chipClusterPtr, callback, data, catalogVendorId, applicationId); + launchAppRequest(chipClusterPtr, callback, data, catalogVendorId, applicationId, null); + } + + public void launchAppRequest( + LauncherResponseCallback callback, + String data, + Integer catalogVendorId, + String applicationId, + int timedInvokeTimeoutMs) { + launchAppRequest( + chipClusterPtr, callback, data, catalogVendorId, applicationId, timedInvokeTimeoutMs); } public void stopAppRequest( LauncherResponseCallback callback, Integer catalogVendorId, String applicationId) { - stopAppRequest(chipClusterPtr, callback, catalogVendorId, applicationId); + stopAppRequest(chipClusterPtr, callback, catalogVendorId, applicationId, null); + } + + public void stopAppRequest( + LauncherResponseCallback callback, + Integer catalogVendorId, + String applicationId, + int timedInvokeTimeoutMs) { + stopAppRequest( + chipClusterPtr, callback, catalogVendorId, applicationId, timedInvokeTimeoutMs); } private native void hideAppRequest( long chipClusterPtr, LauncherResponseCallback Callback, Integer catalogVendorId, - String applicationId); + String applicationId, + @Nullable Integer timedInvokeTimeoutMs); private native void launchAppRequest( long chipClusterPtr, LauncherResponseCallback Callback, String data, Integer catalogVendorId, - String applicationId); + String applicationId, + @Nullable Integer timedInvokeTimeoutMs); private native void stopAppRequest( long chipClusterPtr, LauncherResponseCallback Callback, Integer catalogVendorId, - String applicationId); + String applicationId, + @Nullable Integer timedInvokeTimeoutMs); public interface LauncherResponseCallback { void onSuccess(Integer status, String data); @@ -691,18 +778,35 @@ public static long clusterId() { public native long initWithDevice(long devicePtr, int endpointId); public void renameOutputRequest(DefaultClusterCallback callback, Integer index, String name) { - renameOutputRequest(chipClusterPtr, callback, index, name); + renameOutputRequest(chipClusterPtr, callback, index, name, null); + } + + public void renameOutputRequest( + DefaultClusterCallback callback, Integer index, String name, int timedInvokeTimeoutMs) { + renameOutputRequest(chipClusterPtr, callback, index, name, timedInvokeTimeoutMs); } public void selectOutputRequest(DefaultClusterCallback callback, Integer index) { - selectOutputRequest(chipClusterPtr, callback, index); + selectOutputRequest(chipClusterPtr, callback, index, null); + } + + public void selectOutputRequest( + DefaultClusterCallback callback, Integer index, int timedInvokeTimeoutMs) { + selectOutputRequest(chipClusterPtr, callback, index, timedInvokeTimeoutMs); } private native void renameOutputRequest( - long chipClusterPtr, DefaultClusterCallback Callback, Integer index, String name); + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer index, + String name, + @Nullable Integer timedInvokeTimeoutMs); private native void selectOutputRequest( - long chipClusterPtr, DefaultClusterCallback Callback, Integer index); + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer index, + @Nullable Integer timedInvokeTimeoutMs); public static class AudioOutputListAttribute { public Integer index; @@ -808,17 +912,32 @@ public static long clusterId() { public native long initWithDevice(long devicePtr, int endpointId); public void barrierControlGoToPercent(DefaultClusterCallback callback, Integer percentOpen) { - barrierControlGoToPercent(chipClusterPtr, callback, percentOpen); + barrierControlGoToPercent(chipClusterPtr, callback, percentOpen, null); + } + + public void barrierControlGoToPercent( + DefaultClusterCallback callback, Integer percentOpen, int timedInvokeTimeoutMs) { + barrierControlGoToPercent(chipClusterPtr, callback, percentOpen, timedInvokeTimeoutMs); } public void barrierControlStop(DefaultClusterCallback callback) { - barrierControlStop(chipClusterPtr, callback); + barrierControlStop(chipClusterPtr, callback, null); + } + + public void barrierControlStop(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + barrierControlStop(chipClusterPtr, callback, timedInvokeTimeoutMs); } private native void barrierControlGoToPercent( - long chipClusterPtr, DefaultClusterCallback Callback, Integer percentOpen); + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer percentOpen, + @Nullable Integer timedInvokeTimeoutMs); - private native void barrierControlStop(long chipClusterPtr, DefaultClusterCallback Callback); + private native void barrierControlStop( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); public interface AttributeListAttributeCallback { void onSuccess(List valueList); @@ -924,10 +1043,17 @@ public static long clusterId() { public native long initWithDevice(long devicePtr, int endpointId); public void mfgSpecificPing(DefaultClusterCallback callback) { - mfgSpecificPing(chipClusterPtr, callback); + mfgSpecificPing(chipClusterPtr, callback, null); + } + + public void mfgSpecificPing(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + mfgSpecificPing(chipClusterPtr, callback, timedInvokeTimeoutMs); } - private native void mfgSpecificPing(long chipClusterPtr, DefaultClusterCallback Callback); + private native void mfgSpecificPing( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); public interface VendorIDAttributeCallback { void onSuccess(Integer value); @@ -995,7 +1121,12 @@ public void readNodeLabelAttribute(CharStringAttributeCallback callback) { } public void writeNodeLabelAttribute(DefaultClusterCallback callback, String value) { - writeNodeLabelAttribute(chipClusterPtr, callback, value); + writeNodeLabelAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNodeLabelAttribute( + DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { + writeNodeLabelAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNodeLabelAttribute( @@ -1008,7 +1139,12 @@ public void readLocationAttribute(CharStringAttributeCallback callback) { } public void writeLocationAttribute(DefaultClusterCallback callback, String value) { - writeLocationAttribute(chipClusterPtr, callback, value); + writeLocationAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLocationAttribute( + DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { + writeLocationAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeLocationAttribute( @@ -1102,7 +1238,12 @@ public void readLocalConfigDisabledAttribute(BooleanAttributeCallback callback) } public void writeLocalConfigDisabledAttribute(DefaultClusterCallback callback, Boolean value) { - writeLocalConfigDisabledAttribute(chipClusterPtr, callback, value); + writeLocalConfigDisabledAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLocalConfigDisabledAttribute( + DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writeLocalConfigDisabledAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeLocalConfigDisabledAttribute( @@ -1176,7 +1317,10 @@ private native void readNodeLabelAttribute( long chipClusterPtr, CharStringAttributeCallback callback); private native void writeNodeLabelAttribute( - long chipClusterPtr, DefaultClusterCallback callback, String value); + long chipClusterPtr, + DefaultClusterCallback callback, + String value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNodeLabelAttribute( long chipClusterPtr, @@ -1188,7 +1332,10 @@ private native void readLocationAttribute( long chipClusterPtr, CharStringAttributeCallback callback); private native void writeLocationAttribute( - long chipClusterPtr, DefaultClusterCallback callback, String value); + long chipClusterPtr, + DefaultClusterCallback callback, + String value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeLocationAttribute( long chipClusterPtr, @@ -1275,7 +1422,10 @@ private native void readLocalConfigDisabledAttribute( long chipClusterPtr, BooleanAttributeCallback callback); private native void writeLocalConfigDisabledAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Boolean value); + long chipClusterPtr, + DefaultClusterCallback callback, + Boolean value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeLocalConfigDisabledAttribute( long chipClusterPtr, BooleanAttributeCallback callback, int minInterval, int maxInterval); @@ -1324,7 +1474,12 @@ public void readOutOfServiceAttribute(BooleanAttributeCallback callback) { } public void writeOutOfServiceAttribute(DefaultClusterCallback callback, Boolean value) { - writeOutOfServiceAttribute(chipClusterPtr, callback, value); + writeOutOfServiceAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOutOfServiceAttribute( + DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writeOutOfServiceAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeOutOfServiceAttribute( @@ -1337,7 +1492,12 @@ public void readPresentValueAttribute(BooleanAttributeCallback callback) { } public void writePresentValueAttribute(DefaultClusterCallback callback, Boolean value) { - writePresentValueAttribute(chipClusterPtr, callback, value); + writePresentValueAttribute(chipClusterPtr, callback, value, null); + } + + public void writePresentValueAttribute( + DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writePresentValueAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribePresentValueAttribute( @@ -1371,7 +1531,10 @@ private native void readOutOfServiceAttribute( long chipClusterPtr, BooleanAttributeCallback callback); private native void writeOutOfServiceAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Boolean value); + long chipClusterPtr, + DefaultClusterCallback callback, + Boolean value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeOutOfServiceAttribute( long chipClusterPtr, BooleanAttributeCallback callback, int minInterval, int maxInterval); @@ -1380,7 +1543,10 @@ private native void readPresentValueAttribute( long chipClusterPtr, BooleanAttributeCallback callback); private native void writePresentValueAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Boolean value); + long chipClusterPtr, + DefaultClusterCallback callback, + Boolean value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribePresentValueAttribute( long chipClusterPtr, BooleanAttributeCallback callback, int minInterval, int maxInterval); @@ -1419,7 +1585,17 @@ public void bind( Integer groupId, Integer endpointId, Long clusterId) { - bind(chipClusterPtr, callback, nodeId, groupId, endpointId, clusterId); + bind(chipClusterPtr, callback, nodeId, groupId, endpointId, clusterId, null); + } + + public void bind( + DefaultClusterCallback callback, + Long nodeId, + Integer groupId, + Integer endpointId, + Long clusterId, + int timedInvokeTimeoutMs) { + bind(chipClusterPtr, callback, nodeId, groupId, endpointId, clusterId, timedInvokeTimeoutMs); } public void unbind( @@ -1428,7 +1604,18 @@ public void unbind( Integer groupId, Integer endpointId, Long clusterId) { - unbind(chipClusterPtr, callback, nodeId, groupId, endpointId, clusterId); + unbind(chipClusterPtr, callback, nodeId, groupId, endpointId, clusterId, null); + } + + public void unbind( + DefaultClusterCallback callback, + Long nodeId, + Integer groupId, + Integer endpointId, + Long clusterId, + int timedInvokeTimeoutMs) { + unbind( + chipClusterPtr, callback, nodeId, groupId, endpointId, clusterId, timedInvokeTimeoutMs); } private native void bind( @@ -1437,7 +1624,8 @@ private native void bind( Long nodeId, Integer groupId, Integer endpointId, - Long clusterId); + Long clusterId, + @Nullable Integer timedInvokeTimeoutMs); private native void unbind( long chipClusterPtr, @@ -1445,7 +1633,8 @@ private native void unbind( Long nodeId, Integer groupId, Integer endpointId, - Long clusterId); + Long clusterId, + @Nullable Integer timedInvokeTimeoutMs); public interface AttributeListAttributeCallback { void onSuccess(List valueList); @@ -1550,27 +1739,71 @@ public static long clusterId() { public void disableAction( DefaultClusterCallback callback, Integer actionID, Optional invokeID) { - disableAction(chipClusterPtr, callback, actionID, invokeID); + disableAction(chipClusterPtr, callback, actionID, invokeID, null); + } + + public void disableAction( + DefaultClusterCallback callback, + Integer actionID, + Optional invokeID, + int timedInvokeTimeoutMs) { + disableAction(chipClusterPtr, callback, actionID, invokeID, timedInvokeTimeoutMs); } public void disableActionWithDuration( DefaultClusterCallback callback, Integer actionID, Optional invokeID, Long duration) { - disableActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration); + disableActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration, null); + } + + public void disableActionWithDuration( + DefaultClusterCallback callback, + Integer actionID, + Optional invokeID, + Long duration, + int timedInvokeTimeoutMs) { + disableActionWithDuration( + chipClusterPtr, callback, actionID, invokeID, duration, timedInvokeTimeoutMs); } public void enableAction( DefaultClusterCallback callback, Integer actionID, Optional invokeID) { - enableAction(chipClusterPtr, callback, actionID, invokeID); + enableAction(chipClusterPtr, callback, actionID, invokeID, null); + } + + public void enableAction( + DefaultClusterCallback callback, + Integer actionID, + Optional invokeID, + int timedInvokeTimeoutMs) { + enableAction(chipClusterPtr, callback, actionID, invokeID, timedInvokeTimeoutMs); } public void enableActionWithDuration( DefaultClusterCallback callback, Integer actionID, Optional invokeID, Long duration) { - enableActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration); + enableActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration, null); + } + + public void enableActionWithDuration( + DefaultClusterCallback callback, + Integer actionID, + Optional invokeID, + Long duration, + int timedInvokeTimeoutMs) { + enableActionWithDuration( + chipClusterPtr, callback, actionID, invokeID, duration, timedInvokeTimeoutMs); } public void instantAction( DefaultClusterCallback callback, Integer actionID, Optional invokeID) { - instantAction(chipClusterPtr, callback, actionID, invokeID); + instantAction(chipClusterPtr, callback, actionID, invokeID, null); + } + + public void instantAction( + DefaultClusterCallback callback, + Integer actionID, + Optional invokeID, + int timedInvokeTimeoutMs) { + instantAction(chipClusterPtr, callback, actionID, invokeID, timedInvokeTimeoutMs); } public void instantActionWithTransition( @@ -1578,115 +1811,190 @@ public void instantActionWithTransition( Integer actionID, Optional invokeID, Integer transitionTime) { - instantActionWithTransition(chipClusterPtr, callback, actionID, invokeID, transitionTime); + instantActionWithTransition( + chipClusterPtr, callback, actionID, invokeID, transitionTime, null); + } + + public void instantActionWithTransition( + DefaultClusterCallback callback, + Integer actionID, + Optional invokeID, + Integer transitionTime, + int timedInvokeTimeoutMs) { + instantActionWithTransition( + chipClusterPtr, callback, actionID, invokeID, transitionTime, timedInvokeTimeoutMs); } public void pauseAction( DefaultClusterCallback callback, Integer actionID, Optional invokeID) { - pauseAction(chipClusterPtr, callback, actionID, invokeID); + pauseAction(chipClusterPtr, callback, actionID, invokeID, null); + } + + public void pauseAction( + DefaultClusterCallback callback, + Integer actionID, + Optional invokeID, + int timedInvokeTimeoutMs) { + pauseAction(chipClusterPtr, callback, actionID, invokeID, timedInvokeTimeoutMs); } public void pauseActionWithDuration( DefaultClusterCallback callback, Integer actionID, Optional invokeID, Long duration) { - pauseActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration); + pauseActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration, null); + } + + public void pauseActionWithDuration( + DefaultClusterCallback callback, + Integer actionID, + Optional invokeID, + Long duration, + int timedInvokeTimeoutMs) { + pauseActionWithDuration( + chipClusterPtr, callback, actionID, invokeID, duration, timedInvokeTimeoutMs); } public void resumeAction( DefaultClusterCallback callback, Integer actionID, Optional invokeID) { - resumeAction(chipClusterPtr, callback, actionID, invokeID); + resumeAction(chipClusterPtr, callback, actionID, invokeID, null); + } + + public void resumeAction( + DefaultClusterCallback callback, + Integer actionID, + Optional invokeID, + int timedInvokeTimeoutMs) { + resumeAction(chipClusterPtr, callback, actionID, invokeID, timedInvokeTimeoutMs); } public void startAction( DefaultClusterCallback callback, Integer actionID, Optional invokeID) { - startAction(chipClusterPtr, callback, actionID, invokeID); + startAction(chipClusterPtr, callback, actionID, invokeID, null); + } + + public void startAction( + DefaultClusterCallback callback, + Integer actionID, + Optional invokeID, + int timedInvokeTimeoutMs) { + startAction(chipClusterPtr, callback, actionID, invokeID, timedInvokeTimeoutMs); } public void startActionWithDuration( DefaultClusterCallback callback, Integer actionID, Optional invokeID, Long duration) { - startActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration); + startActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration, null); + } + + public void startActionWithDuration( + DefaultClusterCallback callback, + Integer actionID, + Optional invokeID, + Long duration, + int timedInvokeTimeoutMs) { + startActionWithDuration( + chipClusterPtr, callback, actionID, invokeID, duration, timedInvokeTimeoutMs); } public void stopAction( DefaultClusterCallback callback, Integer actionID, Optional invokeID) { - stopAction(chipClusterPtr, callback, actionID, invokeID); + stopAction(chipClusterPtr, callback, actionID, invokeID, null); + } + + public void stopAction( + DefaultClusterCallback callback, + Integer actionID, + Optional invokeID, + int timedInvokeTimeoutMs) { + stopAction(chipClusterPtr, callback, actionID, invokeID, timedInvokeTimeoutMs); } private native void disableAction( long chipClusterPtr, DefaultClusterCallback Callback, Integer actionID, - Optional invokeID); + Optional invokeID, + @Nullable Integer timedInvokeTimeoutMs); private native void disableActionWithDuration( long chipClusterPtr, DefaultClusterCallback Callback, Integer actionID, Optional invokeID, - Long duration); + Long duration, + @Nullable Integer timedInvokeTimeoutMs); private native void enableAction( long chipClusterPtr, DefaultClusterCallback Callback, Integer actionID, - Optional invokeID); + Optional invokeID, + @Nullable Integer timedInvokeTimeoutMs); private native void enableActionWithDuration( long chipClusterPtr, DefaultClusterCallback Callback, Integer actionID, Optional invokeID, - Long duration); + Long duration, + @Nullable Integer timedInvokeTimeoutMs); private native void instantAction( long chipClusterPtr, DefaultClusterCallback Callback, Integer actionID, - Optional invokeID); + Optional invokeID, + @Nullable Integer timedInvokeTimeoutMs); private native void instantActionWithTransition( long chipClusterPtr, DefaultClusterCallback Callback, Integer actionID, Optional invokeID, - Integer transitionTime); + Integer transitionTime, + @Nullable Integer timedInvokeTimeoutMs); private native void pauseAction( long chipClusterPtr, DefaultClusterCallback Callback, Integer actionID, - Optional invokeID); + Optional invokeID, + @Nullable Integer timedInvokeTimeoutMs); private native void pauseActionWithDuration( long chipClusterPtr, DefaultClusterCallback Callback, Integer actionID, Optional invokeID, - Long duration); + Long duration, + @Nullable Integer timedInvokeTimeoutMs); private native void resumeAction( long chipClusterPtr, DefaultClusterCallback Callback, Integer actionID, - Optional invokeID); + Optional invokeID, + @Nullable Integer timedInvokeTimeoutMs); private native void startAction( long chipClusterPtr, DefaultClusterCallback Callback, Integer actionID, - Optional invokeID); + Optional invokeID, + @Nullable Integer timedInvokeTimeoutMs); private native void startActionWithDuration( long chipClusterPtr, DefaultClusterCallback Callback, Integer actionID, Optional invokeID, - Long duration); + Long duration, + @Nullable Integer timedInvokeTimeoutMs); private native void stopAction( long chipClusterPtr, DefaultClusterCallback Callback, Integer actionID, - Optional invokeID); + Optional invokeID, + @Nullable Integer timedInvokeTimeoutMs); public static class ActionListAttribute { public Integer actionID; @@ -1908,28 +2216,54 @@ public static long clusterId() { public void changeChannelByNumberRequest( DefaultClusterCallback callback, Integer majorNumber, Integer minorNumber) { - changeChannelByNumberRequest(chipClusterPtr, callback, majorNumber, minorNumber); + changeChannelByNumberRequest(chipClusterPtr, callback, majorNumber, minorNumber, null); + } + + public void changeChannelByNumberRequest( + DefaultClusterCallback callback, + Integer majorNumber, + Integer minorNumber, + int timedInvokeTimeoutMs) { + changeChannelByNumberRequest( + chipClusterPtr, callback, majorNumber, minorNumber, timedInvokeTimeoutMs); } public void changeChannelRequest(ChangeChannelResponseCallback callback, String match) { - changeChannelRequest(chipClusterPtr, callback, match); + changeChannelRequest(chipClusterPtr, callback, match, null); + } + + public void changeChannelRequest( + ChangeChannelResponseCallback callback, String match, int timedInvokeTimeoutMs) { + changeChannelRequest(chipClusterPtr, callback, match, timedInvokeTimeoutMs); } public void skipChannelRequest(DefaultClusterCallback callback, Integer count) { - skipChannelRequest(chipClusterPtr, callback, count); + skipChannelRequest(chipClusterPtr, callback, count, null); + } + + public void skipChannelRequest( + DefaultClusterCallback callback, Integer count, int timedInvokeTimeoutMs) { + skipChannelRequest(chipClusterPtr, callback, count, timedInvokeTimeoutMs); } private native void changeChannelByNumberRequest( long chipClusterPtr, DefaultClusterCallback Callback, Integer majorNumber, - Integer minorNumber); + Integer minorNumber, + @Nullable Integer timedInvokeTimeoutMs); private native void changeChannelRequest( - long chipClusterPtr, ChangeChannelResponseCallback Callback, String match); + long chipClusterPtr, + ChangeChannelResponseCallback Callback, + String match, + @Nullable Integer timedInvokeTimeoutMs); private native void skipChannelRequest( - long chipClusterPtr, DefaultClusterCallback Callback, Integer count); + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer count, + @Nullable Integer timedInvokeTimeoutMs); public interface ChangeChannelResponseCallback { void onSuccess( // channelMatch: Struct ChannelInfo @@ -2062,7 +2396,31 @@ public void colorLoopSet( time, startHue, optionsMask, - optionsOverride); + optionsOverride, + null); + } + + public void colorLoopSet( + DefaultClusterCallback callback, + Integer updateFlags, + Integer action, + Integer direction, + Integer time, + Integer startHue, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + colorLoopSet( + chipClusterPtr, + callback, + updateFlags, + action, + direction, + time, + startHue, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void enhancedMoveHue( @@ -2071,7 +2429,24 @@ public void enhancedMoveHue( Integer rate, Integer optionsMask, Integer optionsOverride) { - enhancedMoveHue(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride); + enhancedMoveHue(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride, null); + } + + public void enhancedMoveHue( + DefaultClusterCallback callback, + Integer moveMode, + Integer rate, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + enhancedMoveHue( + chipClusterPtr, + callback, + moveMode, + rate, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void enhancedMoveToHue( @@ -2088,41 +2463,101 @@ public void enhancedMoveToHue( direction, transitionTime, optionsMask, - optionsOverride); + optionsOverride, + null); } - public void enhancedMoveToHueAndSaturation( + public void enhancedMoveToHue( DefaultClusterCallback callback, Integer enhancedHue, - Integer saturation, + Integer direction, Integer transitionTime, Integer optionsMask, - Integer optionsOverride) { - enhancedMoveToHueAndSaturation( + Integer optionsOverride, + int timedInvokeTimeoutMs) { + enhancedMoveToHue( chipClusterPtr, callback, enhancedHue, - saturation, + direction, transitionTime, optionsMask, - optionsOverride); + optionsOverride, + timedInvokeTimeoutMs); } - public void enhancedStepHue( + public void enhancedMoveToHueAndSaturation( DefaultClusterCallback callback, - Integer stepMode, - Integer stepSize, + Integer enhancedHue, + Integer saturation, Integer transitionTime, Integer optionsMask, Integer optionsOverride) { - enhancedStepHue( + enhancedMoveToHueAndSaturation( chipClusterPtr, callback, - stepMode, - stepSize, + enhancedHue, + saturation, transitionTime, optionsMask, - optionsOverride); + optionsOverride, + null); + } + + public void enhancedMoveToHueAndSaturation( + DefaultClusterCallback callback, + Integer enhancedHue, + Integer saturation, + Integer transitionTime, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + enhancedMoveToHueAndSaturation( + chipClusterPtr, + callback, + enhancedHue, + saturation, + transitionTime, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); + } + + public void enhancedStepHue( + DefaultClusterCallback callback, + Integer stepMode, + Integer stepSize, + Integer transitionTime, + Integer optionsMask, + Integer optionsOverride) { + enhancedStepHue( + chipClusterPtr, + callback, + stepMode, + stepSize, + transitionTime, + optionsMask, + optionsOverride, + null); + } + + public void enhancedStepHue( + DefaultClusterCallback callback, + Integer stepMode, + Integer stepSize, + Integer transitionTime, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + enhancedStepHue( + chipClusterPtr, + callback, + stepMode, + stepSize, + transitionTime, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void moveColor( @@ -2131,7 +2566,24 @@ public void moveColor( Integer rateY, Integer optionsMask, Integer optionsOverride) { - moveColor(chipClusterPtr, callback, rateX, rateY, optionsMask, optionsOverride); + moveColor(chipClusterPtr, callback, rateX, rateY, optionsMask, optionsOverride, null); + } + + public void moveColor( + DefaultClusterCallback callback, + Integer rateX, + Integer rateY, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + moveColor( + chipClusterPtr, + callback, + rateX, + rateY, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void moveColorTemperature( @@ -2150,7 +2602,29 @@ public void moveColorTemperature( colorTemperatureMinimum, colorTemperatureMaximum, optionsMask, - optionsOverride); + optionsOverride, + null); + } + + public void moveColorTemperature( + DefaultClusterCallback callback, + Integer moveMode, + Integer rate, + Integer colorTemperatureMinimum, + Integer colorTemperatureMaximum, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + moveColorTemperature( + chipClusterPtr, + callback, + moveMode, + rate, + colorTemperatureMinimum, + colorTemperatureMaximum, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void moveHue( @@ -2159,7 +2633,24 @@ public void moveHue( Integer rate, Integer optionsMask, Integer optionsOverride) { - moveHue(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride); + moveHue(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride, null); + } + + public void moveHue( + DefaultClusterCallback callback, + Integer moveMode, + Integer rate, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + moveHue( + chipClusterPtr, + callback, + moveMode, + rate, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void moveSaturation( @@ -2168,7 +2659,24 @@ public void moveSaturation( Integer rate, Integer optionsMask, Integer optionsOverride) { - moveSaturation(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride); + moveSaturation(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride, null); + } + + public void moveSaturation( + DefaultClusterCallback callback, + Integer moveMode, + Integer rate, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + moveSaturation( + chipClusterPtr, + callback, + moveMode, + rate, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void moveToColor( @@ -2179,7 +2687,33 @@ public void moveToColor( Integer optionsMask, Integer optionsOverride) { moveToColor( - chipClusterPtr, callback, colorX, colorY, transitionTime, optionsMask, optionsOverride); + chipClusterPtr, + callback, + colorX, + colorY, + transitionTime, + optionsMask, + optionsOverride, + null); + } + + public void moveToColor( + DefaultClusterCallback callback, + Integer colorX, + Integer colorY, + Integer transitionTime, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + moveToColor( + chipClusterPtr, + callback, + colorX, + colorY, + transitionTime, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void moveToColorTemperature( @@ -2189,7 +2723,30 @@ public void moveToColorTemperature( Integer optionsMask, Integer optionsOverride) { moveToColorTemperature( - chipClusterPtr, callback, colorTemperature, transitionTime, optionsMask, optionsOverride); + chipClusterPtr, + callback, + colorTemperature, + transitionTime, + optionsMask, + optionsOverride, + null); + } + + public void moveToColorTemperature( + DefaultClusterCallback callback, + Integer colorTemperature, + Integer transitionTime, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + moveToColorTemperature( + chipClusterPtr, + callback, + colorTemperature, + transitionTime, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void moveToHue( @@ -2200,7 +2757,33 @@ public void moveToHue( Integer optionsMask, Integer optionsOverride) { moveToHue( - chipClusterPtr, callback, hue, direction, transitionTime, optionsMask, optionsOverride); + chipClusterPtr, + callback, + hue, + direction, + transitionTime, + optionsMask, + optionsOverride, + null); + } + + public void moveToHue( + DefaultClusterCallback callback, + Integer hue, + Integer direction, + Integer transitionTime, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + moveToHue( + chipClusterPtr, + callback, + hue, + direction, + transitionTime, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void moveToHueAndSaturation( @@ -2211,7 +2794,33 @@ public void moveToHueAndSaturation( Integer optionsMask, Integer optionsOverride) { moveToHueAndSaturation( - chipClusterPtr, callback, hue, saturation, transitionTime, optionsMask, optionsOverride); + chipClusterPtr, + callback, + hue, + saturation, + transitionTime, + optionsMask, + optionsOverride, + null); + } + + public void moveToHueAndSaturation( + DefaultClusterCallback callback, + Integer hue, + Integer saturation, + Integer transitionTime, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + moveToHueAndSaturation( + chipClusterPtr, + callback, + hue, + saturation, + transitionTime, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void moveToSaturation( @@ -2221,7 +2830,24 @@ public void moveToSaturation( Integer optionsMask, Integer optionsOverride) { moveToSaturation( - chipClusterPtr, callback, saturation, transitionTime, optionsMask, optionsOverride); + chipClusterPtr, callback, saturation, transitionTime, optionsMask, optionsOverride, null); + } + + public void moveToSaturation( + DefaultClusterCallback callback, + Integer saturation, + Integer transitionTime, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + moveToSaturation( + chipClusterPtr, + callback, + saturation, + transitionTime, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void stepColor( @@ -2232,7 +2858,33 @@ public void stepColor( Integer optionsMask, Integer optionsOverride) { stepColor( - chipClusterPtr, callback, stepX, stepY, transitionTime, optionsMask, optionsOverride); + chipClusterPtr, + callback, + stepX, + stepY, + transitionTime, + optionsMask, + optionsOverride, + null); + } + + public void stepColor( + DefaultClusterCallback callback, + Integer stepX, + Integer stepY, + Integer transitionTime, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + stepColor( + chipClusterPtr, + callback, + stepX, + stepY, + transitionTime, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void stepColorTemperature( @@ -2253,7 +2905,31 @@ public void stepColorTemperature( colorTemperatureMinimum, colorTemperatureMaximum, optionsMask, - optionsOverride); + optionsOverride, + null); + } + + public void stepColorTemperature( + DefaultClusterCallback callback, + Integer stepMode, + Integer stepSize, + Integer transitionTime, + Integer colorTemperatureMinimum, + Integer colorTemperatureMaximum, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + stepColorTemperature( + chipClusterPtr, + callback, + stepMode, + stepSize, + transitionTime, + colorTemperatureMinimum, + colorTemperatureMaximum, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void stepHue( @@ -2270,7 +2946,27 @@ public void stepHue( stepSize, transitionTime, optionsMask, - optionsOverride); + optionsOverride, + null); + } + + public void stepHue( + DefaultClusterCallback callback, + Integer stepMode, + Integer stepSize, + Integer transitionTime, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + stepHue( + chipClusterPtr, + callback, + stepMode, + stepSize, + transitionTime, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void stepSaturation( @@ -2287,12 +2983,40 @@ public void stepSaturation( stepSize, transitionTime, optionsMask, - optionsOverride); + optionsOverride, + null); + } + + public void stepSaturation( + DefaultClusterCallback callback, + Integer stepMode, + Integer stepSize, + Integer transitionTime, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + stepSaturation( + chipClusterPtr, + callback, + stepMode, + stepSize, + transitionTime, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void stopMoveStep( DefaultClusterCallback callback, Integer optionsMask, Integer optionsOverride) { - stopMoveStep(chipClusterPtr, callback, optionsMask, optionsOverride); + stopMoveStep(chipClusterPtr, callback, optionsMask, optionsOverride, null); + } + + public void stopMoveStep( + DefaultClusterCallback callback, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + stopMoveStep(chipClusterPtr, callback, optionsMask, optionsOverride, timedInvokeTimeoutMs); } private native void colorLoopSet( @@ -2304,7 +3028,8 @@ private native void colorLoopSet( Integer time, Integer startHue, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void enhancedMoveHue( long chipClusterPtr, @@ -2312,7 +3037,8 @@ private native void enhancedMoveHue( Integer moveMode, Integer rate, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void enhancedMoveToHue( long chipClusterPtr, @@ -2321,7 +3047,8 @@ private native void enhancedMoveToHue( Integer direction, Integer transitionTime, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void enhancedMoveToHueAndSaturation( long chipClusterPtr, @@ -2330,7 +3057,8 @@ private native void enhancedMoveToHueAndSaturation( Integer saturation, Integer transitionTime, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void enhancedStepHue( long chipClusterPtr, @@ -2339,7 +3067,8 @@ private native void enhancedStepHue( Integer stepSize, Integer transitionTime, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void moveColor( long chipClusterPtr, @@ -2347,7 +3076,8 @@ private native void moveColor( Integer rateX, Integer rateY, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void moveColorTemperature( long chipClusterPtr, @@ -2357,7 +3087,8 @@ private native void moveColorTemperature( Integer colorTemperatureMinimum, Integer colorTemperatureMaximum, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void moveHue( long chipClusterPtr, @@ -2365,7 +3096,8 @@ private native void moveHue( Integer moveMode, Integer rate, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void moveSaturation( long chipClusterPtr, @@ -2373,7 +3105,8 @@ private native void moveSaturation( Integer moveMode, Integer rate, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void moveToColor( long chipClusterPtr, @@ -2382,7 +3115,8 @@ private native void moveToColor( Integer colorY, Integer transitionTime, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void moveToColorTemperature( long chipClusterPtr, @@ -2390,7 +3124,8 @@ private native void moveToColorTemperature( Integer colorTemperature, Integer transitionTime, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void moveToHue( long chipClusterPtr, @@ -2399,7 +3134,8 @@ private native void moveToHue( Integer direction, Integer transitionTime, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void moveToHueAndSaturation( long chipClusterPtr, @@ -2408,7 +3144,8 @@ private native void moveToHueAndSaturation( Integer saturation, Integer transitionTime, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void moveToSaturation( long chipClusterPtr, @@ -2416,7 +3153,8 @@ private native void moveToSaturation( Integer saturation, Integer transitionTime, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void stepColor( long chipClusterPtr, @@ -2425,7 +3163,8 @@ private native void stepColor( Integer stepY, Integer transitionTime, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void stepColorTemperature( long chipClusterPtr, @@ -2436,7 +3175,8 @@ private native void stepColorTemperature( Integer colorTemperatureMinimum, Integer colorTemperatureMaximum, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void stepHue( long chipClusterPtr, @@ -2445,7 +3185,8 @@ private native void stepHue( Integer stepSize, Integer transitionTime, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void stepSaturation( long chipClusterPtr, @@ -2454,13 +3195,15 @@ private native void stepSaturation( Integer stepSize, Integer transitionTime, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void stopMoveStep( long chipClusterPtr, DefaultClusterCallback Callback, Integer optionsMask, - Integer optionsOverride); + Integer optionsOverride, + @Nullable Integer timedInvokeTimeoutMs); public interface AttributeListAttributeCallback { void onSuccess(List valueList); @@ -2556,7 +3299,12 @@ public void readColorControlOptionsAttribute(IntegerAttributeCallback callback) } public void writeColorControlOptionsAttribute(DefaultClusterCallback callback, Integer value) { - writeColorControlOptionsAttribute(chipClusterPtr, callback, value); + writeColorControlOptionsAttribute(chipClusterPtr, callback, value, null); + } + + public void writeColorControlOptionsAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeColorControlOptionsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeColorControlOptionsAttribute( @@ -2740,7 +3488,12 @@ public void readWhitePointXAttribute(IntegerAttributeCallback callback) { } public void writeWhitePointXAttribute(DefaultClusterCallback callback, Integer value) { - writeWhitePointXAttribute(chipClusterPtr, callback, value); + writeWhitePointXAttribute(chipClusterPtr, callback, value, null); + } + + public void writeWhitePointXAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeWhitePointXAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeWhitePointXAttribute( @@ -2753,7 +3506,12 @@ public void readWhitePointYAttribute(IntegerAttributeCallback callback) { } public void writeWhitePointYAttribute(DefaultClusterCallback callback, Integer value) { - writeWhitePointYAttribute(chipClusterPtr, callback, value); + writeWhitePointYAttribute(chipClusterPtr, callback, value, null); + } + + public void writeWhitePointYAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeWhitePointYAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeWhitePointYAttribute( @@ -2766,7 +3524,12 @@ public void readColorPointRXAttribute(IntegerAttributeCallback callback) { } public void writeColorPointRXAttribute(DefaultClusterCallback callback, Integer value) { - writeColorPointRXAttribute(chipClusterPtr, callback, value); + writeColorPointRXAttribute(chipClusterPtr, callback, value, null); + } + + public void writeColorPointRXAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeColorPointRXAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeColorPointRXAttribute( @@ -2779,7 +3542,12 @@ public void readColorPointRYAttribute(IntegerAttributeCallback callback) { } public void writeColorPointRYAttribute(DefaultClusterCallback callback, Integer value) { - writeColorPointRYAttribute(chipClusterPtr, callback, value); + writeColorPointRYAttribute(chipClusterPtr, callback, value, null); + } + + public void writeColorPointRYAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeColorPointRYAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeColorPointRYAttribute( @@ -2792,7 +3560,12 @@ public void readColorPointRIntensityAttribute(IntegerAttributeCallback callback) } public void writeColorPointRIntensityAttribute(DefaultClusterCallback callback, Integer value) { - writeColorPointRIntensityAttribute(chipClusterPtr, callback, value); + writeColorPointRIntensityAttribute(chipClusterPtr, callback, value, null); + } + + public void writeColorPointRIntensityAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeColorPointRIntensityAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeColorPointRIntensityAttribute( @@ -2805,7 +3578,12 @@ public void readColorPointGXAttribute(IntegerAttributeCallback callback) { } public void writeColorPointGXAttribute(DefaultClusterCallback callback, Integer value) { - writeColorPointGXAttribute(chipClusterPtr, callback, value); + writeColorPointGXAttribute(chipClusterPtr, callback, value, null); + } + + public void writeColorPointGXAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeColorPointGXAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeColorPointGXAttribute( @@ -2818,7 +3596,12 @@ public void readColorPointGYAttribute(IntegerAttributeCallback callback) { } public void writeColorPointGYAttribute(DefaultClusterCallback callback, Integer value) { - writeColorPointGYAttribute(chipClusterPtr, callback, value); + writeColorPointGYAttribute(chipClusterPtr, callback, value, null); + } + + public void writeColorPointGYAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeColorPointGYAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeColorPointGYAttribute( @@ -2831,7 +3614,12 @@ public void readColorPointGIntensityAttribute(IntegerAttributeCallback callback) } public void writeColorPointGIntensityAttribute(DefaultClusterCallback callback, Integer value) { - writeColorPointGIntensityAttribute(chipClusterPtr, callback, value); + writeColorPointGIntensityAttribute(chipClusterPtr, callback, value, null); + } + + public void writeColorPointGIntensityAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeColorPointGIntensityAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeColorPointGIntensityAttribute( @@ -2844,7 +3632,12 @@ public void readColorPointBXAttribute(IntegerAttributeCallback callback) { } public void writeColorPointBXAttribute(DefaultClusterCallback callback, Integer value) { - writeColorPointBXAttribute(chipClusterPtr, callback, value); + writeColorPointBXAttribute(chipClusterPtr, callback, value, null); + } + + public void writeColorPointBXAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeColorPointBXAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeColorPointBXAttribute( @@ -2857,7 +3650,12 @@ public void readColorPointBYAttribute(IntegerAttributeCallback callback) { } public void writeColorPointBYAttribute(DefaultClusterCallback callback, Integer value) { - writeColorPointBYAttribute(chipClusterPtr, callback, value); + writeColorPointBYAttribute(chipClusterPtr, callback, value, null); + } + + public void writeColorPointBYAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeColorPointBYAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeColorPointBYAttribute( @@ -2870,7 +3668,12 @@ public void readColorPointBIntensityAttribute(IntegerAttributeCallback callback) } public void writeColorPointBIntensityAttribute(DefaultClusterCallback callback, Integer value) { - writeColorPointBIntensityAttribute(chipClusterPtr, callback, value); + writeColorPointBIntensityAttribute(chipClusterPtr, callback, value, null); + } + + public void writeColorPointBIntensityAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeColorPointBIntensityAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeColorPointBIntensityAttribute( @@ -2986,7 +3789,13 @@ public void readStartUpColorTemperatureMiredsAttribute(IntegerAttributeCallback public void writeStartUpColorTemperatureMiredsAttribute( DefaultClusterCallback callback, Integer value) { - writeStartUpColorTemperatureMiredsAttribute(chipClusterPtr, callback, value); + writeStartUpColorTemperatureMiredsAttribute(chipClusterPtr, callback, value, null); + } + + public void writeStartUpColorTemperatureMiredsAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeStartUpColorTemperatureMiredsAttribute( + chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeStartUpColorTemperatureMiredsAttribute( @@ -3069,7 +3878,10 @@ private native void readColorControlOptionsAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeColorControlOptionsAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeColorControlOptionsAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -3192,7 +4004,10 @@ private native void readWhitePointXAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeWhitePointXAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeWhitePointXAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -3201,7 +4016,10 @@ private native void readWhitePointYAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeWhitePointYAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeWhitePointYAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -3210,7 +4028,10 @@ private native void readColorPointRXAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeColorPointRXAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeColorPointRXAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -3219,7 +4040,10 @@ private native void readColorPointRYAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeColorPointRYAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeColorPointRYAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -3228,7 +4052,10 @@ private native void readColorPointRIntensityAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeColorPointRIntensityAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeColorPointRIntensityAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -3237,7 +4064,10 @@ private native void readColorPointGXAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeColorPointGXAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeColorPointGXAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -3246,7 +4076,10 @@ private native void readColorPointGYAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeColorPointGYAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeColorPointGYAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -3255,7 +4088,10 @@ private native void readColorPointGIntensityAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeColorPointGIntensityAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeColorPointGIntensityAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -3264,7 +4100,10 @@ private native void readColorPointBXAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeColorPointBXAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeColorPointBXAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -3273,7 +4112,10 @@ private native void readColorPointBYAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeColorPointBYAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeColorPointBYAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -3282,7 +4124,10 @@ private native void readColorPointBIntensityAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeColorPointBIntensityAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeColorPointBIntensityAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -3357,7 +4202,10 @@ private native void readStartUpColorTemperatureMiredsAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeStartUpColorTemperatureMiredsAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeStartUpColorTemperatureMiredsAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -3386,7 +4234,12 @@ public static long clusterId() { public void launchContentRequest( LaunchResponseCallback callback, Boolean autoPlay, String data) { - launchContentRequest(chipClusterPtr, callback, autoPlay, data); + launchContentRequest(chipClusterPtr, callback, autoPlay, data, null); + } + + public void launchContentRequest( + LaunchResponseCallback callback, Boolean autoPlay, String data, int timedInvokeTimeoutMs) { + launchContentRequest(chipClusterPtr, callback, autoPlay, data, timedInvokeTimeoutMs); } public void launchURLRequest( @@ -3394,18 +4247,33 @@ public void launchURLRequest( String contentURL, String displayString, String providerName) { - launchURLRequest(chipClusterPtr, callback, contentURL, displayString, providerName); + launchURLRequest(chipClusterPtr, callback, contentURL, displayString, providerName, null); + } + + public void launchURLRequest( + LaunchResponseCallback callback, + String contentURL, + String displayString, + String providerName, + int timedInvokeTimeoutMs) { + launchURLRequest( + chipClusterPtr, callback, contentURL, displayString, providerName, timedInvokeTimeoutMs); } private native void launchContentRequest( - long chipClusterPtr, LaunchResponseCallback Callback, Boolean autoPlay, String data); + long chipClusterPtr, + LaunchResponseCallback Callback, + Boolean autoPlay, + String data, + @Nullable Integer timedInvokeTimeoutMs); private native void launchURLRequest( long chipClusterPtr, LaunchResponseCallback Callback, String contentURL, String displayString, - String providerName); + String providerName, + @Nullable Integer timedInvokeTimeoutMs); public interface LaunchResponseCallback { void onSuccess(Integer status, String data); @@ -3439,7 +4307,13 @@ public void readSupportedStreamingProtocolsAttribute(LongAttributeCallback callb public void writeSupportedStreamingProtocolsAttribute( DefaultClusterCallback callback, Long value) { - writeSupportedStreamingProtocolsAttribute(chipClusterPtr, callback, value); + writeSupportedStreamingProtocolsAttribute(chipClusterPtr, callback, value, null); + } + + public void writeSupportedStreamingProtocolsAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeSupportedStreamingProtocolsAttribute( + chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeSupportedStreamingProtocolsAttribute( @@ -3468,7 +4342,10 @@ private native void readSupportedStreamingProtocolsAttribute( long chipClusterPtr, LongAttributeCallback callback); private native void writeSupportedStreamingProtocolsAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeSupportedStreamingProtocolsAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -3628,7 +4505,22 @@ public void retrieveLogsRequest( Integer requestedProtocol, byte[] transferFileDesignator) { retrieveLogsRequest( - chipClusterPtr, callback, intent, requestedProtocol, transferFileDesignator); + chipClusterPtr, callback, intent, requestedProtocol, transferFileDesignator, null); + } + + public void retrieveLogsRequest( + RetrieveLogsResponseCallback callback, + Integer intent, + Integer requestedProtocol, + byte[] transferFileDesignator, + int timedInvokeTimeoutMs) { + retrieveLogsRequest( + chipClusterPtr, + callback, + intent, + requestedProtocol, + transferFileDesignator, + timedInvokeTimeoutMs); } private native void retrieveLogsRequest( @@ -3636,7 +4528,8 @@ private native void retrieveLogsRequest( RetrieveLogsResponseCallback Callback, Integer intent, Integer requestedProtocol, - byte[] transferFileDesignator); + byte[] transferFileDesignator, + @Nullable Integer timedInvokeTimeoutMs); public interface RetrieveLogsResponseCallback { void onSuccess(Integer status, byte[] content, Long timeStamp, Long timeSinceBoot); @@ -3674,26 +4567,59 @@ public static long clusterId() { public void clearCredential( DefaultClusterCallback callback, Integer credentialType, Integer credentialIndex) { - clearCredential(chipClusterPtr, callback, credentialType, credentialIndex); + clearCredential(chipClusterPtr, callback, credentialType, credentialIndex, null); + } + + public void clearCredential( + DefaultClusterCallback callback, + Integer credentialType, + Integer credentialIndex, + int timedInvokeTimeoutMs) { + clearCredential( + chipClusterPtr, callback, credentialType, credentialIndex, timedInvokeTimeoutMs); } public void clearUser(DefaultClusterCallback callback, Integer userIndex) { - clearUser(chipClusterPtr, callback, userIndex); + clearUser(chipClusterPtr, callback, userIndex, null); + } + + public void clearUser( + DefaultClusterCallback callback, Integer userIndex, int timedInvokeTimeoutMs) { + clearUser(chipClusterPtr, callback, userIndex, timedInvokeTimeoutMs); } public void getCredentialStatus( GetCredentialStatusResponseCallback callback, Integer credentialType, Integer credentialIndex) { - getCredentialStatus(chipClusterPtr, callback, credentialType, credentialIndex); + getCredentialStatus(chipClusterPtr, callback, credentialType, credentialIndex, null); + } + + public void getCredentialStatus( + GetCredentialStatusResponseCallback callback, + Integer credentialType, + Integer credentialIndex, + int timedInvokeTimeoutMs) { + getCredentialStatus( + chipClusterPtr, callback, credentialType, credentialIndex, timedInvokeTimeoutMs); } public void getUser(GetUserResponseCallback callback, Integer userIndex) { - getUser(chipClusterPtr, callback, userIndex); + getUser(chipClusterPtr, callback, userIndex, null); + } + + public void getUser( + GetUserResponseCallback callback, Integer userIndex, int timedInvokeTimeoutMs) { + getUser(chipClusterPtr, callback, userIndex, timedInvokeTimeoutMs); } public void lockDoor(DefaultClusterCallback callback, Optional pinCode) { - lockDoor(chipClusterPtr, callback, pinCode); + lockDoor(chipClusterPtr, callback, pinCode, null); + } + + public void lockDoor( + DefaultClusterCallback callback, Optional pinCode, int timedInvokeTimeoutMs) { + lockDoor(chipClusterPtr, callback, pinCode, timedInvokeTimeoutMs); } public void setCredential( @@ -3712,7 +4638,29 @@ public void setCredential( credentialIndex, credentialData, userIndex, - userStatus); + userStatus, + null); + } + + public void setCredential( + SetCredentialResponseCallback callback, + Integer operationType, + Integer credentialType, + Integer credentialIndex, + byte[] credentialData, + Integer userIndex, + Integer userStatus, + int timedInvokeTimeoutMs) { + setCredential( + chipClusterPtr, + callback, + operationType, + credentialType, + credentialIndex, + credentialData, + userIndex, + userStatus, + timedInvokeTimeoutMs); } public void setUser( @@ -3733,33 +4681,73 @@ public void setUser( userUniqueId, userStatus, userType, - credentialRule); + credentialRule, + null); + } + + public void setUser( + DefaultClusterCallback callback, + Integer operationType, + Integer userIndex, + @Nullable String userName, + @Nullable Long userUniqueId, + Integer userStatus, + Integer userType, + Integer credentialRule, + int timedInvokeTimeoutMs) { + setUser( + chipClusterPtr, + callback, + operationType, + userIndex, + userName, + userUniqueId, + userStatus, + userType, + credentialRule, + timedInvokeTimeoutMs); } public void unlockDoor(DefaultClusterCallback callback, Optional pinCode) { - unlockDoor(chipClusterPtr, callback, pinCode); + unlockDoor(chipClusterPtr, callback, pinCode, null); + } + + public void unlockDoor( + DefaultClusterCallback callback, Optional pinCode, int timedInvokeTimeoutMs) { + unlockDoor(chipClusterPtr, callback, pinCode, timedInvokeTimeoutMs); } private native void clearCredential( long chipClusterPtr, DefaultClusterCallback Callback, Integer credentialType, - Integer credentialIndex); + Integer credentialIndex, + @Nullable Integer timedInvokeTimeoutMs); private native void clearUser( - long chipClusterPtr, DefaultClusterCallback Callback, Integer userIndex); + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer userIndex, + @Nullable Integer timedInvokeTimeoutMs); private native void getCredentialStatus( long chipClusterPtr, GetCredentialStatusResponseCallback Callback, Integer credentialType, - Integer credentialIndex); + Integer credentialIndex, + @Nullable Integer timedInvokeTimeoutMs); private native void getUser( - long chipClusterPtr, GetUserResponseCallback Callback, Integer userIndex); + long chipClusterPtr, + GetUserResponseCallback Callback, + Integer userIndex, + @Nullable Integer timedInvokeTimeoutMs); private native void lockDoor( - long chipClusterPtr, DefaultClusterCallback Callback, Optional pinCode); + long chipClusterPtr, + DefaultClusterCallback Callback, + Optional pinCode, + @Nullable Integer timedInvokeTimeoutMs); private native void setCredential( long chipClusterPtr, @@ -3769,7 +4757,8 @@ private native void setCredential( Integer credentialIndex, byte[] credentialData, Integer userIndex, - Integer userStatus); + Integer userStatus, + @Nullable Integer timedInvokeTimeoutMs); private native void setUser( long chipClusterPtr, @@ -3780,10 +4769,14 @@ private native void setUser( @Nullable Long userUniqueId, Integer userStatus, Integer userType, - Integer credentialRule); + Integer credentialRule, + @Nullable Integer timedInvokeTimeoutMs); private native void unlockDoor( - long chipClusterPtr, DefaultClusterCallback Callback, Optional pinCode); + long chipClusterPtr, + DefaultClusterCallback Callback, + Optional pinCode, + @Nullable Integer timedInvokeTimeoutMs); public interface GetCredentialStatusResponseCallback { void onSuccess( @@ -3899,7 +4892,12 @@ public void readLanguageAttribute(CharStringAttributeCallback callback) { } public void writeLanguageAttribute(DefaultClusterCallback callback, String value) { - writeLanguageAttribute(chipClusterPtr, callback, value); + writeLanguageAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLanguageAttribute( + DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { + writeLanguageAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeLanguageAttribute( @@ -3912,7 +4910,12 @@ public void readAutoRelockTimeAttribute(LongAttributeCallback callback) { } public void writeAutoRelockTimeAttribute(DefaultClusterCallback callback, Long value) { - writeAutoRelockTimeAttribute(chipClusterPtr, callback, value); + writeAutoRelockTimeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeAutoRelockTimeAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeAutoRelockTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeAutoRelockTimeAttribute( @@ -3925,7 +4928,12 @@ public void readSoundVolumeAttribute(IntegerAttributeCallback callback) { } public void writeSoundVolumeAttribute(DefaultClusterCallback callback, Integer value) { - writeSoundVolumeAttribute(chipClusterPtr, callback, value); + writeSoundVolumeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeSoundVolumeAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeSoundVolumeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeSoundVolumeAttribute( @@ -3938,7 +4946,12 @@ public void readOperatingModeAttribute(IntegerAttributeCallback callback) { } public void writeOperatingModeAttribute(DefaultClusterCallback callback, Integer value) { - writeOperatingModeAttribute(chipClusterPtr, callback, value); + writeOperatingModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOperatingModeAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOperatingModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeOperatingModeAttribute( @@ -3956,7 +4969,12 @@ public void readEnableOneTouchLockingAttribute(BooleanAttributeCallback callback public void writeEnableOneTouchLockingAttribute( DefaultClusterCallback callback, Boolean value) { - writeEnableOneTouchLockingAttribute(chipClusterPtr, callback, value); + writeEnableOneTouchLockingAttribute(chipClusterPtr, callback, value, null); + } + + public void writeEnableOneTouchLockingAttribute( + DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writeEnableOneTouchLockingAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeEnableOneTouchLockingAttribute( @@ -3970,7 +4988,12 @@ public void readEnablePrivacyModeButtonAttribute(BooleanAttributeCallback callba public void writeEnablePrivacyModeButtonAttribute( DefaultClusterCallback callback, Boolean value) { - writeEnablePrivacyModeButtonAttribute(chipClusterPtr, callback, value); + writeEnablePrivacyModeButtonAttribute(chipClusterPtr, callback, value, null); + } + + public void writeEnablePrivacyModeButtonAttribute( + DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writeEnablePrivacyModeButtonAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeEnablePrivacyModeButtonAttribute( @@ -3983,7 +5006,12 @@ public void readWrongCodeEntryLimitAttribute(IntegerAttributeCallback callback) } public void writeWrongCodeEntryLimitAttribute(DefaultClusterCallback callback, Integer value) { - writeWrongCodeEntryLimitAttribute(chipClusterPtr, callback, value); + writeWrongCodeEntryLimitAttribute(chipClusterPtr, callback, value, null); + } + + public void writeWrongCodeEntryLimitAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeWrongCodeEntryLimitAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeWrongCodeEntryLimitAttribute( @@ -4044,7 +5072,10 @@ private native void readLanguageAttribute( long chipClusterPtr, CharStringAttributeCallback callback); private native void writeLanguageAttribute( - long chipClusterPtr, DefaultClusterCallback callback, String value); + long chipClusterPtr, + DefaultClusterCallback callback, + String value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeLanguageAttribute( long chipClusterPtr, @@ -4056,7 +5087,10 @@ private native void readAutoRelockTimeAttribute( long chipClusterPtr, LongAttributeCallback callback); private native void writeAutoRelockTimeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeAutoRelockTimeAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -4065,7 +5099,10 @@ private native void readSoundVolumeAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeSoundVolumeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeSoundVolumeAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -4074,7 +5111,10 @@ private native void readOperatingModeAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeOperatingModeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeOperatingModeAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -4086,7 +5126,10 @@ private native void readEnableOneTouchLockingAttribute( long chipClusterPtr, BooleanAttributeCallback callback); private native void writeEnableOneTouchLockingAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Boolean value); + long chipClusterPtr, + DefaultClusterCallback callback, + Boolean value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeEnableOneTouchLockingAttribute( long chipClusterPtr, BooleanAttributeCallback callback, int minInterval, int maxInterval); @@ -4095,7 +5138,10 @@ private native void readEnablePrivacyModeButtonAttribute( long chipClusterPtr, BooleanAttributeCallback callback); private native void writeEnablePrivacyModeButtonAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Boolean value); + long chipClusterPtr, + DefaultClusterCallback callback, + Boolean value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeEnablePrivacyModeButtonAttribute( long chipClusterPtr, BooleanAttributeCallback callback, int minInterval, int maxInterval); @@ -4104,7 +5150,10 @@ private native void readWrongCodeEntryLimitAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeWrongCodeEntryLimitAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeWrongCodeEntryLimitAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -4340,10 +5389,17 @@ public static long clusterId() { public native long initWithDevice(long devicePtr, int endpointId); public void resetCounts(DefaultClusterCallback callback) { - resetCounts(chipClusterPtr, callback); + resetCounts(chipClusterPtr, callback, null); } - private native void resetCounts(long chipClusterPtr, DefaultClusterCallback Callback); + public void resetCounts(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + resetCounts(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + private native void resetCounts( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); public interface AttributeListAttributeCallback { void onSuccess(List valueList); @@ -4720,11 +5776,31 @@ public void armFailSafe( Integer expiryLengthSeconds, Long breadcrumb, Long timeoutMs) { - armFailSafe(chipClusterPtr, callback, expiryLengthSeconds, breadcrumb, timeoutMs); + armFailSafe(chipClusterPtr, callback, expiryLengthSeconds, breadcrumb, timeoutMs, null); + } + + public void armFailSafe( + ArmFailSafeResponseCallback callback, + Integer expiryLengthSeconds, + Long breadcrumb, + Long timeoutMs, + int timedInvokeTimeoutMs) { + armFailSafe( + chipClusterPtr, + callback, + expiryLengthSeconds, + breadcrumb, + timeoutMs, + timedInvokeTimeoutMs); } public void commissioningComplete(CommissioningCompleteResponseCallback callback) { - commissioningComplete(chipClusterPtr, callback); + commissioningComplete(chipClusterPtr, callback, null); + } + + public void commissioningComplete( + CommissioningCompleteResponseCallback callback, int timedInvokeTimeoutMs) { + commissioningComplete(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void setRegulatoryConfig( @@ -4733,7 +5809,25 @@ public void setRegulatoryConfig( String countryCode, Long breadcrumb, Long timeoutMs) { - setRegulatoryConfig(chipClusterPtr, callback, location, countryCode, breadcrumb, timeoutMs); + setRegulatoryConfig( + chipClusterPtr, callback, location, countryCode, breadcrumb, timeoutMs, null); + } + + public void setRegulatoryConfig( + SetRegulatoryConfigResponseCallback callback, + Integer location, + String countryCode, + Long breadcrumb, + Long timeoutMs, + int timedInvokeTimeoutMs) { + setRegulatoryConfig( + chipClusterPtr, + callback, + location, + countryCode, + breadcrumb, + timeoutMs, + timedInvokeTimeoutMs); } private native void armFailSafe( @@ -4741,10 +5835,13 @@ private native void armFailSafe( ArmFailSafeResponseCallback Callback, Integer expiryLengthSeconds, Long breadcrumb, - Long timeoutMs); + Long timeoutMs, + @Nullable Integer timedInvokeTimeoutMs); private native void commissioningComplete( - long chipClusterPtr, CommissioningCompleteResponseCallback Callback); + long chipClusterPtr, + CommissioningCompleteResponseCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); private native void setRegulatoryConfig( long chipClusterPtr, @@ -4752,7 +5849,8 @@ private native void setRegulatoryConfig( Integer location, String countryCode, Long breadcrumb, - Long timeoutMs); + Long timeoutMs, + @Nullable Integer timedInvokeTimeoutMs); public interface ArmFailSafeResponseCallback { void onSuccess(Integer errorCode, String debugText); @@ -4811,7 +5909,12 @@ public void readBreadcrumbAttribute(LongAttributeCallback callback) { } public void writeBreadcrumbAttribute(DefaultClusterCallback callback, Long value) { - writeBreadcrumbAttribute(chipClusterPtr, callback, value); + writeBreadcrumbAttribute(chipClusterPtr, callback, value, null); + } + + public void writeBreadcrumbAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeBreadcrumbAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeBreadcrumbAttribute( @@ -4849,7 +5952,10 @@ private native void readBreadcrumbAttribute( long chipClusterPtr, LongAttributeCallback callback); private native void writeBreadcrumbAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeBreadcrumbAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -5102,16 +6208,33 @@ public static long clusterId() { public native long initWithDevice(long devicePtr, int endpointId); public void keySetRead(KeySetReadResponseCallback callback, Integer groupKeySetID) { - keySetRead(chipClusterPtr, callback, groupKeySetID); + keySetRead(chipClusterPtr, callback, groupKeySetID, null); + } + + public void keySetRead( + KeySetReadResponseCallback callback, Integer groupKeySetID, int timedInvokeTimeoutMs) { + keySetRead(chipClusterPtr, callback, groupKeySetID, timedInvokeTimeoutMs); } public void keySetReadAllIndices( KeySetReadAllIndicesResponseCallback callback, Integer groupKeySetIDs) { - keySetReadAllIndices(chipClusterPtr, callback, groupKeySetIDs); + keySetReadAllIndices(chipClusterPtr, callback, groupKeySetIDs, null); + } + + public void keySetReadAllIndices( + KeySetReadAllIndicesResponseCallback callback, + Integer groupKeySetIDs, + int timedInvokeTimeoutMs) { + keySetReadAllIndices(chipClusterPtr, callback, groupKeySetIDs, timedInvokeTimeoutMs); } public void keySetRemove(DefaultClusterCallback callback, Integer groupKeySetID) { - keySetRemove(chipClusterPtr, callback, groupKeySetID); + keySetRemove(chipClusterPtr, callback, groupKeySetID, null); + } + + public void keySetRemove( + DefaultClusterCallback callback, Integer groupKeySetID, int timedInvokeTimeoutMs) { + keySetRemove(chipClusterPtr, callback, groupKeySetID, timedInvokeTimeoutMs); } public void keySetWrite( @@ -5134,17 +6257,52 @@ public void keySetWrite( epochKey1, epochStartTime1, epochKey2, - epochStartTime2); + epochStartTime2, + null); + } + + public void keySetWrite( + DefaultClusterCallback callback, + Integer groupKeySetID, + Integer securityPolicy, + byte[] epochKey0, + Long epochStartTime0, + byte[] epochKey1, + Long epochStartTime1, + byte[] epochKey2, + Long epochStartTime2, + int timedInvokeTimeoutMs) { + keySetWrite( + chipClusterPtr, + callback, + groupKeySetID, + securityPolicy, + epochKey0, + epochStartTime0, + epochKey1, + epochStartTime1, + epochKey2, + epochStartTime2, + timedInvokeTimeoutMs); } private native void keySetRead( - long chipClusterPtr, KeySetReadResponseCallback Callback, Integer groupKeySetID); + long chipClusterPtr, + KeySetReadResponseCallback Callback, + Integer groupKeySetID, + @Nullable Integer timedInvokeTimeoutMs); private native void keySetReadAllIndices( - long chipClusterPtr, KeySetReadAllIndicesResponseCallback Callback, Integer groupKeySetIDs); + long chipClusterPtr, + KeySetReadAllIndicesResponseCallback Callback, + Integer groupKeySetIDs, + @Nullable Integer timedInvokeTimeoutMs); private native void keySetRemove( - long chipClusterPtr, DefaultClusterCallback Callback, Integer groupKeySetID); + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer groupKeySetID, + @Nullable Integer timedInvokeTimeoutMs); private native void keySetWrite( long chipClusterPtr, @@ -5156,7 +6314,8 @@ private native void keySetWrite( byte[] epochKey1, Long epochStartTime1, byte[] epochKey2, - Long epochStartTime2); + Long epochStartTime2, + @Nullable Integer timedInvokeTimeoutMs); public interface KeySetReadAllIndicesResponseCallback { void onSuccess( // groupKeySetIDs: /* TYPE WARNING: array array defaults to */ uint8_t * @@ -5322,46 +6481,101 @@ public static long clusterId() { public native long initWithDevice(long devicePtr, int endpointId); public void addGroup(AddGroupResponseCallback callback, Integer groupId, String groupName) { - addGroup(chipClusterPtr, callback, groupId, groupName); + addGroup(chipClusterPtr, callback, groupId, groupName, null); + } + + public void addGroup( + AddGroupResponseCallback callback, + Integer groupId, + String groupName, + int timedInvokeTimeoutMs) { + addGroup(chipClusterPtr, callback, groupId, groupName, timedInvokeTimeoutMs); + } + + public void addGroupIfIdentifying( + DefaultClusterCallback callback, Integer groupId, String groupName) { + addGroupIfIdentifying(chipClusterPtr, callback, groupId, groupName, null); } public void addGroupIfIdentifying( - DefaultClusterCallback callback, Integer groupId, String groupName) { - addGroupIfIdentifying(chipClusterPtr, callback, groupId, groupName); + DefaultClusterCallback callback, + Integer groupId, + String groupName, + int timedInvokeTimeoutMs) { + addGroupIfIdentifying(chipClusterPtr, callback, groupId, groupName, timedInvokeTimeoutMs); } public void getGroupMembership(GetGroupMembershipResponseCallback callback, Integer groupList) { - getGroupMembership(chipClusterPtr, callback, groupList); + getGroupMembership(chipClusterPtr, callback, groupList, null); + } + + public void getGroupMembership( + GetGroupMembershipResponseCallback callback, Integer groupList, int timedInvokeTimeoutMs) { + getGroupMembership(chipClusterPtr, callback, groupList, timedInvokeTimeoutMs); } public void removeAllGroups(DefaultClusterCallback callback) { - removeAllGroups(chipClusterPtr, callback); + removeAllGroups(chipClusterPtr, callback, null); + } + + public void removeAllGroups(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + removeAllGroups(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void removeGroup(RemoveGroupResponseCallback callback, Integer groupId) { - removeGroup(chipClusterPtr, callback, groupId); + removeGroup(chipClusterPtr, callback, groupId, null); + } + + public void removeGroup( + RemoveGroupResponseCallback callback, Integer groupId, int timedInvokeTimeoutMs) { + removeGroup(chipClusterPtr, callback, groupId, timedInvokeTimeoutMs); } public void viewGroup(ViewGroupResponseCallback callback, Integer groupId) { - viewGroup(chipClusterPtr, callback, groupId); + viewGroup(chipClusterPtr, callback, groupId, null); + } + + public void viewGroup( + ViewGroupResponseCallback callback, Integer groupId, int timedInvokeTimeoutMs) { + viewGroup(chipClusterPtr, callback, groupId, timedInvokeTimeoutMs); } private native void addGroup( - long chipClusterPtr, AddGroupResponseCallback Callback, Integer groupId, String groupName); + long chipClusterPtr, + AddGroupResponseCallback Callback, + Integer groupId, + String groupName, + @Nullable Integer timedInvokeTimeoutMs); private native void addGroupIfIdentifying( - long chipClusterPtr, DefaultClusterCallback Callback, Integer groupId, String groupName); + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer groupId, + String groupName, + @Nullable Integer timedInvokeTimeoutMs); private native void getGroupMembership( - long chipClusterPtr, GetGroupMembershipResponseCallback Callback, Integer groupList); + long chipClusterPtr, + GetGroupMembershipResponseCallback Callback, + Integer groupList, + @Nullable Integer timedInvokeTimeoutMs); - private native void removeAllGroups(long chipClusterPtr, DefaultClusterCallback Callback); + private native void removeAllGroups( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); private native void removeGroup( - long chipClusterPtr, RemoveGroupResponseCallback Callback, Integer groupId); + long chipClusterPtr, + RemoveGroupResponseCallback Callback, + Integer groupId, + @Nullable Integer timedInvokeTimeoutMs); private native void viewGroup( - long chipClusterPtr, ViewGroupResponseCallback Callback, Integer groupId); + long chipClusterPtr, + ViewGroupResponseCallback Callback, + Integer groupId, + @Nullable Integer timedInvokeTimeoutMs); public interface AddGroupResponseCallback { void onSuccess(Integer status, Integer groupId); @@ -5449,28 +6663,53 @@ public static long clusterId() { public native long initWithDevice(long devicePtr, int endpointId); public void identify(DefaultClusterCallback callback, Integer identifyTime) { - identify(chipClusterPtr, callback, identifyTime); + identify(chipClusterPtr, callback, identifyTime, null); + } + + public void identify( + DefaultClusterCallback callback, Integer identifyTime, int timedInvokeTimeoutMs) { + identify(chipClusterPtr, callback, identifyTime, timedInvokeTimeoutMs); } public void identifyQuery(IdentifyQueryResponseCallback callback) { - identifyQuery(chipClusterPtr, callback); + identifyQuery(chipClusterPtr, callback, null); + } + + public void identifyQuery(IdentifyQueryResponseCallback callback, int timedInvokeTimeoutMs) { + identifyQuery(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void triggerEffect( DefaultClusterCallback callback, Integer effectIdentifier, Integer effectVariant) { - triggerEffect(chipClusterPtr, callback, effectIdentifier, effectVariant); + triggerEffect(chipClusterPtr, callback, effectIdentifier, effectVariant, null); + } + + public void triggerEffect( + DefaultClusterCallback callback, + Integer effectIdentifier, + Integer effectVariant, + int timedInvokeTimeoutMs) { + triggerEffect( + chipClusterPtr, callback, effectIdentifier, effectVariant, timedInvokeTimeoutMs); } private native void identify( - long chipClusterPtr, DefaultClusterCallback Callback, Integer identifyTime); + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer identifyTime, + @Nullable Integer timedInvokeTimeoutMs); - private native void identifyQuery(long chipClusterPtr, IdentifyQueryResponseCallback Callback); + private native void identifyQuery( + long chipClusterPtr, + IdentifyQueryResponseCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); private native void triggerEffect( long chipClusterPtr, DefaultClusterCallback Callback, Integer effectIdentifier, - Integer effectVariant); + Integer effectVariant, + @Nullable Integer timedInvokeTimeoutMs); public interface IdentifyQueryResponseCallback { void onSuccess(Integer timeout); @@ -5491,7 +6730,12 @@ public void readIdentifyTimeAttribute(IntegerAttributeCallback callback) { } public void writeIdentifyTimeAttribute(DefaultClusterCallback callback, Integer value) { - writeIdentifyTimeAttribute(chipClusterPtr, callback, value); + writeIdentifyTimeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeIdentifyTimeAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeIdentifyTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeIdentifyTimeAttribute( @@ -5525,7 +6769,10 @@ private native void readIdentifyTimeAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeIdentifyTimeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeIdentifyTimeAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -5721,11 +6968,19 @@ public static long clusterId() { public native long initWithDevice(long devicePtr, int endpointId); public void sendKeyRequest(SendKeyResponseCallback callback, Integer keyCode) { - sendKeyRequest(chipClusterPtr, callback, keyCode); + sendKeyRequest(chipClusterPtr, callback, keyCode, null); + } + + public void sendKeyRequest( + SendKeyResponseCallback callback, Integer keyCode, int timedInvokeTimeoutMs) { + sendKeyRequest(chipClusterPtr, callback, keyCode, timedInvokeTimeoutMs); } private native void sendKeyRequest( - long chipClusterPtr, SendKeyResponseCallback Callback, Integer keyCode); + long chipClusterPtr, + SendKeyResponseCallback Callback, + Integer keyCode, + @Nullable Integer timedInvokeTimeoutMs); public interface SendKeyResponseCallback { void onSuccess(Integer status); @@ -5782,7 +7037,24 @@ public void move( Integer rate, Integer optionMask, Integer optionOverride) { - move(chipClusterPtr, callback, moveMode, rate, optionMask, optionOverride); + move(chipClusterPtr, callback, moveMode, rate, optionMask, optionOverride, null); + } + + public void move( + DefaultClusterCallback callback, + Integer moveMode, + Integer rate, + Integer optionMask, + Integer optionOverride, + int timedInvokeTimeoutMs) { + move( + chipClusterPtr, + callback, + moveMode, + rate, + optionMask, + optionOverride, + timedInvokeTimeoutMs); } public void moveToLevel( @@ -5791,16 +7063,47 @@ public void moveToLevel( Integer transitionTime, Integer optionMask, Integer optionOverride) { - moveToLevel(chipClusterPtr, callback, level, transitionTime, optionMask, optionOverride); + moveToLevel( + chipClusterPtr, callback, level, transitionTime, optionMask, optionOverride, null); + } + + public void moveToLevel( + DefaultClusterCallback callback, + Integer level, + Integer transitionTime, + Integer optionMask, + Integer optionOverride, + int timedInvokeTimeoutMs) { + moveToLevel( + chipClusterPtr, + callback, + level, + transitionTime, + optionMask, + optionOverride, + timedInvokeTimeoutMs); } public void moveToLevelWithOnOff( DefaultClusterCallback callback, Integer level, Integer transitionTime) { - moveToLevelWithOnOff(chipClusterPtr, callback, level, transitionTime); + moveToLevelWithOnOff(chipClusterPtr, callback, level, transitionTime, null); + } + + public void moveToLevelWithOnOff( + DefaultClusterCallback callback, + Integer level, + Integer transitionTime, + int timedInvokeTimeoutMs) { + moveToLevelWithOnOff(chipClusterPtr, callback, level, transitionTime, timedInvokeTimeoutMs); } public void moveWithOnOff(DefaultClusterCallback callback, Integer moveMode, Integer rate) { - moveWithOnOff(chipClusterPtr, callback, moveMode, rate); + moveWithOnOff(chipClusterPtr, callback, moveMode, rate, null); + } + + public void moveWithOnOff( + DefaultClusterCallback callback, Integer moveMode, Integer rate, int timedInvokeTimeoutMs) { + moveWithOnOff(chipClusterPtr, callback, moveMode, rate, timedInvokeTimeoutMs); } public void step( @@ -5811,7 +7114,33 @@ public void step( Integer optionMask, Integer optionOverride) { step( - chipClusterPtr, callback, stepMode, stepSize, transitionTime, optionMask, optionOverride); + chipClusterPtr, + callback, + stepMode, + stepSize, + transitionTime, + optionMask, + optionOverride, + null); + } + + public void step( + DefaultClusterCallback callback, + Integer stepMode, + Integer stepSize, + Integer transitionTime, + Integer optionMask, + Integer optionOverride, + int timedInvokeTimeoutMs) { + step( + chipClusterPtr, + callback, + stepMode, + stepSize, + transitionTime, + optionMask, + optionOverride, + timedInvokeTimeoutMs); } public void stepWithOnOff( @@ -5819,15 +7148,37 @@ public void stepWithOnOff( Integer stepMode, Integer stepSize, Integer transitionTime) { - stepWithOnOff(chipClusterPtr, callback, stepMode, stepSize, transitionTime); + stepWithOnOff(chipClusterPtr, callback, stepMode, stepSize, transitionTime, null); + } + + public void stepWithOnOff( + DefaultClusterCallback callback, + Integer stepMode, + Integer stepSize, + Integer transitionTime, + int timedInvokeTimeoutMs) { + stepWithOnOff( + chipClusterPtr, callback, stepMode, stepSize, transitionTime, timedInvokeTimeoutMs); } public void stop(DefaultClusterCallback callback, Integer optionMask, Integer optionOverride) { - stop(chipClusterPtr, callback, optionMask, optionOverride); + stop(chipClusterPtr, callback, optionMask, optionOverride, null); + } + + public void stop( + DefaultClusterCallback callback, + Integer optionMask, + Integer optionOverride, + int timedInvokeTimeoutMs) { + stop(chipClusterPtr, callback, optionMask, optionOverride, timedInvokeTimeoutMs); } public void stopWithOnOff(DefaultClusterCallback callback) { - stopWithOnOff(chipClusterPtr, callback); + stopWithOnOff(chipClusterPtr, callback, null); + } + + public void stopWithOnOff(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + stopWithOnOff(chipClusterPtr, callback, timedInvokeTimeoutMs); } private native void move( @@ -5836,7 +7187,8 @@ private native void move( Integer moveMode, Integer rate, Integer optionMask, - Integer optionOverride); + Integer optionOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void moveToLevel( long chipClusterPtr, @@ -5844,16 +7196,22 @@ private native void moveToLevel( Integer level, Integer transitionTime, Integer optionMask, - Integer optionOverride); + Integer optionOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void moveToLevelWithOnOff( long chipClusterPtr, DefaultClusterCallback Callback, Integer level, - Integer transitionTime); + Integer transitionTime, + @Nullable Integer timedInvokeTimeoutMs); private native void moveWithOnOff( - long chipClusterPtr, DefaultClusterCallback Callback, Integer moveMode, Integer rate); + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer moveMode, + Integer rate, + @Nullable Integer timedInvokeTimeoutMs); private native void step( long chipClusterPtr, @@ -5862,22 +7220,28 @@ private native void step( Integer stepSize, Integer transitionTime, Integer optionMask, - Integer optionOverride); + Integer optionOverride, + @Nullable Integer timedInvokeTimeoutMs); private native void stepWithOnOff( long chipClusterPtr, DefaultClusterCallback Callback, Integer stepMode, Integer stepSize, - Integer transitionTime); + Integer transitionTime, + @Nullable Integer timedInvokeTimeoutMs); private native void stop( long chipClusterPtr, DefaultClusterCallback Callback, Integer optionMask, - Integer optionOverride); + Integer optionOverride, + @Nullable Integer timedInvokeTimeoutMs); - private native void stopWithOnOff(long chipClusterPtr, DefaultClusterCallback Callback); + private native void stopWithOnOff( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); public interface OnLevelAttributeCallback { void onSuccess(@Nullable Integer value); @@ -5987,7 +7351,12 @@ public void readOptionsAttribute(IntegerAttributeCallback callback) { } public void writeOptionsAttribute(DefaultClusterCallback callback, Integer value) { - writeOptionsAttribute(chipClusterPtr, callback, value); + writeOptionsAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOptionsAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOptionsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeOptionsAttribute( @@ -6000,7 +7369,12 @@ public void readOnOffTransitionTimeAttribute(IntegerAttributeCallback callback) } public void writeOnOffTransitionTimeAttribute(DefaultClusterCallback callback, Integer value) { - writeOnOffTransitionTimeAttribute(chipClusterPtr, callback, value); + writeOnOffTransitionTimeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOnOffTransitionTimeAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOnOffTransitionTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeOnOffTransitionTimeAttribute( @@ -6013,7 +7387,12 @@ public void readOnLevelAttribute(OnLevelAttributeCallback callback) { } public void writeOnLevelAttribute(DefaultClusterCallback callback, @Nullable Integer value) { - writeOnLevelAttribute(chipClusterPtr, callback, value); + writeOnLevelAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOnLevelAttribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeOnLevelAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeOnLevelAttribute( @@ -6027,7 +7406,12 @@ public void readOnTransitionTimeAttribute(OnTransitionTimeAttributeCallback call public void writeOnTransitionTimeAttribute( DefaultClusterCallback callback, @Nullable Integer value) { - writeOnTransitionTimeAttribute(chipClusterPtr, callback, value); + writeOnTransitionTimeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOnTransitionTimeAttribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeOnTransitionTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeOnTransitionTimeAttribute( @@ -6041,7 +7425,12 @@ public void readOffTransitionTimeAttribute(OffTransitionTimeAttributeCallback ca public void writeOffTransitionTimeAttribute( DefaultClusterCallback callback, @Nullable Integer value) { - writeOffTransitionTimeAttribute(chipClusterPtr, callback, value); + writeOffTransitionTimeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOffTransitionTimeAttribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeOffTransitionTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeOffTransitionTimeAttribute( @@ -6055,7 +7444,12 @@ public void readDefaultMoveRateAttribute(DefaultMoveRateAttributeCallback callba public void writeDefaultMoveRateAttribute( DefaultClusterCallback callback, @Nullable Integer value) { - writeDefaultMoveRateAttribute(chipClusterPtr, callback, value); + writeDefaultMoveRateAttribute(chipClusterPtr, callback, value, null); + } + + public void writeDefaultMoveRateAttribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeDefaultMoveRateAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeDefaultMoveRateAttribute( @@ -6068,7 +7462,12 @@ public void readStartUpCurrentLevelAttribute(IntegerAttributeCallback callback) } public void writeStartUpCurrentLevelAttribute(DefaultClusterCallback callback, Integer value) { - writeStartUpCurrentLevelAttribute(chipClusterPtr, callback, value); + writeStartUpCurrentLevelAttribute(chipClusterPtr, callback, value, null); + } + + public void writeStartUpCurrentLevelAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeStartUpCurrentLevelAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeStartUpCurrentLevelAttribute( @@ -6135,7 +7534,10 @@ private native void readOptionsAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeOptionsAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeOptionsAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -6144,7 +7546,10 @@ private native void readOnOffTransitionTimeAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeOnOffTransitionTimeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeOnOffTransitionTimeAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -6153,7 +7558,10 @@ private native void readOnLevelAttribute( long chipClusterPtr, OnLevelAttributeCallback callback); private native void writeOnLevelAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeOnLevelAttribute( long chipClusterPtr, OnLevelAttributeCallback callback, int minInterval, int maxInterval); @@ -6162,7 +7570,10 @@ private native void readOnTransitionTimeAttribute( long chipClusterPtr, OnTransitionTimeAttributeCallback callback); private native void writeOnTransitionTimeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeOnTransitionTimeAttribute( long chipClusterPtr, @@ -6174,7 +7585,10 @@ private native void readOffTransitionTimeAttribute( long chipClusterPtr, OffTransitionTimeAttributeCallback callback); private native void writeOffTransitionTimeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeOffTransitionTimeAttribute( long chipClusterPtr, @@ -6186,7 +7600,10 @@ private native void readDefaultMoveRateAttribute( long chipClusterPtr, DefaultMoveRateAttributeCallback callback); private native void writeDefaultMoveRateAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeDefaultMoveRateAttribute( long chipClusterPtr, @@ -6198,7 +7615,10 @@ private native void readStartUpCurrentLevelAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeStartUpCurrentLevelAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeStartUpCurrentLevelAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -6238,7 +7658,12 @@ public void readActiveLocaleAttribute(CharStringAttributeCallback callback) { } public void writeActiveLocaleAttribute(DefaultClusterCallback callback, String value) { - writeActiveLocaleAttribute(chipClusterPtr, callback, value); + writeActiveLocaleAttribute(chipClusterPtr, callback, value, null); + } + + public void writeActiveLocaleAttribute( + DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { + writeActiveLocaleAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void readSupportedLocalesAttribute(SupportedLocalesAttributeCallback callback) { @@ -6249,7 +7674,10 @@ private native void readActiveLocaleAttribute( long chipClusterPtr, CharStringAttributeCallback callback); private native void writeActiveLocaleAttribute( - long chipClusterPtr, DefaultClusterCallback callback, String value); + long chipClusterPtr, + DefaultClusterCallback callback, + String value, + @Nullable Integer timedWriteTimeoutMs); private native void readSupportedLocalesAttribute( long chipClusterPtr, SupportedLocalesAttributeCallback callback); @@ -6268,10 +7696,17 @@ public static long clusterId() { public native long initWithDevice(long devicePtr, int endpointId); public void sleep(DefaultClusterCallback callback) { - sleep(chipClusterPtr, callback); + sleep(chipClusterPtr, callback, null); + } + + public void sleep(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + sleep(chipClusterPtr, callback, timedInvokeTimeoutMs); } - private native void sleep(long chipClusterPtr, DefaultClusterCallback Callback); + private native void sleep( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); public interface AttributeListAttributeCallback { void onSuccess(List valueList); @@ -6317,32 +7752,61 @@ public static long clusterId() { public native long initWithDevice(long devicePtr, int endpointId); public void hideInputStatusRequest(DefaultClusterCallback callback) { - hideInputStatusRequest(chipClusterPtr, callback); + hideInputStatusRequest(chipClusterPtr, callback, null); + } + + public void hideInputStatusRequest(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + hideInputStatusRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void renameInputRequest(DefaultClusterCallback callback, Integer index, String name) { - renameInputRequest(chipClusterPtr, callback, index, name); + renameInputRequest(chipClusterPtr, callback, index, name, null); + } + + public void renameInputRequest( + DefaultClusterCallback callback, Integer index, String name, int timedInvokeTimeoutMs) { + renameInputRequest(chipClusterPtr, callback, index, name, timedInvokeTimeoutMs); } public void selectInputRequest(DefaultClusterCallback callback, Integer index) { - selectInputRequest(chipClusterPtr, callback, index); + selectInputRequest(chipClusterPtr, callback, index, null); + } + + public void selectInputRequest( + DefaultClusterCallback callback, Integer index, int timedInvokeTimeoutMs) { + selectInputRequest(chipClusterPtr, callback, index, timedInvokeTimeoutMs); } public void showInputStatusRequest(DefaultClusterCallback callback) { - showInputStatusRequest(chipClusterPtr, callback); + showInputStatusRequest(chipClusterPtr, callback, null); + } + + public void showInputStatusRequest(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + showInputStatusRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } private native void hideInputStatusRequest( - long chipClusterPtr, DefaultClusterCallback Callback); + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); private native void renameInputRequest( - long chipClusterPtr, DefaultClusterCallback Callback, Integer index, String name); + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer index, + String name, + @Nullable Integer timedInvokeTimeoutMs); private native void selectInputRequest( - long chipClusterPtr, DefaultClusterCallback Callback, Integer index); + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer index, + @Nullable Integer timedInvokeTimeoutMs); private native void showInputStatusRequest( - long chipClusterPtr, DefaultClusterCallback Callback); + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); public static class MediaInputListAttribute { public Integer index; @@ -6455,75 +7919,160 @@ public static long clusterId() { public native long initWithDevice(long devicePtr, int endpointId); public void fastForwardRequest(PlaybackResponseCallback callback) { - fastForwardRequest(chipClusterPtr, callback); + fastForwardRequest(chipClusterPtr, callback, null); + } + + public void fastForwardRequest(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { + fastForwardRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void nextRequest(PlaybackResponseCallback callback) { - nextRequest(chipClusterPtr, callback); + nextRequest(chipClusterPtr, callback, null); + } + + public void nextRequest(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { + nextRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void pauseRequest(PlaybackResponseCallback callback) { - pauseRequest(chipClusterPtr, callback); + pauseRequest(chipClusterPtr, callback, null); + } + + public void pauseRequest(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { + pauseRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void playRequest(PlaybackResponseCallback callback) { - playRequest(chipClusterPtr, callback); + playRequest(chipClusterPtr, callback, null); + } + + public void playRequest(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { + playRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void previousRequest(PlaybackResponseCallback callback) { - previousRequest(chipClusterPtr, callback); + previousRequest(chipClusterPtr, callback, null); + } + + public void previousRequest(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { + previousRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void rewindRequest(PlaybackResponseCallback callback) { - rewindRequest(chipClusterPtr, callback); + rewindRequest(chipClusterPtr, callback, null); + } + + public void rewindRequest(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { + rewindRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void seekRequest(PlaybackResponseCallback callback, Long position) { - seekRequest(chipClusterPtr, callback, position); + seekRequest(chipClusterPtr, callback, position, null); + } + + public void seekRequest( + PlaybackResponseCallback callback, Long position, int timedInvokeTimeoutMs) { + seekRequest(chipClusterPtr, callback, position, timedInvokeTimeoutMs); } public void skipBackwardRequest( PlaybackResponseCallback callback, Long deltaPositionMilliseconds) { - skipBackwardRequest(chipClusterPtr, callback, deltaPositionMilliseconds); + skipBackwardRequest(chipClusterPtr, callback, deltaPositionMilliseconds, null); + } + + public void skipBackwardRequest( + PlaybackResponseCallback callback, + Long deltaPositionMilliseconds, + int timedInvokeTimeoutMs) { + skipBackwardRequest( + chipClusterPtr, callback, deltaPositionMilliseconds, timedInvokeTimeoutMs); } public void skipForwardRequest( PlaybackResponseCallback callback, Long deltaPositionMilliseconds) { - skipForwardRequest(chipClusterPtr, callback, deltaPositionMilliseconds); + skipForwardRequest(chipClusterPtr, callback, deltaPositionMilliseconds, null); + } + + public void skipForwardRequest( + PlaybackResponseCallback callback, + Long deltaPositionMilliseconds, + int timedInvokeTimeoutMs) { + skipForwardRequest(chipClusterPtr, callback, deltaPositionMilliseconds, timedInvokeTimeoutMs); } public void startOverRequest(PlaybackResponseCallback callback) { - startOverRequest(chipClusterPtr, callback); + startOverRequest(chipClusterPtr, callback, null); + } + + public void startOverRequest(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { + startOverRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void stopRequest(PlaybackResponseCallback callback) { - stopRequest(chipClusterPtr, callback); + stopRequest(chipClusterPtr, callback, null); + } + + public void stopRequest(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { + stopRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } - private native void fastForwardRequest(long chipClusterPtr, PlaybackResponseCallback Callback); + private native void fastForwardRequest( + long chipClusterPtr, + PlaybackResponseCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); - private native void nextRequest(long chipClusterPtr, PlaybackResponseCallback Callback); + private native void nextRequest( + long chipClusterPtr, + PlaybackResponseCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); - private native void pauseRequest(long chipClusterPtr, PlaybackResponseCallback Callback); + private native void pauseRequest( + long chipClusterPtr, + PlaybackResponseCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); - private native void playRequest(long chipClusterPtr, PlaybackResponseCallback Callback); + private native void playRequest( + long chipClusterPtr, + PlaybackResponseCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); - private native void previousRequest(long chipClusterPtr, PlaybackResponseCallback Callback); + private native void previousRequest( + long chipClusterPtr, + PlaybackResponseCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); - private native void rewindRequest(long chipClusterPtr, PlaybackResponseCallback Callback); + private native void rewindRequest( + long chipClusterPtr, + PlaybackResponseCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); private native void seekRequest( - long chipClusterPtr, PlaybackResponseCallback Callback, Long position); + long chipClusterPtr, + PlaybackResponseCallback Callback, + Long position, + @Nullable Integer timedInvokeTimeoutMs); private native void skipBackwardRequest( - long chipClusterPtr, PlaybackResponseCallback Callback, Long deltaPositionMilliseconds); + long chipClusterPtr, + PlaybackResponseCallback Callback, + Long deltaPositionMilliseconds, + @Nullable Integer timedInvokeTimeoutMs); private native void skipForwardRequest( - long chipClusterPtr, PlaybackResponseCallback Callback, Long deltaPositionMilliseconds); + long chipClusterPtr, + PlaybackResponseCallback Callback, + Long deltaPositionMilliseconds, + @Nullable Integer timedInvokeTimeoutMs); - private native void startOverRequest(long chipClusterPtr, PlaybackResponseCallback Callback); + private native void startOverRequest( + long chipClusterPtr, + PlaybackResponseCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); - private native void stopRequest(long chipClusterPtr, PlaybackResponseCallback Callback); + private native void stopRequest( + long chipClusterPtr, + PlaybackResponseCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); public interface PlaybackResponseCallback { void onSuccess(Integer status); @@ -6655,11 +8204,19 @@ public static long clusterId() { public native long initWithDevice(long devicePtr, int endpointId); public void changeToMode(DefaultClusterCallback callback, Integer newMode) { - changeToMode(chipClusterPtr, callback, newMode); + changeToMode(chipClusterPtr, callback, newMode, null); + } + + public void changeToMode( + DefaultClusterCallback callback, Integer newMode, int timedInvokeTimeoutMs) { + changeToMode(chipClusterPtr, callback, newMode, timedInvokeTimeoutMs); } private native void changeToMode( - long chipClusterPtr, DefaultClusterCallback Callback, Integer newMode); + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer newMode, + @Nullable Integer timedInvokeTimeoutMs); public static class SupportedModesAttribute { public String label; @@ -6725,7 +8282,12 @@ public void readOnModeAttribute(IntegerAttributeCallback callback) { } public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { - writeOnModeAttribute(chipClusterPtr, callback, value); + writeOnModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOnModeAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOnModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeOnModeAttribute( @@ -6776,7 +8338,10 @@ private native void readSupportedModesAttribute( private native void readOnModeAttribute(long chipClusterPtr, IntegerAttributeCallback callback); private native void writeOnModeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeOnModeAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -6820,22 +8385,57 @@ public static long clusterId() { public void addOrUpdateThreadNetwork( NetworkConfigResponseCallback callback, byte[] operationalDataset, Long breadcrumb) { - addOrUpdateThreadNetwork(chipClusterPtr, callback, operationalDataset, breadcrumb); + addOrUpdateThreadNetwork(chipClusterPtr, callback, operationalDataset, breadcrumb, null); + } + + public void addOrUpdateThreadNetwork( + NetworkConfigResponseCallback callback, + byte[] operationalDataset, + Long breadcrumb, + int timedInvokeTimeoutMs) { + addOrUpdateThreadNetwork( + chipClusterPtr, callback, operationalDataset, breadcrumb, timedInvokeTimeoutMs); } public void addOrUpdateWiFiNetwork( NetworkConfigResponseCallback callback, byte[] ssid, byte[] credentials, Long breadcrumb) { - addOrUpdateWiFiNetwork(chipClusterPtr, callback, ssid, credentials, breadcrumb); + addOrUpdateWiFiNetwork(chipClusterPtr, callback, ssid, credentials, breadcrumb, null); + } + + public void addOrUpdateWiFiNetwork( + NetworkConfigResponseCallback callback, + byte[] ssid, + byte[] credentials, + Long breadcrumb, + int timedInvokeTimeoutMs) { + addOrUpdateWiFiNetwork( + chipClusterPtr, callback, ssid, credentials, breadcrumb, timedInvokeTimeoutMs); } public void connectNetwork( ConnectNetworkResponseCallback callback, byte[] networkID, Long breadcrumb) { - connectNetwork(chipClusterPtr, callback, networkID, breadcrumb); + connectNetwork(chipClusterPtr, callback, networkID, breadcrumb, null); + } + + public void connectNetwork( + ConnectNetworkResponseCallback callback, + byte[] networkID, + Long breadcrumb, + int timedInvokeTimeoutMs) { + connectNetwork(chipClusterPtr, callback, networkID, breadcrumb, timedInvokeTimeoutMs); } public void removeNetwork( NetworkConfigResponseCallback callback, byte[] networkID, Long breadcrumb) { - removeNetwork(chipClusterPtr, callback, networkID, breadcrumb); + removeNetwork(chipClusterPtr, callback, networkID, breadcrumb, null); + } + + public void removeNetwork( + NetworkConfigResponseCallback callback, + byte[] networkID, + Long breadcrumb, + int timedInvokeTimeoutMs) { + removeNetwork(chipClusterPtr, callback, networkID, breadcrumb, timedInvokeTimeoutMs); } public void reorderNetwork( @@ -6843,47 +8443,74 @@ public void reorderNetwork( byte[] networkID, Integer networkIndex, Long breadcrumb) { - reorderNetwork(chipClusterPtr, callback, networkID, networkIndex, breadcrumb); + reorderNetwork(chipClusterPtr, callback, networkID, networkIndex, breadcrumb, null); + } + + public void reorderNetwork( + NetworkConfigResponseCallback callback, + byte[] networkID, + Integer networkIndex, + Long breadcrumb, + int timedInvokeTimeoutMs) { + reorderNetwork( + chipClusterPtr, callback, networkID, networkIndex, breadcrumb, timedInvokeTimeoutMs); } public void scanNetworks(ScanNetworksResponseCallback callback, byte[] ssid, Long breadcrumb) { - scanNetworks(chipClusterPtr, callback, ssid, breadcrumb); + scanNetworks(chipClusterPtr, callback, ssid, breadcrumb, null); + } + + public void scanNetworks( + ScanNetworksResponseCallback callback, + byte[] ssid, + Long breadcrumb, + int timedInvokeTimeoutMs) { + scanNetworks(chipClusterPtr, callback, ssid, breadcrumb, timedInvokeTimeoutMs); } private native void addOrUpdateThreadNetwork( long chipClusterPtr, NetworkConfigResponseCallback Callback, byte[] operationalDataset, - Long breadcrumb); + Long breadcrumb, + @Nullable Integer timedInvokeTimeoutMs); private native void addOrUpdateWiFiNetwork( long chipClusterPtr, NetworkConfigResponseCallback Callback, byte[] ssid, byte[] credentials, - Long breadcrumb); + Long breadcrumb, + @Nullable Integer timedInvokeTimeoutMs); private native void connectNetwork( long chipClusterPtr, ConnectNetworkResponseCallback Callback, byte[] networkID, - Long breadcrumb); + Long breadcrumb, + @Nullable Integer timedInvokeTimeoutMs); private native void removeNetwork( long chipClusterPtr, NetworkConfigResponseCallback Callback, byte[] networkID, - Long breadcrumb); + Long breadcrumb, + @Nullable Integer timedInvokeTimeoutMs); private native void reorderNetwork( long chipClusterPtr, NetworkConfigResponseCallback Callback, byte[] networkID, Integer networkIndex, - Long breadcrumb); + Long breadcrumb, + @Nullable Integer timedInvokeTimeoutMs); private native void scanNetworks( - long chipClusterPtr, ScanNetworksResponseCallback Callback, byte[] ssid, Long breadcrumb); + long chipClusterPtr, + ScanNetworksResponseCallback Callback, + byte[] ssid, + Long breadcrumb, + @Nullable Integer timedInvokeTimeoutMs); public interface ConnectNetworkResponseCallback { void onSuccess(Integer NetworkingStatus, String DebugText, Long ErrorValue); @@ -6960,8 +8587,13 @@ public void readInterfaceEnabledAttribute(BooleanAttributeCallback callback) { readInterfaceEnabledAttribute(chipClusterPtr, callback); } - public void writeInterfaceEnabledAttribute(DefaultClusterCallback callback, Boolean value) { - writeInterfaceEnabledAttribute(chipClusterPtr, callback, value); + public void writeInterfaceEnabledAttribute(DefaultClusterCallback callback, Boolean value) { + writeInterfaceEnabledAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInterfaceEnabledAttribute( + DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writeInterfaceEnabledAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void readLastNetworkingStatusAttribute(IntegerAttributeCallback callback) { @@ -7010,7 +8642,10 @@ private native void readInterfaceEnabledAttribute( long chipClusterPtr, BooleanAttributeCallback callback); private native void writeInterfaceEnabledAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Boolean value); + long chipClusterPtr, + DefaultClusterCallback callback, + Boolean value, + @Nullable Integer timedWriteTimeoutMs); private native void readLastNetworkingStatusAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -7048,12 +8683,29 @@ public static long clusterId() { public void applyUpdateRequest( ApplyUpdateResponseCallback callback, byte[] updateToken, Long newVersion) { - applyUpdateRequest(chipClusterPtr, callback, updateToken, newVersion); + applyUpdateRequest(chipClusterPtr, callback, updateToken, newVersion, null); + } + + public void applyUpdateRequest( + ApplyUpdateResponseCallback callback, + byte[] updateToken, + Long newVersion, + int timedInvokeTimeoutMs) { + applyUpdateRequest(chipClusterPtr, callback, updateToken, newVersion, timedInvokeTimeoutMs); } public void notifyUpdateApplied( DefaultClusterCallback callback, byte[] updateToken, Long softwareVersion) { - notifyUpdateApplied(chipClusterPtr, callback, updateToken, softwareVersion); + notifyUpdateApplied(chipClusterPtr, callback, updateToken, softwareVersion, null); + } + + public void notifyUpdateApplied( + DefaultClusterCallback callback, + byte[] updateToken, + Long softwareVersion, + int timedInvokeTimeoutMs) { + notifyUpdateApplied( + chipClusterPtr, callback, updateToken, softwareVersion, timedInvokeTimeoutMs); } public void queryImage( @@ -7076,20 +8728,48 @@ public void queryImage( hardwareVersion, location, requestorCanConsent, - metadataForProvider); + metadataForProvider, + null); + } + + public void queryImage( + QueryImageResponseCallback callback, + Integer vendorId, + Integer productId, + Long softwareVersion, + Integer protocolsSupported, + Optional hardwareVersion, + Optional location, + Optional requestorCanConsent, + Optional metadataForProvider, + int timedInvokeTimeoutMs) { + queryImage( + chipClusterPtr, + callback, + vendorId, + productId, + softwareVersion, + protocolsSupported, + hardwareVersion, + location, + requestorCanConsent, + metadataForProvider, + timedInvokeTimeoutMs); } private native void applyUpdateRequest( long chipClusterPtr, ApplyUpdateResponseCallback Callback, byte[] updateToken, - Long newVersion); + Long newVersion, + @Nullable Integer timedInvokeTimeoutMs); private native void notifyUpdateApplied( long chipClusterPtr, DefaultClusterCallback Callback, byte[] updateToken, - Long softwareVersion); + Long softwareVersion, + @Nullable Integer timedInvokeTimeoutMs); private native void queryImage( long chipClusterPtr, @@ -7101,7 +8781,8 @@ private native void queryImage( Optional hardwareVersion, Optional location, Optional requestorCanConsent, - Optional metadataForProvider); + Optional metadataForProvider, + @Nullable Integer timedInvokeTimeoutMs); public interface ApplyUpdateResponseCallback { void onSuccess(Integer action, Long delayedActionTime); @@ -7180,7 +8861,27 @@ public void announceOtaProvider( vendorId, announcementReason, metadataForNode, - endpoint); + endpoint, + null); + } + + public void announceOtaProvider( + DefaultClusterCallback callback, + Long providerNodeId, + Integer vendorId, + Integer announcementReason, + Optional metadataForNode, + Integer endpoint, + int timedInvokeTimeoutMs) { + announceOtaProvider( + chipClusterPtr, + callback, + providerNodeId, + vendorId, + announcementReason, + metadataForNode, + endpoint, + timedInvokeTimeoutMs); } private native void announceOtaProvider( @@ -7190,7 +8891,8 @@ private native void announceOtaProvider( Integer vendorId, Integer announcementReason, Optional metadataForNode, - Integer endpoint); + Integer endpoint, + @Nullable Integer timedInvokeTimeoutMs); public static class DefaultOtaProvidersAttribute { public Integer fabricIndex; @@ -7427,20 +9129,40 @@ public static long clusterId() { public native long initWithDevice(long devicePtr, int endpointId); public void off(DefaultClusterCallback callback) { - off(chipClusterPtr, callback); + off(chipClusterPtr, callback, null); + } + + public void off(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + off(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void offWithEffect( DefaultClusterCallback callback, Integer effectId, Integer effectVariant) { - offWithEffect(chipClusterPtr, callback, effectId, effectVariant); + offWithEffect(chipClusterPtr, callback, effectId, effectVariant, null); + } + + public void offWithEffect( + DefaultClusterCallback callback, + Integer effectId, + Integer effectVariant, + int timedInvokeTimeoutMs) { + offWithEffect(chipClusterPtr, callback, effectId, effectVariant, timedInvokeTimeoutMs); } public void on(DefaultClusterCallback callback) { - on(chipClusterPtr, callback); + on(chipClusterPtr, callback, null); + } + + public void on(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + on(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void onWithRecallGlobalScene(DefaultClusterCallback callback) { - onWithRecallGlobalScene(chipClusterPtr, callback); + onWithRecallGlobalScene(chipClusterPtr, callback, null); + } + + public void onWithRecallGlobalScene(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + onWithRecallGlobalScene(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void onWithTimedOff( @@ -7448,34 +9170,61 @@ public void onWithTimedOff( Integer onOffControl, Integer onTime, Integer offWaitTime) { - onWithTimedOff(chipClusterPtr, callback, onOffControl, onTime, offWaitTime); + onWithTimedOff(chipClusterPtr, callback, onOffControl, onTime, offWaitTime, null); + } + + public void onWithTimedOff( + DefaultClusterCallback callback, + Integer onOffControl, + Integer onTime, + Integer offWaitTime, + int timedInvokeTimeoutMs) { + onWithTimedOff( + chipClusterPtr, callback, onOffControl, onTime, offWaitTime, timedInvokeTimeoutMs); } public void toggle(DefaultClusterCallback callback) { - toggle(chipClusterPtr, callback); + toggle(chipClusterPtr, callback, null); + } + + public void toggle(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + toggle(chipClusterPtr, callback, timedInvokeTimeoutMs); } - private native void off(long chipClusterPtr, DefaultClusterCallback Callback); + private native void off( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); private native void offWithEffect( long chipClusterPtr, DefaultClusterCallback Callback, Integer effectId, - Integer effectVariant); + Integer effectVariant, + @Nullable Integer timedInvokeTimeoutMs); - private native void on(long chipClusterPtr, DefaultClusterCallback Callback); + private native void on( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); private native void onWithRecallGlobalScene( - long chipClusterPtr, DefaultClusterCallback Callback); + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); private native void onWithTimedOff( long chipClusterPtr, DefaultClusterCallback Callback, Integer onOffControl, Integer onTime, - Integer offWaitTime); + Integer offWaitTime, + @Nullable Integer timedInvokeTimeoutMs); - private native void toggle(long chipClusterPtr, DefaultClusterCallback Callback); + private native void toggle( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); public interface AttributeListAttributeCallback { void onSuccess(List valueList); @@ -7508,7 +9257,12 @@ public void readOnTimeAttribute(IntegerAttributeCallback callback) { } public void writeOnTimeAttribute(DefaultClusterCallback callback, Integer value) { - writeOnTimeAttribute(chipClusterPtr, callback, value); + writeOnTimeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOnTimeAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOnTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeOnTimeAttribute( @@ -7521,7 +9275,12 @@ public void readOffWaitTimeAttribute(IntegerAttributeCallback callback) { } public void writeOffWaitTimeAttribute(DefaultClusterCallback callback, Integer value) { - writeOffWaitTimeAttribute(chipClusterPtr, callback, value); + writeOffWaitTimeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOffWaitTimeAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOffWaitTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeOffWaitTimeAttribute( @@ -7534,7 +9293,12 @@ public void readStartUpOnOffAttribute(IntegerAttributeCallback callback) { } public void writeStartUpOnOffAttribute(DefaultClusterCallback callback, Integer value) { - writeStartUpOnOffAttribute(chipClusterPtr, callback, value); + writeStartUpOnOffAttribute(chipClusterPtr, callback, value, null); + } + + public void writeStartUpOnOffAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeStartUpOnOffAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeStartUpOnOffAttribute( @@ -7578,7 +9342,10 @@ private native void subscribeGlobalSceneControlAttribute( private native void readOnTimeAttribute(long chipClusterPtr, IntegerAttributeCallback callback); private native void writeOnTimeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeOnTimeAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -7587,7 +9354,10 @@ private native void readOffWaitTimeAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeOffWaitTimeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeOffWaitTimeAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -7596,7 +9366,10 @@ private native void readStartUpOnOffAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeStartUpOnOffAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeStartUpOnOffAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -7651,7 +9424,12 @@ public void readSwitchActionsAttribute(IntegerAttributeCallback callback) { } public void writeSwitchActionsAttribute(DefaultClusterCallback callback, Integer value) { - writeSwitchActionsAttribute(chipClusterPtr, callback, value); + writeSwitchActionsAttribute(chipClusterPtr, callback, value, null); + } + + public void writeSwitchActionsAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeSwitchActionsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeSwitchActionsAttribute( @@ -7682,7 +9460,10 @@ private native void readSwitchActionsAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeSwitchActionsAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeSwitchActionsAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -7716,42 +9497,115 @@ public void addNOC( byte[] IPKValue, Long caseAdminNode, Integer adminVendorId) { - addNOC(chipClusterPtr, callback, NOCValue, ICACValue, IPKValue, caseAdminNode, adminVendorId); + addNOC( + chipClusterPtr, + callback, + NOCValue, + ICACValue, + IPKValue, + caseAdminNode, + adminVendorId, + null); + } + + public void addNOC( + NOCResponseCallback callback, + byte[] NOCValue, + Optional ICACValue, + byte[] IPKValue, + Long caseAdminNode, + Integer adminVendorId, + int timedInvokeTimeoutMs) { + addNOC( + chipClusterPtr, + callback, + NOCValue, + ICACValue, + IPKValue, + caseAdminNode, + adminVendorId, + timedInvokeTimeoutMs); } public void addTrustedRootCertificate(DefaultClusterCallback callback, byte[] rootCertificate) { - addTrustedRootCertificate(chipClusterPtr, callback, rootCertificate); + addTrustedRootCertificate(chipClusterPtr, callback, rootCertificate, null); + } + + public void addTrustedRootCertificate( + DefaultClusterCallback callback, byte[] rootCertificate, int timedInvokeTimeoutMs) { + addTrustedRootCertificate(chipClusterPtr, callback, rootCertificate, timedInvokeTimeoutMs); } public void attestationRequest(AttestationResponseCallback callback, byte[] attestationNonce) { - attestationRequest(chipClusterPtr, callback, attestationNonce); + attestationRequest(chipClusterPtr, callback, attestationNonce, null); + } + + public void attestationRequest( + AttestationResponseCallback callback, byte[] attestationNonce, int timedInvokeTimeoutMs) { + attestationRequest(chipClusterPtr, callback, attestationNonce, timedInvokeTimeoutMs); } public void certificateChainRequest( CertificateChainResponseCallback callback, Integer certificateType) { - certificateChainRequest(chipClusterPtr, callback, certificateType); + certificateChainRequest(chipClusterPtr, callback, certificateType, null); + } + + public void certificateChainRequest( + CertificateChainResponseCallback callback, + Integer certificateType, + int timedInvokeTimeoutMs) { + certificateChainRequest(chipClusterPtr, callback, certificateType, timedInvokeTimeoutMs); } public void opCSRRequest(OpCSRResponseCallback callback, byte[] CSRNonce) { - opCSRRequest(chipClusterPtr, callback, CSRNonce); + opCSRRequest(chipClusterPtr, callback, CSRNonce, null); + } + + public void opCSRRequest( + OpCSRResponseCallback callback, byte[] CSRNonce, int timedInvokeTimeoutMs) { + opCSRRequest(chipClusterPtr, callback, CSRNonce, timedInvokeTimeoutMs); } public void removeFabric(NOCResponseCallback callback, Integer fabricIndex) { - removeFabric(chipClusterPtr, callback, fabricIndex); + removeFabric(chipClusterPtr, callback, fabricIndex, null); + } + + public void removeFabric( + NOCResponseCallback callback, Integer fabricIndex, int timedInvokeTimeoutMs) { + removeFabric(chipClusterPtr, callback, fabricIndex, timedInvokeTimeoutMs); } public void removeTrustedRootCertificate( DefaultClusterCallback callback, byte[] trustedRootIdentifier) { - removeTrustedRootCertificate(chipClusterPtr, callback, trustedRootIdentifier); + removeTrustedRootCertificate(chipClusterPtr, callback, trustedRootIdentifier, null); + } + + public void removeTrustedRootCertificate( + DefaultClusterCallback callback, byte[] trustedRootIdentifier, int timedInvokeTimeoutMs) { + removeTrustedRootCertificate( + chipClusterPtr, callback, trustedRootIdentifier, timedInvokeTimeoutMs); } public void updateFabricLabel(NOCResponseCallback callback, String label) { - updateFabricLabel(chipClusterPtr, callback, label); + updateFabricLabel(chipClusterPtr, callback, label, null); + } + + public void updateFabricLabel( + NOCResponseCallback callback, String label, int timedInvokeTimeoutMs) { + updateFabricLabel(chipClusterPtr, callback, label, timedInvokeTimeoutMs); } public void updateNOC( NOCResponseCallback callback, byte[] NOCValue, Optional ICACValue) { - updateNOC(chipClusterPtr, callback, NOCValue, ICACValue); + updateNOC(chipClusterPtr, callback, NOCValue, ICACValue, null); + } + + public void updateNOC( + NOCResponseCallback callback, + byte[] NOCValue, + Optional ICACValue, + int timedInvokeTimeoutMs) { + updateNOC(chipClusterPtr, callback, NOCValue, ICACValue, timedInvokeTimeoutMs); } private native void addNOC( @@ -7761,34 +9615,57 @@ private native void addNOC( Optional ICACValue, byte[] IPKValue, Long caseAdminNode, - Integer adminVendorId); + Integer adminVendorId, + @Nullable Integer timedInvokeTimeoutMs); private native void addTrustedRootCertificate( - long chipClusterPtr, DefaultClusterCallback Callback, byte[] rootCertificate); + long chipClusterPtr, + DefaultClusterCallback Callback, + byte[] rootCertificate, + @Nullable Integer timedInvokeTimeoutMs); private native void attestationRequest( - long chipClusterPtr, AttestationResponseCallback Callback, byte[] attestationNonce); + long chipClusterPtr, + AttestationResponseCallback Callback, + byte[] attestationNonce, + @Nullable Integer timedInvokeTimeoutMs); private native void certificateChainRequest( - long chipClusterPtr, CertificateChainResponseCallback Callback, Integer certificateType); + long chipClusterPtr, + CertificateChainResponseCallback Callback, + Integer certificateType, + @Nullable Integer timedInvokeTimeoutMs); private native void opCSRRequest( - long chipClusterPtr, OpCSRResponseCallback Callback, byte[] CSRNonce); + long chipClusterPtr, + OpCSRResponseCallback Callback, + byte[] CSRNonce, + @Nullable Integer timedInvokeTimeoutMs); private native void removeFabric( - long chipClusterPtr, NOCResponseCallback Callback, Integer fabricIndex); + long chipClusterPtr, + NOCResponseCallback Callback, + Integer fabricIndex, + @Nullable Integer timedInvokeTimeoutMs); private native void removeTrustedRootCertificate( - long chipClusterPtr, DefaultClusterCallback Callback, byte[] trustedRootIdentifier); + long chipClusterPtr, + DefaultClusterCallback Callback, + byte[] trustedRootIdentifier, + @Nullable Integer timedInvokeTimeoutMs); private native void updateFabricLabel( - long chipClusterPtr, NOCResponseCallback Callback, String label); + long chipClusterPtr, + NOCResponseCallback Callback, + String label, + @Nullable Integer timedInvokeTimeoutMs); private native void updateNOC( long chipClusterPtr, NOCResponseCallback Callback, byte[] NOCValue, - Optional ICACValue); + Optional ICACValue, + @Nullable Integer timedInvokeTimeoutMs); public interface AttestationResponseCallback { void onSuccess(byte[] AttestationElements, byte[] Signature); @@ -8522,7 +10399,12 @@ public void readLifetimeRunningHoursAttribute(LifetimeRunningHoursAttributeCallb public void writeLifetimeRunningHoursAttribute( DefaultClusterCallback callback, @Nullable Long value) { - writeLifetimeRunningHoursAttribute(chipClusterPtr, callback, value); + writeLifetimeRunningHoursAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLifetimeRunningHoursAttribute( + DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + writeLifetimeRunningHoursAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeLifetimeRunningHoursAttribute( @@ -8546,7 +10428,12 @@ public void readLifetimeEnergyConsumedAttribute( public void writeLifetimeEnergyConsumedAttribute( DefaultClusterCallback callback, @Nullable Long value) { - writeLifetimeEnergyConsumedAttribute(chipClusterPtr, callback, value); + writeLifetimeEnergyConsumedAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLifetimeEnergyConsumedAttribute( + DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + writeLifetimeEnergyConsumedAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeLifetimeEnergyConsumedAttribute( @@ -8559,7 +10446,12 @@ public void readOperationModeAttribute(IntegerAttributeCallback callback) { } public void writeOperationModeAttribute(DefaultClusterCallback callback, Integer value) { - writeOperationModeAttribute(chipClusterPtr, callback, value); + writeOperationModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOperationModeAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOperationModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeOperationModeAttribute( @@ -8572,7 +10464,12 @@ public void readControlModeAttribute(IntegerAttributeCallback callback) { } public void writeControlModeAttribute(DefaultClusterCallback callback, Integer value) { - writeControlModeAttribute(chipClusterPtr, callback, value); + writeControlModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeControlModeAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeControlModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeControlModeAttribute( @@ -8722,7 +10619,10 @@ private native void readLifetimeRunningHoursAttribute( long chipClusterPtr, LifetimeRunningHoursAttributeCallback callback); private native void writeLifetimeRunningHoursAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeLifetimeRunningHoursAttribute( long chipClusterPtr, @@ -8739,7 +10639,10 @@ private native void readLifetimeEnergyConsumedAttribute( long chipClusterPtr, LifetimeEnergyConsumedAttributeCallback callback); private native void writeLifetimeEnergyConsumedAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeLifetimeEnergyConsumedAttribute( long chipClusterPtr, @@ -8751,7 +10654,10 @@ private native void readOperationModeAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeOperationModeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeOperationModeAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -8760,7 +10666,10 @@ private native void readControlModeAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeControlModeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeControlModeAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -8920,33 +10829,100 @@ public void addScene( sceneName, clusterId, length, - value); + value, + null); + } + + public void addScene( + AddSceneResponseCallback callback, + Integer groupId, + Integer sceneId, + Integer transitionTime, + String sceneName, + Long clusterId, + Integer length, + Integer value, + int timedInvokeTimeoutMs) { + addScene( + chipClusterPtr, + callback, + groupId, + sceneId, + transitionTime, + sceneName, + clusterId, + length, + value, + timedInvokeTimeoutMs); } public void getSceneMembership(GetSceneMembershipResponseCallback callback, Integer groupId) { - getSceneMembership(chipClusterPtr, callback, groupId); + getSceneMembership(chipClusterPtr, callback, groupId, null); + } + + public void getSceneMembership( + GetSceneMembershipResponseCallback callback, Integer groupId, int timedInvokeTimeoutMs) { + getSceneMembership(chipClusterPtr, callback, groupId, timedInvokeTimeoutMs); } public void recallScene( DefaultClusterCallback callback, Integer groupId, Integer sceneId, Integer transitionTime) { - recallScene(chipClusterPtr, callback, groupId, sceneId, transitionTime); + recallScene(chipClusterPtr, callback, groupId, sceneId, transitionTime, null); + } + + public void recallScene( + DefaultClusterCallback callback, + Integer groupId, + Integer sceneId, + Integer transitionTime, + int timedInvokeTimeoutMs) { + recallScene(chipClusterPtr, callback, groupId, sceneId, transitionTime, timedInvokeTimeoutMs); } public void removeAllScenes(RemoveAllScenesResponseCallback callback, Integer groupId) { - removeAllScenes(chipClusterPtr, callback, groupId); + removeAllScenes(chipClusterPtr, callback, groupId, null); + } + + public void removeAllScenes( + RemoveAllScenesResponseCallback callback, Integer groupId, int timedInvokeTimeoutMs) { + removeAllScenes(chipClusterPtr, callback, groupId, timedInvokeTimeoutMs); } public void removeScene( RemoveSceneResponseCallback callback, Integer groupId, Integer sceneId) { - removeScene(chipClusterPtr, callback, groupId, sceneId); + removeScene(chipClusterPtr, callback, groupId, sceneId, null); + } + + public void removeScene( + RemoveSceneResponseCallback callback, + Integer groupId, + Integer sceneId, + int timedInvokeTimeoutMs) { + removeScene(chipClusterPtr, callback, groupId, sceneId, timedInvokeTimeoutMs); } public void storeScene(StoreSceneResponseCallback callback, Integer groupId, Integer sceneId) { - storeScene(chipClusterPtr, callback, groupId, sceneId); + storeScene(chipClusterPtr, callback, groupId, sceneId, null); + } + + public void storeScene( + StoreSceneResponseCallback callback, + Integer groupId, + Integer sceneId, + int timedInvokeTimeoutMs) { + storeScene(chipClusterPtr, callback, groupId, sceneId, timedInvokeTimeoutMs); } public void viewScene(ViewSceneResponseCallback callback, Integer groupId, Integer sceneId) { - viewScene(chipClusterPtr, callback, groupId, sceneId); + viewScene(chipClusterPtr, callback, groupId, sceneId, null); + } + + public void viewScene( + ViewSceneResponseCallback callback, + Integer groupId, + Integer sceneId, + int timedInvokeTimeoutMs) { + viewScene(chipClusterPtr, callback, groupId, sceneId, timedInvokeTimeoutMs); } private native void addScene( @@ -8958,32 +10934,49 @@ private native void addScene( String sceneName, Long clusterId, Integer length, - Integer value); + Integer value, + @Nullable Integer timedInvokeTimeoutMs); private native void getSceneMembership( - long chipClusterPtr, GetSceneMembershipResponseCallback Callback, Integer groupId); + long chipClusterPtr, + GetSceneMembershipResponseCallback Callback, + Integer groupId, + @Nullable Integer timedInvokeTimeoutMs); private native void recallScene( long chipClusterPtr, DefaultClusterCallback Callback, Integer groupId, Integer sceneId, - Integer transitionTime); + Integer transitionTime, + @Nullable Integer timedInvokeTimeoutMs); private native void removeAllScenes( - long chipClusterPtr, RemoveAllScenesResponseCallback Callback, Integer groupId); + long chipClusterPtr, + RemoveAllScenesResponseCallback Callback, + Integer groupId, + @Nullable Integer timedInvokeTimeoutMs); private native void removeScene( long chipClusterPtr, RemoveSceneResponseCallback Callback, Integer groupId, - Integer sceneId); + Integer sceneId, + @Nullable Integer timedInvokeTimeoutMs); private native void storeScene( - long chipClusterPtr, StoreSceneResponseCallback Callback, Integer groupId, Integer sceneId); + long chipClusterPtr, + StoreSceneResponseCallback Callback, + Integer groupId, + Integer sceneId, + @Nullable Integer timedInvokeTimeoutMs); private native void viewScene( - long chipClusterPtr, ViewSceneResponseCallback Callback, Integer groupId, Integer sceneId); + long chipClusterPtr, + ViewSceneResponseCallback Callback, + Integer groupId, + Integer sceneId, + @Nullable Integer timedInvokeTimeoutMs); public interface AddSceneResponseCallback { void onSuccess(Integer status, Integer groupId, Integer sceneId); @@ -9147,10 +11140,17 @@ public static long clusterId() { public native long initWithDevice(long devicePtr, int endpointId); public void resetWatermarks(DefaultClusterCallback callback) { - resetWatermarks(chipClusterPtr, callback); + resetWatermarks(chipClusterPtr, callback, null); } - private native void resetWatermarks(long chipClusterPtr, DefaultClusterCallback Callback); + public void resetWatermarks(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + resetWatermarks(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + private native void resetWatermarks( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); public static class ThreadMetricsAttribute { public Long id; @@ -9411,11 +11411,23 @@ public static long clusterId() { public void navigateTargetRequest( NavigateTargetResponseCallback callback, Integer target, String data) { - navigateTargetRequest(chipClusterPtr, callback, target, data); + navigateTargetRequest(chipClusterPtr, callback, target, data, null); + } + + public void navigateTargetRequest( + NavigateTargetResponseCallback callback, + Integer target, + String data, + int timedInvokeTimeoutMs) { + navigateTargetRequest(chipClusterPtr, callback, target, data, timedInvokeTimeoutMs); } private native void navigateTargetRequest( - long chipClusterPtr, NavigateTargetResponseCallback Callback, Integer target, String data); + long chipClusterPtr, + NavigateTargetResponseCallback Callback, + Integer target, + String data, + @Nullable Integer timedInvokeTimeoutMs); public interface NavigateTargetResponseCallback { void onSuccess(Integer status, String data); @@ -9633,34 +11645,101 @@ public void simpleStructEchoRequest( Integer f, Float g, Double h) { - simpleStructEchoRequest(chipClusterPtr, callback, a, b, c, d, e, f, g, h); + simpleStructEchoRequest(chipClusterPtr, callback, a, b, c, d, e, f, g, h, null); + } + + public void simpleStructEchoRequest( + SimpleStructResponseCallback callback, + Integer a, + Boolean b, + Integer c, + byte[] d, + String e, + Integer f, + Float g, + Double h, + int timedInvokeTimeoutMs) { + simpleStructEchoRequest( + chipClusterPtr, callback, a, b, c, d, e, f, g, h, timedInvokeTimeoutMs); } public void test(DefaultClusterCallback callback) { - test(chipClusterPtr, callback); + test(chipClusterPtr, callback, null); + } + + public void test(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + test(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void testAddArguments( TestAddArgumentsResponseCallback callback, Integer arg1, Integer arg2) { - testAddArguments(chipClusterPtr, callback, arg1, arg2); + testAddArguments(chipClusterPtr, callback, arg1, arg2, null); + } + + public void testAddArguments( + TestAddArgumentsResponseCallback callback, + Integer arg1, + Integer arg2, + int timedInvokeTimeoutMs) { + testAddArguments(chipClusterPtr, callback, arg1, arg2, timedInvokeTimeoutMs); } public void testEnumsRequest(TestEnumsResponseCallback callback, Integer arg1, Integer arg2) { - testEnumsRequest(chipClusterPtr, callback, arg1, arg2); + testEnumsRequest(chipClusterPtr, callback, arg1, arg2, null); + } + + public void testEnumsRequest( + TestEnumsResponseCallback callback, Integer arg1, Integer arg2, int timedInvokeTimeoutMs) { + testEnumsRequest(chipClusterPtr, callback, arg1, arg2, timedInvokeTimeoutMs); } public void testListInt8UArgumentRequest(BooleanResponseCallback callback, Integer arg1) { - testListInt8UArgumentRequest(chipClusterPtr, callback, arg1); + testListInt8UArgumentRequest(chipClusterPtr, callback, arg1, null); + } + + public void testListInt8UArgumentRequest( + BooleanResponseCallback callback, Integer arg1, int timedInvokeTimeoutMs) { + testListInt8UArgumentRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); } public void testListInt8UReverseRequest( TestListInt8UReverseResponseCallback callback, Integer arg1) { - testListInt8UReverseRequest(chipClusterPtr, callback, arg1); + testListInt8UReverseRequest(chipClusterPtr, callback, arg1, null); + } + + public void testListInt8UReverseRequest( + TestListInt8UReverseResponseCallback callback, Integer arg1, int timedInvokeTimeoutMs) { + testListInt8UReverseRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); + } + + public void testListNestedStructListArgumentRequest( + BooleanResponseCallback callback, Integer a, Boolean b, Long e, byte[] f, Integer g) { + testListNestedStructListArgumentRequest(chipClusterPtr, callback, a, b, e, f, g, null); + } + + public void testListNestedStructListArgumentRequest( + BooleanResponseCallback callback, + Integer a, + Boolean b, + Long e, + byte[] f, + Integer g, + int timedInvokeTimeoutMs) { + testListNestedStructListArgumentRequest( + chipClusterPtr, callback, a, b, e, f, g, timedInvokeTimeoutMs); } - public void testListNestedStructListArgumentRequest( - BooleanResponseCallback callback, Integer a, Boolean b, Long e, byte[] f, Integer g) { - testListNestedStructListArgumentRequest(chipClusterPtr, callback, a, b, e, f, g); + public void testListStructArgumentRequest( + BooleanResponseCallback callback, + Integer a, + Boolean b, + Integer c, + byte[] d, + String e, + Integer f, + Float g, + Double h) { + testListStructArgumentRequest(chipClusterPtr, callback, a, b, c, d, e, f, g, h, null); } public void testListStructArgumentRequest( @@ -9672,36 +11751,75 @@ public void testListStructArgumentRequest( String e, Integer f, Float g, - Double h) { - testListStructArgumentRequest(chipClusterPtr, callback, a, b, c, d, e, f, g, h); + Double h, + int timedInvokeTimeoutMs) { + testListStructArgumentRequest( + chipClusterPtr, callback, a, b, c, d, e, f, g, h, timedInvokeTimeoutMs); } public void testNestedStructArgumentRequest( BooleanResponseCallback callback, Integer a, Boolean b) { - testNestedStructArgumentRequest(chipClusterPtr, callback, a, b); + testNestedStructArgumentRequest(chipClusterPtr, callback, a, b, null); + } + + public void testNestedStructArgumentRequest( + BooleanResponseCallback callback, Integer a, Boolean b, int timedInvokeTimeoutMs) { + testNestedStructArgumentRequest(chipClusterPtr, callback, a, b, timedInvokeTimeoutMs); } public void testNestedStructListArgumentRequest( BooleanResponseCallback callback, Integer a, Boolean b, Long e, byte[] f, Integer g) { - testNestedStructListArgumentRequest(chipClusterPtr, callback, a, b, e, f, g); + testNestedStructListArgumentRequest(chipClusterPtr, callback, a, b, e, f, g, null); + } + + public void testNestedStructListArgumentRequest( + BooleanResponseCallback callback, + Integer a, + Boolean b, + Long e, + byte[] f, + Integer g, + int timedInvokeTimeoutMs) { + testNestedStructListArgumentRequest( + chipClusterPtr, callback, a, b, e, f, g, timedInvokeTimeoutMs); } public void testNotHandled(DefaultClusterCallback callback) { - testNotHandled(chipClusterPtr, callback); + testNotHandled(chipClusterPtr, callback, null); + } + + public void testNotHandled(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + testNotHandled(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void testNullableOptionalRequest( TestNullableOptionalResponseCallback callback, Optional arg1) { - testNullableOptionalRequest(chipClusterPtr, callback, arg1); + testNullableOptionalRequest(chipClusterPtr, callback, arg1, null); + } + + public void testNullableOptionalRequest( + TestNullableOptionalResponseCallback callback, + Optional arg1, + int timedInvokeTimeoutMs) { + testNullableOptionalRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); } public void testSimpleOptionalArgumentRequest( DefaultClusterCallback callback, Optional arg1) { - testSimpleOptionalArgumentRequest(chipClusterPtr, callback, arg1); + testSimpleOptionalArgumentRequest(chipClusterPtr, callback, arg1, null); + } + + public void testSimpleOptionalArgumentRequest( + DefaultClusterCallback callback, Optional arg1, int timedInvokeTimeoutMs) { + testSimpleOptionalArgumentRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); } public void testSpecific(TestSpecificResponseCallback callback) { - testSpecific(chipClusterPtr, callback); + testSpecific(chipClusterPtr, callback, null); + } + + public void testSpecific(TestSpecificResponseCallback callback, int timedInvokeTimeoutMs) { + testSpecific(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void testStructArgumentRequest( @@ -9714,15 +11832,34 @@ public void testStructArgumentRequest( Integer f, Float g, Double h) { - testStructArgumentRequest(chipClusterPtr, callback, a, b, c, d, e, f, g, h); + testStructArgumentRequest(chipClusterPtr, callback, a, b, c, d, e, f, g, h, null); + } + + public void testStructArgumentRequest( + BooleanResponseCallback callback, + Integer a, + Boolean b, + Integer c, + byte[] d, + String e, + Integer f, + Float g, + Double h, + int timedInvokeTimeoutMs) { + testStructArgumentRequest( + chipClusterPtr, callback, a, b, c, d, e, f, g, h, timedInvokeTimeoutMs); } public void testUnknownCommand(DefaultClusterCallback callback) { - testUnknownCommand(chipClusterPtr, callback); + testUnknownCommand(chipClusterPtr, callback, null); + } + + public void testUnknownCommand(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + testUnknownCommand(chipClusterPtr, callback, timedInvokeTimeoutMs); } - public void timedInvokeRequest(DefaultClusterCallback callback) { - timedInvokeRequest(chipClusterPtr, callback); + public void timedInvokeRequest(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + timedInvokeRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } private native void simpleStructEchoRequest( @@ -9735,21 +11872,39 @@ private native void simpleStructEchoRequest( String e, Integer f, Float g, - Double h); + Double h, + @Nullable Integer timedInvokeTimeoutMs); - private native void test(long chipClusterPtr, DefaultClusterCallback Callback); + private native void test( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); private native void testAddArguments( - long chipClusterPtr, TestAddArgumentsResponseCallback Callback, Integer arg1, Integer arg2); + long chipClusterPtr, + TestAddArgumentsResponseCallback Callback, + Integer arg1, + Integer arg2, + @Nullable Integer timedInvokeTimeoutMs); private native void testEnumsRequest( - long chipClusterPtr, TestEnumsResponseCallback Callback, Integer arg1, Integer arg2); + long chipClusterPtr, + TestEnumsResponseCallback Callback, + Integer arg1, + Integer arg2, + @Nullable Integer timedInvokeTimeoutMs); private native void testListInt8UArgumentRequest( - long chipClusterPtr, BooleanResponseCallback Callback, Integer arg1); + long chipClusterPtr, + BooleanResponseCallback Callback, + Integer arg1, + @Nullable Integer timedInvokeTimeoutMs); private native void testListInt8UReverseRequest( - long chipClusterPtr, TestListInt8UReverseResponseCallback Callback, Integer arg1); + long chipClusterPtr, + TestListInt8UReverseResponseCallback Callback, + Integer arg1, + @Nullable Integer timedInvokeTimeoutMs); private native void testListNestedStructListArgumentRequest( long chipClusterPtr, @@ -9758,7 +11913,8 @@ private native void testListNestedStructListArgumentRequest( Boolean b, Long e, byte[] f, - Integer g); + Integer g, + @Nullable Integer timedInvokeTimeoutMs); private native void testListStructArgumentRequest( long chipClusterPtr, @@ -9770,10 +11926,15 @@ private native void testListStructArgumentRequest( String e, Integer f, Float g, - Double h); + Double h, + @Nullable Integer timedInvokeTimeoutMs); private native void testNestedStructArgumentRequest( - long chipClusterPtr, BooleanResponseCallback Callback, Integer a, Boolean b); + long chipClusterPtr, + BooleanResponseCallback Callback, + Integer a, + Boolean b, + @Nullable Integer timedInvokeTimeoutMs); private native void testNestedStructListArgumentRequest( long chipClusterPtr, @@ -9782,17 +11943,30 @@ private native void testNestedStructListArgumentRequest( Boolean b, Long e, byte[] f, - Integer g); + Integer g, + @Nullable Integer timedInvokeTimeoutMs); - private native void testNotHandled(long chipClusterPtr, DefaultClusterCallback Callback); + private native void testNotHandled( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); private native void testNullableOptionalRequest( - long chipClusterPtr, TestNullableOptionalResponseCallback Callback, Optional arg1); + long chipClusterPtr, + TestNullableOptionalResponseCallback Callback, + Optional arg1, + @Nullable Integer timedInvokeTimeoutMs); private native void testSimpleOptionalArgumentRequest( - long chipClusterPtr, DefaultClusterCallback Callback, Optional arg1); + long chipClusterPtr, + DefaultClusterCallback Callback, + Optional arg1, + @Nullable Integer timedInvokeTimeoutMs); - private native void testSpecific(long chipClusterPtr, TestSpecificResponseCallback Callback); + private native void testSpecific( + long chipClusterPtr, + TestSpecificResponseCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); private native void testStructArgumentRequest( long chipClusterPtr, @@ -9804,11 +11978,18 @@ private native void testStructArgumentRequest( String e, Integer f, Float g, - Double h); + Double h, + @Nullable Integer timedInvokeTimeoutMs); - private native void testUnknownCommand(long chipClusterPtr, DefaultClusterCallback Callback); + private native void testUnknownCommand( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); - private native void timedInvokeRequest(long chipClusterPtr, DefaultClusterCallback Callback); + private native void timedInvokeRequest( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); public interface BooleanResponseCallback { void onSuccess(Boolean value); @@ -10232,7 +12413,12 @@ public void readBooleanAttribute(BooleanAttributeCallback callback) { } public void writeBooleanAttribute(DefaultClusterCallback callback, Boolean value) { - writeBooleanAttribute(chipClusterPtr, callback, value); + writeBooleanAttribute(chipClusterPtr, callback, value, null); + } + + public void writeBooleanAttribute( + DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writeBooleanAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeBooleanAttribute( @@ -10245,7 +12431,12 @@ public void readBitmap8Attribute(IntegerAttributeCallback callback) { } public void writeBitmap8Attribute(DefaultClusterCallback callback, Integer value) { - writeBitmap8Attribute(chipClusterPtr, callback, value); + writeBitmap8Attribute(chipClusterPtr, callback, value, null); + } + + public void writeBitmap8Attribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeBitmap8Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeBitmap8Attribute( @@ -10258,7 +12449,12 @@ public void readBitmap16Attribute(IntegerAttributeCallback callback) { } public void writeBitmap16Attribute(DefaultClusterCallback callback, Integer value) { - writeBitmap16Attribute(chipClusterPtr, callback, value); + writeBitmap16Attribute(chipClusterPtr, callback, value, null); + } + + public void writeBitmap16Attribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeBitmap16Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeBitmap16Attribute( @@ -10271,7 +12467,12 @@ public void readBitmap32Attribute(LongAttributeCallback callback) { } public void writeBitmap32Attribute(DefaultClusterCallback callback, Long value) { - writeBitmap32Attribute(chipClusterPtr, callback, value); + writeBitmap32Attribute(chipClusterPtr, callback, value, null); + } + + public void writeBitmap32Attribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeBitmap32Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeBitmap32Attribute( @@ -10284,7 +12485,12 @@ public void readBitmap64Attribute(LongAttributeCallback callback) { } public void writeBitmap64Attribute(DefaultClusterCallback callback, Long value) { - writeBitmap64Attribute(chipClusterPtr, callback, value); + writeBitmap64Attribute(chipClusterPtr, callback, value, null); + } + + public void writeBitmap64Attribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeBitmap64Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeBitmap64Attribute( @@ -10297,7 +12503,12 @@ public void readInt8uAttribute(IntegerAttributeCallback callback) { } public void writeInt8uAttribute(DefaultClusterCallback callback, Integer value) { - writeInt8uAttribute(chipClusterPtr, callback, value); + writeInt8uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt8uAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeInt8uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeInt8uAttribute( @@ -10310,7 +12521,12 @@ public void readInt16uAttribute(IntegerAttributeCallback callback) { } public void writeInt16uAttribute(DefaultClusterCallback callback, Integer value) { - writeInt16uAttribute(chipClusterPtr, callback, value); + writeInt16uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt16uAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeInt16uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeInt16uAttribute( @@ -10323,7 +12539,12 @@ public void readInt24uAttribute(LongAttributeCallback callback) { } public void writeInt24uAttribute(DefaultClusterCallback callback, Long value) { - writeInt24uAttribute(chipClusterPtr, callback, value); + writeInt24uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt24uAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt24uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeInt24uAttribute( @@ -10336,7 +12557,12 @@ public void readInt32uAttribute(LongAttributeCallback callback) { } public void writeInt32uAttribute(DefaultClusterCallback callback, Long value) { - writeInt32uAttribute(chipClusterPtr, callback, value); + writeInt32uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt32uAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt32uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeInt32uAttribute( @@ -10349,7 +12575,12 @@ public void readInt40uAttribute(LongAttributeCallback callback) { } public void writeInt40uAttribute(DefaultClusterCallback callback, Long value) { - writeInt40uAttribute(chipClusterPtr, callback, value); + writeInt40uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt40uAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt40uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeInt40uAttribute( @@ -10362,7 +12593,12 @@ public void readInt48uAttribute(LongAttributeCallback callback) { } public void writeInt48uAttribute(DefaultClusterCallback callback, Long value) { - writeInt48uAttribute(chipClusterPtr, callback, value); + writeInt48uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt48uAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt48uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeInt48uAttribute( @@ -10375,7 +12611,12 @@ public void readInt56uAttribute(LongAttributeCallback callback) { } public void writeInt56uAttribute(DefaultClusterCallback callback, Long value) { - writeInt56uAttribute(chipClusterPtr, callback, value); + writeInt56uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt56uAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt56uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeInt56uAttribute( @@ -10388,7 +12629,12 @@ public void readInt64uAttribute(LongAttributeCallback callback) { } public void writeInt64uAttribute(DefaultClusterCallback callback, Long value) { - writeInt64uAttribute(chipClusterPtr, callback, value); + writeInt64uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt64uAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt64uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeInt64uAttribute( @@ -10401,7 +12647,12 @@ public void readInt8sAttribute(IntegerAttributeCallback callback) { } public void writeInt8sAttribute(DefaultClusterCallback callback, Integer value) { - writeInt8sAttribute(chipClusterPtr, callback, value); + writeInt8sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt8sAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeInt8sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeInt8sAttribute( @@ -10414,7 +12665,12 @@ public void readInt16sAttribute(IntegerAttributeCallback callback) { } public void writeInt16sAttribute(DefaultClusterCallback callback, Integer value) { - writeInt16sAttribute(chipClusterPtr, callback, value); + writeInt16sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt16sAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeInt16sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeInt16sAttribute( @@ -10427,7 +12683,12 @@ public void readInt24sAttribute(LongAttributeCallback callback) { } public void writeInt24sAttribute(DefaultClusterCallback callback, Long value) { - writeInt24sAttribute(chipClusterPtr, callback, value); + writeInt24sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt24sAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt24sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeInt24sAttribute( @@ -10440,7 +12701,12 @@ public void readInt32sAttribute(LongAttributeCallback callback) { } public void writeInt32sAttribute(DefaultClusterCallback callback, Long value) { - writeInt32sAttribute(chipClusterPtr, callback, value); + writeInt32sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt32sAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt32sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeInt32sAttribute( @@ -10453,7 +12719,12 @@ public void readInt40sAttribute(LongAttributeCallback callback) { } public void writeInt40sAttribute(DefaultClusterCallback callback, Long value) { - writeInt40sAttribute(chipClusterPtr, callback, value); + writeInt40sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt40sAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt40sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeInt40sAttribute( @@ -10466,7 +12737,12 @@ public void readInt48sAttribute(LongAttributeCallback callback) { } public void writeInt48sAttribute(DefaultClusterCallback callback, Long value) { - writeInt48sAttribute(chipClusterPtr, callback, value); + writeInt48sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt48sAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt48sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeInt48sAttribute( @@ -10479,7 +12755,12 @@ public void readInt56sAttribute(LongAttributeCallback callback) { } public void writeInt56sAttribute(DefaultClusterCallback callback, Long value) { - writeInt56sAttribute(chipClusterPtr, callback, value); + writeInt56sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt56sAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt56sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeInt56sAttribute( @@ -10492,7 +12773,12 @@ public void readInt64sAttribute(LongAttributeCallback callback) { } public void writeInt64sAttribute(DefaultClusterCallback callback, Long value) { - writeInt64sAttribute(chipClusterPtr, callback, value); + writeInt64sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt64sAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt64sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeInt64sAttribute( @@ -10505,7 +12791,12 @@ public void readEnum8Attribute(IntegerAttributeCallback callback) { } public void writeEnum8Attribute(DefaultClusterCallback callback, Integer value) { - writeEnum8Attribute(chipClusterPtr, callback, value); + writeEnum8Attribute(chipClusterPtr, callback, value, null); + } + + public void writeEnum8Attribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeEnum8Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeEnum8Attribute( @@ -10518,7 +12809,12 @@ public void readEnum16Attribute(IntegerAttributeCallback callback) { } public void writeEnum16Attribute(DefaultClusterCallback callback, Integer value) { - writeEnum16Attribute(chipClusterPtr, callback, value); + writeEnum16Attribute(chipClusterPtr, callback, value, null); + } + + public void writeEnum16Attribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeEnum16Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeEnum16Attribute( @@ -10531,7 +12827,12 @@ public void readFloatSingleAttribute(FloatAttributeCallback callback) { } public void writeFloatSingleAttribute(DefaultClusterCallback callback, Float value) { - writeFloatSingleAttribute(chipClusterPtr, callback, value); + writeFloatSingleAttribute(chipClusterPtr, callback, value, null); + } + + public void writeFloatSingleAttribute( + DefaultClusterCallback callback, Float value, int timedWriteTimeoutMs) { + writeFloatSingleAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeFloatSingleAttribute( @@ -10544,7 +12845,12 @@ public void readFloatDoubleAttribute(DoubleAttributeCallback callback) { } public void writeFloatDoubleAttribute(DefaultClusterCallback callback, Double value) { - writeFloatDoubleAttribute(chipClusterPtr, callback, value); + writeFloatDoubleAttribute(chipClusterPtr, callback, value, null); + } + + public void writeFloatDoubleAttribute( + DefaultClusterCallback callback, Double value, int timedWriteTimeoutMs) { + writeFloatDoubleAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeFloatDoubleAttribute( @@ -10557,7 +12863,12 @@ public void readOctetStringAttribute(OctetStringAttributeCallback callback) { } public void writeOctetStringAttribute(DefaultClusterCallback callback, byte[] value) { - writeOctetStringAttribute(chipClusterPtr, callback, value); + writeOctetStringAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOctetStringAttribute( + DefaultClusterCallback callback, byte[] value, int timedWriteTimeoutMs) { + writeOctetStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeOctetStringAttribute( @@ -10583,7 +12894,12 @@ public void readLongOctetStringAttribute(OctetStringAttributeCallback callback) } public void writeLongOctetStringAttribute(DefaultClusterCallback callback, byte[] value) { - writeLongOctetStringAttribute(chipClusterPtr, callback, value); + writeLongOctetStringAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLongOctetStringAttribute( + DefaultClusterCallback callback, byte[] value, int timedWriteTimeoutMs) { + writeLongOctetStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeLongOctetStringAttribute( @@ -10596,7 +12912,12 @@ public void readCharStringAttribute(CharStringAttributeCallback callback) { } public void writeCharStringAttribute(DefaultClusterCallback callback, String value) { - writeCharStringAttribute(chipClusterPtr, callback, value); + writeCharStringAttribute(chipClusterPtr, callback, value, null); + } + + public void writeCharStringAttribute( + DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { + writeCharStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeCharStringAttribute( @@ -10609,7 +12930,12 @@ public void readLongCharStringAttribute(CharStringAttributeCallback callback) { } public void writeLongCharStringAttribute(DefaultClusterCallback callback, String value) { - writeLongCharStringAttribute(chipClusterPtr, callback, value); + writeLongCharStringAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLongCharStringAttribute( + DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { + writeLongCharStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeLongCharStringAttribute( @@ -10622,7 +12948,12 @@ public void readEpochUsAttribute(LongAttributeCallback callback) { } public void writeEpochUsAttribute(DefaultClusterCallback callback, Long value) { - writeEpochUsAttribute(chipClusterPtr, callback, value); + writeEpochUsAttribute(chipClusterPtr, callback, value, null); + } + + public void writeEpochUsAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeEpochUsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeEpochUsAttribute( @@ -10635,7 +12966,12 @@ public void readEpochSAttribute(LongAttributeCallback callback) { } public void writeEpochSAttribute(DefaultClusterCallback callback, Long value) { - writeEpochSAttribute(chipClusterPtr, callback, value); + writeEpochSAttribute(chipClusterPtr, callback, value, null); + } + + public void writeEpochSAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeEpochSAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeEpochSAttribute( @@ -10648,7 +12984,12 @@ public void readVendorIdAttribute(VendorIdAttributeCallback callback) { } public void writeVendorIdAttribute(DefaultClusterCallback callback, Integer value) { - writeVendorIdAttribute(chipClusterPtr, callback, value); + writeVendorIdAttribute(chipClusterPtr, callback, value, null); + } + + public void writeVendorIdAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeVendorIdAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeVendorIdAttribute( @@ -10666,7 +13007,12 @@ public void readEnumAttrAttribute(IntegerAttributeCallback callback) { } public void writeEnumAttrAttribute(DefaultClusterCallback callback, Integer value) { - writeEnumAttrAttribute(chipClusterPtr, callback, value); + writeEnumAttrAttribute(chipClusterPtr, callback, value, null); + } + + public void writeEnumAttrAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeEnumAttrAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeEnumAttrAttribute( @@ -10679,7 +13025,12 @@ public void readRangeRestrictedInt8uAttribute(IntegerAttributeCallback callback) } public void writeRangeRestrictedInt8uAttribute(DefaultClusterCallback callback, Integer value) { - writeRangeRestrictedInt8uAttribute(chipClusterPtr, callback, value); + writeRangeRestrictedInt8uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeRangeRestrictedInt8uAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeRangeRestrictedInt8uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeRangeRestrictedInt8uAttribute( @@ -10692,7 +13043,12 @@ public void readRangeRestrictedInt8sAttribute(IntegerAttributeCallback callback) } public void writeRangeRestrictedInt8sAttribute(DefaultClusterCallback callback, Integer value) { - writeRangeRestrictedInt8sAttribute(chipClusterPtr, callback, value); + writeRangeRestrictedInt8sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeRangeRestrictedInt8sAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeRangeRestrictedInt8sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeRangeRestrictedInt8sAttribute( @@ -10706,7 +13062,12 @@ public void readRangeRestrictedInt16uAttribute(IntegerAttributeCallback callback public void writeRangeRestrictedInt16uAttribute( DefaultClusterCallback callback, Integer value) { - writeRangeRestrictedInt16uAttribute(chipClusterPtr, callback, value); + writeRangeRestrictedInt16uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeRangeRestrictedInt16uAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeRangeRestrictedInt16uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeRangeRestrictedInt16uAttribute( @@ -10720,7 +13081,12 @@ public void readRangeRestrictedInt16sAttribute(IntegerAttributeCallback callback public void writeRangeRestrictedInt16sAttribute( DefaultClusterCallback callback, Integer value) { - writeRangeRestrictedInt16sAttribute(chipClusterPtr, callback, value); + writeRangeRestrictedInt16sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeRangeRestrictedInt16sAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeRangeRestrictedInt16sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeRangeRestrictedInt16sAttribute( @@ -10736,8 +13102,9 @@ public void readTimedWriteBooleanAttribute(BooleanAttributeCallback callback) { readTimedWriteBooleanAttribute(chipClusterPtr, callback); } - public void writeTimedWriteBooleanAttribute(DefaultClusterCallback callback, Boolean value) { - writeTimedWriteBooleanAttribute(chipClusterPtr, callback, value); + public void writeTimedWriteBooleanAttribute( + DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writeTimedWriteBooleanAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void readUnsupportedAttribute(BooleanAttributeCallback callback) { @@ -10745,7 +13112,12 @@ public void readUnsupportedAttribute(BooleanAttributeCallback callback) { } public void writeUnsupportedAttribute(DefaultClusterCallback callback, Boolean value) { - writeUnsupportedAttribute(chipClusterPtr, callback, value); + writeUnsupportedAttribute(chipClusterPtr, callback, value, null); + } + + public void writeUnsupportedAttribute( + DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writeUnsupportedAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeUnsupportedAttribute( @@ -10759,7 +13131,12 @@ public void readNullableBooleanAttribute(NullableBooleanAttributeCallback callba public void writeNullableBooleanAttribute( DefaultClusterCallback callback, @Nullable Boolean value) { - writeNullableBooleanAttribute(chipClusterPtr, callback, value); + writeNullableBooleanAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableBooleanAttribute( + DefaultClusterCallback callback, @Nullable Boolean value, int timedWriteTimeoutMs) { + writeNullableBooleanAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableBooleanAttribute( @@ -10773,7 +13150,12 @@ public void readNullableBitmap8Attribute(NullableBitmap8AttributeCallback callba public void writeNullableBitmap8Attribute( DefaultClusterCallback callback, @Nullable Integer value) { - writeNullableBitmap8Attribute(chipClusterPtr, callback, value); + writeNullableBitmap8Attribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableBitmap8Attribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeNullableBitmap8Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableBitmap8Attribute( @@ -10787,7 +13169,12 @@ public void readNullableBitmap16Attribute(NullableBitmap16AttributeCallback call public void writeNullableBitmap16Attribute( DefaultClusterCallback callback, @Nullable Integer value) { - writeNullableBitmap16Attribute(chipClusterPtr, callback, value); + writeNullableBitmap16Attribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableBitmap16Attribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeNullableBitmap16Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableBitmap16Attribute( @@ -10801,7 +13188,12 @@ public void readNullableBitmap32Attribute(NullableBitmap32AttributeCallback call public void writeNullableBitmap32Attribute( DefaultClusterCallback callback, @Nullable Long value) { - writeNullableBitmap32Attribute(chipClusterPtr, callback, value); + writeNullableBitmap32Attribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableBitmap32Attribute( + DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + writeNullableBitmap32Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableBitmap32Attribute( @@ -10815,7 +13207,12 @@ public void readNullableBitmap64Attribute(NullableBitmap64AttributeCallback call public void writeNullableBitmap64Attribute( DefaultClusterCallback callback, @Nullable Long value) { - writeNullableBitmap64Attribute(chipClusterPtr, callback, value); + writeNullableBitmap64Attribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableBitmap64Attribute( + DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + writeNullableBitmap64Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableBitmap64Attribute( @@ -10829,7 +13226,12 @@ public void readNullableInt8uAttribute(NullableInt8uAttributeCallback callback) public void writeNullableInt8uAttribute( DefaultClusterCallback callback, @Nullable Integer value) { - writeNullableInt8uAttribute(chipClusterPtr, callback, value); + writeNullableInt8uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt8uAttribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeNullableInt8uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableInt8uAttribute( @@ -10843,7 +13245,12 @@ public void readNullableInt16uAttribute(NullableInt16uAttributeCallback callback public void writeNullableInt16uAttribute( DefaultClusterCallback callback, @Nullable Integer value) { - writeNullableInt16uAttribute(chipClusterPtr, callback, value); + writeNullableInt16uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt16uAttribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeNullableInt16uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableInt16uAttribute( @@ -10857,7 +13264,12 @@ public void readNullableInt24uAttribute(NullableInt24uAttributeCallback callback public void writeNullableInt24uAttribute( DefaultClusterCallback callback, @Nullable Long value) { - writeNullableInt24uAttribute(chipClusterPtr, callback, value); + writeNullableInt24uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt24uAttribute( + DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + writeNullableInt24uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableInt24uAttribute( @@ -10871,7 +13283,12 @@ public void readNullableInt32uAttribute(NullableInt32uAttributeCallback callback public void writeNullableInt32uAttribute( DefaultClusterCallback callback, @Nullable Long value) { - writeNullableInt32uAttribute(chipClusterPtr, callback, value); + writeNullableInt32uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt32uAttribute( + DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + writeNullableInt32uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableInt32uAttribute( @@ -10885,7 +13302,12 @@ public void readNullableInt40uAttribute(NullableInt40uAttributeCallback callback public void writeNullableInt40uAttribute( DefaultClusterCallback callback, @Nullable Long value) { - writeNullableInt40uAttribute(chipClusterPtr, callback, value); + writeNullableInt40uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt40uAttribute( + DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + writeNullableInt40uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableInt40uAttribute( @@ -10899,7 +13321,12 @@ public void readNullableInt48uAttribute(NullableInt48uAttributeCallback callback public void writeNullableInt48uAttribute( DefaultClusterCallback callback, @Nullable Long value) { - writeNullableInt48uAttribute(chipClusterPtr, callback, value); + writeNullableInt48uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt48uAttribute( + DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + writeNullableInt48uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableInt48uAttribute( @@ -10913,7 +13340,12 @@ public void readNullableInt56uAttribute(NullableInt56uAttributeCallback callback public void writeNullableInt56uAttribute( DefaultClusterCallback callback, @Nullable Long value) { - writeNullableInt56uAttribute(chipClusterPtr, callback, value); + writeNullableInt56uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt56uAttribute( + DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + writeNullableInt56uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableInt56uAttribute( @@ -10927,7 +13359,12 @@ public void readNullableInt64uAttribute(NullableInt64uAttributeCallback callback public void writeNullableInt64uAttribute( DefaultClusterCallback callback, @Nullable Long value) { - writeNullableInt64uAttribute(chipClusterPtr, callback, value); + writeNullableInt64uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt64uAttribute( + DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + writeNullableInt64uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableInt64uAttribute( @@ -10941,7 +13378,12 @@ public void readNullableInt8sAttribute(NullableInt8sAttributeCallback callback) public void writeNullableInt8sAttribute( DefaultClusterCallback callback, @Nullable Integer value) { - writeNullableInt8sAttribute(chipClusterPtr, callback, value); + writeNullableInt8sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt8sAttribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeNullableInt8sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableInt8sAttribute( @@ -10955,7 +13397,12 @@ public void readNullableInt16sAttribute(NullableInt16sAttributeCallback callback public void writeNullableInt16sAttribute( DefaultClusterCallback callback, @Nullable Integer value) { - writeNullableInt16sAttribute(chipClusterPtr, callback, value); + writeNullableInt16sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt16sAttribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeNullableInt16sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableInt16sAttribute( @@ -10969,7 +13416,12 @@ public void readNullableInt24sAttribute(NullableInt24sAttributeCallback callback public void writeNullableInt24sAttribute( DefaultClusterCallback callback, @Nullable Long value) { - writeNullableInt24sAttribute(chipClusterPtr, callback, value); + writeNullableInt24sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt24sAttribute( + DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + writeNullableInt24sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableInt24sAttribute( @@ -10983,7 +13435,12 @@ public void readNullableInt32sAttribute(NullableInt32sAttributeCallback callback public void writeNullableInt32sAttribute( DefaultClusterCallback callback, @Nullable Long value) { - writeNullableInt32sAttribute(chipClusterPtr, callback, value); + writeNullableInt32sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt32sAttribute( + DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + writeNullableInt32sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableInt32sAttribute( @@ -10997,7 +13454,12 @@ public void readNullableInt40sAttribute(NullableInt40sAttributeCallback callback public void writeNullableInt40sAttribute( DefaultClusterCallback callback, @Nullable Long value) { - writeNullableInt40sAttribute(chipClusterPtr, callback, value); + writeNullableInt40sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt40sAttribute( + DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + writeNullableInt40sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableInt40sAttribute( @@ -11011,7 +13473,12 @@ public void readNullableInt48sAttribute(NullableInt48sAttributeCallback callback public void writeNullableInt48sAttribute( DefaultClusterCallback callback, @Nullable Long value) { - writeNullableInt48sAttribute(chipClusterPtr, callback, value); + writeNullableInt48sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt48sAttribute( + DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + writeNullableInt48sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableInt48sAttribute( @@ -11025,7 +13492,12 @@ public void readNullableInt56sAttribute(NullableInt56sAttributeCallback callback public void writeNullableInt56sAttribute( DefaultClusterCallback callback, @Nullable Long value) { - writeNullableInt56sAttribute(chipClusterPtr, callback, value); + writeNullableInt56sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt56sAttribute( + DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + writeNullableInt56sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableInt56sAttribute( @@ -11039,7 +13511,12 @@ public void readNullableInt64sAttribute(NullableInt64sAttributeCallback callback public void writeNullableInt64sAttribute( DefaultClusterCallback callback, @Nullable Long value) { - writeNullableInt64sAttribute(chipClusterPtr, callback, value); + writeNullableInt64sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt64sAttribute( + DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + writeNullableInt64sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableInt64sAttribute( @@ -11053,7 +13530,12 @@ public void readNullableEnum8Attribute(NullableEnum8AttributeCallback callback) public void writeNullableEnum8Attribute( DefaultClusterCallback callback, @Nullable Integer value) { - writeNullableEnum8Attribute(chipClusterPtr, callback, value); + writeNullableEnum8Attribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableEnum8Attribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeNullableEnum8Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableEnum8Attribute( @@ -11067,7 +13549,12 @@ public void readNullableEnum16Attribute(NullableEnum16AttributeCallback callback public void writeNullableEnum16Attribute( DefaultClusterCallback callback, @Nullable Integer value) { - writeNullableEnum16Attribute(chipClusterPtr, callback, value); + writeNullableEnum16Attribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableEnum16Attribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeNullableEnum16Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableEnum16Attribute( @@ -11081,7 +13568,12 @@ public void readNullableFloatSingleAttribute(NullableFloatSingleAttributeCallbac public void writeNullableFloatSingleAttribute( DefaultClusterCallback callback, @Nullable Float value) { - writeNullableFloatSingleAttribute(chipClusterPtr, callback, value); + writeNullableFloatSingleAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableFloatSingleAttribute( + DefaultClusterCallback callback, @Nullable Float value, int timedWriteTimeoutMs) { + writeNullableFloatSingleAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableFloatSingleAttribute( @@ -11095,7 +13587,12 @@ public void readNullableFloatDoubleAttribute(NullableFloatDoubleAttributeCallbac public void writeNullableFloatDoubleAttribute( DefaultClusterCallback callback, @Nullable Double value) { - writeNullableFloatDoubleAttribute(chipClusterPtr, callback, value); + writeNullableFloatDoubleAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableFloatDoubleAttribute( + DefaultClusterCallback callback, @Nullable Double value, int timedWriteTimeoutMs) { + writeNullableFloatDoubleAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableFloatDoubleAttribute( @@ -11109,7 +13606,12 @@ public void readNullableOctetStringAttribute(NullableOctetStringAttributeCallbac public void writeNullableOctetStringAttribute( DefaultClusterCallback callback, @Nullable byte[] value) { - writeNullableOctetStringAttribute(chipClusterPtr, callback, value); + writeNullableOctetStringAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableOctetStringAttribute( + DefaultClusterCallback callback, @Nullable byte[] value, int timedWriteTimeoutMs) { + writeNullableOctetStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableOctetStringAttribute( @@ -11123,7 +13625,12 @@ public void readNullableCharStringAttribute(NullableCharStringAttributeCallback public void writeNullableCharStringAttribute( DefaultClusterCallback callback, @Nullable String value) { - writeNullableCharStringAttribute(chipClusterPtr, callback, value); + writeNullableCharStringAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableCharStringAttribute( + DefaultClusterCallback callback, @Nullable String value, int timedWriteTimeoutMs) { + writeNullableCharStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableCharStringAttribute( @@ -11137,7 +13644,12 @@ public void readNullableEnumAttrAttribute(NullableEnumAttrAttributeCallback call public void writeNullableEnumAttrAttribute( DefaultClusterCallback callback, @Nullable Integer value) { - writeNullableEnumAttrAttribute(chipClusterPtr, callback, value); + writeNullableEnumAttrAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableEnumAttrAttribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeNullableEnumAttrAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableEnumAttrAttribute( @@ -11152,7 +13664,13 @@ public void readNullableRangeRestrictedInt8uAttribute( public void writeNullableRangeRestrictedInt8uAttribute( DefaultClusterCallback callback, @Nullable Integer value) { - writeNullableRangeRestrictedInt8uAttribute(chipClusterPtr, callback, value); + writeNullableRangeRestrictedInt8uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableRangeRestrictedInt8uAttribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeNullableRangeRestrictedInt8uAttribute( + chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableRangeRestrictedInt8uAttribute( @@ -11168,7 +13686,13 @@ public void readNullableRangeRestrictedInt8sAttribute( public void writeNullableRangeRestrictedInt8sAttribute( DefaultClusterCallback callback, @Nullable Integer value) { - writeNullableRangeRestrictedInt8sAttribute(chipClusterPtr, callback, value); + writeNullableRangeRestrictedInt8sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableRangeRestrictedInt8sAttribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeNullableRangeRestrictedInt8sAttribute( + chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableRangeRestrictedInt8sAttribute( @@ -11184,7 +13708,13 @@ public void readNullableRangeRestrictedInt16uAttribute( public void writeNullableRangeRestrictedInt16uAttribute( DefaultClusterCallback callback, @Nullable Integer value) { - writeNullableRangeRestrictedInt16uAttribute(chipClusterPtr, callback, value); + writeNullableRangeRestrictedInt16uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableRangeRestrictedInt16uAttribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeNullableRangeRestrictedInt16uAttribute( + chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableRangeRestrictedInt16uAttribute( @@ -11200,7 +13730,13 @@ public void readNullableRangeRestrictedInt16sAttribute( public void writeNullableRangeRestrictedInt16sAttribute( DefaultClusterCallback callback, @Nullable Integer value) { - writeNullableRangeRestrictedInt16sAttribute(chipClusterPtr, callback, value); + writeNullableRangeRestrictedInt16sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableRangeRestrictedInt16sAttribute( + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + writeNullableRangeRestrictedInt16sAttribute( + chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNullableRangeRestrictedInt16sAttribute( @@ -11226,7 +13762,10 @@ private native void readBooleanAttribute( long chipClusterPtr, BooleanAttributeCallback callback); private native void writeBooleanAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Boolean value); + long chipClusterPtr, + DefaultClusterCallback callback, + Boolean value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeBooleanAttribute( long chipClusterPtr, BooleanAttributeCallback callback, int minInterval, int maxInterval); @@ -11235,7 +13774,10 @@ private native void readBitmap8Attribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeBitmap8Attribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeBitmap8Attribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -11244,7 +13786,10 @@ private native void readBitmap16Attribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeBitmap16Attribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeBitmap16Attribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -11252,7 +13797,10 @@ private native void subscribeBitmap16Attribute( private native void readBitmap32Attribute(long chipClusterPtr, LongAttributeCallback callback); private native void writeBitmap32Attribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeBitmap32Attribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -11260,7 +13808,10 @@ private native void subscribeBitmap32Attribute( private native void readBitmap64Attribute(long chipClusterPtr, LongAttributeCallback callback); private native void writeBitmap64Attribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeBitmap64Attribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -11268,7 +13819,10 @@ private native void subscribeBitmap64Attribute( private native void readInt8uAttribute(long chipClusterPtr, IntegerAttributeCallback callback); private native void writeInt8uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeInt8uAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -11276,7 +13830,10 @@ private native void subscribeInt8uAttribute( private native void readInt16uAttribute(long chipClusterPtr, IntegerAttributeCallback callback); private native void writeInt16uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeInt16uAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -11284,7 +13841,10 @@ private native void subscribeInt16uAttribute( private native void readInt24uAttribute(long chipClusterPtr, LongAttributeCallback callback); private native void writeInt24uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeInt24uAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -11292,7 +13852,10 @@ private native void subscribeInt24uAttribute( private native void readInt32uAttribute(long chipClusterPtr, LongAttributeCallback callback); private native void writeInt32uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeInt32uAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -11300,7 +13863,10 @@ private native void subscribeInt32uAttribute( private native void readInt40uAttribute(long chipClusterPtr, LongAttributeCallback callback); private native void writeInt40uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeInt40uAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -11308,7 +13874,10 @@ private native void subscribeInt40uAttribute( private native void readInt48uAttribute(long chipClusterPtr, LongAttributeCallback callback); private native void writeInt48uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeInt48uAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -11316,7 +13885,10 @@ private native void subscribeInt48uAttribute( private native void readInt56uAttribute(long chipClusterPtr, LongAttributeCallback callback); private native void writeInt56uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeInt56uAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -11324,7 +13896,10 @@ private native void subscribeInt56uAttribute( private native void readInt64uAttribute(long chipClusterPtr, LongAttributeCallback callback); private native void writeInt64uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeInt64uAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -11332,7 +13907,10 @@ private native void subscribeInt64uAttribute( private native void readInt8sAttribute(long chipClusterPtr, IntegerAttributeCallback callback); private native void writeInt8sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeInt8sAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -11340,7 +13918,10 @@ private native void subscribeInt8sAttribute( private native void readInt16sAttribute(long chipClusterPtr, IntegerAttributeCallback callback); private native void writeInt16sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeInt16sAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -11348,7 +13929,10 @@ private native void subscribeInt16sAttribute( private native void readInt24sAttribute(long chipClusterPtr, LongAttributeCallback callback); private native void writeInt24sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeInt24sAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -11356,7 +13940,10 @@ private native void subscribeInt24sAttribute( private native void readInt32sAttribute(long chipClusterPtr, LongAttributeCallback callback); private native void writeInt32sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeInt32sAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -11364,7 +13951,10 @@ private native void subscribeInt32sAttribute( private native void readInt40sAttribute(long chipClusterPtr, LongAttributeCallback callback); private native void writeInt40sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeInt40sAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -11372,7 +13962,10 @@ private native void subscribeInt40sAttribute( private native void readInt48sAttribute(long chipClusterPtr, LongAttributeCallback callback); private native void writeInt48sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeInt48sAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -11380,7 +13973,10 @@ private native void subscribeInt48sAttribute( private native void readInt56sAttribute(long chipClusterPtr, LongAttributeCallback callback); private native void writeInt56sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeInt56sAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -11388,7 +13984,10 @@ private native void subscribeInt56sAttribute( private native void readInt64sAttribute(long chipClusterPtr, LongAttributeCallback callback); private native void writeInt64sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeInt64sAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -11396,7 +13995,10 @@ private native void subscribeInt64sAttribute( private native void readEnum8Attribute(long chipClusterPtr, IntegerAttributeCallback callback); private native void writeEnum8Attribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeEnum8Attribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -11404,7 +14006,10 @@ private native void subscribeEnum8Attribute( private native void readEnum16Attribute(long chipClusterPtr, IntegerAttributeCallback callback); private native void writeEnum16Attribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeEnum16Attribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -11413,7 +14018,10 @@ private native void readFloatSingleAttribute( long chipClusterPtr, FloatAttributeCallback callback); private native void writeFloatSingleAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Float value); + long chipClusterPtr, + DefaultClusterCallback callback, + Float value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeFloatSingleAttribute( long chipClusterPtr, FloatAttributeCallback callback, int minInterval, int maxInterval); @@ -11422,7 +14030,10 @@ private native void readFloatDoubleAttribute( long chipClusterPtr, DoubleAttributeCallback callback); private native void writeFloatDoubleAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Double value); + long chipClusterPtr, + DefaultClusterCallback callback, + Double value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeFloatDoubleAttribute( long chipClusterPtr, DoubleAttributeCallback callback, int minInterval, int maxInterval); @@ -11431,7 +14042,10 @@ private native void readOctetStringAttribute( long chipClusterPtr, OctetStringAttributeCallback callback); private native void writeOctetStringAttribute( - long chipClusterPtr, DefaultClusterCallback callback, byte[] value); + long chipClusterPtr, + DefaultClusterCallback callback, + byte[] value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeOctetStringAttribute( long chipClusterPtr, @@ -11452,7 +14066,10 @@ private native void readLongOctetStringAttribute( long chipClusterPtr, OctetStringAttributeCallback callback); private native void writeLongOctetStringAttribute( - long chipClusterPtr, DefaultClusterCallback callback, byte[] value); + long chipClusterPtr, + DefaultClusterCallback callback, + byte[] value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeLongOctetStringAttribute( long chipClusterPtr, @@ -11464,7 +14081,10 @@ private native void readCharStringAttribute( long chipClusterPtr, CharStringAttributeCallback callback); private native void writeCharStringAttribute( - long chipClusterPtr, DefaultClusterCallback callback, String value); + long chipClusterPtr, + DefaultClusterCallback callback, + String value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeCharStringAttribute( long chipClusterPtr, @@ -11476,7 +14096,10 @@ private native void readLongCharStringAttribute( long chipClusterPtr, CharStringAttributeCallback callback); private native void writeLongCharStringAttribute( - long chipClusterPtr, DefaultClusterCallback callback, String value); + long chipClusterPtr, + DefaultClusterCallback callback, + String value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeLongCharStringAttribute( long chipClusterPtr, @@ -11487,7 +14110,10 @@ private native void subscribeLongCharStringAttribute( private native void readEpochUsAttribute(long chipClusterPtr, LongAttributeCallback callback); private native void writeEpochUsAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeEpochUsAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -11495,7 +14121,10 @@ private native void subscribeEpochUsAttribute( private native void readEpochSAttribute(long chipClusterPtr, LongAttributeCallback callback); private native void writeEpochSAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeEpochSAttribute( long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); @@ -11504,7 +14133,10 @@ private native void readVendorIdAttribute( long chipClusterPtr, VendorIdAttributeCallback callback); private native void writeVendorIdAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeVendorIdAttribute( long chipClusterPtr, VendorIdAttributeCallback callback, int minInterval, int maxInterval); @@ -11516,7 +14148,10 @@ private native void readEnumAttrAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeEnumAttrAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeEnumAttrAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -11525,7 +14160,10 @@ private native void readRangeRestrictedInt8uAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeRangeRestrictedInt8uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeRangeRestrictedInt8uAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -11534,7 +14172,10 @@ private native void readRangeRestrictedInt8sAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeRangeRestrictedInt8sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeRangeRestrictedInt8sAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -11543,7 +14184,10 @@ private native void readRangeRestrictedInt16uAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeRangeRestrictedInt16uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeRangeRestrictedInt16uAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -11552,7 +14196,10 @@ private native void readRangeRestrictedInt16sAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeRangeRestrictedInt16sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeRangeRestrictedInt16sAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -11564,13 +14211,19 @@ private native void readTimedWriteBooleanAttribute( long chipClusterPtr, BooleanAttributeCallback callback); private native void writeTimedWriteBooleanAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Boolean value); + long chipClusterPtr, + DefaultClusterCallback callback, + Boolean value, + @Nullable Integer timedWriteTimeoutMs); private native void readUnsupportedAttribute( long chipClusterPtr, BooleanAttributeCallback callback); private native void writeUnsupportedAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Boolean value); + long chipClusterPtr, + DefaultClusterCallback callback, + Boolean value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeUnsupportedAttribute( long chipClusterPtr, BooleanAttributeCallback callback, int minInterval, int maxInterval); @@ -11579,7 +14232,10 @@ private native void readNullableBooleanAttribute( long chipClusterPtr, NullableBooleanAttributeCallback callback); private native void writeNullableBooleanAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Boolean value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Boolean value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableBooleanAttribute( long chipClusterPtr, @@ -11591,7 +14247,10 @@ private native void readNullableBitmap8Attribute( long chipClusterPtr, NullableBitmap8AttributeCallback callback); private native void writeNullableBitmap8Attribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableBitmap8Attribute( long chipClusterPtr, @@ -11603,7 +14262,10 @@ private native void readNullableBitmap16Attribute( long chipClusterPtr, NullableBitmap16AttributeCallback callback); private native void writeNullableBitmap16Attribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableBitmap16Attribute( long chipClusterPtr, @@ -11615,7 +14277,10 @@ private native void readNullableBitmap32Attribute( long chipClusterPtr, NullableBitmap32AttributeCallback callback); private native void writeNullableBitmap32Attribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableBitmap32Attribute( long chipClusterPtr, @@ -11627,7 +14292,10 @@ private native void readNullableBitmap64Attribute( long chipClusterPtr, NullableBitmap64AttributeCallback callback); private native void writeNullableBitmap64Attribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableBitmap64Attribute( long chipClusterPtr, @@ -11639,7 +14307,10 @@ private native void readNullableInt8uAttribute( long chipClusterPtr, NullableInt8uAttributeCallback callback); private native void writeNullableInt8uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt8uAttribute( long chipClusterPtr, @@ -11651,7 +14322,10 @@ private native void readNullableInt16uAttribute( long chipClusterPtr, NullableInt16uAttributeCallback callback); private native void writeNullableInt16uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt16uAttribute( long chipClusterPtr, @@ -11663,7 +14337,10 @@ private native void readNullableInt24uAttribute( long chipClusterPtr, NullableInt24uAttributeCallback callback); private native void writeNullableInt24uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt24uAttribute( long chipClusterPtr, @@ -11675,7 +14352,10 @@ private native void readNullableInt32uAttribute( long chipClusterPtr, NullableInt32uAttributeCallback callback); private native void writeNullableInt32uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt32uAttribute( long chipClusterPtr, @@ -11687,7 +14367,10 @@ private native void readNullableInt40uAttribute( long chipClusterPtr, NullableInt40uAttributeCallback callback); private native void writeNullableInt40uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt40uAttribute( long chipClusterPtr, @@ -11699,7 +14382,10 @@ private native void readNullableInt48uAttribute( long chipClusterPtr, NullableInt48uAttributeCallback callback); private native void writeNullableInt48uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt48uAttribute( long chipClusterPtr, @@ -11711,7 +14397,10 @@ private native void readNullableInt56uAttribute( long chipClusterPtr, NullableInt56uAttributeCallback callback); private native void writeNullableInt56uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt56uAttribute( long chipClusterPtr, @@ -11723,7 +14412,10 @@ private native void readNullableInt64uAttribute( long chipClusterPtr, NullableInt64uAttributeCallback callback); private native void writeNullableInt64uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt64uAttribute( long chipClusterPtr, @@ -11735,7 +14427,10 @@ private native void readNullableInt8sAttribute( long chipClusterPtr, NullableInt8sAttributeCallback callback); private native void writeNullableInt8sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt8sAttribute( long chipClusterPtr, @@ -11747,7 +14442,10 @@ private native void readNullableInt16sAttribute( long chipClusterPtr, NullableInt16sAttributeCallback callback); private native void writeNullableInt16sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt16sAttribute( long chipClusterPtr, @@ -11759,7 +14457,10 @@ private native void readNullableInt24sAttribute( long chipClusterPtr, NullableInt24sAttributeCallback callback); private native void writeNullableInt24sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt24sAttribute( long chipClusterPtr, @@ -11771,7 +14472,10 @@ private native void readNullableInt32sAttribute( long chipClusterPtr, NullableInt32sAttributeCallback callback); private native void writeNullableInt32sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt32sAttribute( long chipClusterPtr, @@ -11783,7 +14487,10 @@ private native void readNullableInt40sAttribute( long chipClusterPtr, NullableInt40sAttributeCallback callback); private native void writeNullableInt40sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt40sAttribute( long chipClusterPtr, @@ -11795,7 +14502,10 @@ private native void readNullableInt48sAttribute( long chipClusterPtr, NullableInt48sAttributeCallback callback); private native void writeNullableInt48sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt48sAttribute( long chipClusterPtr, @@ -11807,7 +14517,10 @@ private native void readNullableInt56sAttribute( long chipClusterPtr, NullableInt56sAttributeCallback callback); private native void writeNullableInt56sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt56sAttribute( long chipClusterPtr, @@ -11819,7 +14532,10 @@ private native void readNullableInt64sAttribute( long chipClusterPtr, NullableInt64sAttributeCallback callback); private native void writeNullableInt64sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Long value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt64sAttribute( long chipClusterPtr, @@ -11831,7 +14547,10 @@ private native void readNullableEnum8Attribute( long chipClusterPtr, NullableEnum8AttributeCallback callback); private native void writeNullableEnum8Attribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableEnum8Attribute( long chipClusterPtr, @@ -11843,7 +14562,10 @@ private native void readNullableEnum16Attribute( long chipClusterPtr, NullableEnum16AttributeCallback callback); private native void writeNullableEnum16Attribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableEnum16Attribute( long chipClusterPtr, @@ -11855,7 +14577,10 @@ private native void readNullableFloatSingleAttribute( long chipClusterPtr, NullableFloatSingleAttributeCallback callback); private native void writeNullableFloatSingleAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Float value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Float value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableFloatSingleAttribute( long chipClusterPtr, @@ -11867,7 +14592,10 @@ private native void readNullableFloatDoubleAttribute( long chipClusterPtr, NullableFloatDoubleAttributeCallback callback); private native void writeNullableFloatDoubleAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Double value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Double value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableFloatDoubleAttribute( long chipClusterPtr, @@ -11879,7 +14607,10 @@ private native void readNullableOctetStringAttribute( long chipClusterPtr, NullableOctetStringAttributeCallback callback); private native void writeNullableOctetStringAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable byte[] value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable byte[] value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableOctetStringAttribute( long chipClusterPtr, @@ -11891,7 +14622,10 @@ private native void readNullableCharStringAttribute( long chipClusterPtr, NullableCharStringAttributeCallback callback); private native void writeNullableCharStringAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable String value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable String value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableCharStringAttribute( long chipClusterPtr, @@ -11903,7 +14637,10 @@ private native void readNullableEnumAttrAttribute( long chipClusterPtr, NullableEnumAttrAttributeCallback callback); private native void writeNullableEnumAttrAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableEnumAttrAttribute( long chipClusterPtr, @@ -11915,7 +14652,10 @@ private native void readNullableRangeRestrictedInt8uAttribute( long chipClusterPtr, NullableRangeRestrictedInt8uAttributeCallback callback); private native void writeNullableRangeRestrictedInt8uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableRangeRestrictedInt8uAttribute( long chipClusterPtr, @@ -11927,7 +14667,10 @@ private native void readNullableRangeRestrictedInt8sAttribute( long chipClusterPtr, NullableRangeRestrictedInt8sAttributeCallback callback); private native void writeNullableRangeRestrictedInt8sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableRangeRestrictedInt8sAttribute( long chipClusterPtr, @@ -11939,7 +14682,10 @@ private native void readNullableRangeRestrictedInt16uAttribute( long chipClusterPtr, NullableRangeRestrictedInt16uAttributeCallback callback); private native void writeNullableRangeRestrictedInt16uAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableRangeRestrictedInt16uAttribute( long chipClusterPtr, @@ -11951,7 +14697,10 @@ private native void readNullableRangeRestrictedInt16sAttribute( long chipClusterPtr, NullableRangeRestrictedInt16sAttributeCallback callback); private native void writeNullableRangeRestrictedInt16sAttribute( - long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + @Nullable Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableRangeRestrictedInt16sAttribute( long chipClusterPtr, @@ -11982,16 +14731,33 @@ public static long clusterId() { public native long initWithDevice(long devicePtr, int endpointId); public void clearWeeklySchedule(DefaultClusterCallback callback) { - clearWeeklySchedule(chipClusterPtr, callback); + clearWeeklySchedule(chipClusterPtr, callback, null); + } + + public void clearWeeklySchedule(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + clearWeeklySchedule(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void getRelayStatusLog(GetRelayStatusLogResponseCallback callback) { - getRelayStatusLog(chipClusterPtr, callback); + getRelayStatusLog(chipClusterPtr, callback, null); + } + + public void getRelayStatusLog( + GetRelayStatusLogResponseCallback callback, int timedInvokeTimeoutMs) { + getRelayStatusLog(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void getWeeklySchedule( GetWeeklyScheduleResponseCallback callback, Integer daysToReturn, Integer modeToReturn) { - getWeeklySchedule(chipClusterPtr, callback, daysToReturn, modeToReturn); + getWeeklySchedule(chipClusterPtr, callback, daysToReturn, modeToReturn, null); + } + + public void getWeeklySchedule( + GetWeeklyScheduleResponseCallback callback, + Integer daysToReturn, + Integer modeToReturn, + int timedInvokeTimeoutMs) { + getWeeklySchedule(chipClusterPtr, callback, daysToReturn, modeToReturn, timedInvokeTimeoutMs); } public void setWeeklySchedule( @@ -12006,23 +14772,52 @@ public void setWeeklySchedule( numberOfTransitionsForSequence, dayOfWeekForSequence, modeForSequence, - payload); + payload, + null); + } + + public void setWeeklySchedule( + DefaultClusterCallback callback, + Integer numberOfTransitionsForSequence, + Integer dayOfWeekForSequence, + Integer modeForSequence, + Integer payload, + int timedInvokeTimeoutMs) { + setWeeklySchedule( + chipClusterPtr, + callback, + numberOfTransitionsForSequence, + dayOfWeekForSequence, + modeForSequence, + payload, + timedInvokeTimeoutMs); } public void setpointRaiseLower(DefaultClusterCallback callback, Integer mode, Integer amount) { - setpointRaiseLower(chipClusterPtr, callback, mode, amount); + setpointRaiseLower(chipClusterPtr, callback, mode, amount, null); + } + + public void setpointRaiseLower( + DefaultClusterCallback callback, Integer mode, Integer amount, int timedInvokeTimeoutMs) { + setpointRaiseLower(chipClusterPtr, callback, mode, amount, timedInvokeTimeoutMs); } - private native void clearWeeklySchedule(long chipClusterPtr, DefaultClusterCallback Callback); + private native void clearWeeklySchedule( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); private native void getRelayStatusLog( - long chipClusterPtr, GetRelayStatusLogResponseCallback Callback); + long chipClusterPtr, + GetRelayStatusLogResponseCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); private native void getWeeklySchedule( long chipClusterPtr, GetWeeklyScheduleResponseCallback Callback, Integer daysToReturn, - Integer modeToReturn); + Integer modeToReturn, + @Nullable Integer timedInvokeTimeoutMs); private native void setWeeklySchedule( long chipClusterPtr, @@ -12030,10 +14825,15 @@ private native void setWeeklySchedule( Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, - Integer payload); + Integer payload, + @Nullable Integer timedInvokeTimeoutMs); private native void setpointRaiseLower( - long chipClusterPtr, DefaultClusterCallback Callback, Integer mode, Integer amount); + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer mode, + Integer amount, + @Nullable Integer timedInvokeTimeoutMs); public interface GetRelayStatusLogResponseCallback { void onSuccess( @@ -12118,7 +14918,12 @@ public void readOccupiedCoolingSetpointAttribute(IntegerAttributeCallback callba public void writeOccupiedCoolingSetpointAttribute( DefaultClusterCallback callback, Integer value) { - writeOccupiedCoolingSetpointAttribute(chipClusterPtr, callback, value); + writeOccupiedCoolingSetpointAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOccupiedCoolingSetpointAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOccupiedCoolingSetpointAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeOccupiedCoolingSetpointAttribute( @@ -12132,7 +14937,12 @@ public void readOccupiedHeatingSetpointAttribute(IntegerAttributeCallback callba public void writeOccupiedHeatingSetpointAttribute( DefaultClusterCallback callback, Integer value) { - writeOccupiedHeatingSetpointAttribute(chipClusterPtr, callback, value); + writeOccupiedHeatingSetpointAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOccupiedHeatingSetpointAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOccupiedHeatingSetpointAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeOccupiedHeatingSetpointAttribute( @@ -12145,7 +14955,12 @@ public void readMinHeatSetpointLimitAttribute(IntegerAttributeCallback callback) } public void writeMinHeatSetpointLimitAttribute(DefaultClusterCallback callback, Integer value) { - writeMinHeatSetpointLimitAttribute(chipClusterPtr, callback, value); + writeMinHeatSetpointLimitAttribute(chipClusterPtr, callback, value, null); + } + + public void writeMinHeatSetpointLimitAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeMinHeatSetpointLimitAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeMinHeatSetpointLimitAttribute( @@ -12158,7 +14973,12 @@ public void readMaxHeatSetpointLimitAttribute(IntegerAttributeCallback callback) } public void writeMaxHeatSetpointLimitAttribute(DefaultClusterCallback callback, Integer value) { - writeMaxHeatSetpointLimitAttribute(chipClusterPtr, callback, value); + writeMaxHeatSetpointLimitAttribute(chipClusterPtr, callback, value, null); + } + + public void writeMaxHeatSetpointLimitAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeMaxHeatSetpointLimitAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeMaxHeatSetpointLimitAttribute( @@ -12171,7 +14991,12 @@ public void readMinCoolSetpointLimitAttribute(IntegerAttributeCallback callback) } public void writeMinCoolSetpointLimitAttribute(DefaultClusterCallback callback, Integer value) { - writeMinCoolSetpointLimitAttribute(chipClusterPtr, callback, value); + writeMinCoolSetpointLimitAttribute(chipClusterPtr, callback, value, null); + } + + public void writeMinCoolSetpointLimitAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeMinCoolSetpointLimitAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeMinCoolSetpointLimitAttribute( @@ -12184,7 +15009,12 @@ public void readMaxCoolSetpointLimitAttribute(IntegerAttributeCallback callback) } public void writeMaxCoolSetpointLimitAttribute(DefaultClusterCallback callback, Integer value) { - writeMaxCoolSetpointLimitAttribute(chipClusterPtr, callback, value); + writeMaxCoolSetpointLimitAttribute(chipClusterPtr, callback, value, null); + } + + public void writeMaxCoolSetpointLimitAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeMaxCoolSetpointLimitAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeMaxCoolSetpointLimitAttribute( @@ -12197,7 +15027,12 @@ public void readMinSetpointDeadBandAttribute(IntegerAttributeCallback callback) } public void writeMinSetpointDeadBandAttribute(DefaultClusterCallback callback, Integer value) { - writeMinSetpointDeadBandAttribute(chipClusterPtr, callback, value); + writeMinSetpointDeadBandAttribute(chipClusterPtr, callback, value, null); + } + + public void writeMinSetpointDeadBandAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeMinSetpointDeadBandAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeMinSetpointDeadBandAttribute( @@ -12211,7 +15046,13 @@ public void readControlSequenceOfOperationAttribute(IntegerAttributeCallback cal public void writeControlSequenceOfOperationAttribute( DefaultClusterCallback callback, Integer value) { - writeControlSequenceOfOperationAttribute(chipClusterPtr, callback, value); + writeControlSequenceOfOperationAttribute(chipClusterPtr, callback, value, null); + } + + public void writeControlSequenceOfOperationAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeControlSequenceOfOperationAttribute( + chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeControlSequenceOfOperationAttribute( @@ -12225,7 +15066,12 @@ public void readSystemModeAttribute(IntegerAttributeCallback callback) { } public void writeSystemModeAttribute(DefaultClusterCallback callback, Integer value) { - writeSystemModeAttribute(chipClusterPtr, callback, value); + writeSystemModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeSystemModeAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeSystemModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeSystemModeAttribute( @@ -12318,7 +15164,10 @@ private native void readOccupiedCoolingSetpointAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeOccupiedCoolingSetpointAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeOccupiedCoolingSetpointAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -12327,7 +15176,10 @@ private native void readOccupiedHeatingSetpointAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeOccupiedHeatingSetpointAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeOccupiedHeatingSetpointAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -12336,7 +15188,10 @@ private native void readMinHeatSetpointLimitAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeMinHeatSetpointLimitAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeMinHeatSetpointLimitAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -12345,7 +15200,10 @@ private native void readMaxHeatSetpointLimitAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeMaxHeatSetpointLimitAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeMaxHeatSetpointLimitAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -12354,7 +15212,10 @@ private native void readMinCoolSetpointLimitAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeMinCoolSetpointLimitAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeMinCoolSetpointLimitAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -12363,7 +15224,10 @@ private native void readMaxCoolSetpointLimitAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeMaxCoolSetpointLimitAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeMaxCoolSetpointLimitAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -12372,7 +15236,10 @@ private native void readMinSetpointDeadBandAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeMinSetpointDeadBandAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeMinSetpointDeadBandAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -12381,7 +15248,10 @@ private native void readControlSequenceOfOperationAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeControlSequenceOfOperationAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeControlSequenceOfOperationAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -12390,7 +15260,10 @@ private native void readSystemModeAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeSystemModeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeSystemModeAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -12455,7 +15328,12 @@ public void readTemperatureDisplayModeAttribute(IntegerAttributeCallback callbac public void writeTemperatureDisplayModeAttribute( DefaultClusterCallback callback, Integer value) { - writeTemperatureDisplayModeAttribute(chipClusterPtr, callback, value); + writeTemperatureDisplayModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeTemperatureDisplayModeAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeTemperatureDisplayModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeTemperatureDisplayModeAttribute( @@ -12468,7 +15346,12 @@ public void readKeypadLockoutAttribute(IntegerAttributeCallback callback) { } public void writeKeypadLockoutAttribute(DefaultClusterCallback callback, Integer value) { - writeKeypadLockoutAttribute(chipClusterPtr, callback, value); + writeKeypadLockoutAttribute(chipClusterPtr, callback, value, null); + } + + public void writeKeypadLockoutAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeKeypadLockoutAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeKeypadLockoutAttribute( @@ -12482,7 +15365,13 @@ public void readScheduleProgrammingVisibilityAttribute(IntegerAttributeCallback public void writeScheduleProgrammingVisibilityAttribute( DefaultClusterCallback callback, Integer value) { - writeScheduleProgrammingVisibilityAttribute(chipClusterPtr, callback, value); + writeScheduleProgrammingVisibilityAttribute(chipClusterPtr, callback, value, null); + } + + public void writeScheduleProgrammingVisibilityAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeScheduleProgrammingVisibilityAttribute( + chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeScheduleProgrammingVisibilityAttribute( @@ -12508,7 +15397,10 @@ private native void readTemperatureDisplayModeAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeTemperatureDisplayModeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeTemperatureDisplayModeAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -12517,7 +15409,10 @@ private native void readKeypadLockoutAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeKeypadLockoutAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeKeypadLockoutAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -12526,7 +15421,10 @@ private native void readScheduleProgrammingVisibilityAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void writeScheduleProgrammingVisibilityAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeScheduleProgrammingVisibilityAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); @@ -12554,10 +15452,17 @@ public static long clusterId() { public native long initWithDevice(long devicePtr, int endpointId); public void resetCounts(DefaultClusterCallback callback) { - resetCounts(chipClusterPtr, callback); + resetCounts(chipClusterPtr, callback, null); + } + + public void resetCounts(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + resetCounts(chipClusterPtr, callback, timedInvokeTimeoutMs); } - private native void resetCounts(long chipClusterPtr, DefaultClusterCallback Callback); + private native void resetCounts( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); public static class NeighborTableListAttribute { public Long extAddress; @@ -14001,10 +16906,17 @@ public static long clusterId() { public native long initWithDevice(long devicePtr, int endpointId); public void resetCounts(DefaultClusterCallback callback) { - resetCounts(chipClusterPtr, callback); + resetCounts(chipClusterPtr, callback, null); + } + + public void resetCounts(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + resetCounts(chipClusterPtr, callback, timedInvokeTimeoutMs); } - private native void resetCounts(long chipClusterPtr, DefaultClusterCallback Callback); + private native void resetCounts( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); public interface AttributeListAttributeCallback { void onSuccess(List valueList); @@ -14254,62 +17166,129 @@ public static long clusterId() { public native long initWithDevice(long devicePtr, int endpointId); public void downOrClose(DefaultClusterCallback callback) { - downOrClose(chipClusterPtr, callback); + downOrClose(chipClusterPtr, callback, null); + } + + public void downOrClose(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + downOrClose(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void goToLiftPercentage( DefaultClusterCallback callback, Integer liftPercentageValue, Integer liftPercent100thsValue) { - goToLiftPercentage(chipClusterPtr, callback, liftPercentageValue, liftPercent100thsValue); + goToLiftPercentage( + chipClusterPtr, callback, liftPercentageValue, liftPercent100thsValue, null); + } + + public void goToLiftPercentage( + DefaultClusterCallback callback, + Integer liftPercentageValue, + Integer liftPercent100thsValue, + int timedInvokeTimeoutMs) { + goToLiftPercentage( + chipClusterPtr, + callback, + liftPercentageValue, + liftPercent100thsValue, + timedInvokeTimeoutMs); } public void goToLiftValue(DefaultClusterCallback callback, Integer liftValue) { - goToLiftValue(chipClusterPtr, callback, liftValue); + goToLiftValue(chipClusterPtr, callback, liftValue, null); + } + + public void goToLiftValue( + DefaultClusterCallback callback, Integer liftValue, int timedInvokeTimeoutMs) { + goToLiftValue(chipClusterPtr, callback, liftValue, timedInvokeTimeoutMs); } public void goToTiltPercentage( DefaultClusterCallback callback, Integer tiltPercentageValue, Integer tiltPercent100thsValue) { - goToTiltPercentage(chipClusterPtr, callback, tiltPercentageValue, tiltPercent100thsValue); + goToTiltPercentage( + chipClusterPtr, callback, tiltPercentageValue, tiltPercent100thsValue, null); + } + + public void goToTiltPercentage( + DefaultClusterCallback callback, + Integer tiltPercentageValue, + Integer tiltPercent100thsValue, + int timedInvokeTimeoutMs) { + goToTiltPercentage( + chipClusterPtr, + callback, + tiltPercentageValue, + tiltPercent100thsValue, + timedInvokeTimeoutMs); } public void goToTiltValue(DefaultClusterCallback callback, Integer tiltValue) { - goToTiltValue(chipClusterPtr, callback, tiltValue); + goToTiltValue(chipClusterPtr, callback, tiltValue, null); + } + + public void goToTiltValue( + DefaultClusterCallback callback, Integer tiltValue, int timedInvokeTimeoutMs) { + goToTiltValue(chipClusterPtr, callback, tiltValue, timedInvokeTimeoutMs); } public void stopMotion(DefaultClusterCallback callback) { - stopMotion(chipClusterPtr, callback); + stopMotion(chipClusterPtr, callback, null); + } + + public void stopMotion(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + stopMotion(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void upOrOpen(DefaultClusterCallback callback) { - upOrOpen(chipClusterPtr, callback); + upOrOpen(chipClusterPtr, callback, null); } - private native void downOrClose(long chipClusterPtr, DefaultClusterCallback Callback); + public void upOrOpen(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + upOrOpen(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + private native void downOrClose( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); private native void goToLiftPercentage( long chipClusterPtr, DefaultClusterCallback Callback, Integer liftPercentageValue, - Integer liftPercent100thsValue); + Integer liftPercent100thsValue, + @Nullable Integer timedInvokeTimeoutMs); private native void goToLiftValue( - long chipClusterPtr, DefaultClusterCallback Callback, Integer liftValue); + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer liftValue, + @Nullable Integer timedInvokeTimeoutMs); private native void goToTiltPercentage( long chipClusterPtr, DefaultClusterCallback Callback, Integer tiltPercentageValue, - Integer tiltPercent100thsValue); + Integer tiltPercent100thsValue, + @Nullable Integer timedInvokeTimeoutMs); private native void goToTiltValue( - long chipClusterPtr, DefaultClusterCallback Callback, Integer tiltValue); + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer tiltValue, + @Nullable Integer timedInvokeTimeoutMs); - private native void stopMotion(long chipClusterPtr, DefaultClusterCallback Callback); + private native void stopMotion( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); - private native void upOrOpen(long chipClusterPtr, DefaultClusterCallback Callback); + private native void upOrOpen( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable Integer timedInvokeTimeoutMs); public interface CurrentPositionLiftAttributeCallback { void onSuccess(@Nullable Integer value); @@ -14554,7 +17533,12 @@ public void readModeAttribute(IntegerAttributeCallback callback) { } public void writeModeAttribute(DefaultClusterCallback callback, Integer value) { - writeModeAttribute(chipClusterPtr, callback, value); + writeModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeModeAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeModeAttribute( @@ -14715,7 +17699,10 @@ private native void subscribeInstalledClosedLimitTiltAttribute( private native void readModeAttribute(long chipClusterPtr, IntegerAttributeCallback callback); private native void writeModeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); private native void subscribeModeAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index b689eb3b748e05..730bf738b7b033 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -4597,7 +4597,8 @@ public Map> getCommandMap() { ((ChipClusters.AccountLoginCluster) cluster) .getSetupPINRequest( (ChipClusters.AccountLoginCluster.GetSetupPINResponseCallback) callback, - (String) commandArguments.get("tempAccountIdentifier")); + (String) commandArguments.get("tempAccountIdentifier"), + 10000); }, () -> new DelegatedGetSetupPINResponseCallback(), accountLogingetSetupPINRequestCommandParams); @@ -4636,7 +4637,7 @@ public Map> getCommandMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.AccountLoginCluster) cluster) - .logoutRequest((DefaultClusterCallback) callback); + .logoutRequest((DefaultClusterCallback) callback, 10000); }, () -> new DelegatedDefaultClusterCallback(), accountLoginlogoutRequestCommandParams); @@ -8976,7 +8977,7 @@ public Map> getCommandMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.TestClusterCluster) cluster) - .timedInvokeRequest((DefaultClusterCallback) callback); + .timedInvokeRequest((DefaultClusterCallback) callback, 10000); }, () -> new DelegatedDefaultClusterCallback(), testClustertimedInvokeRequestCommandParams); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java index 9acf2b4ab55d94..9f8f7539417b79 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java @@ -1559,7 +1559,9 @@ public Map> getWriteAttributeMap() { (cluster, callback, commandArguments) -> { ((ChipClusters.TestClusterCluster) cluster) .writeTimedWriteBooleanAttribute( - (DefaultClusterCallback) callback, (Boolean) commandArguments.get("value")); + (DefaultClusterCallback) callback, + (Boolean) commandArguments.get("value"), + 10000); }, () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), writeTestClusterTimedWriteBooleanCommandParams); From 56ddde02b5bd8c6b0783364408e9bfe1d64aa790 Mon Sep 17 00:00:00 2001 From: Pankaj Garg Date: Tue, 11 Jan 2022 14:56:28 -0800 Subject: [PATCH 47/64] Use current time during CASE session handshake (#13462) --- src/protocols/secure_channel/CASESession.cpp | 29 ++++++++++++++++---- src/protocols/secure_channel/CASESession.h | 5 ++-- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/src/protocols/secure_channel/CASESession.cpp b/src/protocols/secure_channel/CASESession.cpp index a069263f371b50..23fc70aed7d565 100644 --- a/src/protocols/secure_channel/CASESession.cpp +++ b/src/protocols/secure_channel/CASESession.cpp @@ -1298,15 +1298,14 @@ CHIP_ERROR CASESession::RetrieveIPK(FabricId fabricId, MutableByteSpan & ipk) return CHIP_NO_ERROR; } -// TODO: Remove this and replace with system method to retrieve current time -CHIP_ERROR CASESession::SetEffectiveTime(void) +CHIP_ERROR CASESession::GetHardcodedTime() { using namespace ASN1; ASN1UniversalTime effectiveTime; - effectiveTime.Year = 2021; - effectiveTime.Month = 2; - effectiveTime.Day = 12; + effectiveTime.Year = 2022; + effectiveTime.Month = 1; + effectiveTime.Day = 1; effectiveTime.Hour = 10; effectiveTime.Minute = 10; effectiveTime.Second = 10; @@ -1314,6 +1313,26 @@ CHIP_ERROR CASESession::SetEffectiveTime(void) return ASN1ToChipEpochTime(effectiveTime, mValidContext.mEffectiveTime); } +CHIP_ERROR CASESession::SetEffectiveTime() +{ + System::Clock::Milliseconds64 currentTimeMS; + CHIP_ERROR err = System::SystemClock().GetClock_RealTimeMS(currentTimeMS); + if (err == CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE) + { + ChipLogError( + SecureChannel, + "The device does not support GetClock_RealTimeMS() API. This will eventually result in CASE session setup failures."); + // TODO: Remove use of hardcoded time during CASE setup + return GetHardcodedTime(); + } + ReturnErrorOnFailure(err); + + System::Clock::Seconds32 currentTime = std::chrono::duration_cast(currentTimeMS); + VerifyOrReturnError(UnixEpochToChipEpochTime(currentTime.count(), mValidContext.mEffectiveTime), CHIP_ERROR_INVALID_TIME); + + return CHIP_NO_ERROR; +} + void CASESession::OnSuccessStatusReport() { ChipLogProgress(SecureChannel, "Success status report received. Session was established"); diff --git a/src/protocols/secure_channel/CASESession.h b/src/protocols/secure_channel/CASESession.h index a780c298a6dd9a..ef1309790b5b48 100644 --- a/src/protocols/secure_channel/CASESession.h +++ b/src/protocols/secure_channel/CASESession.h @@ -226,8 +226,9 @@ class DLL_EXPORT CASESession : public Messaging::ExchangeDelegate, public Pairin */ void DiscardExchange(); - // TODO: Remove this and replace with system method to retrieve current time - CHIP_ERROR SetEffectiveTime(void); + CHIP_ERROR GetHardcodedTime(); + + CHIP_ERROR SetEffectiveTime(); CHIP_ERROR ValidateReceivedMessage(Messaging::ExchangeContext * ec, const PayloadHeader & payloadHeader, System::PacketBufferHandle & msg); From 5c2c4bd1311edcb2cb50a6937a97f0ca8e5fa8ad Mon Sep 17 00:00:00 2001 From: Austin Hsieh <77706079+austinh0@users.noreply.github.com> Date: Tue, 11 Jan 2022 15:05:21 -0800 Subject: [PATCH 48/64] Make Java cluster id a constant instead of a method (#13469) --- .../java/templates/ChipClusters-java.zapt | 6 +- .../chip/devicecontroller/ChipClusters.java | 366 ++++++------------ 2 files changed, 124 insertions(+), 248 deletions(-) diff --git a/src/controller/java/templates/ChipClusters-java.zapt b/src/controller/java/templates/ChipClusters-java.zapt index 4c54d8926c9c6f..37ae51f5e88ad3 100644 --- a/src/controller/java/templates/ChipClusters-java.zapt +++ b/src/controller/java/templates/ChipClusters-java.zapt @@ -83,14 +83,12 @@ public class ChipClusters { {{#chip_client_clusters}} public static class {{asUpperCamelCase name}}Cluster extends BaseChipCluster { + public static final long CLUSTER_ID = {{code}}L; + public {{asUpperCamelCase name}}Cluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("{{code}}"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); {{#chip_cluster_commands}} diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index b3dacb534f2601..52dff5986bd32f 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -113,14 +113,12 @@ protected void finalize() throws Throwable { } public static class AccessControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 31L; + public AccessControlCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("31"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -231,14 +229,12 @@ private native void readClusterRevisionAttribute( } public static class AccountLoginCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1294L; + public AccountLoginCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1294"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -322,14 +318,12 @@ private native void subscribeClusterRevisionAttribute( } public static class AdministratorCommissioningCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 60L; + public AdministratorCommissioningCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("60"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -476,14 +470,12 @@ private native void subscribeClusterRevisionAttribute( } public static class ApplicationBasicCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1293L; + public ApplicationBasicCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1293"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -633,14 +625,12 @@ private native void subscribeClusterRevisionAttribute( } public static class ApplicationLauncherCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1292L; + public ApplicationLauncherCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1292"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -766,14 +756,12 @@ private native void subscribeClusterRevisionAttribute( } public static class AudioOutputCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1291L; + public AudioOutputCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1291"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -900,14 +888,12 @@ private native void subscribeClusterRevisionAttribute( } public static class BarrierControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 259L; + public BarrierControlCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("259"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -1031,14 +1017,12 @@ private native void subscribeClusterRevisionAttribute( } public static class BasicCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 40L; + public BasicCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("40"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -1450,14 +1434,12 @@ private native void subscribeClusterRevisionAttribute( } public static class BinaryInputBasicCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 15L; + public BinaryInputBasicCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("15"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -1568,14 +1550,12 @@ private native void subscribeClusterRevisionAttribute( } public static class BindingCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 30L; + public BindingCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("30"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -1668,14 +1648,12 @@ private native void subscribeClusterRevisionAttribute( } public static class BooleanStateCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 69L; + public BooleanStateCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("69"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -1726,14 +1704,12 @@ private native void subscribeClusterRevisionAttribute( } public static class BridgedActionsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 37L; + public BridgedActionsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("37"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -2160,14 +2136,12 @@ private native void subscribeClusterRevisionAttribute( } public static class BridgedDeviceBasicCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 57L; + public BridgedDeviceBasicCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("57"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -2203,14 +2177,12 @@ private native void subscribeClusterRevisionAttribute( } public static class ChannelCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1284L; + public ChannelCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1284"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -2367,14 +2339,12 @@ private native void subscribeClusterRevisionAttribute( } public static class ColorControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 768L; + public ColorControlCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("768"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -4221,14 +4191,12 @@ private native void subscribeClusterRevisionAttribute( } public static class ContentLauncherCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1290L; + public ContentLauncherCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1290"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -4361,14 +4329,12 @@ private native void subscribeClusterRevisionAttribute( } public static class DescriptorCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 29L; + public DescriptorCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("29"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -4488,14 +4454,12 @@ private native void subscribeClusterRevisionAttribute( } public static class DiagnosticLogsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 50L; + public DiagnosticLogsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("50"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -4554,14 +4518,12 @@ private native void readAttributeListAttribute( } public static class DoorLockCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 257L; + public DoorLockCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("257"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -5169,14 +5131,12 @@ private native void subscribeClusterRevisionAttribute( } public static class ElectricalMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 2820L; + public ElectricalMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("2820"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -5377,14 +5337,12 @@ private native void subscribeClusterRevisionAttribute( } public static class EthernetNetworkDiagnosticsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 55L; + public EthernetNetworkDiagnosticsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("55"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -5575,14 +5533,12 @@ private native void subscribeClusterRevisionAttribute( } public static class FixedLabelCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 64L; + public FixedLabelCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("64"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -5657,14 +5613,12 @@ private native void subscribeClusterRevisionAttribute( } public static class FlowMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1028L; + public FlowMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1028"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -5760,14 +5714,12 @@ private native void subscribeClusterRevisionAttribute( } public static class GeneralCommissioningCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 48L; + public GeneralCommissioningCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("48"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -5980,14 +5932,12 @@ private native void subscribeClusterRevisionAttribute( } public static class GeneralDiagnosticsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 51L; + public GeneralDiagnosticsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("51"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -6196,14 +6146,12 @@ private native void subscribeClusterRevisionAttribute( } public static class GroupKeyManagementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 63L; + public GroupKeyManagementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("63"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -6469,14 +6417,12 @@ private native void subscribeClusterRevisionAttribute( } public static class GroupsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 4L; + public GroupsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("4"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -6651,14 +6597,12 @@ private native void subscribeClusterRevisionAttribute( } public static class IdentifyCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 3L; + public IdentifyCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("3"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -6794,14 +6738,12 @@ private native void subscribeClusterRevisionAttribute( } public static class IlluminanceMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1024L; + public IlluminanceMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1024"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -6956,14 +6898,12 @@ private native void subscribeClusterRevisionAttribute( } public static class KeypadInputCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1289L; + public KeypadInputCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1289"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -7020,14 +6960,12 @@ private native void subscribeClusterRevisionAttribute( } public static class LevelControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 8L; + public LevelControlCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("8"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -7634,14 +7572,12 @@ private native void subscribeClusterRevisionAttribute( } public static class LocalizationConfigurationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 43L; + public LocalizationConfigurationCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("43"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -7684,14 +7620,12 @@ private native void readSupportedLocalesAttribute( } public static class LowPowerCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1288L; + public LowPowerCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1288"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -7740,14 +7674,12 @@ private native void subscribeClusterRevisionAttribute( } public static class MediaInputCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1287L; + public MediaInputCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1287"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -7907,14 +7839,12 @@ private native void subscribeClusterRevisionAttribute( } public static class MediaPlaybackCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1286L; + public MediaPlaybackCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1286"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -8192,14 +8122,12 @@ private native void subscribeClusterRevisionAttribute( } public static class ModeSelectCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 80L; + public ModeSelectCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("80"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -8372,14 +8300,12 @@ private native void subscribeClusterRevisionAttribute( } public static class NetworkCommissioningCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 49L; + public NetworkCommissioningCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("49"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -8670,14 +8596,12 @@ private native void subscribeClusterRevisionAttribute( } public static class OtaSoftwareUpdateProviderCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 41L; + public OtaSoftwareUpdateProviderCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("41"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -8836,14 +8760,12 @@ private native void subscribeClusterRevisionAttribute( } public static class OtaSoftwareUpdateRequestorCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 42L; + public OtaSoftwareUpdateRequestorCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("42"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -9028,14 +8950,12 @@ private native void subscribeClusterRevisionAttribute( } public static class OccupancySensingCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1030L; + public OccupancySensingCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1030"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -9117,14 +9037,12 @@ private native void subscribeClusterRevisionAttribute( } public static class OnOffCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 6L; + public OnOffCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("6"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -9391,14 +9309,12 @@ private native void subscribeClusterRevisionAttribute( } public static class OnOffSwitchConfigurationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 7L; + public OnOffSwitchConfigurationCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("7"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -9479,14 +9395,12 @@ private native void subscribeClusterRevisionAttribute( } public static class OperationalCredentialsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 62L; + public OperationalCredentialsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("62"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -9864,14 +9778,12 @@ private native void subscribeClusterRevisionAttribute( } public static class PowerSourceCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 47L; + public PowerSourceCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("47"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -10058,14 +9970,12 @@ private native void subscribeClusterRevisionAttribute( } public static class PowerSourceConfigurationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 46L; + public PowerSourceConfigurationCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("46"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -10108,14 +10018,12 @@ private native void readClusterRevisionAttribute( } public static class PressureMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1027L; + public PressureMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1027"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -10196,14 +10104,12 @@ private native void subscribeClusterRevisionAttribute( } public static class PumpConfigurationAndControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 512L; + public PumpConfigurationAndControlCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("512"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -10697,14 +10603,12 @@ private native void subscribeClusterRevisionAttribute( } public static class RelativeHumidityMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1029L; + public RelativeHumidityMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1029"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -10800,14 +10704,12 @@ private native void subscribeClusterRevisionAttribute( } public static class ScenesCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 5L; + public ScenesCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("5"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -11128,14 +11030,12 @@ private native void subscribeClusterRevisionAttribute( } public static class SoftwareDiagnosticsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 52L; + public SoftwareDiagnosticsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("52"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -11295,14 +11195,12 @@ private native void subscribeClusterRevisionAttribute( } public static class SwitchCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 59L; + public SwitchCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("59"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -11398,14 +11296,12 @@ private native void subscribeClusterRevisionAttribute( } public static class TargetNavigatorCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1285L; + public TargetNavigatorCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1285"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -11521,14 +11417,12 @@ private native void subscribeClusterRevisionAttribute( } public static class TemperatureMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1026L; + public TemperatureMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1026"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -11624,14 +11518,12 @@ private native void subscribeClusterRevisionAttribute( } public static class TestClusterCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1295L; + public TestClusterCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1295"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -14719,14 +14611,12 @@ private native void subscribeClusterRevisionAttribute( } public static class ThermostatCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 513L; + public ThermostatCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("513"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -15303,14 +15193,12 @@ private native void subscribeClusterRevisionAttribute( } public static class ThermostatUserInterfaceConfigurationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 516L; + public ThermostatUserInterfaceConfigurationCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("516"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -15440,14 +15328,12 @@ private native void subscribeClusterRevisionAttribute( } public static class ThreadNetworkDiagnosticsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 53L; + public ThreadNetworkDiagnosticsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("53"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -16774,14 +16660,12 @@ private native void subscribeClusterRevisionAttribute( } public static class UserLabelCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 65L; + public UserLabelCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("65"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -16833,14 +16717,12 @@ private native void readClusterRevisionAttribute( } public static class WakeOnLanCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1283L; + public WakeOnLanCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1283"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -16894,14 +16776,12 @@ private native void subscribeClusterRevisionAttribute( } public static class WiFiNetworkDiagnosticsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 54L; + public WiFiNetworkDiagnosticsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("54"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -17154,14 +17034,12 @@ private native void subscribeClusterRevisionAttribute( } public static class WindowCoveringCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 258L; + public WindowCoveringCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("258"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); From 20dea72f6790aa82cd0101825bc1e8151eb2b2dc Mon Sep 17 00:00:00 2001 From: "Hui.Li-TCL" Date: Wed, 12 Jan 2022 07:22:47 +0800 Subject: [PATCH 49/64] Android java endpoint and fix memory errors (#13398) * added endpoint support in Java * fix jni sign error * fix memory error in media input cluster on android * fix restyled-io and ci errors * fix memory issus in channel cluster * fix memory issus in content launcher cluster * fix memory issue in wake up on lan launcher cluster * fix media playback cluster issue in last PR * fix restyled-io and ci errors * fix CI issue --- .../chiptvserver/service/MatterServant.java | 36 +++- examples/tv-app/android/BUILD.gn | 3 + .../tv-app/android/java/ChannelManager.cpp | 114 ++++++----- examples/tv-app/android/java/ChannelManager.h | 19 +- .../android/java/ContentLauncherManager.cpp | 77 ++++---- .../android/java/ContentLauncherManager.h | 25 +-- .../android/java/KeypadInputManager.cpp | 27 +-- .../tv-app/android/java/KeypadInputManager.h | 10 +- .../tv-app/android/java/LowPowerManager.cpp | 24 ++- .../tv-app/android/java/LowPowerManager.h | 10 +- .../tv-app/android/java/MediaInputManager.cpp | 42 ++-- .../tv-app/android/java/MediaInputManager.h | 13 +- .../android/java/MediaPlaybackManager.cpp | 184 +++++++++++++----- .../android/java/MediaPlaybackManager.h | 29 ++- examples/tv-app/android/java/TVApp-JNI.cpp | 73 +++++-- examples/tv-app/android/java/TvApp-JNI.h | 40 ++++ .../tv-app/android/java/WakeOnLanManager.cpp | 45 ++--- .../tv-app/android/java/WakeOnLanManager.h | 12 +- .../src/com/tcl/chip/tvapp/ChannelInfo.java | 25 ++- .../tcl/chip/tvapp/ChannelManagerStub.java | 47 ++++- .../java/src/com/tcl/chip/tvapp/Clusters.java | 138 +++++++++++++ .../tcl/chip/tvapp/ContentLaunchManager.java | 6 +- .../chip/tvapp/ContentLaunchManagerStub.java | 34 ++-- .../chip/tvapp/KeypadInputManagerStub.java | 11 +- .../tcl/chip/tvapp/LowPowerManagerStub.java | 8 +- .../tcl/chip/tvapp/MediaInputManagerStub.java | 24 ++- .../tcl/chip/tvapp/MediaPlaybackManager.java | 15 +- .../chip/tvapp/MediaPlaybackManagerStub.java | 54 ++--- .../tcl/chip/tvapp/MediaPlaybackPosition.java | 13 ++ .../java/src/com/tcl/chip/tvapp/TvApp.java | 33 +++- .../src/com/tcl/chip/tvapp/TvAppCallback.java | 21 ++ .../com/tcl/chip/tvapp/WakeOnLanManager.java | 2 +- .../tcl/chip/tvapp/WakeOnLanManagerStub.java | 8 +- .../linux/include/channel/ChannelManager.cpp | 48 +++-- .../linux/include/channel/ChannelManager.h | 10 +- .../ContentLauncherManager.cpp | 37 ++-- .../content-launcher/ContentLauncherManager.h | 21 +- .../include/media-input/MediaInputManager.cpp | 29 +-- .../include/media-input/MediaInputManager.h | 3 +- .../include/wake-on-lan/WakeOnLanManager.cpp | 4 +- .../include/wake-on-lan/WakeOnLanManager.h | 2 +- examples/tv-app/linux/main.cpp | 3 +- src/app/BUILD.gn | 1 + src/app/CommandResponseHelper.h | 61 ++++++ .../channel-server/channel-delegate.h | 18 +- .../channel-server/channel-server.cpp | 32 ++- .../content-launch-delegate.h | 14 +- .../content-launch-server.cpp | 32 ++- .../media-input-server/media-input-delegate.h | 15 +- .../media-input-server/media-input-server.cpp | 9 +- .../wake-on-lan-server/wake-on-lan-delegate.h | 3 +- .../wake-on-lan-server/wake-on-lan-server.cpp | 3 +- src/lib/support/JniTypeWrappers.h | 8 +- 53 files changed, 1076 insertions(+), 499 deletions(-) create mode 100644 examples/tv-app/android/java/TvApp-JNI.h create mode 100644 examples/tv-app/android/java/src/com/tcl/chip/tvapp/Clusters.java create mode 100644 examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaPlaybackPosition.java create mode 100644 examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvAppCallback.java create mode 100644 src/app/CommandResponseHelper.h diff --git a/examples/tv-app/android/App/app/src/main/java/com/tcl/chip/chiptvserver/service/MatterServant.java b/examples/tv-app/android/App/app/src/main/java/com/tcl/chip/chiptvserver/service/MatterServant.java index fffb60be46040b..d6798354058b93 100644 --- a/examples/tv-app/android/App/app/src/main/java/com/tcl/chip/chiptvserver/service/MatterServant.java +++ b/examples/tv-app/android/App/app/src/main/java/com/tcl/chip/chiptvserver/service/MatterServant.java @@ -10,6 +10,7 @@ import chip.platform.PreferencesConfigurationManager; import chip.platform.PreferencesKeyValueStoreManager; import com.tcl.chip.tvapp.ChannelManagerStub; +import com.tcl.chip.tvapp.Clusters; import com.tcl.chip.tvapp.ContentLaunchManagerStub; import com.tcl.chip.tvapp.KeypadInputManagerStub; import com.tcl.chip.tvapp.LowPowerManagerStub; @@ -33,14 +34,33 @@ public static MatterServant get() { } public void init(@NonNull Context context) { - TvApp tvApp = new TvApp(); - tvApp.setKeypadInputManager(new KeypadInputManagerStub()); - tvApp.setWakeOnLanManager(new WakeOnLanManagerStub()); - tvApp.setMediaInputManager(new MediaInputManagerStub()); - tvApp.setContentLaunchManager(new ContentLaunchManagerStub()); - tvApp.setLowPowerManager(new LowPowerManagerStub()); - tvApp.setMediaPlaybackManager(new MediaPlaybackManagerStub()); - tvApp.setChannelManager(new ChannelManagerStub()); + TvApp tvApp = + new TvApp( + (app, clusterId, endpoint) -> { + switch (clusterId) { + case Clusters.ClusterId_KeypadInput: + app.setKeypadInputManager(endpoint, new KeypadInputManagerStub(endpoint)); + break; + case Clusters.ClusterId_WakeOnLan: + app.setWakeOnLanManager(endpoint, new WakeOnLanManagerStub(endpoint)); + break; + case Clusters.ClusterId_MediaInput: + app.setMediaInputManager(endpoint, new MediaInputManagerStub(endpoint)); + break; + case Clusters.ClusterId_ContentLauncher: + app.setContentLaunchManager(endpoint, new ContentLaunchManagerStub(endpoint)); + break; + case Clusters.ClusterId_LowPower: + app.setLowPowerManager(endpoint, new LowPowerManagerStub(endpoint)); + break; + case Clusters.ClusterId_MediaPlayback: + app.setMediaPlaybackManager(endpoint, new MediaPlaybackManagerStub(endpoint)); + break; + case Clusters.ClusterId_Channel: + app.setChannelManager(endpoint, new ChannelManagerStub(endpoint)); + break; + } + }); Context applicationContext = context.getApplicationContext(); AndroidChipPlatform chipPlatform = diff --git a/examples/tv-app/android/BUILD.gn b/examples/tv-app/android/BUILD.gn index d77831c649d5fa..da112196c57e6a 100644 --- a/examples/tv-app/android/BUILD.gn +++ b/examples/tv-app/android/BUILD.gn @@ -87,6 +87,7 @@ android_library("java") { "java/src/com/tcl/chip/tvapp/ChannelLineupInfo.java", "java/src/com/tcl/chip/tvapp/ChannelManager.java", "java/src/com/tcl/chip/tvapp/ChannelManagerStub.java", + "java/src/com/tcl/chip/tvapp/Clusters.java", "java/src/com/tcl/chip/tvapp/ContentLaunchBrandingInformation.java", "java/src/com/tcl/chip/tvapp/ContentLaunchManager.java", "java/src/com/tcl/chip/tvapp/ContentLaunchManagerStub.java", @@ -101,7 +102,9 @@ android_library("java") { "java/src/com/tcl/chip/tvapp/MediaInputManagerStub.java", "java/src/com/tcl/chip/tvapp/MediaPlaybackManager.java", "java/src/com/tcl/chip/tvapp/MediaPlaybackManagerStub.java", + "java/src/com/tcl/chip/tvapp/MediaPlaybackPosition.java", "java/src/com/tcl/chip/tvapp/TvApp.java", + "java/src/com/tcl/chip/tvapp/TvAppCallback.java", "java/src/com/tcl/chip/tvapp/WakeOnLanManager.java", "java/src/com/tcl/chip/tvapp/WakeOnLanManagerStub.java", ] diff --git a/examples/tv-app/android/java/ChannelManager.cpp b/examples/tv-app/android/java/ChannelManager.cpp index cd0b2f79fd4a0c..fa4969e489b2c8 100644 --- a/examples/tv-app/android/java/ChannelManager.cpp +++ b/examples/tv-app/android/java/ChannelManager.cpp @@ -16,6 +16,9 @@ */ #include "ChannelManager.h" +#include "TvApp-JNI.h" +#include +#include #include #include #include @@ -24,13 +27,31 @@ using namespace chip; using namespace chip::app::Clusters::Channel; -namespace { -static ChannelManager channelManager; -} // namespace +/** @brief Channel Cluster Init + * + * This function is called when a specific cluster is initialized. It gives the + * application an opportunity to take care of cluster initialization procedures. + * It is called exactly once for each endpoint where cluster is present. + * + * @param endpoint Ver.: always + * + */ +void emberAfChannelClusterInitCallback(EndpointId endpoint) +{ + ChipLogProgress(Zcl, "TV Android App: Channel::PostClusterInit"); + TvAppJNIMgr().PostClusterInit(chip::app::Clusters::Channel::Id, endpoint); +} -std::list ChannelManager::HandleGetChannelList() +void ChannelManager::NewManager(jint endpoint, jobject manager) +{ + ChipLogProgress(Zcl, "TV Android App: Channel::SetDefaultDelegate"); + ChannelManager * mgr = new ChannelManager(); + mgr->InitializeWithObjects(manager); + chip::app::Clusters::Channel::SetDefaultDelegate(static_cast(endpoint), mgr); +} + +CHIP_ERROR ChannelManager::HandleGetChannelList(chip::app::AttributeValueEncoder & aEncoder) { - std::list list; CHIP_ERROR err = CHIP_NO_ERROR; JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -39,9 +60,17 @@ std::list ChannelManag VerifyOrExit(mGetChannelListMethod != nullptr, err = CHIP_ERROR_INCORRECT_STATE); VerifyOrExit(env != NULL, err = CHIP_JNI_ERROR_NO_ENV); - { + return aEncoder.EncodeList([this, env](const auto & encoder) -> CHIP_ERROR { jobjectArray channelInfoList = (jobjectArray) env->CallObjectMethod(mChannelManagerObject, mGetChannelListMethod); - jint length = env->GetArrayLength(channelInfoList); + if (env->ExceptionCheck()) + { + ChipLogError(Zcl, "Java exception in ChannelManager::HandleGetChannelList"); + env->ExceptionDescribe(); + env->ExceptionClear(); + return CHIP_ERROR_INCORRECT_STATE; + } + + jint length = env->GetArrayLength(channelInfoList); for (jint i = 0; i < length; i++) { @@ -62,7 +91,7 @@ std::list ChannelManag if (jname != NULL) { JniUtfString name(env, jname); - channelInfo.callSign = name.charSpan(); + channelInfo.name = name.charSpan(); } jfieldID getJaffiliateCallSignField = env->GetFieldID(channelClass, "affiliateCallSign", "Ljava/lang/String;"); @@ -70,7 +99,7 @@ std::list ChannelManag if (jaffiliateCallSign != NULL) { JniUtfString affiliateCallSign(env, jaffiliateCallSign); - channelInfo.callSign = affiliateCallSign.charSpan(); + channelInfo.affiliateCallSign = affiliateCallSign.charSpan(); } jfieldID majorNumField = env->GetFieldID(channelClass, "majorNumber", "I"); @@ -79,10 +108,13 @@ std::list ChannelManag jfieldID minorNumField = env->GetFieldID(channelClass, "minorNumber", "I"); jint jminorNum = env->GetIntField(channelObject, minorNumField); - channelInfo.majorNumber = static_cast(jminorNum); - list.push_back(channelInfo); + channelInfo.minorNumber = static_cast(jminorNum); + + ReturnErrorOnFailure(encoder.Encode(channelInfo)); } - } + + return CHIP_NO_ERROR; + }); exit: if (err != CHIP_NO_ERROR) @@ -90,10 +122,10 @@ std::list ChannelManag ChipLogError(Zcl, "ChannelManager::getChannelList status error: %s", err.AsString()); } - return list; + return err; } -chip::app::Clusters::Channel::Structs::LineupInfo::Type ChannelManager::HandleGetLineup() +CHIP_ERROR ChannelManager::HandleGetLineup(chip::app::AttributeValueEncoder & aEncoder) { chip::app::Clusters::Channel::Structs::LineupInfo::Type lineupInfo; CHIP_ERROR err = CHIP_NO_ERROR; @@ -135,6 +167,8 @@ chip::app::Clusters::Channel::Structs::LineupInfo::Type ChannelManager::HandleGe jfieldID lineupInfoTypeFild = env->GetFieldID(channelLineupClazz, "lineupInfoTypeEnum", "I"); jint jlineupInfoType = (env->GetIntField(channelLineupObject, lineupInfoTypeFild)); lineupInfo.lineupInfoType = static_cast(jlineupInfoType); + + err = aEncoder.Encode(lineupInfo); } exit: @@ -143,10 +177,10 @@ chip::app::Clusters::Channel::Structs::LineupInfo::Type ChannelManager::HandleGe ChipLogError(Zcl, "ChannelManager::getChannelLineup status error: %s", err.AsString()); } - return lineupInfo; + return err; } -chip::app::Clusters::Channel::Structs::ChannelInfo::Type ChannelManager::HandleGetCurrentChannel() +CHIP_ERROR ChannelManager::HandleGetCurrentChannel(chip::app::AttributeValueEncoder & aEncoder) { chip::app::Clusters::Channel::Structs::ChannelInfo::Type channelInfo; CHIP_ERROR err = CHIP_NO_ERROR; @@ -173,7 +207,7 @@ chip::app::Clusters::Channel::Structs::ChannelInfo::Type ChannelManager::HandleG if (jname != NULL) { JniUtfString name(env, jname); - channelInfo.callSign = name.charSpan(); + channelInfo.name = name.charSpan(); } jfieldID getJaffiliateCallSignField = env->GetFieldID(channelClass, "affiliateCallSign", "Ljava/lang/String;"); @@ -181,7 +215,7 @@ chip::app::Clusters::Channel::Structs::ChannelInfo::Type ChannelManager::HandleG if (jaffiliateCallSign != NULL) { JniUtfString affiliateCallSign(env, jaffiliateCallSign); - channelInfo.callSign = affiliateCallSign.charSpan(); + channelInfo.affiliateCallSign = affiliateCallSign.charSpan(); } jfieldID majorNumField = env->GetFieldID(channelClass, "majorNumber", "I"); @@ -190,7 +224,9 @@ chip::app::Clusters::Channel::Structs::ChannelInfo::Type ChannelManager::HandleG jfieldID minorNumField = env->GetFieldID(channelClass, "minorNumber", "I"); jint jminorNum = env->GetIntField(channelInfoObject, minorNumField); - channelInfo.majorNumber = static_cast(jminorNum); + channelInfo.minorNumber = static_cast(jminorNum); + + err = aEncoder.Encode(channelInfo); } exit: @@ -199,10 +235,12 @@ chip::app::Clusters::Channel::Structs::ChannelInfo::Type ChannelManager::HandleG ChipLogError(Zcl, "ChannelManager::HandleGetCurrentChannel status error: %s", err.AsString()); } - return channelInfo; + return err; } -Commands::ChangeChannelResponse::Type ChannelManager::HandleChangeChannel(const chip::CharSpan & match) +void ChannelManager::HandleChangeChannel( + const chip::CharSpan & match, + chip::app::CommandResponseHelper & responser) { std::string name(match.data(), match.size()); JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -225,11 +263,15 @@ Commands::ChangeChannelResponse::Type ChannelManager::HandleChangeChannel(const ChipLogError(DeviceLayer, "Java exception in ChannelManager::HandleChangeChannel"); env->ExceptionDescribe(); env->ExceptionClear(); - return response; + goto exit; } jclass channelClass = env->GetObjectClass(channelObject); + jfieldID getErrorTypeField = env->GetFieldID(channelClass, "errorType", "I"); + jint jerrorType = env->GetIntField(channelObject, getErrorTypeField); + response.errorType = static_cast(jerrorType); + jfieldID getCallSignField = env->GetFieldID(channelClass, "callSign", "Ljava/lang/String;"); jstring jcallSign = static_cast(env->GetObjectField(channelObject, getCallSignField)); if (jcallSign != NULL) @@ -243,14 +285,14 @@ Commands::ChangeChannelResponse::Type ChannelManager::HandleChangeChannel(const if (jname != NULL) { JniUtfString junitname(env, jname); - response.channelMatch.callSign = junitname.charSpan(); + response.channelMatch.name = junitname.charSpan(); } jfieldID getJaffiliateCallSignField = env->GetFieldID(channelClass, "affiliateCallSign", "Ljava/lang/String;"); jstring jaffiliateCallSign = static_cast(env->GetObjectField(channelObject, getJaffiliateCallSignField)); if (jaffiliateCallSign != NULL) { JniUtfString affiliateCallSign(env, jaffiliateCallSign); - response.channelMatch.callSign = affiliateCallSign.charSpan(); + response.channelMatch.affiliateCallSign = affiliateCallSign.charSpan(); } jfieldID majorNumField = env->GetFieldID(channelClass, "majorNumber", "I"); @@ -259,12 +301,13 @@ Commands::ChangeChannelResponse::Type ChannelManager::HandleChangeChannel(const jfieldID minorNumField = env->GetFieldID(channelClass, "minorNumber", "I"); jint jminorNum = env->GetIntField(channelObject, minorNumField); - response.channelMatch.majorNumber = static_cast(jminorNum); + response.channelMatch.minorNumber = static_cast(jminorNum); + + responser.Success(response); } exit: - - return response; + return; } bool ChannelManager::HandleChangeChannelByNumber(const uint16_t & majorNumber, const uint16_t & minorNumber) @@ -372,20 +415,3 @@ void ChannelManager::InitializeWithObjects(jobject managerObject) env->ExceptionClear(); } } - -ChannelManager ChannelManager::sInstance; - -/** @brief Channel Cluster Init - * - * This function is called when a specific cluster is initialized. It gives the - * application an opportunity to take care of cluster initialization procedures. - * It is called exactly once for each endpoint where cluster is present. - * - * @param endpoint Ver.: always - * - */ -void emberAfChannelClusterInitCallback(EndpointId endpoint) -{ - ChipLogProgress(Zcl, "TV Android App: Channel::SetDefaultDelegate"); - chip::app::Clusters::Channel::SetDefaultDelegate(endpoint, &channelManager); -} diff --git a/examples/tv-app/android/java/ChannelManager.h b/examples/tv-app/android/java/ChannelManager.h index 0ed1659d7e51e8..e898c56c7e5093 100644 --- a/examples/tv-app/android/java/ChannelManager.h +++ b/examples/tv-app/android/java/ChannelManager.h @@ -23,20 +23,20 @@ class ChannelManager : public chip::app::Clusters::Channel::Delegate { public: + static void NewManager(jint endpoint, jobject manager); void InitializeWithObjects(jobject managerObject); - std::list HandleGetChannelList() override; - chip::app::Clusters::Channel::Structs::LineupInfo::Type HandleGetLineup() override; - chip::app::Clusters::Channel::Structs::ChannelInfo::Type HandleGetCurrentChannel() override; + virtual CHIP_ERROR HandleGetChannelList(chip::app::AttributeValueEncoder & aEncoder) override; + virtual CHIP_ERROR HandleGetLineup(chip::app::AttributeValueEncoder & aEncoder) override; + virtual CHIP_ERROR HandleGetCurrentChannel(chip::app::AttributeValueEncoder & aEncoder) override; - chip::app::Clusters::Channel::Commands::ChangeChannelResponse::Type HandleChangeChannel(const chip::CharSpan & match) override; + virtual void HandleChangeChannel( + const chip::CharSpan & match, + chip::app::CommandResponseHelper & responser) override; bool HandleChangeChannelByNumber(const uint16_t & majorNumber, const uint16_t & minorNumber) override; bool HandleSkipChannel(const uint16_t & count) override; private: - friend ChannelManager & ChannelMgr(); - - static ChannelManager sInstance; jobject mChannelManagerObject = nullptr; jmethodID mGetChannelListMethod = nullptr; jmethodID mGetLineupMethod = nullptr; @@ -46,8 +46,3 @@ class ChannelManager : public chip::app::Clusters::Channel::Delegate jmethodID mChangeChannelByNumberMethod = nullptr; jmethodID mSkipChannelMethod = nullptr; }; - -inline class ChannelManager & ChannelMgr() -{ - return ChannelManager::sInstance; -} diff --git a/examples/tv-app/android/java/ContentLauncherManager.cpp b/examples/tv-app/android/java/ContentLauncherManager.cpp index 4298fe24c1d364..e5fa67e9d6916b 100644 --- a/examples/tv-app/android/java/ContentLauncherManager.cpp +++ b/examples/tv-app/android/java/ContentLauncherManager.cpp @@ -17,7 +17,8 @@ */ #include "ContentLauncherManager.h" - +#include "TvApp-JNI.h" +#include #include #include #include @@ -28,21 +29,23 @@ using namespace std; using namespace chip; using namespace chip::app::Clusters::ContentLauncher; -ContentLauncherManager ContentLauncherManager::sInstance; - -namespace { -static ContentLauncherManager contentLauncherManager; -} // namespace - void emberAfContentLauncherClusterInitCallback(EndpointId endpoint) { - ChipLogProgress(Zcl, "TV Linux App: ContentLauncher::SetDelegate"); - chip::app::Clusters::ContentLauncher::SetDelegate(endpoint, &contentLauncherManager); + ChipLogProgress(Zcl, "TV Android App: ContentLauncher::PostClusterInit"); + TvAppJNIMgr().PostClusterInit(chip::app::Clusters::ContentLauncher::Id, endpoint); +} + +void ContentLauncherManager::NewManager(jint endpoint, jobject manager) +{ + ChipLogProgress(Zcl, "TV Android App: ContentLauncher::SetDefaultDelegate"); + ContentLauncherManager * mgr = new ContentLauncherManager(); + mgr->InitializeWithObjects(manager); + chip::app::Clusters::ContentLauncher::SetDelegate(static_cast(endpoint), mgr); } -Commands::LaunchResponse::Type ContentLauncherManager::HandleLaunchContent(chip::EndpointId endpointId, - const std::list & parameterList, - bool autoplay, const chip::CharSpan & data) +void ContentLauncherManager::HandleLaunchContent( + const std::list & parameterList, bool autoplay, const chip::CharSpan & data, + chip::app::CommandResponseHelper & responser) { Commands::LaunchResponse::Type response; CHIP_ERROR err = CHIP_NO_ERROR; @@ -59,8 +62,8 @@ Commands::LaunchResponse::Type ContentLauncherManager::HandleLaunchContent(chip: // Todo: make parameterList java jobjectArray parameterArray = nullptr; - jobject resp = - env->CallObjectMethod(mContentLauncherManagerObject, mLaunchContentMethod, parameterArray, autoplay, jData.jniValue()); + jobject resp = env->CallObjectMethod(mContentLauncherManagerObject, mLaunchContentMethod, parameterArray, + static_cast(autoplay), jData.jniValue()); if (env->ExceptionCheck()) { ChipLogError(Zcl, "Java exception in ContentLauncherManager::LaunchContent"); @@ -83,6 +86,8 @@ Commands::LaunchResponse::Type ContentLauncherManager::HandleLaunchContent(chip: response.status = static_cast(status); response.data = dataStr.charSpan(); + + err = responser.Success(response); } exit: @@ -90,13 +95,12 @@ Commands::LaunchResponse::Type ContentLauncherManager::HandleLaunchContent(chip: { ChipLogError(Zcl, "ContentLauncherManager::LaunchContent status error: %s", err.AsString()); } - - return response; } -Commands::LaunchResponse::Type ContentLauncherManager::HandleLaunchUrl(const chip::CharSpan & contentUrl, - const chip::CharSpan & displayString, - const std::list & brandingInformation) +void ContentLauncherManager::HandleLaunchUrl( + const chip::CharSpan & contentUrl, const chip::CharSpan & displayString, + const std::list & brandingInformation, + chip::app::CommandResponseHelper & responser) { Commands::LaunchResponse::Type response; CHIP_ERROR err = CHIP_NO_ERROR; @@ -138,6 +142,8 @@ Commands::LaunchResponse::Type ContentLauncherManager::HandleLaunchUrl(const chi response.status = static_cast(status); response.data = dataStr.charSpan(); + + err = responser.Success(response); } exit: @@ -145,11 +151,9 @@ Commands::LaunchResponse::Type ContentLauncherManager::HandleLaunchUrl(const chi { ChipLogError(Zcl, "ContentLauncherManager::LaunchUrl status error: %s", err.AsString()); } - - return response; } -std::list ContentLauncherManager::HandleGetAcceptHeaderList() +CHIP_ERROR ContentLauncherManager::HandleGetAcceptHeaderList(chip::app::AttributeValueEncoder & aEncoder) { CHIP_ERROR err = CHIP_NO_ERROR; JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -160,7 +164,7 @@ std::list ContentLauncherManager::HandleGetAcceptHeaderList() VerifyOrExit(mGetAcceptHeaderMethod != nullptr, err = CHIP_ERROR_INCORRECT_STATE); VerifyOrExit(env != NULL, err = CHIP_JNI_ERROR_NO_ENV); - { + return aEncoder.EncodeList([this, env](const auto & encoder) -> CHIP_ERROR { jobjectArray acceptedHeadersArray = (jobjectArray) env->CallObjectMethod(mContentLauncherManagerObject, mGetAcceptHeaderMethod); if (env->ExceptionCheck()) @@ -168,20 +172,19 @@ std::list ContentLauncherManager::HandleGetAcceptHeaderList() ChipLogError(Zcl, "Java exception in ContentLauncherManager::GetAcceptHeader"); env->ExceptionDescribe(); env->ExceptionClear(); - err = CHIP_ERROR_INCORRECT_STATE; - goto exit; + return CHIP_ERROR_INCORRECT_STATE; } jint size = env->GetArrayLength(acceptedHeadersArray); for (int i = 0; i < size; i++) { - - jstring jAcceptedHeader = (jstring) env->GetObjectArrayElement(acceptedHeadersArray, i); - const char * convertedValue = (env)->GetStringUTFChars(jAcceptedHeader, JNI_FALSE); - std::string acceptedHeader = std::string(convertedValue, strlen(convertedValue)); - acceptedHeadersList.push_front(acceptedHeader); + jstring jAcceptedHeader = (jstring) env->GetObjectArrayElement(acceptedHeadersArray, i); + JniUtfString acceptedHeader(env, jAcceptedHeader); + ReturnErrorOnFailure(encoder.Encode(acceptedHeader.charSpan())); } - } + + return CHIP_NO_ERROR; + }); exit: if (err != CHIP_NO_ERROR) @@ -189,7 +192,7 @@ std::list ContentLauncherManager::HandleGetAcceptHeaderList() ChipLogError(Zcl, "ContentLauncherManager::GetAcceptHeader status error: %s", err.AsString()); } - return acceptedHeadersList; + return err; } uint32_t ContentLauncherManager::HandleGetSupportedStreamingProtocols() @@ -204,8 +207,8 @@ uint32_t ContentLauncherManager::HandleGetSupportedStreamingProtocols() VerifyOrExit(env != NULL, err = CHIP_JNI_ERROR_NO_ENV); { - jint jSupportedStreamingProtocols = - env->CallIntMethod(mContentLauncherManagerObject, mGetSupportedStreamingProtocolsMethod); + jlong jSupportedStreamingProtocols = + env->CallLongMethod(mContentLauncherManagerObject, mGetSupportedStreamingProtocolsMethod); supportedStreamingProtocols = (uint32_t) jSupportedStreamingProtocols; if (env->ExceptionCheck()) { @@ -244,7 +247,7 @@ void ContentLauncherManager::InitializeWithObjects(jobject managerObject) env->ExceptionClear(); } - mGetSupportedStreamingProtocolsMethod = env->GetMethodID(ContentLauncherClass, "getSupportedStreamingProtocols", "()[I"); + mGetSupportedStreamingProtocolsMethod = env->GetMethodID(ContentLauncherClass, "getSupportedStreamingProtocols", "()J"); if (mGetSupportedStreamingProtocolsMethod == nullptr) { ChipLogError(Zcl, "Failed to access ContentLauncherManager 'getSupportedStreamingProtocols' method"); @@ -253,7 +256,7 @@ void ContentLauncherManager::InitializeWithObjects(jobject managerObject) mLaunchContentMethod = env->GetMethodID( ContentLauncherClass, "launchContent", - "([Lcom/tcl/chip/tvapp/ContentLaunchSearchParameter;ZLjava/lang/String;)Lcom/tcl/chip/tvapp/LaunchResponse;"); + "([Lcom/tcl/chip/tvapp/ContentLaunchSearchParameter;ZLjava/lang/String;)Lcom/tcl/chip/tvapp/ContentLaunchResponse;"); if (mLaunchContentMethod == nullptr) { ChipLogError(Zcl, "Failed to access ContentLauncherManager 'launchContent' method"); @@ -262,7 +265,7 @@ void ContentLauncherManager::InitializeWithObjects(jobject managerObject) mLaunchUrlMethod = env->GetMethodID(ContentLauncherClass, "launchUrl", "(Ljava/lang/String;Ljava/lang/String;Lcom/tcl/chip/tvapp/" - "ContentLaunchBrandingInformation;)Lcom/tcl/chip/tvapp/LaunchResponse;"); + "ContentLaunchBrandingInformation;)Lcom/tcl/chip/tvapp/ContentLaunchResponse;"); if (mLaunchUrlMethod == nullptr) { ChipLogError(AppServer, "Failed to access 'launchUrl' method"); diff --git a/examples/tv-app/android/java/ContentLauncherManager.h b/examples/tv-app/android/java/ContentLauncherManager.h index 8ef2bc0fa8287d..22d4a099f58144 100644 --- a/examples/tv-app/android/java/ContentLauncherManager.h +++ b/examples/tv-app/android/java/ContentLauncherManager.h @@ -29,29 +29,24 @@ class ContentLauncherManager : public chip::app::Clusters::ContentLauncher::Delegate { public: + static void NewManager(jint endpoint, jobject manager); void InitializeWithObjects(jobject managerObject); - chip::app::Clusters::ContentLauncher::Commands::LaunchResponse::Type - HandleLaunchContent(chip::EndpointId endpointId, const std::list & parameterList, bool autoplay, - const chip::CharSpan & data) override; - chip::app::Clusters::ContentLauncher::Commands::LaunchResponse::Type - HandleLaunchUrl(const chip::CharSpan & contentUrl, const chip::CharSpan & displayString, - const std::list & brandingInformation) override; - std::list HandleGetAcceptHeaderList() override; + void + HandleLaunchContent(const std::list & parameterList, bool autoplay, const chip::CharSpan & data, + chip::app::CommandResponseHelper & + responser) override; + void HandleLaunchUrl(const chip::CharSpan & contentUrl, const chip::CharSpan & displayString, + const std::list & brandingInformation, + chip::app::CommandResponseHelper & + responser) override; + CHIP_ERROR HandleGetAcceptHeaderList(chip::app::AttributeValueEncoder & aEncoder) override; uint32_t HandleGetSupportedStreamingProtocols() override; private: - friend ContentLauncherManager & ContentLauncherMgr(); - - static ContentLauncherManager sInstance; jobject mContentLauncherManagerObject = nullptr; jmethodID mGetAcceptHeaderMethod = nullptr; jmethodID mGetSupportedStreamingProtocolsMethod = nullptr; jmethodID mLaunchContentMethod = nullptr; jmethodID mLaunchUrlMethod = nullptr; }; - -inline ContentLauncherManager & ContentLauncherMgr() -{ - return ContentLauncherManager::sInstance; -} diff --git a/examples/tv-app/android/java/KeypadInputManager.cpp b/examples/tv-app/android/java/KeypadInputManager.cpp index 40dc3a31132ad2..dbe9db273bb392 100644 --- a/examples/tv-app/android/java/KeypadInputManager.cpp +++ b/examples/tv-app/android/java/KeypadInputManager.cpp @@ -17,18 +17,27 @@ */ #include "KeypadInputManager.h" - +#include "TvApp-JNI.h" +#include #include #include using namespace chip; using namespace chip::app::Clusters::KeypadInput; -KeypadInputManager KeypadInputManager::sInstance; +void emberAfKeypadInputClusterInitCallback(EndpointId endpoint) +{ + ChipLogProgress(Zcl, "TV Android App: KeypadInput::PostClusterInit"); + TvAppJNIMgr().PostClusterInit(chip::app::Clusters::KeypadInput::Id, endpoint); +} -namespace { -static KeypadInputManager keypadInputManager; -} // namespace +void KeypadInputManager::NewManager(jint endpoint, jobject manager) +{ + ChipLogProgress(Zcl, "TV Android App: KeypadInput::SetDefaultDelegate"); + KeypadInputManager * mgr = new KeypadInputManager(); + mgr->InitializeWithObjects(manager); + chip::app::Clusters::KeypadInput::SetDefaultDelegate(static_cast(endpoint), mgr); +} Commands::SendKeyResponse::Type KeypadInputManager::HandleSendKey(const CecKeyCode & keyCode) { @@ -50,7 +59,7 @@ Commands::SendKeyResponse::Type KeypadInputManager::HandleSendKey(const CecKeyCo exit: if (err != CHIP_NO_ERROR) { - response.status = chip::app::Clusters::KeypadInput::StatusEnum::kSuccess; + response.status = chip::app::Clusters::KeypadInput::StatusEnum::kInvalidKeyInCurrentState; } else { @@ -77,9 +86,3 @@ void KeypadInputManager::InitializeWithObjects(jobject managerObject) env->ExceptionClear(); } } - -void emberAfKeypadInputClusterInitCallback(EndpointId endpoint) -{ - ChipLogProgress(Zcl, "TV Android App: KeypadInput::SetDefaultDelegate"); - chip::app::Clusters::KeypadInput::SetDefaultDelegate(endpoint, &keypadInputManager); -} diff --git a/examples/tv-app/android/java/KeypadInputManager.h b/examples/tv-app/android/java/KeypadInputManager.h index cb90df01c04e28..a623a5e335e46c 100644 --- a/examples/tv-app/android/java/KeypadInputManager.h +++ b/examples/tv-app/android/java/KeypadInputManager.h @@ -24,19 +24,13 @@ class KeypadInputManager : public chip::app::Clusters::KeypadInput::Delegate { public: + static void NewManager(jint endpoint, jobject manager); void InitializeWithObjects(jobject managerObject); + chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::Type HandleSendKey(const chip::app::Clusters::KeypadInput::CecKeyCode & keyCode) override; private: - friend KeypadInputManager & KeypadInputMgr(); - - static KeypadInputManager sInstance; jobject mKeypadInputManagerObject = nullptr; jmethodID mSendKeyMethod = nullptr; }; - -inline KeypadInputManager & KeypadInputMgr() -{ - return KeypadInputManager::sInstance; -} diff --git a/examples/tv-app/android/java/LowPowerManager.cpp b/examples/tv-app/android/java/LowPowerManager.cpp index 741c0e6437d82e..b7f8f56a40b93a 100644 --- a/examples/tv-app/android/java/LowPowerManager.cpp +++ b/examples/tv-app/android/java/LowPowerManager.cpp @@ -17,6 +17,8 @@ */ #include "LowPowerManager.h" +#include "TvApp-JNI.h" +#include #include #include #include @@ -26,11 +28,19 @@ using namespace chip; using namespace chip::app::Clusters::LowPower; -LowPowerManager LowPowerManager::sInstance; +void emberAfLowPowerClusterInitCallback(EndpointId endpoint) +{ + ChipLogProgress(Zcl, "TV Android App: LowPower::PostClusterInit"); + TvAppJNIMgr().PostClusterInit(chip::app::Clusters::LowPower::Id, endpoint); +} -namespace { -static LowPowerManager lowPowerManager; -} // namespace +void LowPowerManager::NewManager(jint endpoint, jobject manager) +{ + ChipLogProgress(Zcl, "TV Android App: LowPower::SetDefaultDelegate"); + LowPowerManager * mgr = new LowPowerManager(); + mgr->InitializeWithObjects(manager); + chip::app::Clusters::LowPower::SetDefaultDelegate(static_cast(endpoint), mgr); +} void LowPowerManager::InitializeWithObjects(jobject managerObject) { @@ -74,9 +84,3 @@ bool LowPowerManager::HandleSleep() exit: return static_cast(ret); } - -void emberAfLowPowerClusterInitCallback(EndpointId endpoint) -{ - ChipLogProgress(Zcl, "TV Android App: LowPower::SetDefaultDelegate"); - chip::app::Clusters::LowPower::SetDefaultDelegate(endpoint, &lowPowerManager); -} diff --git a/examples/tv-app/android/java/LowPowerManager.h b/examples/tv-app/android/java/LowPowerManager.h index 24e00fe8f2bd54..df191be746b7d8 100644 --- a/examples/tv-app/android/java/LowPowerManager.h +++ b/examples/tv-app/android/java/LowPowerManager.h @@ -26,18 +26,12 @@ class LowPowerManager : public chip::app::Clusters::LowPower::Delegate { public: + static void NewManager(jint endpoint, jobject manager); void InitializeWithObjects(jobject managerObject); + bool HandleSleep() override; private: - friend LowPowerManager & LowPowerMgr(); - - static LowPowerManager sInstance; jobject mLowPowerManagerObject = nullptr; jmethodID mSleepMethod = nullptr; }; - -inline LowPowerManager & LowPowerMgr() -{ - return LowPowerManager::sInstance; -} diff --git a/examples/tv-app/android/java/MediaInputManager.cpp b/examples/tv-app/android/java/MediaInputManager.cpp index 6ee85c2e259074..8076ff100ef6f3 100644 --- a/examples/tv-app/android/java/MediaInputManager.cpp +++ b/examples/tv-app/android/java/MediaInputManager.cpp @@ -16,7 +16,8 @@ */ #include "MediaInputManager.h" - +#include "TvApp-JNI.h" +#include #include #include #include @@ -25,12 +26,6 @@ using namespace chip; using namespace chip::app::Clusters::MediaInput; -MediaInputManager MediaInputManager::sInstance; - -namespace { -static MediaInputManager mediaInputManager; -} // namespace - /** @brief Media Input Cluster Init * * This function is called when a specific cluster is initialized. It gives the @@ -41,14 +36,21 @@ static MediaInputManager mediaInputManager; * */ void emberAfMediaInputClusterInitCallback(EndpointId endpoint) +{ + ChipLogProgress(Zcl, "TV Android App: MediaInput::PostClusterInit"); + TvAppJNIMgr().PostClusterInit(chip::app::Clusters::MediaInput::Id, endpoint); +} + +void MediaInputManager::NewManager(jint endpoint, jobject manager) { ChipLogProgress(Zcl, "TV Android App: MediaInput::SetDefaultDelegate"); - chip::app::Clusters::MediaInput::SetDefaultDelegate(endpoint, &mediaInputManager); + MediaInputManager * mgr = new MediaInputManager(); + mgr->InitializeWithObjects(manager); + chip::app::Clusters::MediaInput::SetDefaultDelegate(static_cast(endpoint), mgr); } -std::list MediaInputManager::HandleGetInputList() +CHIP_ERROR MediaInputManager::HandleGetInputList(chip::app::AttributeValueEncoder & aEncoder) { - std::list list; CHIP_ERROR err = CHIP_NO_ERROR; JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -57,14 +59,14 @@ std::list MediaInputM VerifyOrExit(mGetInputListMethod != nullptr, err = CHIP_ERROR_INCORRECT_STATE); VerifyOrExit(env != NULL, err = CHIP_JNI_ERROR_NO_ENV); - { + return aEncoder.EncodeList([this, env](const auto & encoder) -> CHIP_ERROR { jobjectArray inputArray = (jobjectArray) env->CallObjectMethod(mMediaInputManagerObject, mGetInputListMethod); if (env->ExceptionCheck()) { ChipLogError(AppServer, "Java exception in MediaInputManager::HandleGetInputList"); env->ExceptionDescribe(); env->ExceptionClear(); - return list; + return CHIP_ERROR_INCORRECT_STATE; } jint size = env->GetArrayLength(inputArray); @@ -86,32 +88,34 @@ std::list MediaInputM jfieldID nameId = env->GetFieldID(inputClass, "name", "Ljava/lang/String;"); jstring jname = static_cast(env->GetObjectField(inputObj, nameId)); + JniUtfString name(env, jname); if (jname != NULL) { - JniUtfString name(env, jname); mediaInput.name = name.charSpan(); } jfieldID descriptionId = env->GetFieldID(inputClass, "description", "Ljava/lang/String;"); jstring jdescription = static_cast(env->GetObjectField(inputObj, descriptionId)); + JniUtfString description(env, jdescription); if (jdescription != NULL) { - JniUtfString description(env, jdescription); mediaInput.description = description.charSpan(); } - list.push_back(mediaInput); + ReturnErrorOnFailure(encoder.Encode(mediaInput)); } - } + + return CHIP_NO_ERROR; + }); exit: if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "MediaInputManager::HandleGetInputList status error: %s", err.AsString()); + ChipLogError(Zcl, "MediaInputManager::GetInputList status error: %s", err.AsString()); } - return list; + return err; } uint8_t MediaInputManager::HandleGetCurrentInput() @@ -256,7 +260,7 @@ void MediaInputManager::InitializeWithObjects(jobject managerObject) jclass MediaInputManagerClass = env->GetObjectClass(managerObject); VerifyOrReturn(MediaInputManagerClass != nullptr, ChipLogError(Zcl, "Failed to get MediaInputManager Java class")); - mGetInputListMethod = env->GetMethodID(MediaInputManagerClass, "getInputList", "()[Lcom/tcl/chip/tvapp/InputInfo;"); + mGetInputListMethod = env->GetMethodID(MediaInputManagerClass, "getInputList", "()[Lcom/tcl/chip/tvapp/MediaInputInfo;"); if (mGetInputListMethod == nullptr) { ChipLogError(Zcl, "Failed to access MediaInputManager 'getInputList' method"); diff --git a/examples/tv-app/android/java/MediaInputManager.h b/examples/tv-app/android/java/MediaInputManager.h index 8651e3321cecc6..e93e956c249e07 100644 --- a/examples/tv-app/android/java/MediaInputManager.h +++ b/examples/tv-app/android/java/MediaInputManager.h @@ -18,14 +18,17 @@ #pragma once +#include #include #include class MediaInputManager : public chip::app::Clusters::MediaInput::Delegate { public: + static void NewManager(jint endpoint, jobject manager); void InitializeWithObjects(jobject managerObject); - std::list HandleGetInputList() override; + + CHIP_ERROR HandleGetInputList(chip::app::AttributeValueEncoder & aEncoder) override; uint8_t HandleGetCurrentInput() override; bool HandleSelectInput(const uint8_t index) override; bool HandleShowInputStatus() override; @@ -33,9 +36,6 @@ class MediaInputManager : public chip::app::Clusters::MediaInput::Delegate bool HandleRenameInput(const uint8_t index, const chip::CharSpan & name) override; private: - friend MediaInputManager & MediaInputMgr(); - - static MediaInputManager sInstance; jobject mMediaInputManagerObject = nullptr; jmethodID mGetInputListMethod = nullptr; jmethodID mGetCurrentInputMethod = nullptr; @@ -44,8 +44,3 @@ class MediaInputManager : public chip::app::Clusters::MediaInput::Delegate jmethodID mHideInputStatusMethod = nullptr; jmethodID mRenameInputMethod = nullptr; }; - -inline class MediaInputManager & MediaInputMgr() -{ - return MediaInputManager::sInstance; -} diff --git a/examples/tv-app/android/java/MediaPlaybackManager.cpp b/examples/tv-app/android/java/MediaPlaybackManager.cpp index 8e3d6b6a12222d..02e6707bdf2628 100644 --- a/examples/tv-app/android/java/MediaPlaybackManager.cpp +++ b/examples/tv-app/android/java/MediaPlaybackManager.cpp @@ -16,6 +16,10 @@ */ #include "MediaPlaybackManager.h" +#include "TvApp-JNI.h" +#include +#include +#include #include #include #include @@ -25,12 +29,6 @@ using namespace chip; using namespace chip::app::Clusters::MediaPlayback; -MediaPlaybackManager MediaPlaybackManager::sInstance; - -namespace { -static MediaPlaybackManager mediaPlaybackManager; -} // namespace - /** @brief Media PlayBack Cluster Init * * This function is called when a specific cluster is initialized. It gives the @@ -41,106 +39,182 @@ static MediaPlaybackManager mediaPlaybackManager; * */ void emberAfMediaPlaybackClusterInitCallback(chip::EndpointId endpoint) +{ + ChipLogProgress(Zcl, "TV Android App: MediaPlayback::PostClusterInit"); + TvAppJNIMgr().PostClusterInit(chip::app::Clusters::MediaPlayback::Id, endpoint); +} + +void MediaPlaybackManager::NewManager(jint endpoint, jobject manager) { ChipLogProgress(Zcl, "TV Android App: MediaPlayback::SetDefaultDelegate"); - chip::app::Clusters::MediaPlayback::SetDefaultDelegate(endpoint, &mediaPlaybackManager); + MediaPlaybackManager * mgr = new MediaPlaybackManager(); + mgr->InitializeWithObjects(manager); + chip::app::Clusters::MediaPlayback::SetDefaultDelegate(static_cast(endpoint), mgr); } PlaybackStateEnum MediaPlaybackManager::HandleGetCurrentState() { - return PlaybackStateEnum::kPlaying; + uint64_t ret = HandleMediaRequestGetAttribute(MEDIA_PLAYBACK_ATTRIBUTE_PLAYBACK_STATE); + return static_cast(ret); } uint64_t MediaPlaybackManager::HandleGetStartTime() { - return 0; + return HandleMediaRequestGetAttribute(MEDIA_PLAYBACK_ATTRIBUTE_START_TIME); } uint64_t MediaPlaybackManager::HandleGetDuration() { - return 0; -} - -Structs::PlaybackPosition::Type MediaPlaybackManager::HandleGetSampledPosition() -{ - Structs::PlaybackPosition::Type sampledPosition; - sampledPosition.updatedAt = 0; - sampledPosition.position = 0; - return sampledPosition; + return HandleMediaRequestGetAttribute(MEDIA_PLAYBACK_ATTRIBUTE_DURATION); } float MediaPlaybackManager::HandleGetPlaybackSpeed() { - return 0; + uint64_t ret = HandleMediaRequestGetAttribute(MEDIA_PLAYBACK_ATTRIBUTE_SPEED); + return static_cast(ret) / 10000.0f; } uint64_t MediaPlaybackManager::HandleGetSeekRangeStart() { - return 0; + return HandleMediaRequestGetAttribute(MEDIA_PLAYBACK_ATTRIBUTE_SEEK_RANGE_START); } uint64_t MediaPlaybackManager::HandleGetSeekRangeEnd() { - return 0; + return HandleMediaRequestGetAttribute(MEDIA_PLAYBACK_ATTRIBUTE_SEEK_RANGE_END); } Commands::PlaybackResponse::Type MediaPlaybackManager::HandlePlay() { - return MediaPlaybackMgr().HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_PLAY, 0); + return HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_PLAY, 0); } Commands::PlaybackResponse::Type MediaPlaybackManager::HandlePause() { - return MediaPlaybackMgr().HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_PAUSE, 0); + return HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_PAUSE, 0); } Commands::PlaybackResponse::Type MediaPlaybackManager::HandleStop() { - return MediaPlaybackMgr().HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_STOP, 0); + return HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_STOP, 0); } Commands::PlaybackResponse::Type MediaPlaybackManager::HandleFastForward() { - return MediaPlaybackMgr().HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_FAST_FORWARD, 0); + return HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_FAST_FORWARD, 0); } Commands::PlaybackResponse::Type MediaPlaybackManager::HandlePrevious() { - return MediaPlaybackMgr().HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_PREVIOUS, 0); + return HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_PREVIOUS, 0); } Commands::PlaybackResponse::Type MediaPlaybackManager::HandleRewind() { - return MediaPlaybackMgr().HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_REWIND, 0); + return HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_REWIND, 0); } Commands::PlaybackResponse::Type MediaPlaybackManager::HandleSkipBackward(const uint64_t & deltaPositionMilliseconds) { - return MediaPlaybackMgr().HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_SKIP_BACKWARD, deltaPositionMilliseconds); + return HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_SKIP_BACKWARD, deltaPositionMilliseconds); } Commands::PlaybackResponse::Type MediaPlaybackManager::HandleSkipForward(const uint64_t & deltaPositionMilliseconds) { - return MediaPlaybackMgr().HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_SKIP_FORWARD, deltaPositionMilliseconds); + return HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_SKIP_FORWARD, deltaPositionMilliseconds); } Commands::PlaybackResponse::Type MediaPlaybackManager::HandleSeekRequest(const uint64_t & positionMilliseconds) { - return MediaPlaybackMgr().HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_SEEK, positionMilliseconds); + return HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_SEEK, positionMilliseconds); } Commands::PlaybackResponse::Type MediaPlaybackManager::HandleNext() { - return MediaPlaybackMgr().HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_NEXT, 0); + return HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_NEXT, 0); } Commands::PlaybackResponse::Type MediaPlaybackManager::HandleStartOverRequest() { - return MediaPlaybackMgr().HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_START_OVER, 0); + return HandleMediaRequest(MEDIA_PLAYBACK_REQUEST_START_OVER, 0); +} + +void MediaPlaybackManager::InitializeWithObjects(jobject managerObject) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Failed to GetEnvForCurrentThread for MediaPlaybackManager")); + + mMediaPlaybackManagerObject = env->NewGlobalRef(managerObject); + VerifyOrReturn(mMediaPlaybackManagerObject != nullptr, ChipLogError(Zcl, "Failed to NewGlobalRef MediaPlaybackManager")); + + jclass mMediaPlaybackManagerClass = env->GetObjectClass(managerObject); + VerifyOrReturn(mMediaPlaybackManagerClass != nullptr, ChipLogError(Zcl, "Failed to get MediaPlaybackManager Java class")); + + mGetAttributeMethod = env->GetMethodID(mMediaPlaybackManagerClass, "getAttributes", "(I)J"); + if (mGetAttributeMethod == nullptr) + { + ChipLogError(Zcl, "Failed to access MediaPlaybackManager 'getAttributes' method"); + env->ExceptionClear(); + } + + mRequestMethod = env->GetMethodID(mMediaPlaybackManagerClass, "request", "(IJ)I"); + if (mRequestMethod == nullptr) + { + ChipLogError(Zcl, "Failed to access MediaPlaybackManager 'request' method"); + env->ExceptionClear(); + } + + mGetPositionMethod = + env->GetMethodID(mMediaPlaybackManagerClass, "getPosition", "()[Lcom/tcl/chip/tvapp/MediaPlaybackPosition;"); + if (mGetPositionMethod == nullptr) + { + ChipLogError(Zcl, "Failed to access MediaPlaybackManager 'getPosition' method"); + env->ExceptionClear(); + } +} + +uint64_t MediaPlaybackManager::HandleMediaRequestGetAttribute(MediaPlaybackRequestAttribute attribute) +{ + uint64_t ret = std::numeric_limits::max(); + jlong jAttributeValue = -1; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + + ChipLogProgress(Zcl, "Received MediaPlaybackManager::HandleMediaRequestGetAttribute:%d", attribute); + VerifyOrExit(mMediaPlaybackManagerObject != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(mGetAttributeMethod != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(env != NULL, err = CHIP_JNI_ERROR_NO_ENV); + + jAttributeValue = env->CallLongMethod(mMediaPlaybackManagerObject, mGetAttributeMethod, static_cast(attribute)); + if (env->ExceptionCheck()) + { + ChipLogError(AppServer, "Java exception in MediaPlaybackManager::GetAttribute"); + env->ExceptionDescribe(); + env->ExceptionClear(); + goto exit; + } + + if (jAttributeValue >= 0) + { + ret = static_cast(jAttributeValue); + } + else + { + err = CHIP_ERROR_INCORRECT_STATE; + } + +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "MediaPlaybackManager::GetAttribute status error: %s", err.AsString()); + } + + return ret; } Commands::PlaybackResponse::Type MediaPlaybackManager::HandleMediaRequest(MediaPlaybackRequest mediaPlaybackRequest, uint64_t deltaPositionMilliseconds) + { Commands::PlaybackResponse::Type response; @@ -164,38 +238,56 @@ Commands::PlaybackResponse::Type MediaPlaybackManager::HandleMediaRequest(MediaP env->ExceptionClear(); response.status = StatusEnum::kInvalidStateForCommand; } + response.status = static_cast(ret); exit: if (err != CHIP_NO_ERROR) { response.status = StatusEnum::kInvalidStateForCommand; + ChipLogError(Zcl, "MediaPlaybackManager::HandleMediaRequest status error: %s", err.AsString()); } return response; } -void MediaPlaybackManager::InitializeWithObjects(jobject managerObject) +Structs::PlaybackPosition::Type MediaPlaybackManager::HandleGetSampledPosition() { - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Failed to GetEnvForCurrentThread for MediaPlaybackManager")); + Structs::PlaybackPosition::Type response; + response.updatedAt = 0; + response.position = 0; - mMediaPlaybackManagerObject = env->NewGlobalRef(managerObject); - VerifyOrReturn(mMediaPlaybackManagerObject != nullptr, ChipLogError(Zcl, "Failed to NewGlobalRef MediaPlaybackManager")); + jobject positionObj; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jclass mMediaPlaybackManagerClass = env->GetObjectClass(managerObject); - VerifyOrReturn(mMediaPlaybackManagerClass != nullptr, ChipLogError(Zcl, "Failed to get MediaPlaybackManager Java class")); + ChipLogProgress(Zcl, "MediaPlaybackManager::HandleGetSampledPosition"); + VerifyOrExit(mMediaPlaybackManagerObject != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(mGetPositionMethod != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(env != NULL, err = CHIP_JNI_ERROR_NO_ENV); - mGetAttributeMethod = env->GetMethodID(mMediaPlaybackManagerClass, "getAttributes", "(I)J"); - if (mGetAttributeMethod == nullptr) + env->ExceptionClear(); + positionObj = env->CallObjectMethod(mMediaPlaybackManagerObject, mGetPositionMethod); + if (env->ExceptionCheck()) { - ChipLogError(Zcl, "Failed to access MediaPlaybackManager 'getMediaPlaybackAttribute' method"); + ChipLogError(AppServer, "Java exception in MediaPlaybackManager::HandleGetSampledPosition"); + env->ExceptionDescribe(); env->ExceptionClear(); + goto exit; } - mRequestMethod = env->GetMethodID(mMediaPlaybackManagerClass, "request", "(IJ)I"); - if (mRequestMethod == nullptr) { - ChipLogError(Zcl, "Failed to access MediaPlaybackManager 'proxyMediaPlaybackRequest' method"); - env->ExceptionClear(); + jclass inputClass = env->GetObjectClass(positionObj); + jfieldID positionId = env->GetFieldID(inputClass, "position", "J"); + jfieldID updatedAtId = env->GetFieldID(inputClass, "updatedAt", "J"); + response.position = static_cast(env->GetIntField(positionObj, positionId)); + response.updatedAt = static_cast(env->GetIntField(positionObj, updatedAtId)); } + +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "MediaPlaybackManager::GetAttribute status error: %s", err.AsString()); + } + + return response; } diff --git a/examples/tv-app/android/java/MediaPlaybackManager.h b/examples/tv-app/android/java/MediaPlaybackManager.h index 12aaeab077bfa0..a9479011294c26 100644 --- a/examples/tv-app/android/java/MediaPlaybackManager.h +++ b/examples/tv-app/android/java/MediaPlaybackManager.h @@ -19,8 +19,20 @@ #pragma once #include +#include #include +enum MediaPlaybackRequestAttribute : uint8_t +{ + MEDIA_PLAYBACK_ATTRIBUTE_PLAYBACK_STATE = 0, + MEDIA_PLAYBACK_ATTRIBUTE_START_TIME = 1, + MEDIA_PLAYBACK_ATTRIBUTE_DURATION = 2, + MEDIA_PLAYBACK_ATTRIBUTE_SPEED = 3, + MEDIA_PLAYBACK_ATTRIBUTE_SEEK_RANGE_END = 4, + MEDIA_PLAYBACK_ATTRIBUTE_SEEK_RANGE_START = 5, + MEDIA_PLAYBACK_ATTRIBUTE_COUNT, +}; + enum MediaPlaybackRequest : uint8_t { MEDIA_PLAYBACK_REQUEST_PLAY = 0, @@ -39,7 +51,9 @@ enum MediaPlaybackRequest : uint8_t class MediaPlaybackManager : public chip::app::Clusters::MediaPlayback::Delegate { public: + static void NewManager(jint endpoint, jobject manager); void InitializeWithObjects(jobject managerObject); + chip::app::Clusters::MediaPlayback::PlaybackStateEnum HandleGetCurrentState() override; uint64_t HandleGetStartTime() override; uint64_t HandleGetDuration() override; @@ -62,19 +76,14 @@ class MediaPlaybackManager : public chip::app::Clusters::MediaPlayback::Delegate HandleSeekRequest(const uint64_t & positionMilliseconds) override; chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Type HandleNext() override; chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Type HandleStartOverRequest() override; - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Type - HandleMediaRequest(MediaPlaybackRequest mediaPlaybackRequest, uint64_t deltaPositionMilliseconds); private: - friend MediaPlaybackManager & MediaPlaybackMgr(); - - static MediaPlaybackManager sInstance; jobject mMediaPlaybackManagerObject = nullptr; jmethodID mRequestMethod = nullptr; jmethodID mGetAttributeMethod = nullptr; -}; + jmethodID mGetPositionMethod = nullptr; -inline MediaPlaybackManager & MediaPlaybackMgr() -{ - return MediaPlaybackManager::sInstance; -} + uint64_t HandleMediaRequestGetAttribute(MediaPlaybackRequestAttribute attribute); + chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Type + HandleMediaRequest(MediaPlaybackRequest mediaPlaybackRequest, uint64_t deltaPositionMilliseconds); +}; diff --git a/examples/tv-app/android/java/TVApp-JNI.cpp b/examples/tv-app/android/java/TVApp-JNI.cpp index 6a637c0e168688..f8a1100f5f11ba 100644 --- a/examples/tv-app/android/java/TVApp-JNI.cpp +++ b/examples/tv-app/android/java/TVApp-JNI.cpp @@ -16,6 +16,7 @@ * */ +#include "TvApp-JNI.h" #include "ChannelManager.h" #include "ContentLauncherManager.h" #include "KeypadInputManager.h" @@ -27,9 +28,48 @@ #include #include #include +#include + +using namespace chip; #define JNI_METHOD(RETURN, METHOD_NAME) extern "C" JNIEXPORT RETURN JNICALL Java_com_tcl_chip_tvapp_TvApp_##METHOD_NAME +TvAppJNI TvAppJNI::sInstance; + +void TvAppJNI::InitializeWithObjects(jobject app) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Failed to GetEnvForCurrentThread for TvAppJNI")); + + mTvAppObject = env->NewGlobalRef(app); + VerifyOrReturn(mTvAppObject != nullptr, ChipLogError(Zcl, "Failed to NewGlobalRef TvAppJNI")); + + jclass managerClass = env->GetObjectClass(mTvAppObject); + VerifyOrReturn(managerClass != nullptr, ChipLogError(Zcl, "Failed to get TvAppJNI Java class")); + + mPostClusterInitMethod = env->GetMethodID(managerClass, "postClusterInit", "(II)V"); + if (mPostClusterInitMethod == nullptr) + { + ChipLogError(Zcl, "Failed to access ChannelManager 'postClusterInit' method"); + env->ExceptionClear(); + } +} + +void TvAppJNI::PostClusterInit(int clusterId, int endpoint) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Failed to GetEnvForCurrentThread for TvAppJNI::PostClusterInit")); + VerifyOrReturn(mTvAppObject != nullptr, ChipLogError(Zcl, "TvAppJNI::mTvAppObject null")); + VerifyOrReturn(mPostClusterInitMethod != nullptr, ChipLogError(Zcl, "TvAppJNI::mPostClusterInitMethod null")); + + env->CallVoidMethod(mTvAppObject, mPostClusterInitMethod, static_cast(clusterId), static_cast(endpoint)); + if (env->ExceptionCheck()) + { + ChipLogError(Zcl, "Failed to call TvAppJNI 'postClusterInit' method"); + env->ExceptionClear(); + } +} + jint JNI_OnLoad(JavaVM * jvm, void * reserved) { return AndroidAppServerJNI_OnLoad(jvm, reserved); @@ -40,37 +80,42 @@ void JNI_OnUnload(JavaVM * jvm, void * reserved) return AndroidAppServerJNI_OnUnload(jvm, reserved); } -JNI_METHOD(void, setKeypadInputManager)(JNIEnv *, jobject, jobject manager) +JNI_METHOD(void, nativeInit)(JNIEnv *, jobject app) +{ + TvAppJNIMgr().InitializeWithObjects(app); +} + +JNI_METHOD(void, setKeypadInputManager)(JNIEnv *, jobject, jint endpoint, jobject manager) { - KeypadInputMgr().InitializeWithObjects(manager); + KeypadInputManager::NewManager(endpoint, manager); } -JNI_METHOD(void, setWakeOnLanManager)(JNIEnv *, jobject, jobject manager) +JNI_METHOD(void, setWakeOnLanManager)(JNIEnv *, jobject, jint endpoint, jobject manager) { - WakeOnLanMgr().InitializeWithObjects(manager); + WakeOnLanManager::NewManager(endpoint, manager); } -JNI_METHOD(void, setMediaInputManager)(JNIEnv *, jobject, jobject manager) +JNI_METHOD(void, setMediaInputManager)(JNIEnv *, jobject, jint endpoint, jobject manager) { - MediaInputMgr().InitializeWithObjects(manager); + MediaInputManager::NewManager(endpoint, manager); } -JNI_METHOD(void, setContentLaunchManager)(JNIEnv *, jobject, jobject manager) +JNI_METHOD(void, setContentLaunchManager)(JNIEnv *, jobject, jint endpoint, jobject manager) { - ContentLauncherMgr().InitializeWithObjects(manager); + ContentLauncherManager::NewManager(endpoint, manager); } -JNI_METHOD(void, setLowPowerManager)(JNIEnv *, jobject, jobject manager) +JNI_METHOD(void, setLowPowerManager)(JNIEnv *, jobject, jint endpoint, jobject manager) { - LowPowerMgr().InitializeWithObjects(manager); + LowPowerManager::NewManager(endpoint, manager); } -JNI_METHOD(void, setMediaPlaybackManager)(JNIEnv *, jobject, jobject manager) +JNI_METHOD(void, setMediaPlaybackManager)(JNIEnv *, jobject, jint endpoint, jobject manager) { - MediaPlaybackMgr().InitializeWithObjects(manager); + MediaPlaybackManager::NewManager(endpoint, manager); } -JNI_METHOD(void, setChannelManager)(JNIEnv *, jobject, jobject manager) +JNI_METHOD(void, setChannelManager)(JNIEnv *, jobject, jint endpoint, jobject manager) { - ChannelMgr().InitializeWithObjects(manager); + ChannelManager::NewManager(endpoint, manager); } diff --git a/examples/tv-app/android/java/TvApp-JNI.h b/examples/tv-app/android/java/TvApp-JNI.h new file mode 100644 index 00000000000000..36033727a42817 --- /dev/null +++ b/examples/tv-app/android/java/TvApp-JNI.h @@ -0,0 +1,40 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +class TvAppJNI +{ +public: + void InitializeWithObjects(jobject app); + void PostClusterInit(int clusterId, int endpoint); + +private: + friend TvAppJNI & TvAppJNIMgr(); + + static TvAppJNI sInstance; + jobject mTvAppObject = nullptr; + jmethodID mPostClusterInitMethod = nullptr; +}; + +inline class TvAppJNI & TvAppJNIMgr() +{ + return TvAppJNI::sInstance; +} diff --git a/examples/tv-app/android/java/WakeOnLanManager.cpp b/examples/tv-app/android/java/WakeOnLanManager.cpp index 8c9c7f26bbace1..99b4dc089dc250 100644 --- a/examples/tv-app/android/java/WakeOnLanManager.cpp +++ b/examples/tv-app/android/java/WakeOnLanManager.cpp @@ -17,7 +17,8 @@ */ #include "WakeOnLanManager.h" - +#include "TvApp-JNI.h" +#include #include #include #include @@ -25,12 +26,6 @@ using namespace chip; using namespace chip::app::Clusters::WakeOnLan; -WakeOnLanManager WakeOnLanManager::sInstance; - -namespace { -static WakeOnLanManager wakeOnLanManager; -} // namespace - /** @brief Wake On LAN Cluster Init * * This function is called when a specific cluster is initialized. It gives the @@ -42,13 +37,21 @@ static WakeOnLanManager wakeOnLanManager; */ void emberAfWakeOnLanClusterInitCallback(chip::EndpointId endpoint) { - ChipLogProgress(Zcl, "TV Android App: WakeOnLan::SetDefaultDelegate"); - chip::app::Clusters::WakeOnLan::SetDefaultDelegate(endpoint, &wakeOnLanManager); + ChipLogProgress(Zcl, "TV Android App: WakeOnLan::PostClusterInit"); + TvAppJNIMgr().PostClusterInit(chip::app::Clusters::WakeOnLan::Id, endpoint); } -chip::CharSpan WakeOnLanManager::HandleGetMacAddress() +void WakeOnLanManager::NewManager(jint endpoint, jobject manager) { + ChipLogProgress(Zcl, "TV Android App: WakeOnLan::SetDefaultDelegate"); + WakeOnLanManager * mgr = new WakeOnLanManager(); + mgr->InitializeWithObjects(manager); + chip::app::Clusters::WakeOnLan::SetDefaultDelegate(static_cast(endpoint), mgr); +} +CHIP_ERROR WakeOnLanManager::HandleGetMacAddress(chip::app::AttributeValueEncoder & aEncoder) +{ + jobject javaMac; CHIP_ERROR err = CHIP_NO_ERROR; JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); chip::CharSpan macValue; @@ -58,27 +61,25 @@ chip::CharSpan WakeOnLanManager::HandleGetMacAddress() VerifyOrExit(mGetMacMethod != nullptr, err = CHIP_ERROR_INCORRECT_STATE); VerifyOrExit(env != NULL, err = CHIP_JNI_ERROR_NO_ENV); + env->ExceptionClear(); + javaMac = env->CallObjectMethod(mWakeOnLanManagerObject, mGetMacMethod); + if (env->ExceptionCheck()) { + ChipLogError(DeviceLayer, "Java exception in WakeOnLanManager::getMac"); + env->ExceptionDescribe(); env->ExceptionClear(); - jobject javaMac = env->CallObjectMethod(mWakeOnLanManagerObject, mGetMacMethod, static_cast(1)); - if (env->ExceptionCheck()) - { - ChipLogError(DeviceLayer, "Java exception in WakeOnLanManager::getMac"); - env->ExceptionDescribe(); - env->ExceptionClear(); - return macValue; - } - - macValue = chip::JniUtfString(env, static_cast(javaMac)).charSpan(); + goto exit; } + macValue = chip::JniUtfString(env, static_cast(javaMac)).charSpan(); + exit: if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "WakeOnLanManager::HandleGetMacAddress status error: %s", err.AsString()); } - return macValue; + return aEncoder.Encode(macValue); } void WakeOnLanManager::InitializeWithObjects(jobject managerObject) @@ -92,7 +93,7 @@ void WakeOnLanManager::InitializeWithObjects(jobject managerObject) jclass WakeOnLanManagerClass = env->GetObjectClass(managerObject); VerifyOrReturn(WakeOnLanManagerClass != nullptr, ChipLogError(Zcl, "Failed to get WakeOnLanManager Java class")); - mGetMacMethod = env->GetMethodID(WakeOnLanManagerClass, "getMac", "(I)Ljava/lang/String;"); + mGetMacMethod = env->GetMethodID(WakeOnLanManagerClass, "getMac", "()Ljava/lang/String;"); if (mGetMacMethod == nullptr) { ChipLogError(Zcl, "Failed to access WakeOnLanManager 'getMac' method"); diff --git a/examples/tv-app/android/java/WakeOnLanManager.h b/examples/tv-app/android/java/WakeOnLanManager.h index 69327737a45335..f837572c377168 100644 --- a/examples/tv-app/android/java/WakeOnLanManager.h +++ b/examples/tv-app/android/java/WakeOnLanManager.h @@ -24,18 +24,12 @@ class WakeOnLanManager : public chip::app::Clusters::WakeOnLan::Delegate { public: + static void NewManager(jint endpoint, jobject manager); void InitializeWithObjects(jobject managerObject); - chip::CharSpan HandleGetMacAddress() override; -private: - friend WakeOnLanManager & WakeOnLanMgr(); + CHIP_ERROR HandleGetMacAddress(chip::app::AttributeValueEncoder & aEncoder) override; - static WakeOnLanManager sInstance; +private: jobject mWakeOnLanManagerObject = nullptr; jmethodID mGetMacMethod = nullptr; }; - -inline WakeOnLanManager & WakeOnLanMgr() -{ - return WakeOnLanManager::sInstance; -} diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ChannelInfo.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ChannelInfo.java index b383b789a9d78c..b291deb7e6f488 100644 --- a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ChannelInfo.java +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ChannelInfo.java @@ -18,16 +18,21 @@ package com.tcl.chip.tvapp; public class ChannelInfo { - public int majorNumber; - public int minorNumber; - public String name; - public String callSign; - public String affiliateCallSign; - public ChannelInfo() {} + public static final int kNoError = -1; // todo: what will be the value of no error? + public static final int kMultipleMatches = 0; + public static final int kNoMatches = 1; + + private int errorType; + private int majorNumber; + private int minorNumber; + private String name; + private String callSign; + private String affiliateCallSign; public ChannelInfo( int majorNumber, int minorNumber, String name, String callSign, String affiliateCallSign) { + this.errorType = kNoError; this.majorNumber = majorNumber; this.minorNumber = minorNumber; this.name = name; @@ -35,10 +40,16 @@ public ChannelInfo( this.affiliateCallSign = affiliateCallSign; } + public ChannelInfo(int errorType) { + this.errorType = errorType; + } + @Override public String toString() { return "ChannelInfo{" - + "majorNumber=" + + "errorType=" + + errorType + + ", majorNumber=" + majorNumber + ", minorNumber=" + minorNumber diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ChannelManagerStub.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ChannelManagerStub.java index 2b76098750595b..c1ed8d0e07f8a5 100644 --- a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ChannelManagerStub.java +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ChannelManagerStub.java @@ -20,46 +20,73 @@ import android.util.Log; public class ChannelManagerStub implements ChannelManager { - private static final String TAG = "ChannelManagerStub"; + private static final String TAG = ChannelManagerStub.class.getSimpleName(); + + private int endpoint; + + public ChannelManagerStub(int endpoint) { + this.endpoint = endpoint; + } @Override public ChannelInfo[] getChannelList() { - ChannelInfo ChannelInfo1 = new ChannelInfo(1, 1, "HDMI1", "callSign1", "affiliateCallSign1"); - ChannelInfo ChannelInfo2 = new ChannelInfo(2, 2, "HDMI2", "callSign2", "affiliateCallSign2"); - Log.d(TAG, "getChannelList"); + ChannelInfo ChannelInfo1 = new ChannelInfo(1, 11, "HDMI1", "callSign1", "affiliateCallSign1"); + ChannelInfo ChannelInfo2 = new ChannelInfo(2, 22, "HDMI2", "callSign2", "affiliateCallSign2"); + Log.d(TAG, "getChannelList at " + endpoint); return new ChannelInfo[] {ChannelInfo1, ChannelInfo2}; } @Override public ChannelLineupInfo getLineup() { ChannelLineupInfo lineupInfo = new ChannelLineupInfo("operator", "lineup", "postalCode"); - Log.d(TAG, "getChannelLineup: " + lineupInfo); + Log.d(TAG, "getChannelLineup: " + lineupInfo + " at " + endpoint); return lineupInfo; } @Override public ChannelInfo getCurrentChannel() { - Log.d(TAG, "getCurrentChannel: "); + Log.d(TAG, "getCurrentChannel: at " + endpoint); return new ChannelInfo(1, 1, "HDMI", "callSign", "affiliateCallSign"); } @Override public ChannelInfo changeChannel(String match) { - Log.d(TAG, "changeChannel: " + match); - return new ChannelInfo(1, 1, "HDMI", "callSign", "affiliateCallSign"); + Log.d(TAG, "changeChannel: " + match + " at " + endpoint); + if ("no".equals(match)) { + return new ChannelInfo(ChannelInfo.kNoMatches); + } else if ("multiple".equals(match)) { + return new ChannelInfo(ChannelInfo.kMultipleMatches); + } else { + return new ChannelInfo(1, 1, "HDMI", "callSign", "affiliateCallSign"); + } } @Override public boolean changeChannelByNumber(int majorNumber, int minorNumber) { Log.d( TAG, - "changeChannelByNumber: majorNumber = " + majorNumber + " minorNumber = " + minorNumber); + "changeChannelByNumber: majorNumber = " + + majorNumber + + " minorNumber = " + + minorNumber + + " at " + + endpoint); + + // for failed test + if (majorNumber == 1 && minorNumber == 1) { + return false; + } return true; } @Override public boolean skipChannel(int count) { - Log.d(TAG, "skipChannel: count = " + count); + Log.d(TAG, "skipChannel: count = " + count + " at " + endpoint); + + // for failed test + if (count == 100) { + return false; + } return true; } } diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/Clusters.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/Clusters.java new file mode 100644 index 00000000000000..37fd495fcff7e6 --- /dev/null +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/Clusters.java @@ -0,0 +1,138 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.tcl.chip.tvapp; + +public class Clusters { + + public static final int ClusterId_PowerConfiguration = 0x00000001; + public static final int ClusterId_DeviceTemperatureConfiguration = 0x00000002; + public static final int ClusterId_Identify = 0x00000003; + public static final int ClusterId_Groups = 0x00000004; + public static final int ClusterId_Scenes = 0x00000005; + public static final int ClusterId_OnOff = 0x00000006; + public static final int ClusterId_OnOffSwitchConfiguration = 0x00000007; + public static final int ClusterId_LevelControl = 0x00000008; + public static final int ClusterId_Alarms = 0x00000009; + public static final int ClusterId_Time = 0x0000000A; + public static final int ClusterId_BinaryInputBasic = 0x0000000F; + public static final int ClusterId_PowerProfile = 0x0000001A; + public static final int ClusterId_ApplianceControl = 0x0000001B; + public static final int ClusterId_PulseWidthModulation = 0x0000001C; + public static final int ClusterId_Descriptor = 0x0000001D; + public static final int ClusterId_Binding = 0x0000001E; + public static final int ClusterId_AccessControl = 0x0000001F; + public static final int ClusterId_PollControl = 0x00000020; + public static final int ClusterId_BridgedActions = 0x00000025; + public static final int ClusterId_Basic = 0x00000028; + public static final int ClusterId_OtaSoftwareUpdateProvider = 0x00000029; + public static final int ClusterId_OtaSoftwareUpdateRequestor = 0x0000002A; + public static final int ClusterId_LocalizationConfiguration = 0x0000002B; + public static final int ClusterId_LocalizationTimeFormat = 0x0000002C; + public static final int ClusterId_LocalizationUnit = 0x0000002D; + public static final int ClusterId_PowerSourceConfiguration = 0x0000002E; + public static final int ClusterId_PowerSource = 0x0000002F; + public static final int ClusterId_GeneralCommissioning = 0x00000030; + public static final int ClusterId_NetworkCommissioning = 0x00000031; + public static final int ClusterId_DiagnosticLogs = 0x00000032; + public static final int ClusterId_GeneralDiagnostics = 0x00000033; + public static final int ClusterId_SoftwareDiagnostics = 0x00000034; + public static final int ClusterId_ThreadNetworkDiagnostics = 0x00000035; + public static final int ClusterId_WiFiNetworkDiagnostics = 0x00000036; + public static final int ClusterId_EthernetNetworkDiagnostics = 0x00000037; + public static final int ClusterId_TimeSynchronization = 0x00000038; + public static final int ClusterId_BridgedDeviceBasic = 0x00000039; + public static final int ClusterId_Switch = 0x0000003B; + public static final int ClusterId_AdministratorCommissioning = 0x0000003C; + public static final int ClusterId_OperationalCredentials = 0x0000003E; + public static final int ClusterId_GroupKeyManagement = 0x0000003F; + public static final int ClusterId_FixedLabel = 0x00000040; + public static final int ClusterId_UserLabel = 0x00000041; + public static final int ClusterId_ProxyConfiguration = 0x00000042; + public static final int ClusterId_ProxyDiscovery = 0x00000043; + public static final int ClusterId_ProxyValid = 0x00000044; + public static final int ClusterId_BooleanState = 0x00000045; + public static final int ClusterId_ModeSelect = 0x00000050; + public static final int ClusterId_ShadeConfiguration = 0x00000100; + public static final int ClusterId_DoorLock = 0x00000101; + public static final int ClusterId_WindowCovering = 0x00000102; + public static final int ClusterId_BarrierControl = 0x00000103; + public static final int ClusterId_PumpConfigurationAndControl = 0x00000200; + public static final int ClusterId_Thermostat = 0x00000201; + public static final int ClusterId_FanControl = 0x00000202; + public static final int ClusterId_DehumidificationControl = 0x00000203; + public static final int ClusterId_ThermostatUserInterfaceConfiguration = 0x00000204; + public static final int ClusterId_ColorControl = 0x00000300; + public static final int ClusterId_BallastConfiguration = 0x00000301; + public static final int ClusterId_IlluminanceMeasurement = 0x00000400; + public static final int ClusterId_TemperatureMeasurement = 0x00000402; + public static final int ClusterId_PressureMeasurement = 0x00000403; + public static final int ClusterId_FlowMeasurement = 0x00000404; + public static final int ClusterId_RelativeHumidityMeasurement = 0x00000405; + public static final int ClusterId_OccupancySensing = 0x00000406; + public static final int ClusterId_CarbonMonoxideConcentrationMeasurement = 0x0000040C; + public static final int ClusterId_CarbonDioxideConcentrationMeasurement = 0x0000040D; + public static final int ClusterId_EthyleneConcentrationMeasurement = 0x0000040E; + public static final int ClusterId_EthyleneOxideConcentrationMeasurement = 0x0000040F; + public static final int ClusterId_HydrogenConcentrationMeasurement = 0x00000410; + public static final int ClusterId_HydrogenSulphideConcentrationMeasurement = 0x00000411; + public static final int ClusterId_NitricOxideConcentrationMeasurement = 0x00000412; + public static final int ClusterId_NitrogenDioxideConcentrationMeasurement = 0x00000413; + public static final int ClusterId_OxygenConcentrationMeasurement = 0x00000414; + public static final int ClusterId_OzoneConcentrationMeasurement = 0x00000415; + public static final int ClusterId_SulfurDioxideConcentrationMeasurement = 0x00000416; + public static final int ClusterId_DissolvedOxygenConcentrationMeasurement = 0x00000417; + public static final int ClusterId_BromateConcentrationMeasurement = 0x00000418; + public static final int ClusterId_ChloraminesConcentrationMeasurement = 0x00000419; + public static final int ClusterId_ChlorineConcentrationMeasurement = 0x0000041A; + public static final int ClusterId_FecalColiformAndEColiConcentrationMeasurement = 0x0000041B; + public static final int ClusterId_FluorideConcentrationMeasurement = 0x0000041C; + public static final int ClusterId_HaloaceticAcidsConcentrationMeasurement = 0x0000041D; + public static final int ClusterId_TotalTrihalomethanesConcentrationMeasurement = 0x0000041E; + public static final int ClusterId_TotalColiformBacteriaConcentrationMeasurement = 0x0000041F; + public static final int ClusterId_TurbidityConcentrationMeasurement = 0x00000420; + public static final int ClusterId_CopperConcentrationMeasurement = 0x00000421; + public static final int ClusterId_LeadConcentrationMeasurement = 0x00000422; + public static final int ClusterId_ManganeseConcentrationMeasurement = 0x00000423; + public static final int ClusterId_SulfateConcentrationMeasurement = 0x00000424; + public static final int ClusterId_BromodichloromethaneConcentrationMeasurement = 0x00000425; + public static final int ClusterId_BromoformConcentrationMeasurement = 0x00000426; + public static final int ClusterId_ChlorodibromomethaneConcentrationMeasurement = 0x00000427; + public static final int ClusterId_ChloroformConcentrationMeasurement = 0x00000428; + public static final int ClusterId_SodiumConcentrationMeasurement = 0x00000429; + public static final int ClusterId_IasZone = 0x00000500; + public static final int ClusterId_IasAce = 0x00000501; + public static final int ClusterId_IasWd = 0x00000502; + public static final int ClusterId_WakeOnLan = 0x00000503; + public static final int ClusterId_Channel = 0x00000504; + public static final int ClusterId_TargetNavigator = 0x00000505; + public static final int ClusterId_MediaPlayback = 0x00000506; + public static final int ClusterId_MediaInput = 0x00000507; + public static final int ClusterId_LowPower = 0x00000508; + public static final int ClusterId_KeypadInput = 0x00000509; + public static final int ClusterId_ContentLauncher = 0x0000050A; + public static final int ClusterId_AudioOutput = 0x0000050B; + public static final int ClusterId_ApplicationLauncher = 0x0000050C; + public static final int ClusterId_ApplicationBasic = 0x0000050D; + public static final int ClusterId_AccountLogin = 0x0000050E; + public static final int ClusterId_TestCluster = 0x0000050F; + public static final int ClusterId_Messaging = 0x00000703; + public static final int ClusterId_ApplianceIdentification = 0x00000B00; + public static final int ClusterId_MeterIdentification = 0x00000B01; + public static final int ClusterId_ApplianceEventsAndAlert = 0x00000B02; + public static final int ClusterId_ApplianceStatistics = 0x00000B03; + public static final int ClusterId_ElectricalMeasurement = 0x00000B04; +} diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchManager.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchManager.java index fe50a7a8420d0d..be39112f59602d 100755 --- a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchManager.java +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchManager.java @@ -20,8 +20,8 @@ public interface ContentLaunchManager { - int STREAMING_TYPE_DASH = 0; - int STREAMING_TYPE_HLS = 1; + int STREAMING_TYPE_DASH = 1; + int STREAMING_TYPE_HLS = 2; /** * @return The list of content types supported by the Video Player or Content App in the form of @@ -30,7 +30,7 @@ public interface ContentLaunchManager { String[] getAcceptHeader(); /** @return The list information about supported streaming protocols in STREAMING_TYPE_XXX. */ - int[] getSupportedStreamingProtocols(); + long getSupportedStreamingProtocols(); /** * Launch the specified content with optional search criteria. diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchManagerStub.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchManagerStub.java index 347b670cc58acf..8bf1628296157a 100644 --- a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchManagerStub.java +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchManagerStub.java @@ -6,6 +6,12 @@ public class ContentLaunchManagerStub implements ContentLaunchManager { private final String TAG = ContentLaunchManagerStub.class.getSimpleName(); + private int endpoint; + + public ContentLaunchManagerStub(int endpoint) { + this.endpoint = endpoint; + } + @Override public String[] getAcceptHeader() { String[] headers = @@ -17,26 +23,32 @@ public String[] getAcceptHeader() { } @Override - public int[] getSupportedStreamingProtocols() { - int[] types = new int[] {STREAMING_TYPE_DASH, STREAMING_TYPE_HLS}; - return types; + public long getSupportedStreamingProtocols() { + long protocols = STREAMING_TYPE_DASH | STREAMING_TYPE_HLS; + return protocols; } @Override public ContentLaunchResponse launchContent( ContentLaunchSearchParameter[] search, boolean autoplay, String data) { - Log.d(TAG, "launchContent:" + data + " autoplay=" + autoplay); - ContentLaunchResponse resp = - new ContentLaunchResponse(ContentLaunchResponse.STATUS_SUCCESS, "Example data in Java"); - return resp; + Log.d(TAG, "launchContent:" + data + " autoplay=" + autoplay + " at " + endpoint); + + if ("err".equals(data)) { + return new ContentLaunchResponse( + ContentLaunchResponse.STATUS_URL_NOT_AVAILABLE, "Error data in Java"); + } + return new ContentLaunchResponse(ContentLaunchResponse.STATUS_SUCCESS, "Example data in Java"); } @Override public ContentLaunchResponse launchUrl( String url, String display, ContentLaunchBrandingInformation branding) { - Log.d(TAG, "launchUrl:" + url + " display=" + display); - ContentLaunchResponse resp = - new ContentLaunchResponse(ContentLaunchResponse.STATUS_SUCCESS, "Example data in Java"); - return resp; + Log.d(TAG, "launchUrl:" + url + " display=" + display + " at " + endpoint); + + if ("err".equals(display)) { + return new ContentLaunchResponse( + ContentLaunchResponse.STATUS_URL_NOT_AVAILABLE, "Error data in Java"); + } + return new ContentLaunchResponse(ContentLaunchResponse.STATUS_SUCCESS, "Example data in Java"); } } diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/KeypadInputManagerStub.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/KeypadInputManagerStub.java index 0c5d2f9734efaf..c25acd003dc9f8 100644 --- a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/KeypadInputManagerStub.java +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/KeypadInputManagerStub.java @@ -23,10 +23,19 @@ public class KeypadInputManagerStub implements KeypadInputManager { private final String TAG = KeypadInputManagerStub.class.getSimpleName(); + private int endpoint; + + public KeypadInputManagerStub(int endpoint) { + this.endpoint = endpoint; + } @Override public int sendKey(int keyCode) { - Log.d(TAG, "sendKey:" + keyCode); + Log.d(TAG, "sendKey:" + keyCode + " at " + endpoint); + + if (keyCode == KeypadInputManager.KEY_CODE_F4_YELLOW) { + return KEY_STATUS_UNSUPPORTED_KEY; + } return KEY_STATUS_SUCCESS; } } diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/LowPowerManagerStub.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/LowPowerManagerStub.java index 8dd9e2f8caab87..1885dc2f82cedf 100644 --- a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/LowPowerManagerStub.java +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/LowPowerManagerStub.java @@ -6,9 +6,15 @@ public class LowPowerManagerStub implements LowPowerManager { private final String TAG = LowPowerManagerStub.class.getSimpleName(); + private int endpoint; + + public LowPowerManagerStub(int endpoint) { + this.endpoint = endpoint; + } + @Override public boolean sleep() { - Log.d(TAG, "sleep"); + Log.d(TAG, "sleep at " + endpoint); return true; } } diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaInputManagerStub.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaInputManagerStub.java index e3c2919e36c512..a3ffc0a995717a 100755 --- a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaInputManagerStub.java +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaInputManagerStub.java @@ -23,9 +23,15 @@ public class MediaInputManagerStub implements MediaInputManager { private final String TAG = MediaInputManagerStub.class.getSimpleName(); + private int endpoint; + + public MediaInputManagerStub(int endpoint) { + this.endpoint = endpoint; + } + @Override public MediaInputInfo[] getInputList() { - MediaInputInfo[] info = new MediaInputInfo[2]; + MediaInputInfo[] info = new MediaInputInfo[3]; info[0] = new MediaInputInfo(); info[0].name = "HDMI 1"; info[0].description = "Living room Playstation"; @@ -33,39 +39,45 @@ public MediaInputInfo[] getInputList() { info[0].type = MediaInputInfo.INPUT_TYPE_HDMI; info[1] = new MediaInputInfo(); + info[1].name = "HDMI 2"; + info[1].description = "Living room XBox"; info[1].index = 1; info[1].type = MediaInputInfo.INPUT_TYPE_HDMI; + info[2] = new MediaInputInfo(); + info[2].index = 2; + info[2].type = MediaInputInfo.INPUT_TYPE_HDMI; + return info; } @Override public int getCurrentInput() { - Log.d(TAG, "getCurrentInput"); + Log.d(TAG, "getCurrentInput at " + endpoint); return 1; } @Override public boolean selectInput(int index) { - Log.d(TAG, "selectInput:" + index); + Log.d(TAG, "selectInput:" + index + " at " + endpoint); return true; } @Override public boolean showInputStatus() { - Log.d(TAG, "showInputStatus"); + Log.d(TAG, "showInputStatus at " + endpoint); return true; } @Override public boolean hideInputStatus() { - Log.d(TAG, "hideInputStatus"); + Log.d(TAG, "hideInputStatus at " + endpoint); return true; } @Override public boolean renameInput(int index, String name) { - Log.d(TAG, "renameInput index:" + index + " name:" + name); + Log.d(TAG, "renameInput index:" + index + " name:" + name + " at " + endpoint); return true; } } diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaPlaybackManager.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaPlaybackManager.java index 7972a49d93bffd..4a1b347b1b0d6b 100755 --- a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaPlaybackManager.java +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaPlaybackManager.java @@ -29,23 +29,17 @@ public interface MediaPlaybackManager { /** The duration, in milliseconds or 0 if the duration is not applicable */ int ATTRIBUTE_PLAYBACK_DURATION = 0x0002; - /** The position of playback (Position field) at the time (UpdateAt field) in milliseconds. */ - int ATTRIBUTE_PLAYBACK_POSITION_UPDATED_AT = 0x0003; - - /** The position of playback (Position field) at the time (UpdateAt field) in milliseconds. */ - int ATTRIBUTE_PLAYBACK_POSITION = 0x0004; - /** * The speed at which the current media is being played. 10000 means 1X, 5000 means 0.5X and 20000 * means 2X */ - int ATTRIBUTE_PLAYBACK_SPEED = 0x0005; + int ATTRIBUTE_PLAYBACK_SPEED = 0x0003; /** The earliest valid position to which a client MAY seek back, in milliseconds */ - int ATTRIBUTE_PLAYBACK_SEEK_RANGE_END = 0x0006; + int ATTRIBUTE_PLAYBACK_SEEK_RANGE_END = 0x0004; /** The furthest forward valid position to which a client MAY seek forward, in milliseconds */ - int ATTRIBUTE_PLAYBACK_SEEK_RANGE_START = 0x0007; + int ATTRIBUTE_PLAYBACK_SEEK_RANGE_START = 0x0005; int PLAYBACK_STATE_PLAYING = 0; int PLAYBACK_STATE_PAUSED = 1; @@ -122,4 +116,7 @@ public interface MediaPlaybackManager { * @return the response status defined in RESPONSE_STATUS_XXX */ int request(int cmd, long parameter); + + /** Get the position of playback (Position field) at the time (UpdateAt field) specified */ + MediaPlaybackPosition getPosition(); } diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaPlaybackManagerStub.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaPlaybackManagerStub.java index d4fb7552935e10..9e7c1d7bdca3ba 100755 --- a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaPlaybackManagerStub.java +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaPlaybackManagerStub.java @@ -19,46 +19,43 @@ package com.tcl.chip.tvapp; import android.util.Log; -import java.util.Date; /** Stub implement of MediaPlaybackManager, TV manufacture should have there own implements */ public class MediaPlaybackManagerStub implements MediaPlaybackManager { private final String TAG = MediaPlaybackManagerStub.class.getSimpleName(); + private int endpoint; + + public MediaPlaybackManagerStub(int endpoint) { + this.endpoint = endpoint; + } + @Override public long getAttributes(int attributesId) { switch (attributesId) { case ATTRIBUTE_PLAYBACK_STATE: - Log.d(TAG, "getAttributes CurrentState"); + Log.d(TAG, "getAttributes CurrentState at " + endpoint); return PLAYBACK_STATE_PLAYING; case ATTRIBUTE_PLAYBACK_START_TIME: - Log.d(TAG, "getAttributes StartTime"); + Log.d(TAG, "getAttributes StartTime at " + endpoint); return 100; case ATTRIBUTE_PLAYBACK_DURATION: - Log.d(TAG, "getAttributes Duration"); + Log.d(TAG, "getAttributes Duration at " + endpoint); return 5 * 60 * 1000; - case ATTRIBUTE_PLAYBACK_POSITION_UPDATED_AT: - Log.d(TAG, "getAttributes SampledPosition UpdatedAt"); - return new Date().getTime() * 1000; - - case ATTRIBUTE_PLAYBACK_POSITION: - Log.d(TAG, "getAttributes SampledPosition Position"); - return 3 * 60 * 1000; - case ATTRIBUTE_PLAYBACK_SPEED: - Log.d(TAG, "getAttributes SampledPosition PlaybackSpeed"); + Log.d(TAG, "getAttributes SampledPosition PlaybackSpeed at " + endpoint); return 10000; case ATTRIBUTE_PLAYBACK_SEEK_RANGE_END: - Log.d(TAG, "getAttributes SampledPosition SeekRangeEnd"); + Log.d(TAG, "getAttributes SampledPosition SeekRangeEnd at " + endpoint); return 5 * 60 * 1000; case ATTRIBUTE_PLAYBACK_SEEK_RANGE_START: - Log.d(TAG, "getAttributes SampledPosition SeekRangeStart"); + Log.d(TAG, "getAttributes SampledPosition SeekRangeStart at " + endpoint); return 200; } @@ -69,50 +66,55 @@ public long getAttributes(int attributesId) { public int request(int cmd, long parameter) { switch (cmd) { case REQUEST_PLAY: - Log.d(TAG, "request Play"); + Log.d(TAG, "request Play at " + endpoint); return RESPONSE_STATUS_SUCCESS; case REQUEST_PAUSE: - Log.d(TAG, "request pause"); + Log.d(TAG, "request pause at " + endpoint); return RESPONSE_STATUS_SUCCESS; case REQUEST_STOP: - Log.d(TAG, "request stop"); + Log.d(TAG, "request stop at " + endpoint); return RESPONSE_STATUS_SUCCESS; case REQUEST_START_OVER: - Log.d(TAG, "request start over"); + Log.d(TAG, "request start over at " + endpoint); return RESPONSE_STATUS_SUCCESS; case REQUEST_PREVIOUS: - Log.d(TAG, "request previous"); + Log.d(TAG, "request previous at " + endpoint); return RESPONSE_STATUS_SUCCESS; case REQUEST_NEXT: - Log.d(TAG, "request next"); + Log.d(TAG, "request next at " + endpoint); return RESPONSE_STATUS_SUCCESS; case REQUEST_REWIND: - Log.d(TAG, "request rewind"); + Log.d(TAG, "request rewind at " + endpoint); return RESPONSE_STATUS_SUCCESS; case REQUEST_FAST_FORWARD: - Log.d(TAG, "request fast forward"); + Log.d(TAG, "request fast forward at " + endpoint); return RESPONSE_STATUS_SUCCESS; case REQUEST_SKIP_FORWARD: - Log.d(TAG, "request skip forward " + parameter + " milliseconds"); + Log.d(TAG, "request skip forward " + parameter + " milliseconds at " + endpoint); return RESPONSE_STATUS_SUCCESS; case REQUEST_SKIP_BACKWARD: - Log.d(TAG, "request skip backward " + parameter + " milliseconds"); + Log.d(TAG, "request skip backward " + parameter + " milliseconds at " + endpoint); return RESPONSE_STATUS_SUCCESS; case REQUEST_SEEK: - Log.d(TAG, "request seek to " + parameter + " milliseconds"); + Log.d(TAG, "request seek to " + parameter + " milliseconds at " + endpoint); return RESPONSE_STATUS_SUCCESS; } return RESPONSE_STATUS_NOT_ALLOWED; } + + @Override + public MediaPlaybackPosition getPosition() { + return new MediaPlaybackPosition(3 * 60 * 1000); + } } diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaPlaybackPosition.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaPlaybackPosition.java new file mode 100644 index 00000000000000..0e8f8de2724d9e --- /dev/null +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaPlaybackPosition.java @@ -0,0 +1,13 @@ +package com.tcl.chip.tvapp; + +import java.util.Date; + +public class MediaPlaybackPosition { + private long updatedAt; + private long position; + + public MediaPlaybackPosition(long position) { + this.position = position; + this.updatedAt = new Date().getTime() * 1000; + } +} diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvApp.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvApp.java index 521a1c1dee70d7..71cc923a36f1b6 100644 --- a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvApp.java +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvApp.java @@ -17,22 +17,39 @@ */ package com.tcl.chip.tvapp; +import android.util.Log; + public class TvApp { - public TvApp() {} + private TvAppCallback mCallback; + private static final String TAG = "TvApp"; + + public TvApp(TvAppCallback callback) { + mCallback = callback; + nativeInit(); + } + + private void postClusterInit(int clusterId, int endpoint) { + Log.d(TAG, "postClusterInit for " + clusterId + " at " + endpoint); + if (mCallback != null) { + mCallback.onClusterInit(this, clusterId, endpoint); + } + } + + public native void nativeInit(); - public native void setKeypadInputManager(KeypadInputManager manager); + public native void setKeypadInputManager(int endpoint, KeypadInputManager manager); - public native void setWakeOnLanManager(WakeOnLanManager manager); + public native void setWakeOnLanManager(int endpoint, WakeOnLanManager manager); - public native void setMediaInputManager(MediaInputManager manager); + public native void setMediaInputManager(int endpoint, MediaInputManager manager); - public native void setContentLaunchManager(ContentLaunchManager manager); + public native void setContentLaunchManager(int endpoint, ContentLaunchManager manager); - public native void setLowPowerManager(LowPowerManager manager); + public native void setLowPowerManager(int endpoint, LowPowerManager manager); - public native void setMediaPlaybackManager(MediaPlaybackManager manager); + public native void setMediaPlaybackManager(int endpoint, MediaPlaybackManager manager); - public native void setChannelManager(ChannelManager manager); + public native void setChannelManager(int endpoint, ChannelManager manager); static { System.loadLibrary("TvApp"); diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvAppCallback.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvAppCallback.java new file mode 100644 index 00000000000000..47fff94e1dadcc --- /dev/null +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvAppCallback.java @@ -0,0 +1,21 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.tcl.chip.tvapp; + +public interface TvAppCallback { + void onClusterInit(TvApp app, int clusterId, int endpoint); +} diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/WakeOnLanManager.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/WakeOnLanManager.java index 315408f164181a..ab2b45935bf5a7 100644 --- a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/WakeOnLanManager.java +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/WakeOnLanManager.java @@ -24,5 +24,5 @@ public interface WakeOnLanManager { * * @return Mac address in AA:BB:CC:DD:EE */ - String getMac(int endpoint); + String getMac(); } diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/WakeOnLanManagerStub.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/WakeOnLanManagerStub.java index 24017e912900bb..4d7b17c5a75230 100644 --- a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/WakeOnLanManagerStub.java +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/WakeOnLanManagerStub.java @@ -6,8 +6,14 @@ public class WakeOnLanManagerStub implements WakeOnLanManager { private final String TAG = WakeOnLanManagerStub.class.getSimpleName(); + private int endpoint; + + public WakeOnLanManagerStub(int endpoint) { + this.endpoint = endpoint; + } + @Override - public String getMac(int endpoint) { + public String getMac() { Log.d(TAG, "getMac for endpoint=" + endpoint); return "AA:BB:CC:DD:EE"; } diff --git a/examples/tv-app/linux/include/channel/ChannelManager.cpp b/examples/tv-app/linux/include/channel/ChannelManager.cpp index 066476c57c759e..64052dbec76d4c 100644 --- a/examples/tv-app/linux/include/channel/ChannelManager.cpp +++ b/examples/tv-app/linux/include/channel/ChannelManager.cpp @@ -20,36 +20,40 @@ using namespace chip; using namespace chip::app::Clusters::Channel; -std::list ChannelManager::HandleGetChannelList() +CHIP_ERROR ChannelManager::HandleGetChannelList(chip::app::AttributeValueEncoder & aEncoder) { - std::list list; // TODO: Insert code here - int maximumVectorSize = 2; + return aEncoder.EncodeList([](const auto & encoder) -> CHIP_ERROR { + int maximumVectorSize = 2; - for (int i = 0; i < maximumVectorSize; ++i) - { - chip::app::Clusters::Channel::Structs::ChannelInfo::Type channelInfo; - channelInfo.affiliateCallSign = chip::CharSpan("exampleASign", strlen("exampleASign")); - channelInfo.callSign = chip::CharSpan("exampleCSign", strlen("exampleCSign")); - channelInfo.name = chip::CharSpan("exampleName", strlen("exampleName")); - channelInfo.majorNumber = static_cast(1 + i); - channelInfo.minorNumber = static_cast(2 + i); - list.push_back(channelInfo); - } - return list; + for (int i = 0; i < maximumVectorSize; ++i) + { + chip::app::Clusters::Channel::Structs::ChannelInfo::Type channelInfo; + channelInfo.affiliateCallSign = chip::CharSpan("exampleASign", strlen("exampleASign")); + channelInfo.callSign = chip::CharSpan("exampleCSign", strlen("exampleCSign")); + channelInfo.name = chip::CharSpan("exampleName", strlen("exampleName")); + channelInfo.majorNumber = static_cast(1 + i); + channelInfo.minorNumber = static_cast(2 + i); + + ReturnErrorOnFailure(encoder.Encode(channelInfo)); + } + + return CHIP_NO_ERROR; + }); } -chip::app::Clusters::Channel::Structs::LineupInfo::Type ChannelManager::HandleGetLineup() +CHIP_ERROR ChannelManager::HandleGetLineup(chip::app::AttributeValueEncoder & aEncoder) { chip::app::Clusters::Channel::Structs::LineupInfo::Type lineup; lineup.operatorName = chip::CharSpan("operatorName", strlen("operatorName")); lineup.lineupName = chip::CharSpan("lineupName", strlen("lineupName")); lineup.postalCode = chip::CharSpan("postalCode", strlen("postalCode")); lineup.lineupInfoType = chip::app::Clusters::Channel::LineupInfoTypeEnum::kMso; - return lineup; + + return aEncoder.Encode(lineup); } -chip::app::Clusters::Channel::Structs::ChannelInfo::Type ChannelManager::HandleGetCurrentChannel() +CHIP_ERROR ChannelManager::HandleGetCurrentChannel(chip::app::AttributeValueEncoder & aEncoder) { chip::app::Clusters::Channel::Structs::ChannelInfo::Type currentChannel; currentChannel.affiliateCallSign = chip::CharSpan("exampleASign", strlen("exampleASign")); @@ -57,10 +61,13 @@ chip::app::Clusters::Channel::Structs::ChannelInfo::Type ChannelManager::HandleG currentChannel.name = chip::CharSpan("exampleName", strlen("exampleName")); currentChannel.majorNumber = 1; currentChannel.minorNumber = 0; - return currentChannel; + + return aEncoder.Encode(currentChannel); } -Commands::ChangeChannelResponse::Type ChannelManager::HandleChangeChannel(const chip::CharSpan & match) +void ChannelManager::HandleChangeChannel( + const chip::CharSpan & match, + chip::app::CommandResponseHelper & responser) { Commands::ChangeChannelResponse::Type response; response.channelMatch.majorNumber = 1; @@ -69,7 +76,8 @@ Commands::ChangeChannelResponse::Type ChannelManager::HandleChangeChannel(const response.channelMatch.callSign = chip::CharSpan("callSign", strlen("callSign")); response.channelMatch.affiliateCallSign = chip::CharSpan("affiliateCallSign", strlen("affiliateCallSign")); response.errorType = chip::app::Clusters::Channel::ErrorTypeEnum::kMultipleMatches; - return response; + + responser.Success(response); } bool ChannelManager::HandleChangeChannelByNumber(const uint16_t & majorNumber, const uint16_t & minorNumber) diff --git a/examples/tv-app/linux/include/channel/ChannelManager.h b/examples/tv-app/linux/include/channel/ChannelManager.h index f090b18150de27..372523fe9f426e 100644 --- a/examples/tv-app/linux/include/channel/ChannelManager.h +++ b/examples/tv-app/linux/include/channel/ChannelManager.h @@ -22,11 +22,13 @@ class ChannelManager : public chip::app::Clusters::Channel::Delegate { public: - std::list HandleGetChannelList() override; - chip::app::Clusters::Channel::Structs::LineupInfo::Type HandleGetLineup() override; - chip::app::Clusters::Channel::Structs::ChannelInfo::Type HandleGetCurrentChannel() override; + virtual CHIP_ERROR HandleGetChannelList(chip::app::AttributeValueEncoder & aEncoder) override; + virtual CHIP_ERROR HandleGetLineup(chip::app::AttributeValueEncoder & aEncoder) override; + virtual CHIP_ERROR HandleGetCurrentChannel(chip::app::AttributeValueEncoder & aEncoder) override; - chip::app::Clusters::Channel::Commands::ChangeChannelResponse::Type HandleChangeChannel(const chip::CharSpan & match) override; + virtual void HandleChangeChannel( + const chip::CharSpan & match, + chip::app::CommandResponseHelper & responser) override; bool HandleChangeChannelByNumber(const uint16_t & majorNumber, const uint16_t & minorNumber) override; bool HandleSkipChannel(const uint16_t & count) override; }; diff --git a/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.cpp b/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.cpp index 33891a9f9bbfa7..54ff9f3d8dd94a 100644 --- a/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.cpp +++ b/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.cpp @@ -23,31 +23,35 @@ using namespace std; using namespace chip::app::Clusters::ContentLauncher; using namespace chip::AppPlatform; -Commands::LaunchResponse::Type ContentLauncherManager::HandleLaunchContent(chip::EndpointId endpointId, - const std::list & parameterList, - bool autoplay, const chip::CharSpan & data) +void ContentLauncherManager::HandleLaunchContent( + const std::list & parameterList, bool autoplay, const chip::CharSpan & data, + chip::app::CommandResponseHelper & responser) { - ChipLogProgress(Zcl, "ContentLauncherManager::HandleLaunchContent"); + ChipLogProgress(Zcl, "ContentLauncherManager::HandleLaunchContent for endpoint %d", mEndpointId); string dataString(data.data(), data.size()); + Commands::LaunchResponse::Type response; + #if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED - ContentApp * app = chip::AppPlatform::AppPlatform::GetInstance().GetContentAppByEndpointId(endpointId); + ContentApp * app = chip::AppPlatform::AppPlatform::GetInstance().GetContentAppByEndpointId(mEndpointId); if (app != NULL) { - return app->GetContentLauncher()->LaunchContent(parameterList, autoplay, dataString); + response = app->GetContentLauncher()->LaunchContent(parameterList, autoplay, dataString); + responser.Success(response); + return; } #endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED // TODO: Insert code here - Commands::LaunchResponse::Type response; response.data = chip::CharSpan("exampleData", strlen("exampleData")); response.status = chip::app::Clusters::ContentLauncher::StatusEnum::kSuccess; - return response; + responser.Success(response); } -Commands::LaunchResponse::Type ContentLauncherManager::HandleLaunchUrl(const chip::CharSpan & contentUrl, - const chip::CharSpan & displayString, - const std::list & brandingInformation) +void ContentLauncherManager::HandleLaunchUrl( + const chip::CharSpan & contentUrl, const chip::CharSpan & displayString, + const std::list & brandingInformation, + chip::app::CommandResponseHelper & responser) { ChipLogProgress(Zcl, "ContentLauncherManager::HandleLaunchUrl"); @@ -58,13 +62,18 @@ Commands::LaunchResponse::Type ContentLauncherManager::HandleLaunchUrl(const chi Commands::LaunchResponse::Type response; response.data = chip::CharSpan("exampleData", strlen("exampleData")); response.status = chip::app::Clusters::ContentLauncher::StatusEnum::kSuccess; - return response; + responser.Success(response); } -std::list ContentLauncherManager::HandleGetAcceptHeaderList() +CHIP_ERROR ContentLauncherManager::HandleGetAcceptHeaderList(chip::app::AttributeValueEncoder & aEncoder) { ChipLogProgress(Zcl, "ContentLauncherManager::HandleGetAcceptHeaderList"); - return { "example", "example" }; + return aEncoder.EncodeList([](const auto & encoder) -> CHIP_ERROR { + chip::CharSpan data = chip::CharSpan("example", strlen("example")); + ReturnErrorOnFailure(encoder.Encode(data)); + ReturnErrorOnFailure(encoder.Encode(data)); + return CHIP_NO_ERROR; + }); } uint32_t ContentLauncherManager::HandleGetSupportedStreamingProtocols() diff --git a/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.h b/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.h index 132afeb37a9812..0429c945548b8f 100644 --- a/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.h +++ b/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.h @@ -23,12 +23,19 @@ class ContentLauncherManager : public chip::app::Clusters::ContentLauncher::Delegate { public: - chip::app::Clusters::ContentLauncher::Commands::LaunchResponse::Type - HandleLaunchContent(chip::EndpointId endpointId, const std::list & parameterList, bool autoplay, - const chip::CharSpan & data) override; - chip::app::Clusters::ContentLauncher::Commands::LaunchResponse::Type - HandleLaunchUrl(const chip::CharSpan & contentUrl, const chip::CharSpan & displayString, - const std::list & brandingInformation) override; - std::list HandleGetAcceptHeaderList() override; + ContentLauncherManager(chip::EndpointId endpointId) : mEndpointId(endpointId) {} + + void + HandleLaunchContent(const std::list & parameterList, bool autoplay, const chip::CharSpan & data, + chip::app::CommandResponseHelper & + responser) override; + void HandleLaunchUrl(const chip::CharSpan & contentUrl, const chip::CharSpan & displayString, + const std::list & brandingInformation, + chip::app::CommandResponseHelper & + responser) override; + CHIP_ERROR HandleGetAcceptHeaderList(chip::app::AttributeValueEncoder & aEncoder) override; uint32_t HandleGetSupportedStreamingProtocols() override; + +private: + chip::EndpointId mEndpointId; }; diff --git a/examples/tv-app/linux/include/media-input/MediaInputManager.cpp b/examples/tv-app/linux/include/media-input/MediaInputManager.cpp index 4b654d0b838d87..b4128403672d50 100644 --- a/examples/tv-app/linux/include/media-input/MediaInputManager.cpp +++ b/examples/tv-app/linux/include/media-input/MediaInputManager.cpp @@ -20,22 +20,25 @@ using namespace chip; using namespace chip::app::Clusters::MediaInput; -std::list MediaInputManager::HandleGetInputList() +CHIP_ERROR MediaInputManager::HandleGetInputList(chip::app::AttributeValueEncoder & aEncoder) { - std::list list; // TODO: Insert code here - int maximumVectorSize = 2; - for (int i = 0; i < maximumVectorSize; ++i) - { - chip::app::Clusters::MediaInput::Structs::InputInfo::Type inputInfo; - inputInfo.description = chip::CharSpan("exampleDescription", strlen("exampleDescription")); - inputInfo.name = chip::CharSpan("exampleName", strlen("exampleName")); - inputInfo.inputType = chip::app::Clusters::MediaInput::InputTypeEnum::kHdmi; - inputInfo.index = static_cast(1 + i); - list.push_back(inputInfo); - } - return list; + return aEncoder.EncodeList([](const auto & encoder) -> CHIP_ERROR { + int maximumVectorSize = 2; + for (int i = 0; i < maximumVectorSize; ++i) + { + chip::app::Clusters::MediaInput::Structs::InputInfo::Type inputInfo; + inputInfo.description = chip::CharSpan("exampleDescription", strlen("exampleDescription")); + inputInfo.name = chip::CharSpan("exampleName", strlen("exampleName")); + inputInfo.inputType = chip::app::Clusters::MediaInput::InputTypeEnum::kHdmi; + inputInfo.index = static_cast(1 + i); + + ReturnErrorOnFailure(encoder.Encode(inputInfo)); + } + + return CHIP_NO_ERROR; + }); } uint8_t MediaInputManager::HandleGetCurrentInput() diff --git a/examples/tv-app/linux/include/media-input/MediaInputManager.h b/examples/tv-app/linux/include/media-input/MediaInputManager.h index 84e0114f43c3f3..b2fa47c1013750 100644 --- a/examples/tv-app/linux/include/media-input/MediaInputManager.h +++ b/examples/tv-app/linux/include/media-input/MediaInputManager.h @@ -18,12 +18,13 @@ #pragma once +#include #include class MediaInputManager : public chip::app::Clusters::MediaInput::Delegate { public: - std::list HandleGetInputList() override; + CHIP_ERROR HandleGetInputList(chip::app::AttributeValueEncoder & aEncoder) override; uint8_t HandleGetCurrentInput() override; bool HandleSelectInput(const uint8_t index) override; bool HandleShowInputStatus() override; diff --git a/examples/tv-app/linux/include/wake-on-lan/WakeOnLanManager.cpp b/examples/tv-app/linux/include/wake-on-lan/WakeOnLanManager.cpp index 291c2951c221f8..1191612b84e2c4 100644 --- a/examples/tv-app/linux/include/wake-on-lan/WakeOnLanManager.cpp +++ b/examples/tv-app/linux/include/wake-on-lan/WakeOnLanManager.cpp @@ -21,7 +21,7 @@ using namespace chip; using namespace chip::app::Clusters::WakeOnLan; -chip::CharSpan WakeOnLanManager::HandleGetMacAddress() +CHIP_ERROR WakeOnLanManager::HandleGetMacAddress(chip::app::AttributeValueEncoder & aEncoder) { - return chip::CharSpan("00:00:00:00:00", strlen("00:00:00:00:00")); + return aEncoder.Encode(chip::CharSpan("00:00:00:00:00", strlen("00:00:00:00:00"))); } diff --git a/examples/tv-app/linux/include/wake-on-lan/WakeOnLanManager.h b/examples/tv-app/linux/include/wake-on-lan/WakeOnLanManager.h index ba4a6964a5bfc8..63217020e9ab11 100644 --- a/examples/tv-app/linux/include/wake-on-lan/WakeOnLanManager.h +++ b/examples/tv-app/linux/include/wake-on-lan/WakeOnLanManager.h @@ -23,5 +23,5 @@ class WakeOnLanManager : public chip::app::Clusters::WakeOnLan::Delegate { public: - chip::CharSpan HandleGetMacAddress() override; + CHIP_ERROR HandleGetMacAddress(chip::app::AttributeValueEncoder & aEncoder) override; }; diff --git a/examples/tv-app/linux/main.cpp b/examples/tv-app/linux/main.cpp index e0549f20559cd9..f6133e5217dda2 100644 --- a/examples/tv-app/linux/main.cpp +++ b/examples/tv-app/linux/main.cpp @@ -57,7 +57,6 @@ bool emberAfBasicClusterMfgSpecificPingCallback(chip::app::CommandHandler * comm } namespace { -static ContentLauncherManager contentLauncherManager; static AccountLoginManager accountLoginManager; static ApplicationBasicManager applicationBasicManager; static ApplicationLauncherManager applicationLauncherManager; @@ -101,7 +100,7 @@ int main(int argc, char * argv[]) void emberAfContentLauncherClusterInitCallback(EndpointId endpoint) { ChipLogProgress(Zcl, "TV Linux App: ContentLauncher::SetDelegate"); - chip::app::Clusters::ContentLauncher::SetDelegate(endpoint, &contentLauncherManager); + chip::app::Clusters::ContentLauncher::SetDelegate(endpoint, new ContentLauncherManager(endpoint)); } void emberAfAccountLoginClusterInitCallback(EndpointId endpoint) diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index 01506f2c38036e..4cdbe5d86e1dd3 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -49,6 +49,7 @@ static_library("app") { "CASESessionManager.cpp", "CASESessionManager.h", "CommandHandler.cpp", + "CommandResponseHelper.h", "CommandSender.cpp", "DefaultAttributePersistenceProvider.cpp", "DeviceProxy.cpp", diff --git a/src/app/CommandResponseHelper.h b/src/app/CommandResponseHelper.h new file mode 100644 index 00000000000000..840a8a590fc5ff --- /dev/null +++ b/src/app/CommandResponseHelper.h @@ -0,0 +1,61 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include + +namespace chip { +namespace app { + +template +class CommandResponseHelper +{ +public: + CommandResponseHelper(app::CommandHandler * command, const app::ConcreteCommandPath & commandPath) : + mCommand(command), mCommandPath(commandPath), responsed(false) + {} + + CHIP_ERROR Success(const CommandData & response) + { + CHIP_ERROR err = mCommand->AddResponseData(mCommandPath, response); + if (err == CHIP_NO_ERROR) + { + responsed = true; + } + return err; + }; + + void Response(EmberAfStatus status) + { + emberAfSendImmediateDefaultResponse(status); + responsed = true; + } + + bool IsResponsed() { return responsed; } + +private: + app::CommandHandler * mCommand; + app::ConcreteCommandPath mCommandPath; + bool responsed; +}; + +} // namespace app +} // namespace chip diff --git a/src/app/clusters/channel-server/channel-delegate.h b/src/app/clusters/channel-server/channel-delegate.h index 0195c1004389b7..6c382bb83dd09b 100644 --- a/src/app/clusters/channel-server/channel-delegate.h +++ b/src/app/clusters/channel-server/channel-delegate.h @@ -19,7 +19,8 @@ #pragma once #include - +#include +#include #include #include @@ -34,13 +35,14 @@ namespace Channel { class Delegate { public: - virtual std::list HandleGetChannelList() = 0; - virtual chip::app::Clusters::Channel::Structs::LineupInfo::Type HandleGetLineup() = 0; - virtual chip::app::Clusters::Channel::Structs::ChannelInfo::Type HandleGetCurrentChannel() = 0; - - virtual Commands::ChangeChannelResponse::Type HandleChangeChannel(const chip::CharSpan & match) = 0; - virtual bool HandleChangeChannelByNumber(const uint16_t & majorNumber, const uint16_t & minorNumber) = 0; - virtual bool HandleSkipChannel(const uint16_t & count) = 0; + virtual CHIP_ERROR HandleGetChannelList(app::AttributeValueEncoder & aEncoder) = 0; + virtual CHIP_ERROR HandleGetLineup(app::AttributeValueEncoder & aEncoder) = 0; + virtual CHIP_ERROR HandleGetCurrentChannel(app::AttributeValueEncoder & aEncoder) = 0; + + virtual void HandleChangeChannel(const chip::CharSpan & match, + CommandResponseHelper & responser) = 0; + virtual bool HandleChangeChannelByNumber(const uint16_t & majorNumber, const uint16_t & minorNumber) = 0; + virtual bool HandleSkipChannel(const uint16_t & count) = 0; virtual ~Delegate() = default; }; diff --git a/src/app/clusters/channel-server/channel-server.cpp b/src/app/clusters/channel-server/channel-server.cpp index c5f08c427a750d..bc68441b9389fe 100644 --- a/src/app/clusters/channel-server/channel-server.cpp +++ b/src/app/clusters/channel-server/channel-server.cpp @@ -38,12 +38,11 @@ ******************************************************************************* ******************************************************************************/ -#include -#include - #include #include #include +#include +#include #include #include @@ -149,26 +148,17 @@ CHIP_ERROR ChannelAttrAccess::Read(const app::ConcreteReadAttributePath & aPath, CHIP_ERROR ChannelAttrAccess::ReadChannelListAttribute(app::AttributeValueEncoder & aEncoder, Delegate * delegate) { - std::list channelList = delegate->HandleGetChannelList(); - return aEncoder.EncodeList([channelList](const auto & encoder) -> CHIP_ERROR { - for (const auto & channel : channelList) - { - ReturnErrorOnFailure(encoder.Encode(channel)); - } - return CHIP_NO_ERROR; - }); + return delegate->HandleGetChannelList(aEncoder); } CHIP_ERROR ChannelAttrAccess::ReadLineupAttribute(app::AttributeValueEncoder & aEncoder, Delegate * delegate) { - Structs::LineupInfo::Type lineup = delegate->HandleGetLineup(); - return aEncoder.Encode(lineup); + return delegate->HandleGetLineup(aEncoder); } CHIP_ERROR ChannelAttrAccess::ReadCurrentChannelAttribute(app::AttributeValueEncoder & aEncoder, Delegate * delegate) { - Structs::ChannelInfo::Type currentChannel = delegate->HandleGetCurrentChannel(); - return aEncoder.Encode(currentChannel); + return delegate->HandleGetCurrentChannel(aEncoder); } } // anonymous namespace @@ -184,20 +174,26 @@ bool emberAfChannelClusterChangeChannelRequestCallback(app::CommandHandler * com auto & match = commandData.match; + app::CommandResponseHelper responser(command, commandPath); + Delegate * delegate = GetDelegate(endpoint); VerifyOrExit(isDelegateNull(delegate, endpoint) != true, err = CHIP_ERROR_INCORRECT_STATE); { - Commands::ChangeChannelResponse::Type response = delegate->HandleChangeChannel(match); - err = command->AddResponseData(commandPath, response); - SuccessOrExit(err); + delegate->HandleChangeChannel(match, responser); } exit: if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "emberAfChannelClusterChangeChannelRequestCallback error: %s", err.AsString()); + } + + // If isDelegateNull, no one will call responser, so IsResponsed will be false + if (!responser.IsResponsed()) + { emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_FAILURE); } + return true; } diff --git a/src/app/clusters/content-launch-server/content-launch-delegate.h b/src/app/clusters/content-launch-server/content-launch-delegate.h index 0ac1da2bf96a0a..766f8aff26907a 100644 --- a/src/app/clusters/content-launch-server/content-launch-delegate.h +++ b/src/app/clusters/content-launch-server/content-launch-delegate.h @@ -21,6 +21,8 @@ #include #include +#include +#include #include #include @@ -35,14 +37,14 @@ namespace ContentLauncher { class Delegate { public: - virtual Commands::LaunchResponse::Type HandleLaunchContent(chip::EndpointId endpointId, - const std::list & parameterList, bool autoplay, - const chip::CharSpan & data) = 0; + virtual void HandleLaunchContent(const std::list & parameterList, bool autoplay, const chip::CharSpan & data, + CommandResponseHelper & responser) = 0; - virtual Commands::LaunchResponse::Type HandleLaunchUrl(const chip::CharSpan & contentUrl, const chip::CharSpan & displayString, - const std::list & brandingInformation) = 0; + virtual void HandleLaunchUrl(const chip::CharSpan & contentUrl, const chip::CharSpan & displayString, + const std::list & brandingInformation, + CommandResponseHelper & responser) = 0; - virtual std::list HandleGetAcceptHeaderList() = 0; + virtual CHIP_ERROR HandleGetAcceptHeaderList(app::AttributeValueEncoder & aEncoder) = 0; virtual uint32_t HandleGetSupportedStreamingProtocols() = 0; diff --git a/src/app/clusters/content-launch-server/content-launch-server.cpp b/src/app/clusters/content-launch-server/content-launch-server.cpp index 286e141bd324b1..079f459eb974eb 100644 --- a/src/app/clusters/content-launch-server/content-launch-server.cpp +++ b/src/app/clusters/content-launch-server/content-launch-server.cpp @@ -149,15 +149,7 @@ CHIP_ERROR ContentLauncherAttrAccess::Read(const app::ConcreteReadAttributePath CHIP_ERROR ContentLauncherAttrAccess::ReadAcceptHeaderAttribute(app::AttributeValueEncoder & aEncoder, Delegate * delegate) { - std::list acceptHeaderList = delegate->HandleGetAcceptHeaderList(); - return aEncoder.EncodeList([acceptHeaderList](const auto & encoder) -> CHIP_ERROR { - for (const auto & acceptedHeader : acceptHeaderList) - { - CharSpan span(acceptedHeader.c_str(), acceptedHeader.length()); - ReturnErrorOnFailure(encoder.Encode(span)); - } - return CHIP_NO_ERROR; - }); + return delegate->HandleGetAcceptHeaderList(aEncoder); } CHIP_ERROR ContentLauncherAttrAccess::ReadSupportedStreamingProtocolsAttribute(app::AttributeValueEncoder & aEncoder, @@ -185,20 +177,23 @@ bool emberAfContentLauncherClusterLaunchContentRequestCallback( // auto searchIterator = commandData.search.begin(); std::list parameterList; + app::CommandResponseHelper responser(commandObj, commandPath); + Delegate * delegate = GetDelegate(endpoint); VerifyOrExit(isDelegateNull(delegate, endpoint) != true, err = CHIP_ERROR_INCORRECT_STATE); - { - Commands::LaunchResponse::Type response = delegate->HandleLaunchContent(endpoint, parameterList, autoplay, data); - err = commandObj->AddResponseData(commandPath, response); - SuccessOrExit(err); + delegate->HandleLaunchContent(parameterList, autoplay, data, responser); } exit: if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "emberAfContentLauncherClusterLaunchContentRequestCallback error: %s", err.AsString()); + } + // If isDelegateNull, no one will call responser, so IsResponsed will be false + if (!responser.IsResponsed()) + { emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_FAILURE); } @@ -218,20 +213,23 @@ bool emberAfContentLauncherClusterLaunchURLRequestCallback( // auto brandingInformationIterator = commandData.brandingInformation.begin(); std::list brandingInformationList; + app::CommandResponseHelper responser(commandObj, commandPath); + Delegate * delegate = GetDelegate(endpoint); VerifyOrExit(isDelegateNull(delegate, endpoint) != true, err = CHIP_ERROR_INCORRECT_STATE); - { - Commands::LaunchResponse::Type response = delegate->HandleLaunchUrl(contentUrl, displayString, brandingInformationList); - err = commandObj->AddResponseData(commandPath, response); - SuccessOrExit(err); + delegate->HandleLaunchUrl(contentUrl, displayString, brandingInformationList, responser); } exit: if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "emberAfContentLauncherClusterLaunchURLCallback error: %s", err.AsString()); + } + // If isDelegateNull, no one will call responser, so IsResponsed will be false + if (!responser.IsResponsed()) + { emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_FAILURE); } diff --git a/src/app/clusters/media-input-server/media-input-delegate.h b/src/app/clusters/media-input-server/media-input-delegate.h index b596a9c5e58b2f..862298b9352777 100644 --- a/src/app/clusters/media-input-server/media-input-delegate.h +++ b/src/app/clusters/media-input-server/media-input-delegate.h @@ -19,7 +19,7 @@ #pragma once #include - +#include #include #include @@ -34,12 +34,13 @@ namespace MediaInput { class Delegate { public: - virtual std::list HandleGetInputList() = 0; - virtual uint8_t HandleGetCurrentInput() = 0; - virtual bool HandleSelectInput(const uint8_t index) = 0; - virtual bool HandleShowInputStatus() = 0; - virtual bool HandleHideInputStatus() = 0; - virtual bool HandleRenameInput(const uint8_t index, const chip::CharSpan & name) = 0; + // no easy way to handle the return memory of app::Clusters::MediaInput::Structs::InputInfo::Type list, so encoder is used + virtual CHIP_ERROR HandleGetInputList(app::AttributeValueEncoder & aEncoder) = 0; + virtual uint8_t HandleGetCurrentInput() = 0; + virtual bool HandleSelectInput(const uint8_t index) = 0; + virtual bool HandleShowInputStatus() = 0; + virtual bool HandleHideInputStatus() = 0; + virtual bool HandleRenameInput(const uint8_t index, const chip::CharSpan & name) = 0; virtual ~Delegate() = default; }; diff --git a/src/app/clusters/media-input-server/media-input-server.cpp b/src/app/clusters/media-input-server/media-input-server.cpp index 896a759ba0a758..a1b72a6dd0c23a 100644 --- a/src/app/clusters/media-input-server/media-input-server.cpp +++ b/src/app/clusters/media-input-server/media-input-server.cpp @@ -129,14 +129,7 @@ CHIP_ERROR MediaInputAttrAccess::Read(const app::ConcreteReadAttributePath & aPa CHIP_ERROR MediaInputAttrAccess::ReadInputListAttribute(app::AttributeValueEncoder & aEncoder, Delegate * delegate) { - std::list inputList = delegate->HandleGetInputList(); - return aEncoder.EncodeList([inputList](const auto & encoder) -> CHIP_ERROR { - for (const auto & input : inputList) - { - ReturnErrorOnFailure(encoder.Encode(input)); - } - return CHIP_NO_ERROR; - }); + return delegate->HandleGetInputList(aEncoder); } CHIP_ERROR MediaInputAttrAccess::ReadCurrentInputAttribute(app::AttributeValueEncoder & aEncoder, Delegate * delegate) diff --git a/src/app/clusters/wake-on-lan-server/wake-on-lan-delegate.h b/src/app/clusters/wake-on-lan-server/wake-on-lan-delegate.h index 400dda253a867d..1f4bed9177733a 100644 --- a/src/app/clusters/wake-on-lan-server/wake-on-lan-delegate.h +++ b/src/app/clusters/wake-on-lan-server/wake-on-lan-delegate.h @@ -19,6 +19,7 @@ #pragma once #include +#include namespace chip { namespace app { @@ -31,7 +32,7 @@ namespace WakeOnLan { class Delegate { public: - virtual chip::CharSpan HandleGetMacAddress() = 0; + virtual CHIP_ERROR HandleGetMacAddress(app::AttributeValueEncoder & aEncoder) = 0; virtual ~Delegate() = default; }; diff --git a/src/app/clusters/wake-on-lan-server/wake-on-lan-server.cpp b/src/app/clusters/wake-on-lan-server/wake-on-lan-server.cpp index 9b6e5d20e9634a..658430cc873c1b 100644 --- a/src/app/clusters/wake-on-lan-server/wake-on-lan-server.cpp +++ b/src/app/clusters/wake-on-lan-server/wake-on-lan-server.cpp @@ -126,8 +126,7 @@ CHIP_ERROR WakeOnLanAttrAccess::Read(const app::ConcreteReadAttributePath & aPat CHIP_ERROR WakeOnLanAttrAccess::ReadMacAddressAttribute(app::AttributeValueEncoder & aEncoder, Delegate * delegate) { - chip::CharSpan macAddress = delegate->HandleGetMacAddress(); - return aEncoder.Encode(macAddress); + return delegate->HandleGetMacAddress(aEncoder); } } // anonymous namespace diff --git a/src/lib/support/JniTypeWrappers.h b/src/lib/support/JniTypeWrappers.h index 64d03301333b5a..ced71bb0e1b793 100644 --- a/src/lib/support/JniTypeWrappers.h +++ b/src/lib/support/JniTypeWrappers.h @@ -37,7 +37,13 @@ class JniUtfString mChars = env->GetStringUTFChars(string, 0); mDataLength = env->GetStringUTFLength(string); } - ~JniUtfString() { mEnv->ReleaseStringUTFChars(mString, mChars); } + ~JniUtfString() + { + if (mString != nullptr) + { + mEnv->ReleaseStringUTFChars(mString, mChars); + } + } const char * c_str() const { return mChars; } From aaa7ad0163bb82e223ade61d324b5a828a871077 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Tue, 11 Jan 2022 18:27:13 -0500 Subject: [PATCH 50/64] Fix CommissioneeDeviceProxy state (#13466) * Fix CommissioneeDeviceProxy state The pairing call was moved to external so the commissionee device proxy never gets set to connected. LoadSecureSessionParameters will take care of setting up the pairing in the session manager so added a new function that gets called when the pairing is complete to set the state and setup the pairing in the session manager. * Address review comments. --- src/controller/CHIPDeviceController.cpp | 4 +--- src/controller/CommissioneeDeviceProxy.cpp | 15 +++++++++++++++ src/controller/CommissioneeDeviceProxy.h | 8 ++++++++ 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 6ca2ba0719d2bd..073d15f2256d5b 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -976,9 +976,7 @@ void DeviceCommissioner::OnSessionEstablished() // TODO: the session should know which peer we are trying to connect to when started pairing->SetPeerNodeId(mDeviceBeingCommissioned->GetDeviceId()); - CHIP_ERROR err = mSystemState->SessionMgr()->NewPairing( - mDeviceBeingCommissioned->GetSecureSessionHolder(), Optional::Value(pairing->GetPeerAddress()), - pairing->GetPeerNodeId(), pairing, CryptoContext::SessionRole::kInitiator, mFabricIndex); + CHIP_ERROR err = mDeviceBeingCommissioned->SetConnected(); if (err != CHIP_NO_ERROR) { ChipLogError(Controller, "Failed in setting up secure channel: err %s", ErrorStr(err)); diff --git a/src/controller/CommissioneeDeviceProxy.cpp b/src/controller/CommissioneeDeviceProxy.cpp index bebd673c3d2c22..024a7c5167d8f9 100644 --- a/src/controller/CommissioneeDeviceProxy.cpp +++ b/src/controller/CommissioneeDeviceProxy.cpp @@ -132,6 +132,21 @@ CHIP_ERROR CommissioneeDeviceProxy::UpdateDeviceData(const Transport::PeerAddres return CHIP_NO_ERROR; } +CHIP_ERROR CommissioneeDeviceProxy::SetConnected() +{ + if (mState != ConnectionState::Connecting) + { + return CHIP_ERROR_INCORRECT_STATE; + } + bool _didLoad; + CHIP_ERROR err = LoadSecureSessionParametersIfNeeded(_didLoad); + if (err == CHIP_NO_ERROR) + { + mState = ConnectionState::SecureConnected; + } + return err; +} + void CommissioneeDeviceProxy::Reset() { SetActive(false); diff --git a/src/controller/CommissioneeDeviceProxy.h b/src/controller/CommissioneeDeviceProxy.h index 200e5913b6e11e..fa36aaf24b6f58 100644 --- a/src/controller/CommissioneeDeviceProxy.h +++ b/src/controller/CommissioneeDeviceProxy.h @@ -196,6 +196,14 @@ class CommissioneeDeviceProxy : public DeviceProxy, public SessionReleaseDelegat void SetActive(bool active) { mActive = active; } + /** + * @brief + * Called to indicate this proxy has been paired successfully. + * + * This causes the secure session parameters to be loaded and stores the session details in the session manager. + */ + CHIP_ERROR SetConnected(); + bool IsSecureConnected() const override { return IsActive() && mState == ConnectionState::SecureConnected; } bool IsSessionSetupInProgress() const { return IsActive() && mState == ConnectionState::Connecting; } From cd25649b0aeb5b6bc22bc9e8106f244a4689f140 Mon Sep 17 00:00:00 2001 From: Sagar Dhawan Date: Tue, 11 Jan 2022 17:41:47 -0800 Subject: [PATCH 51/64] Avoid duplicate block typedef (#13481) --- src/darwin/Framework/CHIP/CHIPDevice.h | 6 ++---- src/darwin/Framework/CHIP/CHIPDevice.mm | 4 +++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/darwin/Framework/CHIP/CHIPDevice.h b/src/darwin/Framework/CHIP/CHIPDevice.h index e90c3af2fa398e..6731593db70f4e 100644 --- a/src/darwin/Framework/CHIP/CHIPDevice.h +++ b/src/darwin/Framework/CHIP/CHIPDevice.h @@ -22,8 +22,6 @@ NS_ASSUME_NONNULL_BEGIN -typedef void (^SubscriptionEstablishedHandler)(void); - @interface CHIPDevice : NSObject - (instancetype)init NS_UNAVAILABLE; @@ -40,7 +38,7 @@ typedef void (^SubscriptionEstablishedHandler)(void); * * The array passed to reportHandler will contain CHIPAttributeReport instances. * - * subscriptionEstablishedHandler, if not nil, will be called once the + * subscriptionEstablished block, if not nil, will be called once the * subscription is established. This will be _after_ the first (priming) call * to reportHandler. * @@ -50,7 +48,7 @@ typedef void (^SubscriptionEstablishedHandler)(void); minInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler; + subscriptionEstablished:(nullable void (^)(void))subscriptionEstablishedHandler; @end @interface CHIPAttributePath : NSObject diff --git a/src/darwin/Framework/CHIP/CHIPDevice.mm b/src/darwin/Framework/CHIP/CHIPDevice.mm index a79c645202ecc1..f9ae4bbaa549a3 100644 --- a/src/darwin/Framework/CHIP/CHIPDevice.mm +++ b/src/darwin/Framework/CHIP/CHIPDevice.mm @@ -27,6 +27,8 @@ #include #include +typedef void (^SubscriptionEstablishedHandler)(void); + using namespace chip; using namespace chip::app; using namespace chip::Protocols::InteractionModel; @@ -138,7 +140,7 @@ - (void)subscribeWithQueue:(dispatch_queue_t)queue minInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(nullable void (^)(void))subscriptionEstablishedHandler { DeviceProxy * device = [self internalDevice]; if (!device) { From 6e7ad9905fa0eea38e7e7dbd83117dc1530420c9 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Tue, 11 Jan 2022 21:24:29 -0500 Subject: [PATCH 52/64] CommissioneeDeviceProxy fix. (#13482) Added a review comment fix, but the logic is not correct due to an early exit on the load function. This didn't show up when testing because the python tool caches the proxy and doesn't need to re-look up the pairing. --- src/controller/CommissioneeDeviceProxy.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/controller/CommissioneeDeviceProxy.cpp b/src/controller/CommissioneeDeviceProxy.cpp index 024a7c5167d8f9..74b0231e3a7401 100644 --- a/src/controller/CommissioneeDeviceProxy.cpp +++ b/src/controller/CommissioneeDeviceProxy.cpp @@ -138,11 +138,12 @@ CHIP_ERROR CommissioneeDeviceProxy::SetConnected() { return CHIP_ERROR_INCORRECT_STATE; } + mState = ConnectionState::SecureConnected; bool _didLoad; CHIP_ERROR err = LoadSecureSessionParametersIfNeeded(_didLoad); - if (err == CHIP_NO_ERROR) + if (err != CHIP_NO_ERROR) { - mState = ConnectionState::SecureConnected; + mState = ConnectionState::NotConnected; } return err; } From 9c8ce8e97ee453ada1f8a2ee0b4afce38d66e100 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Tue, 11 Jan 2022 23:29:16 -0500 Subject: [PATCH 53/64] Add a check for device != null on commissioning. (#13473) --- src/controller/CHIPDeviceController.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 073d15f2256d5b..f660a40bd73ee9 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -856,7 +856,8 @@ CHIP_ERROR DeviceCommissioner::Commission(NodeId remoteDeviceId, CommissioningPa // TODO(cecille): Can we get rid of mDeviceBeingCommissioned and use the remote id instead? Would require storing the // commissioning stage in the device. CommissioneeDeviceProxy * device = mDeviceBeingCommissioned; - if (device->GetDeviceId() != remoteDeviceId || (!device->IsSecureConnected() && !device->IsSessionSetupInProgress())) + if (device == nullptr || device->GetDeviceId() != remoteDeviceId || + (!device->IsSecureConnected() && !device->IsSessionSetupInProgress())) { ChipLogError(Controller, "Invalid device for commissioning" ChipLogFormatX64, ChipLogValueX64(remoteDeviceId)); return CHIP_ERROR_INCORRECT_STATE; From 7948da730f47c24c1f32a6adb4bb2492e60cf3df Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Wed, 12 Jan 2022 10:49:15 +0530 Subject: [PATCH 54/64] all-clusters-app: Disable OTA Provider Server (#13454) * all-clusters-app: Disable OTA Provider Server Having same cluster's client and server in same app is not supported in the zap. Removed OTA provider server from all-clusters-app * Remove OTA Provider server test cases * Remove OTA Provider files from all-clusters-app/mbed CMakeLists.txt * Disable OtaSoftwareUpdateProvider cluster tests for Darwin --- .../all-clusters-common/all-clusters-app.zap | 2 +- .../esp32/main/CMakeLists.txt | 1 - examples/all-clusters-app/mbed/CMakeLists.txt | 2 - .../tests/suites/TestDescriptorCluster.yaml | 1 - .../CHIP/templates/clusters-tests.zapt | 2 + .../Framework/CHIPTests/CHIPClustersTests.m | 87 +++------- .../zap-generated/IMClusterCommandHandler.cpp | 54 ------- .../PluginApplicationCallbacks.h | 1 - .../zap-generated/endpoint_config.h | 150 +++++++++--------- .../zap-generated/gen_config.h | 6 - .../chip-tool/zap-generated/test/Commands.h | 38 +++-- 11 files changed, 111 insertions(+), 233 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 d5ca564c973bfc..96b2b8d38b02f8 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 @@ -1408,7 +1408,7 @@ "mfgCode": null, "define": "OTA_PROVIDER_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "QueryImageResponse", diff --git a/examples/all-clusters-app/esp32/main/CMakeLists.txt b/examples/all-clusters-app/esp32/main/CMakeLists.txt index 0ab13536e5d807..ae22ec44a75888 100644 --- a/examples/all-clusters-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/main/CMakeLists.txt @@ -60,7 +60,6 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/keypad-input-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/media-playback-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ota-requestor" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ota-provider" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/target-navigator-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thermostat-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thermostat-user-interface-configuration-server" diff --git a/examples/all-clusters-app/mbed/CMakeLists.txt b/examples/all-clusters-app/mbed/CMakeLists.txt index e63b91ee53179e..e5611b5dc0c14c 100644 --- a/examples/all-clusters-app/mbed/CMakeLists.txt +++ b/examples/all-clusters-app/mbed/CMakeLists.txt @@ -43,7 +43,6 @@ target_include_directories(${APP_TARGET} PRIVATE ${CHIP_ROOT}/src/app ${CHIP_ROOT}/third_party/nlio/repo/include ${GEN_DIR}/all-clusters-app - ${GEN_DIR}/ota-provider-app ${GEN_DIR}/app-common ) @@ -118,7 +117,6 @@ target_sources(${APP_TARGET} PRIVATE ${APP_CLUSTERS}/network-commissioning-old/network-commissioning-ember.cpp ${APP_CLUSTERS}/network-commissioning-old/network-commissioning-old.cpp ${APP_CLUSTERS}/on-off-server/on-off-server.cpp - ${APP_CLUSTERS}/ota-provider/ota-provider.cpp ${APP_CLUSTERS}/scenes/scenes.cpp ${APP_CLUSTERS}/switch-server/switch-server.cpp ${APP_CLUSTERS}/target-navigator-server/target-navigator-server.cpp diff --git a/src/app/tests/suites/TestDescriptorCluster.yaml b/src/app/tests/suites/TestDescriptorCluster.yaml index 81831fe0ed18d7..9ab91edab81ff2 100644 --- a/src/app/tests/suites/TestDescriptorCluster.yaml +++ b/src/app/tests/suites/TestDescriptorCluster.yaml @@ -40,7 +40,6 @@ tests: 0x001E, # Binding 0x001F, # Access Control 0x0028, # Basic Information - 0x0029, # OTA Software Update Provider 0x002A, # OTA Software Update Requestor 0x002B, # Localization Configuration 0x002E, # Power Source Configuration diff --git a/src/darwin/Framework/CHIP/templates/clusters-tests.zapt b/src/darwin/Framework/CHIP/templates/clusters-tests.zapt index f111d35b765750..b510811b21b636 100644 --- a/src/darwin/Framework/CHIP/templates/clusters-tests.zapt +++ b/src/darwin/Framework/CHIP/templates/clusters-tests.zapt @@ -210,6 +210,7 @@ CHIPDevice * GetConnectedDevice(void) {{#unless (isStrEqual "Access Control" name)}} {{#unless (isStrEqual "Basic" name)}} {{#unless (isStrEqual "Thermostat" name)}} +{{#unless (isStrEqual "OTA Software Update Provider" name)}} {{#chip_server_cluster_attributes}} {{#unless (isStrEqual chipCallback.name "Unsupported")}} - (void)testSendCluster{{asUpperCamelCase parent.name}}ReadAttribute{{asUpperCamelCase name}}WithCompletionHandler @@ -266,6 +267,7 @@ CHIPDevice * GetConnectedDevice(void) {{/unless}} {{/unless}} {{/unless}} +{{/unless}} {{/chip_client_clusters}} @end diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index 8c186da3dbb116..9de320743c055d 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -36725,31 +36725,30 @@ - (void)testSendClusterTestDescriptorCluster_000002_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue count], 24); + XCTAssertEqual([actualValue count], 23); XCTAssertEqual([actualValue[0] unsignedIntValue], 3UL); XCTAssertEqual([actualValue[1] unsignedIntValue], 4UL); XCTAssertEqual([actualValue[2] unsignedIntValue], 29UL); XCTAssertEqual([actualValue[3] unsignedIntValue], 30UL); XCTAssertEqual([actualValue[4] unsignedIntValue], 31UL); XCTAssertEqual([actualValue[5] unsignedIntValue], 40UL); - XCTAssertEqual([actualValue[6] unsignedIntValue], 41UL); - XCTAssertEqual([actualValue[7] unsignedIntValue], 42UL); - XCTAssertEqual([actualValue[8] unsignedIntValue], 43UL); - XCTAssertEqual([actualValue[9] unsignedIntValue], 46UL); - XCTAssertEqual([actualValue[10] unsignedIntValue], 48UL); - XCTAssertEqual([actualValue[11] unsignedIntValue], 49UL); - XCTAssertEqual([actualValue[12] unsignedIntValue], 50UL); - XCTAssertEqual([actualValue[13] unsignedIntValue], 51UL); - XCTAssertEqual([actualValue[14] unsignedIntValue], 52UL); - XCTAssertEqual([actualValue[15] unsignedIntValue], 53UL); - XCTAssertEqual([actualValue[16] unsignedIntValue], 54UL); - XCTAssertEqual([actualValue[17] unsignedIntValue], 55UL); - XCTAssertEqual([actualValue[18] unsignedIntValue], 60UL); - XCTAssertEqual([actualValue[19] unsignedIntValue], 62UL); - XCTAssertEqual([actualValue[20] unsignedIntValue], 63UL); - XCTAssertEqual([actualValue[21] unsignedIntValue], 64UL); - XCTAssertEqual([actualValue[22] unsignedIntValue], 65UL); - XCTAssertEqual([actualValue[23] unsignedIntValue], 1029UL); + XCTAssertEqual([actualValue[6] unsignedIntValue], 42UL); + XCTAssertEqual([actualValue[7] unsignedIntValue], 43UL); + XCTAssertEqual([actualValue[8] unsignedIntValue], 46UL); + XCTAssertEqual([actualValue[9] unsignedIntValue], 48UL); + XCTAssertEqual([actualValue[10] unsignedIntValue], 49UL); + XCTAssertEqual([actualValue[11] unsignedIntValue], 50UL); + XCTAssertEqual([actualValue[12] unsignedIntValue], 51UL); + XCTAssertEqual([actualValue[13] unsignedIntValue], 52UL); + XCTAssertEqual([actualValue[14] unsignedIntValue], 53UL); + XCTAssertEqual([actualValue[15] unsignedIntValue], 54UL); + XCTAssertEqual([actualValue[16] unsignedIntValue], 55UL); + XCTAssertEqual([actualValue[17] unsignedIntValue], 60UL); + XCTAssertEqual([actualValue[18] unsignedIntValue], 62UL); + XCTAssertEqual([actualValue[19] unsignedIntValue], 63UL); + XCTAssertEqual([actualValue[20] unsignedIntValue], 64UL); + XCTAssertEqual([actualValue[21] unsignedIntValue], 65UL); + XCTAssertEqual([actualValue[22] unsignedIntValue], 1029UL); } [expectation fulfill]; @@ -45414,56 +45413,6 @@ - (void)testSendClusterNetworkCommissioningReadAttributeClusterRevisionWithCompl [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterOtaSoftwareUpdateProviderReadAttributeAttributeListWithCompletionHandler -{ - dispatch_queue_t queue = dispatch_get_main_queue(); - - XCTestExpectation * connectedExpectation = - [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - WaitForCommissionee(connectedExpectation, queue); - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; - - CHIPDevice * device = GetConnectedDevice(); - CHIPOtaSoftwareUpdateProvider * cluster = [[CHIPOtaSoftwareUpdateProvider alloc] initWithDevice:device endpoint:0 queue:queue]; - XCTAssertNotNil(cluster); - - XCTestExpectation * expectation = - [self expectationWithDescription:@"OtaSoftwareUpdateProviderReadAttributeAttributeListWithCompletionHandler"]; - - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"OtaSoftwareUpdateProvider AttributeList Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} - -- (void)testSendClusterOtaSoftwareUpdateProviderReadAttributeClusterRevisionWithCompletionHandler -{ - dispatch_queue_t queue = dispatch_get_main_queue(); - - XCTestExpectation * connectedExpectation = - [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - WaitForCommissionee(connectedExpectation, queue); - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; - - CHIPDevice * device = GetConnectedDevice(); - CHIPOtaSoftwareUpdateProvider * cluster = [[CHIPOtaSoftwareUpdateProvider alloc] initWithDevice:device endpoint:0 queue:queue]; - XCTAssertNotNil(cluster); - - XCTestExpectation * expectation = - [self expectationWithDescription:@"OtaSoftwareUpdateProviderReadAttributeClusterRevisionWithCompletionHandler"]; - - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"OtaSoftwareUpdateProvider ClusterRevision Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} - - (void)testSendClusterOtaSoftwareUpdateRequestorReadAttributeDefaultOtaProvidersWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); diff --git a/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp index d38a6c8f3883f0..0a671cc2520a9b 100644 --- a/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp @@ -1293,57 +1293,6 @@ void DispatchClientCommand(CommandSender * apCommandObj, const ConcreteCommandPa } // namespace OtaSoftwareUpdateProvider -namespace OtaSoftwareUpdateProvider { - -void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) -{ - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - // The following variables are used for all commands to save code size. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - bool wasHandled = false; - { - switch (aCommandPath.mCommandId) - { - case Commands::ApplyUpdateRequest::Id: { - Commands::ApplyUpdateRequest::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = - emberAfOtaSoftwareUpdateProviderClusterApplyUpdateRequestCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::QueryImage::Id: { - Commands::QueryImage::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = emberAfOtaSoftwareUpdateProviderClusterQueryImageCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - default: { - // Unrecognized command ID, error status will apply. - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, - ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); - return; - } - } - } - - if (CHIP_NO_ERROR != TLVError || !wasHandled) - { - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); - ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); - } -} - -} // namespace OtaSoftwareUpdateProvider - namespace OtaSoftwareUpdateRequestor { void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) @@ -2120,9 +2069,6 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV: case Clusters::NetworkCommissioning::Id: Clusters::NetworkCommissioning::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; - case Clusters::OtaSoftwareUpdateProvider::Id: - Clusters::OtaSoftwareUpdateProvider::DispatchServerCommand(apCommandObj, aCommandPath, aReader); - break; case Clusters::OtaSoftwareUpdateRequestor::Id: Clusters::OtaSoftwareUpdateRequestor::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; diff --git a/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h index bbfccc11029d89..269b9a65b20ac3 100644 --- a/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h @@ -61,7 +61,6 @@ MatterModeSelectPluginServerInitCallback(); \ MatterNetworkCommissioningPluginServerInitCallback(); \ MatterOtaSoftwareUpdateProviderPluginClientInitCallback(); \ - MatterOtaSoftwareUpdateProviderPluginServerInitCallback(); \ MatterOtaSoftwareUpdateRequestorPluginServerInitCallback(); \ MatterOccupancySensingPluginServerInitCallback(); \ MatterOnOffPluginServerInitCallback(); \ 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 fae62789a46262..96832858422c60 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -1462,7 +1462,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 606 +#define GENERATED_ATTRIBUTE_COUNT 605 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1523,9 +1523,6 @@ /* Endpoint: 0, Cluster: OTA Software Update Provider (client) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ - /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ - \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* DefaultOtaProviders */ \ @@ -2389,7 +2386,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 76 +#define GENERATED_CLUSTER_COUNT 75 #define GENERATED_CLUSTERS \ { \ { 0x0003, \ @@ -2423,259 +2420,256 @@ 0x0029, ZAP_ATTRIBUTE_INDEX(34), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 0, Cluster: OTA Software Update Provider (client) */ \ { \ - 0x0029, ZAP_ATTRIBUTE_INDEX(35), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ - }, /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ - { \ - 0x002A, ZAP_ATTRIBUTE_INDEX(36), 5, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002A, ZAP_ATTRIBUTE_INDEX(35), 5, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { \ - 0x002B, ZAP_ATTRIBUTE_INDEX(41), 2, 290, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(40), 2, 290, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ { \ - 0x002E, ZAP_ATTRIBUTE_INDEX(43), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002E, ZAP_ATTRIBUTE_INDEX(42), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Power Source Configuration (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(45), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0030, ZAP_ATTRIBUTE_INDEX(44), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(51), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(50), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(61), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0032, ZAP_ATTRIBUTE_INDEX(60), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(61), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(60), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(70), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(69), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(76), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(75), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(141), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0036, ZAP_ATTRIBUTE_INDEX(140), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(156), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(155), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(167), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(166), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(171), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(170), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x003F, ZAP_ATTRIBUTE_INDEX(177), 5, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003F, ZAP_ATTRIBUTE_INDEX(176), 5, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Group Key Management (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(182), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(181), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(184), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(183), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(186), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0405, ZAP_ATTRIBUTE_INDEX(185), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Relative Humidity Measurement (server) */ \ { 0x0003, \ - ZAP_ATTRIBUTE_INDEX(190), \ + ZAP_ATTRIBUTE_INDEX(189), \ 3, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayIdentifyServer }, /* Endpoint: 1, Cluster: Identify (server) */ \ { 0x0004, \ - ZAP_ATTRIBUTE_INDEX(193), \ + ZAP_ATTRIBUTE_INDEX(192), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 1, Cluster: Groups (server) */ \ { 0x0005, \ - ZAP_ATTRIBUTE_INDEX(195), \ + ZAP_ATTRIBUTE_INDEX(194), \ 6, \ 8, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayScenesServer }, /* Endpoint: 1, Cluster: Scenes (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(201), \ + ZAP_ATTRIBUTE_INDEX(200), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { \ - 0x0007, ZAP_ATTRIBUTE_INDEX(208), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0007, ZAP_ATTRIBUTE_INDEX(207), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ { 0x0008, \ - ZAP_ATTRIBUTE_INDEX(211), \ + ZAP_ATTRIBUTE_INDEX(210), \ 15, \ 23, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x000F, ZAP_ATTRIBUTE_INDEX(226), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x000F, ZAP_ATTRIBUTE_INDEX(225), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(230), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(229), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x001E, ZAP_ATTRIBUTE_INDEX(235), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001E, ZAP_ATTRIBUTE_INDEX(234), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binding (server) */ \ { \ - 0x0025, ZAP_ATTRIBUTE_INDEX(236), 4, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0025, ZAP_ATTRIBUTE_INDEX(235), 4, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Actions (server) */ \ { \ - 0x002B, ZAP_ATTRIBUTE_INDEX(240), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(239), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Localization Configuration (server) */ \ { \ - 0x002F, ZAP_ATTRIBUTE_INDEX(242), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002F, ZAP_ATTRIBUTE_INDEX(241), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Power Source (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(253), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(252), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Network Commissioning (server) */ \ { \ - 0x0039, ZAP_ATTRIBUTE_INDEX(263), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0039, ZAP_ATTRIBUTE_INDEX(262), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ { \ - 0x003B, ZAP_ATTRIBUTE_INDEX(264), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003B, ZAP_ATTRIBUTE_INDEX(263), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(269), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(268), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(271), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(270), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: User Label (server) */ \ { \ - 0x0045, ZAP_ATTRIBUTE_INDEX(273), 2, 3, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0045, ZAP_ATTRIBUTE_INDEX(272), 2, 3, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Boolean State (server) */ \ { \ - 0x0050, ZAP_ATTRIBUTE_INDEX(275), 6, 38, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0050, ZAP_ATTRIBUTE_INDEX(274), 6, 38, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Mode Select (server) */ \ { 0x0101, \ - ZAP_ATTRIBUTE_INDEX(281), \ + ZAP_ATTRIBUTE_INDEX(280), \ 19, \ 29, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | \ ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayDoorLockServer }, /* Endpoint: 1, Cluster: Door Lock (server) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(300), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0102, ZAP_ATTRIBUTE_INDEX(299), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (server) */ \ { \ - 0x0103, ZAP_ATTRIBUTE_INDEX(320), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0103, ZAP_ATTRIBUTE_INDEX(319), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Barrier Control (server) */ \ { \ 0x0200, \ - ZAP_ATTRIBUTE_INDEX(325), \ + ZAP_ATTRIBUTE_INDEX(324), \ 26, \ 54, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayPumpConfigurationAndControlServer \ }, /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ { 0x0201, \ - ZAP_ATTRIBUTE_INDEX(351), \ + ZAP_ATTRIBUTE_INDEX(350), \ 19, \ 34, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayThermostatServer }, /* Endpoint: 1, Cluster: Thermostat (server) */ \ { \ 0x0204, \ - ZAP_ATTRIBUTE_INDEX(370), \ + ZAP_ATTRIBUTE_INDEX(369), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayThermostatUserInterfaceConfigurationServer \ }, /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ { 0x0300, \ - ZAP_ATTRIBUTE_INDEX(374), \ + ZAP_ATTRIBUTE_INDEX(373), \ 53, \ 341, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { \ - 0x0400, ZAP_ATTRIBUTE_INDEX(427), 6, 11, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0400, ZAP_ATTRIBUTE_INDEX(426), 6, 11, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Illuminance Measurement (server) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(433), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0402, ZAP_ATTRIBUTE_INDEX(432), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ { \ - 0x0403, ZAP_ATTRIBUTE_INDEX(438), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0403, ZAP_ATTRIBUTE_INDEX(437), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ { \ - 0x0404, ZAP_ATTRIBUTE_INDEX(442), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0404, ZAP_ATTRIBUTE_INDEX(441), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(447), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0405, ZAP_ATTRIBUTE_INDEX(446), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(452), \ + ZAP_ATTRIBUTE_INDEX(451), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOccupancySensingServer }, /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ { 0x0500, \ - ZAP_ATTRIBUTE_INDEX(456), \ + ZAP_ATTRIBUTE_INDEX(455), \ 6, \ 16, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION) | \ ZAP_CLUSTER_MASK(MESSAGE_SENT_FUNCTION), \ chipFuncArrayIasZoneServer }, /* Endpoint: 1, Cluster: IAS Zone (server) */ \ { \ - 0x0503, ZAP_ATTRIBUTE_INDEX(462), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0503, ZAP_ATTRIBUTE_INDEX(461), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(464), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0504, ZAP_ATTRIBUTE_INDEX(463), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Channel (server) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(466), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0505, ZAP_ATTRIBUTE_INDEX(465), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(469), 7, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(468), 7, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (server) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(476), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0507, ZAP_ATTRIBUTE_INDEX(475), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Input (server) */ \ { \ - 0x0508, ZAP_ATTRIBUTE_INDEX(479), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0508, ZAP_ATTRIBUTE_INDEX(478), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Low Power (server) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(480), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0509, ZAP_ATTRIBUTE_INDEX(479), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(481), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(480), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (server) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(484), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(483), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (server) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(487), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050C, ZAP_ATTRIBUTE_INDEX(486), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(489), 8, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(488), 8, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (server) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(497), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(496), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Account Login (server) */ \ { \ - 0x050F, ZAP_ATTRIBUTE_INDEX(498), 78, 3285, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050F, ZAP_ATTRIBUTE_INDEX(497), 78, 3285, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (server) */ \ { \ - 0x0B04, ZAP_ATTRIBUTE_INDEX(576), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0B04, ZAP_ATTRIBUTE_INDEX(575), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ { 0x0004, \ - ZAP_ATTRIBUTE_INDEX(588), \ + ZAP_ATTRIBUTE_INDEX(587), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 2, Cluster: Groups (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(590), \ + ZAP_ATTRIBUTE_INDEX(589), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(597), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(596), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(602), \ + ZAP_ATTRIBUTE_INDEX(601), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2687,7 +2681,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 25, 1757 }, { ZAP_CLUSTER_INDEX(25), 47, 6206 }, { ZAP_CLUSTER_INDEX(72), 4, 21 }, \ + { ZAP_CLUSTER_INDEX(0), 24, 1755 }, { ZAP_CLUSTER_INDEX(24), 47, 6206 }, { ZAP_CLUSTER_INDEX(71), 4, 21 }, \ } // Largest attribute size is needed for various buffers @@ -2697,7 +2691,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (689) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (7984) +#define ATTRIBUTE_MAX_SIZE (7982) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) diff --git a/zzz_generated/all-clusters-app/zap-generated/gen_config.h b/zzz_generated/all-clusters-app/zap-generated/gen_config.h index a6ebfe6fb3413e..1f00a31f29ed1b 100644 --- a/zzz_generated/all-clusters-app/zap-generated/gen_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/gen_config.h @@ -68,7 +68,6 @@ #define EMBER_AF_MODE_SELECT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (2) #define EMBER_AF_OTA_PROVIDER_CLUSTER_CLIENT_ENDPOINT_COUNT (1) -#define EMBER_AF_OTA_PROVIDER_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OTA_REQUESTOR_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OCCUPANCY_SENSING_CLUSTER_SERVER_ENDPOINT_COUNT (2) #define EMBER_AF_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT (2) @@ -299,11 +298,6 @@ #define ZCL_USING_OTA_PROVIDER_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_OTA_SOFTWARE_UPDATE_PROVIDER_CLIENT -// Use this macro to check if the server side of the OTA Software Update Provider cluster is included -#define ZCL_USING_OTA_PROVIDER_CLUSTER_SERVER -#define EMBER_AF_PLUGIN_OTA_SOFTWARE_UPDATE_PROVIDER_SERVER -#define EMBER_AF_PLUGIN_OTA_SOFTWARE_UPDATE_PROVIDER - // Use this macro to check if the server side of the OTA Software Update Requestor cluster is included #define ZCL_USING_OTA_REQUESTOR_CLUSTER_SERVER #define EMBER_AF_PLUGIN_OTA_SOFTWARE_UPDATE_REQUESTOR_SERVER diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 8169cedb2573b5..cfb3300af70475 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -59770,42 +59770,40 @@ class TestDescriptorCluster : public TestCommand VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 5)); VerifyOrReturn(CheckValue("serverList[5]", iter_0.GetValue(), 40UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 6)); - VerifyOrReturn(CheckValue("serverList[6]", iter_0.GetValue(), 41UL)); + VerifyOrReturn(CheckValue("serverList[6]", iter_0.GetValue(), 42UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 7)); - VerifyOrReturn(CheckValue("serverList[7]", iter_0.GetValue(), 42UL)); + VerifyOrReturn(CheckValue("serverList[7]", iter_0.GetValue(), 43UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 8)); - VerifyOrReturn(CheckValue("serverList[8]", iter_0.GetValue(), 43UL)); + VerifyOrReturn(CheckValue("serverList[8]", iter_0.GetValue(), 46UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 9)); - VerifyOrReturn(CheckValue("serverList[9]", iter_0.GetValue(), 46UL)); + VerifyOrReturn(CheckValue("serverList[9]", iter_0.GetValue(), 48UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 10)); - VerifyOrReturn(CheckValue("serverList[10]", iter_0.GetValue(), 48UL)); + VerifyOrReturn(CheckValue("serverList[10]", iter_0.GetValue(), 49UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 11)); - VerifyOrReturn(CheckValue("serverList[11]", iter_0.GetValue(), 49UL)); + VerifyOrReturn(CheckValue("serverList[11]", iter_0.GetValue(), 50UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 12)); - VerifyOrReturn(CheckValue("serverList[12]", iter_0.GetValue(), 50UL)); + VerifyOrReturn(CheckValue("serverList[12]", iter_0.GetValue(), 51UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 13)); - VerifyOrReturn(CheckValue("serverList[13]", iter_0.GetValue(), 51UL)); + VerifyOrReturn(CheckValue("serverList[13]", iter_0.GetValue(), 52UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 14)); - VerifyOrReturn(CheckValue("serverList[14]", iter_0.GetValue(), 52UL)); + VerifyOrReturn(CheckValue("serverList[14]", iter_0.GetValue(), 53UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 15)); - VerifyOrReturn(CheckValue("serverList[15]", iter_0.GetValue(), 53UL)); + VerifyOrReturn(CheckValue("serverList[15]", iter_0.GetValue(), 54UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 16)); - VerifyOrReturn(CheckValue("serverList[16]", iter_0.GetValue(), 54UL)); + VerifyOrReturn(CheckValue("serverList[16]", iter_0.GetValue(), 55UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 17)); - VerifyOrReturn(CheckValue("serverList[17]", iter_0.GetValue(), 55UL)); + VerifyOrReturn(CheckValue("serverList[17]", iter_0.GetValue(), 60UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 18)); - VerifyOrReturn(CheckValue("serverList[18]", iter_0.GetValue(), 60UL)); + VerifyOrReturn(CheckValue("serverList[18]", iter_0.GetValue(), 62UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 19)); - VerifyOrReturn(CheckValue("serverList[19]", iter_0.GetValue(), 62UL)); + VerifyOrReturn(CheckValue("serverList[19]", iter_0.GetValue(), 63UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 20)); - VerifyOrReturn(CheckValue("serverList[20]", iter_0.GetValue(), 63UL)); + VerifyOrReturn(CheckValue("serverList[20]", iter_0.GetValue(), 64UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 21)); - VerifyOrReturn(CheckValue("serverList[21]", iter_0.GetValue(), 64UL)); + VerifyOrReturn(CheckValue("serverList[21]", iter_0.GetValue(), 65UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 22)); - VerifyOrReturn(CheckValue("serverList[22]", iter_0.GetValue(), 65UL)); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 23)); - VerifyOrReturn(CheckValue("serverList[23]", iter_0.GetValue(), 1029UL)); - VerifyOrReturn(CheckNoMoreListItems("serverList", iter_0, 24)); + VerifyOrReturn(CheckValue("serverList[22]", iter_0.GetValue(), 1029UL)); + VerifyOrReturn(CheckNoMoreListItems("serverList", iter_0, 23)); } NextTest(); From 96c66453f321bc4c25f5bdffc5e386de86d8a3b4 Mon Sep 17 00:00:00 2001 From: Marc Lepage <67919234+mlepage-google@users.noreply.github.com> Date: Wed, 12 Jan 2022 00:27:30 -0500 Subject: [PATCH 55/64] Fix and refactor ReadSingleClusterData (#13468) * Fix and refactor ReadSingleClusterData PR #12660 seems to have refactored ReadSingleClusterData in such a way that the access control check may be skipped. (Possibly due to merge?) Fix this by refactoring the function to a sensible flow of checks. Progress towards #10239 * Apply review comment. Co-authored-by: Boris Zbarsky --- .../util/ember-compatibility-functions.cpp | 60 ++++++++++--------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/src/app/util/ember-compatibility-functions.cpp b/src/app/util/ember-compatibility-functions.cpp index c9e092d82409f0..0bd07101e769e4 100644 --- a/src/app/util/ember-compatibility-functions.cpp +++ b/src/app/util/ember-compatibility-functions.cpp @@ -369,35 +369,32 @@ CHIP_ERROR ReadSingleClusterData(const SubjectDescriptor & aSubjectDescriptor, c " (expanded=%d)", ChipLogValueMEI(aPath.mClusterId), aPath.mEndpointId, ChipLogValueMEI(aPath.mAttributeId), aPath.mExpanded); + // Check attribute existence. This includes attributes with registered metadata, but also specially handled + // mandatory global attributes (which just check for cluster on endpoint). + + EmberAfCluster * attributeCluster = nullptr; + EmberAfAttributeMetadata * attributeMetadata = nullptr; + if (aPath.mAttributeId == Clusters::Globals::Attributes::AttributeList::Id) { - // This is not in our attribute metadata, so we just check for this - // endpoint+cluster existing. - EmberAfCluster * cluster = emberAfFindCluster(aPath.mEndpointId, aPath.mClusterId, CLUSTER_MASK_SERVER); - if (cluster) - { - AttributeListReader reader(cluster); - bool ignored; // Our reader always tries to encode - return ReadViaAccessInterface(aSubjectDescriptor.fabricIndex, aPath, aAttributeReports, apEncoderState, &reader, - &ignored); - } - - // else to save codesize just fall through and do the metadata search - // (which we know will fail and error out); + attributeCluster = emberAfFindCluster(aPath.mEndpointId, aPath.mClusterId, CLUSTER_MASK_SERVER); + } + else + { + attributeMetadata = + emberAfLocateAttributeMetadata(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId, CLUSTER_MASK_SERVER, 0); } - EmberAfAttributeMetadata * attributeMetadata = - emberAfLocateAttributeMetadata(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId, CLUSTER_MASK_SERVER, 0); - - if (attributeMetadata == nullptr) + if (attributeCluster == nullptr && attributeMetadata == nullptr) { AttributeReportIB::Builder & attributeReport = aAttributeReports.CreateAttributeReport(); ReturnErrorOnFailure(aAttributeReports.GetError()); - - // This path is not actually supported. return SendFailureStatus(aPath, attributeReport, Protocols::InteractionModel::Status::UnsupportedAttribute, nullptr); } + // Check access control. A failed check will disallow the operation, and may or may not generate an attribute report + // depending on whether the path was expanded. + { Access::RequestPath requestPath{ .cluster = aPath.mClusterId, .endpoint = aPath.mEndpointId }; Access::Privilege requestPrivilege = Access::Privilege::kView; // TODO: get actual request privilege @@ -419,27 +416,32 @@ CHIP_ERROR ReadSingleClusterData(const SubjectDescriptor & aSubjectDescriptor, c } } - // Value encoder will encode the whole AttributeReport, including the path, value and the version. - // The AttributeValueEncoder may encode more than one AttributeReportIB for the list chunking feature. - if (auto * attrOverride = findAttributeAccessOverride(aPath.mEndpointId, aPath.mClusterId)) - { - bool triedEncode; - ReturnErrorOnFailure(ReadViaAccessInterface(aSubjectDescriptor.fabricIndex, aPath, aAttributeReports, apEncoderState, - attrOverride, &triedEncode)); + // Read attribute using attribute override, if appropriate. This includes registered overrides, but also + // specially handled mandatory global attributes (which use unregistered overrides). - if (triedEncode) + { + // Special handling for mandatory global attributes: these are always for attribute list, using a special + // reader (which can be lightweight constructed even from nullptr). + AttributeListReader reader(attributeCluster); + AttributeAccessInterface * attributeOverride = + (attributeCluster != nullptr) ? &reader : findAttributeAccessOverride(aPath.mEndpointId, aPath.mClusterId); + if (attributeOverride) { - return CHIP_NO_ERROR; + bool triedEncode; + ReturnErrorOnFailure(ReadViaAccessInterface(aSubjectDescriptor.fabricIndex, aPath, aAttributeReports, apEncoderState, + attributeOverride, &triedEncode)); + ReturnErrorCodeIf(triedEncode, CHIP_NO_ERROR); } } + // Read attribute using Ember, if it doesn't have an override. + AttributeReportIB::Builder & attributeReport = aAttributeReports.CreateAttributeReport(); ReturnErrorOnFailure(aAttributeReports.GetError()); TLV::TLVWriter backup; attributeReport.Checkpoint(backup); - // We have verified that the attribute exists. AttributeDataIB::Builder & attributeDataIBBuilder = attributeReport.CreateAttributeData(); ReturnErrorOnFailure(attributeDataIBBuilder.GetError()); From 6c6f438ec95d560e982842015518c4bc45391842 Mon Sep 17 00:00:00 2001 From: Victor Morales Date: Tue, 11 Jan 2022 22:09:42 -0800 Subject: [PATCH 56/64] Remove patch on ESP32 Docker img (#13474) Signed-off-by: Victor Morales --- ...crt_bundle-remove-EC-ACC-certificate.patch | 54 ------------------- integrations/docker/images/chip-build/version | 2 +- 2 files changed, 1 insertion(+), 55 deletions(-) delete mode 100644 integrations/docker/images/chip-build-esp32/0001-esp_crt_bundle-remove-EC-ACC-certificate.patch diff --git a/integrations/docker/images/chip-build-esp32/0001-esp_crt_bundle-remove-EC-ACC-certificate.patch b/integrations/docker/images/chip-build-esp32/0001-esp_crt_bundle-remove-EC-ACC-certificate.patch deleted file mode 100644 index ae3f42edb0d7c7..00000000000000 --- a/integrations/docker/images/chip-build-esp32/0001-esp_crt_bundle-remove-EC-ACC-certificate.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 4e45f13e2df72a4cb4dc875942e95775198db85c Mon Sep 17 00:00:00 2001 -From: Victor Morales -Date: Fri, 1 Oct 2021 13:56:33 -0700 -Subject: [PATCH] esp_crt_bundle: remove EC-ACC certificate - -Fixes bug #7631 ---- - .../mbedtls/esp_crt_bundle/cacrt_all.pem | 30 ------------------- - 1 file changed, 30 deletions(-) - -diff --git a/components/mbedtls/esp_crt_bundle/cacrt_all.pem b/components/mbedtls/esp_crt_bundle/cacrt_all.pem -index 09b4ce16b7..a669b94fbd 100644 ---- a/components/mbedtls/esp_crt_bundle/cacrt_all.pem -+++ b/components/mbedtls/esp_crt_bundle/cacrt_all.pem -@@ -1645,36 +1645,6 @@ tnRGEmyR7jTV7JqR50S+kDFy1UkC9gLl9B/rfNmWVan/7Ir5mUf/NVoCqgTLiluHcSmRvaS0eg29 - mvVXIwAHIRc/SjnRBUkLp7Y3gaVdjKozXoEofKd9J+sAro03 - -----END CERTIFICATE----- - --EC-ACC --====== -------BEGIN CERTIFICATE----- --MIIFVjCCBD6gAwIBAgIQ7is969Qh3hSoYqwE893EATANBgkqhkiG9w0BAQUFADCB8zELMAkGA1UE --BhMCRVMxOzA5BgNVBAoTMkFnZW5jaWEgQ2F0YWxhbmEgZGUgQ2VydGlmaWNhY2lvIChOSUYgUS0w --ODAxMTc2LUkpMSgwJgYDVQQLEx9TZXJ2ZWlzIFB1YmxpY3MgZGUgQ2VydGlmaWNhY2lvMTUwMwYD --VQQLEyxWZWdldSBodHRwczovL3d3dy5jYXRjZXJ0Lm5ldC92ZXJhcnJlbCAoYykwMzE1MDMGA1UE --CxMsSmVyYXJxdWlhIEVudGl0YXRzIGRlIENlcnRpZmljYWNpbyBDYXRhbGFuZXMxDzANBgNVBAMT --BkVDLUFDQzAeFw0wMzAxMDcyMzAwMDBaFw0zMTAxMDcyMjU5NTlaMIHzMQswCQYDVQQGEwJFUzE7 --MDkGA1UEChMyQWdlbmNpYSBDYXRhbGFuYSBkZSBDZXJ0aWZpY2FjaW8gKE5JRiBRLTA4MDExNzYt --SSkxKDAmBgNVBAsTH1NlcnZlaXMgUHVibGljcyBkZSBDZXJ0aWZpY2FjaW8xNTAzBgNVBAsTLFZl --Z2V1IGh0dHBzOi8vd3d3LmNhdGNlcnQubmV0L3ZlcmFycmVsIChjKTAzMTUwMwYDVQQLEyxKZXJh --cnF1aWEgRW50aXRhdHMgZGUgQ2VydGlmaWNhY2lvIENhdGFsYW5lczEPMA0GA1UEAxMGRUMtQUND --MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsyLHT+KXQpWIR4NA9h0X84NzJB5R85iK --w5K4/0CQBXCHYMkAqbWUZRkiFRfCQ2xmRJoNBD45b6VLeqpjt4pEndljkYRm4CgPukLjbo73FCeT --ae6RDqNfDrHrZqJyTxIThmV6PttPB/SnCWDaOkKZx7J/sxaVHMf5NLWUhdWZXqBIoH7nF2W4onW4 --HvPlQn2v7fOKSGRdghST2MDk/7NQcvJ29rNdQlB50JQ+awwAvthrDk4q7D7SzIKiGGUzE3eeml0a --E9jD2z3Il3rucO2n5nzbcc8tlGLfbdb1OL4/pYUKGbio2Al1QnDE6u/LDsg0qBIimAy4E5S2S+zw --0JDnJwIDAQABo4HjMIHgMB0GA1UdEQQWMBSBEmVjX2FjY0BjYXRjZXJ0Lm5ldDAPBgNVHRMBAf8E --BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUoMOLRKo3pUW/l4Ba0fF4opvpXY0wfwYD --VR0gBHgwdjB0BgsrBgEEAfV4AQMBCjBlMCwGCCsGAQUFBwIBFiBodHRwczovL3d3dy5jYXRjZXJ0 --Lm5ldC92ZXJhcnJlbDA1BggrBgEFBQcCAjApGidWZWdldSBodHRwczovL3d3dy5jYXRjZXJ0Lm5l --dC92ZXJhcnJlbCAwDQYJKoZIhvcNAQEFBQADggEBAKBIW4IB9k1IuDlVNZyAelOZ1Vr/sXE7zDkJ --lF7W2u++AVtd0x7Y/X1PzaBB4DSTv8vihpw3kpBWHNzrKQXlxJ7HNd+KDM3FIUPpqojlNcAZQmNa --Al6kSBg6hW/cnbw/nZzBh7h6YQjpdwt/cKt63dmXLGQehb+8dJahw3oS7AwaboMMPOhyRp/7SNVe --l+axofjk70YllJyJ22k4vuxcDlbHZVHlUIiIv0LVKz3l+bqeLrPK9HOSAgu+TGbrIP65y7WZf+a2 --E/rKS03Z7lNGBjvGTq2TWoF+bCpLagVFjPIhpDGQh2xlnJ2lYJU6Un/10asIbvPuW/mIPX64b24D --5EI= -------END CERTIFICATE----- -- - Hellenic Academic and Research Institutions RootCA 2011 - ======================================================= - -----BEGIN CERTIFICATE----- --- -2.25.1 - diff --git a/integrations/docker/images/chip-build/version b/integrations/docker/images/chip-build/version index c95fda3804f0c9..3d95b8206e59a3 100644 --- a/integrations/docker/images/chip-build/version +++ b/integrations/docker/images/chip-build/version @@ -1 +1 @@ -0.5.43 Version bump reason: [Ameba] Update toolchain to asdk-10.3.0 +0.5.44 Version bump reason: Remove ESP32 workaround for invalid certificates From 54f4e43e62d5b79abb750ec274ce90f1f5e09e0f Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Wed, 12 Jan 2022 12:05:59 +0100 Subject: [PATCH 57/64] [YAML] Add isLowerCase/isUpperCase/isHexString constraints (#13479) --- .../templates/partials/test_cluster.zapt | 27 +- src/app/tests/suites/TestConstraints.yaml | 71 ++ .../tests/suites/include/ConstraintsChecker.h | 99 +++ src/app/zap-templates/templates/app/helper.js | 6 + .../CHIP/templates/partials/test_cluster.zapt | 45 +- .../Framework/CHIPTests/CHIPClustersTests.m | 729 ++++++++++++++++++ .../chip-tool/zap-generated/test/Commands.h | 409 +++++++++- 7 files changed, 1358 insertions(+), 28 deletions(-) diff --git a/examples/chip-tool/templates/partials/test_cluster.zapt b/examples/chip-tool/templates/partials/test_cluster.zapt index 311b21326b4a2d..360fa4656998a8 100644 --- a/examples/chip-tool/templates/partials/test_cluster.zapt +++ b/examples/chip-tool/templates/partials/test_cluster.zapt @@ -332,18 +332,23 @@ class {{filename}}: public TestCommand {{~#*inline "item"}}{{asLowerCamelCase name}}{{/inline}} VerifyOrReturn(CheckValuePresent("{{> item}}", {{> item}})); {{/if}} - {{#if expectedConstraints.type}}VerifyOrReturn(CheckConstraintType("{{>item}}", "", "{{expectedConstraints.type}}"));{{/if}} - {{~#if expectedConstraints.format}}VerifyOrReturn(CheckConstraintFormat("{{>item}}", "", "{{expectedConstraints.format}}"));{{/if}} - {{~#if expectedConstraints.startsWith}}VerifyOrReturn(CheckConstraintStartsWith("{{>item}}", {{>item}}, "{{expectedConstraints.startsWith}}"));{{/if}} - {{~#if expectedConstraints.endsWith}}VerifyOrReturn(CheckConstraintEndsWith("{{>item}}", {{>item}}, "{{expectedConstraints.endsWith}}"));{{/if}} - {{~#if expectedConstraints.minLength}}VerifyOrReturn(CheckConstraintMinLength("{{>item}}", {{>item}}.size(), {{expectedConstraints.minLength}}));{{/if}} - {{~#if expectedConstraints.maxLength}}VerifyOrReturn(CheckConstraintMaxLength("{{>item}}", {{>item}}.size(), {{expectedConstraints.maxLength}}));{{/if}} - {{~#if expectedConstraints.minValue}}VerifyOrReturn(CheckConstraintMinValue<{{chipType}}>("{{>item}}", {{>item}}, {{asTypedLiteral expectedConstraints.minValue type}}));{{/if}} - {{~#if expectedConstraints.maxValue}}VerifyOrReturn(CheckConstraintMaxValue<{{chipType}}>("{{>item}}", {{>item}}, {{asTypedLiteral expectedConstraints.maxValue type}}));{{/if}} - {{~#if expectedConstraints.notValue}} - VerifyOrReturn(CheckConstraintNotValue("{{>item}}", {{>item}}, {{asTypedLiteral expectedConstraints.notValue type}})); - {{else if (isLiteralNull expectedConstraints.notValue)}} + {{#if (hasProperty expectedConstraints "type")}}VerifyOrReturn(CheckConstraintType("{{>item}}", "", "{{expectedConstraints.type}}"));{{/if}} + {{~#if (hasProperty expectedConstraints "format")}}VerifyOrReturn(CheckConstraintFormat("{{>item}}", "", "{{expectedConstraints.format}}"));{{/if}} + {{~#if (hasProperty expectedConstraints "startsWith")}}VerifyOrReturn(CheckConstraintStartsWith("{{>item}}", {{>item}}, "{{expectedConstraints.startsWith}}"));{{/if}} + {{~#if (hasProperty expectedConstraints "endsWith")}}VerifyOrReturn(CheckConstraintEndsWith("{{>item}}", {{>item}}, "{{expectedConstraints.endsWith}}"));{{/if}} + {{~#if (hasProperty expectedConstraints "isUpperCase")}}VerifyOrReturn(CheckConstraintIsUpperCase("{{>item}}", {{>item}}, {{expectedConstraints.isUpperCase}}));{{/if}} + {{~#if (hasProperty expectedConstraints "isLowerCase")}}VerifyOrReturn(CheckConstraintIsLowerCase("{{>item}}", {{>item}}, {{expectedConstraints.isLowerCase}}));{{/if}} + {{~#if (hasProperty expectedConstraints "isHexString")}}VerifyOrReturn(CheckConstraintIsHexString("{{>item}}", {{>item}}, {{expectedConstraints.isHexString}}));{{/if}} + {{~#if (hasProperty expectedConstraints "minLength")}}VerifyOrReturn(CheckConstraintMinLength("{{>item}}", {{>item}}.size(), {{expectedConstraints.minLength}}));{{/if}} + {{~#if (hasProperty expectedConstraints "maxLength")}}VerifyOrReturn(CheckConstraintMaxLength("{{>item}}", {{>item}}.size(), {{expectedConstraints.maxLength}}));{{/if}} + {{~#if (hasProperty expectedConstraints "minValue")}}VerifyOrReturn(CheckConstraintMinValue<{{chipType}}>("{{>item}}", {{>item}}, {{asTypedLiteral expectedConstraints.minValue type}}));{{/if}} + {{~#if (hasProperty expectedConstraints "maxValue")}}VerifyOrReturn(CheckConstraintMaxValue<{{chipType}}>("{{>item}}", {{>item}}, {{asTypedLiteral expectedConstraints.maxValue type}}));{{/if}} + {{~#if (hasProperty expectedConstraints "notValue")}} + {{#if (isLiteralNull expectedConstraints.notValue)}} VerifyOrReturn(CheckValueNonNull("{{>item}}", {{>item}})); + {{else}} + VerifyOrReturn(CheckConstraintNotValue("{{>item}}", {{>item}}, {{asTypedLiteral expectedConstraints.notValue type}})); + {{/if}} {{/if}} {{/if}} diff --git a/src/app/tests/suites/TestConstraints.yaml b/src/app/tests/suites/TestConstraints.yaml index 017d41a3b79b6c..30ed159b32ce06 100644 --- a/src/app/tests/suites/TestConstraints.yaml +++ b/src/app/tests/suites/TestConstraints.yaml @@ -94,6 +94,77 @@ tests: constraints: endsWith: "**" + - label: "Write attribute CHAR_STRING Value" + command: "writeAttribute" + attribute: "char_string" + arguments: + value: "lowercase" + + - label: + "Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints" + command: "readAttribute" + attribute: "char_string" + response: + constraints: + isLowerCase: true + isUpperCase: false + + - label: "Write attribute CHAR_STRING Value" + command: "writeAttribute" + attribute: "char_string" + arguments: + value: "UPPERCASE" + + - label: + "Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints" + command: "readAttribute" + attribute: "char_string" + response: + constraints: + isUpperCase: true + isLowerCase: false + + - label: "Write attribute CHAR_STRING Value" + command: "writeAttribute" + attribute: "char_string" + arguments: + value: "lowUPPER" + + - label: + "Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints" + command: "readAttribute" + attribute: "char_string" + response: + constraints: + isUpperCase: false + isLowerCase: false + + - label: "Write attribute CHAR_STRING Value" + command: "writeAttribute" + attribute: "char_string" + arguments: + value: "ABCDEF012V" + + - label: "Read attribute CHAR_STRING Value isHexString Constraints" + command: "readAttribute" + attribute: "char_string" + response: + constraints: + isHexString: false + + - label: "Write attribute CHAR_STRING Value" + command: "writeAttribute" + attribute: "char_string" + arguments: + value: "ABCDEF0123" + + - label: "Read attribute CHAR_STRING Value isHexString Constraints" + command: "readAttribute" + attribute: "char_string" + response: + constraints: + isHexString: true + - label: "Write attribute CHAR_STRING Value Back to Default Value" command: "writeAttribute" attribute: "char_string" diff --git a/src/app/tests/suites/include/ConstraintsChecker.h b/src/app/tests/suites/include/ConstraintsChecker.h index 0c44c8b3bbe5d9..43d14134c64c07 100644 --- a/src/app/tests/suites/include/ConstraintsChecker.h +++ b/src/app/tests/suites/include/ConstraintsChecker.h @@ -90,6 +90,105 @@ class ConstraintsChecker return true; } + bool CheckConstraintIsUpperCase(const char * itemName, const chip::CharSpan current, bool expectUpperCase) + { + std::string value(current.data(), current.size()); + return CheckConstraintIsUpperCase(itemName, value.c_str(), expectUpperCase); + } + + bool CheckConstraintIsUpperCase(const char * itemName, const char * current, bool expectUpperCase) + { + bool isUpperCase = true; + for (size_t i = 0; i < strlen(current); i++) + { + if (!isupper(current[i])) + { + isUpperCase = false; + break; + } + } + + if (expectUpperCase && !isUpperCase) + { + Exit(std::string(itemName) + " (\"" + std::string(current) + "\") is not an upppercase string"); + return false; + } + + if (!expectUpperCase && isUpperCase) + { + Exit(std::string(itemName) + " (\"" + std::string(current) + "\") is an upppercase string"); + return false; + } + + return true; + } + + bool CheckConstraintIsLowerCase(const char * itemName, const chip::CharSpan current, bool expectLowerCase) + { + std::string value(current.data(), current.size()); + return CheckConstraintIsLowerCase(itemName, value.c_str(), expectLowerCase); + } + + bool CheckConstraintIsLowerCase(const char * itemName, const char * current, bool expectLowerCase) + { + bool isLowerCase = true; + for (size_t i = 0; i < strlen(current); i++) + { + if (isupper(current[i])) + { + isLowerCase = false; + break; + } + } + + if (expectLowerCase && !isLowerCase) + { + Exit(std::string(itemName) + " (\"" + std::string(current) + "\") is not a lowercase string"); + return false; + } + + if (!expectLowerCase && isLowerCase) + { + Exit(std::string(itemName) + " (\"" + std::string(current) + "\") is a lowercase string"); + return false; + } + + return true; + } + + bool CheckConstraintIsHexString(const char * itemName, const chip::CharSpan current, bool expectHexString) + { + std::string value(current.data(), current.size()); + return CheckConstraintIsHexString(itemName, value.c_str(), expectHexString); + } + + bool CheckConstraintIsHexString(const char * itemName, const char * current, bool expectHexString) + { + bool isHexString = true; + for (size_t i = 0; i < strlen(current); i++) + { + if (!isxdigit(current[i])) + { + isHexString = false; + break; + } + } + + if (expectHexString && !isHexString) + { + Exit(std::string(itemName) + " (\"" + std::string(current) + "\") is not a hexadecimal string"); + return false; + } + + if (!expectHexString && isHexString) + { + Exit(std::string(itemName) + " (\"" + std::string(current) + "\") is a hexadecimal string"); + return false; + } + + return true; + } + template bool CheckConstraintMinValue(const char * itemName, T current, T expected) { diff --git a/src/app/zap-templates/templates/app/helper.js b/src/app/zap-templates/templates/app/helper.js index 1c4bb270720da2..0af4118c78b719 100644 --- a/src/app/zap-templates/templates/app/helper.js +++ b/src/app/zap-templates/templates/app/helper.js @@ -685,6 +685,11 @@ function incrementDepth(depth) return depth + 1; } +function hasProperty(obj, prop) +{ + return prop in obj; +} + // // Module exports // @@ -695,6 +700,7 @@ exports.chip_endpoint_cluster_list = chip_endpoint_cluster_list exports.asTypedLiteral = asTypedLiteral; exports.asLowerCamelCase = asLowerCamelCase; exports.asUpperCamelCase = asUpperCamelCase; +exports.hasProperty = hasProperty; exports.hasSpecificAttributes = hasSpecificAttributes; exports.asMEI = asMEI; exports.zapTypeToEncodableClusterObjectType = zapTypeToEncodableClusterObjectType; diff --git a/src/darwin/Framework/CHIP/templates/partials/test_cluster.zapt b/src/darwin/Framework/CHIP/templates/partials/test_cluster.zapt index 316a1ca1f2a8d9..2dc923a4739c32 100644 --- a/src/darwin/Framework/CHIP/templates/partials/test_cluster.zapt +++ b/src/darwin/Framework/CHIP/templates/partials/test_cluster.zapt @@ -108,31 +108,53 @@ ResponseHandler {{> subscribeDataCallback}} = nil; } {{/if}} {{#if hasExpectedConstraints}} - {{#if expectedConstraints.minLength}} + {{#if (hasProperty expectedConstraints "minLength")}} { {{> actualValue}} XCTAssertGreaterThanOrEqual([actualValue length], {{expectedConstraints.minLength}}); } {{/if}} - {{#if expectedConstraints.startsWith}} + {{#if (hasProperty expectedConstraints "startsWith")}} { {{> actualValue}} XCTAssertTrue([actualValue hasPrefix:@"{{expectedConstraints.startsWith}}"]); } {{/if}} - {{#if expectedConstraints.endsWith}} + {{#if (hasProperty expectedConstraints "endsWith")}} { {{> actualValue}} XCTAssertTrue([actualValue hasSuffix:@"{{expectedConstraints.endsWith}}"]); } {{/if}} - {{#if expectedConstraints.maxLength}} + {{#if (hasProperty expectedConstraints "isLowerCase")}} + { + {{> actualValue}} + BOOL isLowerCase = [actualValue isEqualToString:[actualValue lowercaseString]]; + XCTAssert{{#if expectedConstraints.isLowerCase}}True{{else}}False{{/if}}(isLowerCase); + } + {{/if}} + {{#if (hasProperty expectedConstraints "isUpperCase")}} + { + {{> actualValue}} + BOOL isUpperCase = [actualValue isEqualToString:[actualValue uppercaseString]]; + XCTAssert{{#if expectedConstraints.isUpperCase}}True{{else}}False{{/if}}(isUpperCase); + } + {{/if}} + {{#if (hasProperty expectedConstraints "isHexString")}} + { + {{> actualValue}} + NSCharacterSet *chars = [[NSCharacterSet characterSetWithCharactersInString:@"0123456789ABCDEF"] invertedSet]; + BOOL isHexString = (NSNotFound == [actualValue rangeOfCharacterFromSet:chars].location); + XCTAssert{{#if expectedConstraints.isHexString}}True{{else}}False{{/if}}(isHexString); + } + {{/if}} + {{#if (hasProperty expectedConstraints "maxLength")}} { {{> actualValue}} XCTAssertLessThanOrEqual([actualValue length], {{expectedConstraints.maxLength}}); } {{/if}} - {{#if expectedConstraints.minValue}} + {{#if (hasProperty expectedConstraints "minValue")}} { {{> actualValue}} if (actualValue != nil) { @@ -140,7 +162,7 @@ ResponseHandler {{> subscribeDataCallback}} = nil; } } {{/if}} - {{#if expectedConstraints.maxValue}} + {{#if (hasProperty expectedConstraints "maxValue")}} { {{> actualValue}} if (actualValue != nil) { @@ -148,17 +170,16 @@ ResponseHandler {{> subscribeDataCallback}} = nil; } } {{/if}} - {{#if expectedConstraints.notValue}} + {{#if (hasProperty expectedConstraints "notValue")}} { {{> actualValue}} + {{#if (isLiteralNull expectedConstraints.notValue)}} + XCTAssertFalse(actualValue == nil); + {{else}} if (actualValue != nil) { XCTAssertNotEqual([actualValue {{asObjectiveCNumberType "" type true}}Value], {{asTypedLiteral expectedConstraints.notValue type}}); } - } - {{else if (isLiteralNull expectedConstraints.notValue)}} - { - {{> actualValue}} - XCTAssertFalse(actualValue == nil); + {{/if}} } {{/if}} {{/if}} diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index 9de320743c055d..6c5e472199d19d 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -528,6 +528,12 @@ - (void)testSendClusterTest_TC_BI_2_1_000009_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -1085,6 +1091,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000002_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -1181,6 +1193,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000006_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -1278,6 +1296,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000010_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -1373,6 +1397,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000014_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -1446,6 +1476,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000017_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -1472,6 +1508,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000018_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -2180,6 +2222,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000049_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -2278,6 +2326,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000053_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -2380,6 +2434,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000057_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -2551,6 +2611,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000063_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -2672,6 +2738,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000067_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -2760,6 +2832,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000070_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -2929,6 +3007,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000076_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -3001,6 +3085,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000079_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -3072,6 +3162,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000082_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -3162,6 +3258,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000086_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -3233,6 +3335,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000089_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -3323,6 +3431,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000093_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -3394,6 +3508,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000096_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -3484,6 +3604,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000100_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -3555,6 +3681,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000103_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -3645,6 +3777,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000107_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -3716,6 +3854,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000110_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -3806,6 +3950,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000114_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -3877,6 +4027,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000117_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -3972,6 +4128,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000121_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -4059,6 +4221,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000124_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -4146,6 +4314,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000127_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -4233,6 +4407,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000130_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -4401,6 +4581,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000136_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -4488,6 +4674,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000139_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -4656,6 +4848,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000145_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -4743,6 +4941,12 @@ - (void)testSendClusterTest_TC_CC_2_1_000148_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -10503,6 +10707,12 @@ - (void)testSendClusterTest_TC_FLW_2_1_000011_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -12004,6 +12214,12 @@ - (void)testSendClusterTest_TC_OCC_2_1_000001_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -12077,6 +12293,12 @@ - (void)testSendClusterTest_TC_OCC_2_1_000004_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -16183,6 +16405,12 @@ - (void)testSendClusterTest_TC_RH_2_1_000002_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -16247,6 +16475,12 @@ - (void)testSendClusterTest_TC_RH_2_1_000004_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -16468,6 +16702,12 @@ - (void)testSendClusterTest_TC_TM_2_1_000002_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -17751,6 +17991,12 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000043_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -17853,6 +18099,12 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000047_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -17962,6 +18214,12 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000051_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue charValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -18054,6 +18312,12 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000054_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -20322,6 +20586,12 @@ - (void)testSendClusterTest_TC_WNCV_1_1_000004_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedIntValue], 0UL); + } + } { id actualValue = value; if (actualValue != nil) { @@ -20405,6 +20675,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000001_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -20478,6 +20754,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000004_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -20553,6 +20835,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000007_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -20630,6 +20918,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000010_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -20706,6 +21000,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000013_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -20780,6 +21080,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000016_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -20861,6 +21167,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000019_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -20942,6 +21254,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000022_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -21023,6 +21341,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000025_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -21103,6 +21427,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000028_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -21155,6 +21485,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000030_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -21182,6 +21518,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000031_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -21234,6 +21576,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000033_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -21261,6 +21609,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000034_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -21313,6 +21667,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000036_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -21340,6 +21700,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000037_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -21392,6 +21758,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000039_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -21418,6 +21790,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000040_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -21493,6 +21871,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000043_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -21544,6 +21928,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000045_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -21571,6 +21961,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000046_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -21622,6 +22018,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000048_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -21650,6 +22052,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000049_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -21731,6 +22139,12 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000052_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -21852,6 +22266,12 @@ - (void)testSendClusterTest_TC_WNCV_2_4_000002_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -21911,6 +22331,12 @@ - (void)testSendClusterTest_TC_WNCV_2_5_000002_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -27808,6 +28234,12 @@ - (void)testSendClusterTestCluster_000214_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -27882,6 +28314,12 @@ - (void)testSendClusterTestCluster_000217_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } { id actualValue = value; if (actualValue != nil) { @@ -28121,6 +28559,12 @@ - (void)testSendClusterTestCluster_000227_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -28195,6 +28639,12 @@ - (void)testSendClusterTestCluster_000230_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } { id actualValue = value; if (actualValue != nil) { @@ -28434,6 +28884,12 @@ - (void)testSendClusterTestCluster_000240_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedIntValue], 0UL); + } + } { id actualValue = value; if (actualValue != nil) { @@ -28508,6 +28964,12 @@ - (void)testSendClusterTestCluster_000243_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedIntValue], 0UL); + } + } { id actualValue = value; if (actualValue != nil) { @@ -28747,6 +29209,12 @@ - (void)testSendClusterTestCluster_000253_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedLongLongValue], 0ULL); + } + } { id actualValue = value; if (actualValue != nil) { @@ -28821,6 +29289,12 @@ - (void)testSendClusterTestCluster_000256_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedLongLongValue], 0ULL); + } + } { id actualValue = value; if (actualValue != nil) { @@ -36636,6 +37110,261 @@ - (void)testSendClusterTestConstraints_000010_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - (void)testSendClusterTestConstraints_000011_WriteAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute CHAR_STRING Value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id charStringArgument; + charStringArgument = @"lowercase"; + [cluster writeAttributeCharStringWithValue:charStringArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute CHAR_STRING Value Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestConstraints_000012_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + BOOL isLowerCase = [actualValue isEqualToString:[actualValue lowercaseString]]; + XCTAssertTrue(isLowerCase); + } + { + id actualValue = value; + BOOL isUpperCase = [actualValue isEqualToString:[actualValue uppercaseString]]; + XCTAssertFalse(isUpperCase); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestConstraints_000013_WriteAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute CHAR_STRING Value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id charStringArgument; + charStringArgument = @"UPPERCASE"; + [cluster writeAttributeCharStringWithValue:charStringArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute CHAR_STRING Value Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestConstraints_000014_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + BOOL isLowerCase = [actualValue isEqualToString:[actualValue lowercaseString]]; + XCTAssertFalse(isLowerCase); + } + { + id actualValue = value; + BOOL isUpperCase = [actualValue isEqualToString:[actualValue uppercaseString]]; + XCTAssertTrue(isUpperCase); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestConstraints_000015_WriteAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute CHAR_STRING Value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id charStringArgument; + charStringArgument = @"lowUPPER"; + [cluster writeAttributeCharStringWithValue:charStringArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute CHAR_STRING Value Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestConstraints_000016_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + BOOL isLowerCase = [actualValue isEqualToString:[actualValue lowercaseString]]; + XCTAssertFalse(isLowerCase); + } + { + id actualValue = value; + BOOL isUpperCase = [actualValue isEqualToString:[actualValue uppercaseString]]; + XCTAssertFalse(isUpperCase); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestConstraints_000017_WriteAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute CHAR_STRING Value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id charStringArgument; + charStringArgument = @"ABCDEF012V"; + [cluster writeAttributeCharStringWithValue:charStringArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute CHAR_STRING Value Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestConstraints_000018_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute CHAR_STRING Value isHexString Constraints"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute CHAR_STRING Value isHexString Constraints Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + NSCharacterSet * chars = [[NSCharacterSet characterSetWithCharactersInString:@"0123456789ABCDEF"] invertedSet]; + BOOL isHexString = (NSNotFound == [actualValue rangeOfCharacterFromSet:chars].location); + XCTAssertFalse(isHexString); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestConstraints_000019_WriteAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute CHAR_STRING Value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id charStringArgument; + charStringArgument = @"ABCDEF0123"; + [cluster writeAttributeCharStringWithValue:charStringArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute CHAR_STRING Value Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestConstraints_000020_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute CHAR_STRING Value isHexString Constraints"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute CHAR_STRING Value isHexString Constraints Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + NSCharacterSet * chars = [[NSCharacterSet characterSetWithCharactersInString:@"0123456789ABCDEF"] invertedSet]; + BOOL isHexString = (NSNotFound == [actualValue rangeOfCharacterFromSet:chars].location); + XCTAssertTrue(isHexString); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestConstraints_000021_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute CHAR_STRING Value Back to Default Value"]; diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index cfb3300af70475..50bffa05251424 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -743,6 +743,7 @@ class Test_TC_BI_2_1 : public TestCommand void OnSuccessResponse_9(uint8_t statusFlags) { VerifyOrReturn(CheckConstraintType("statusFlags", "", "map8")); + VerifyOrReturn(CheckConstraintMinValue("statusFlags", statusFlags, 0)); VerifyOrReturn(CheckConstraintMaxValue("statusFlags", statusFlags, 15)); NextTest(); } @@ -3821,6 +3822,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_2(uint8_t currentHue) { VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + VerifyOrReturn(CheckConstraintMinValue("currentHue", currentHue, 0)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", currentHue, 254)); NextTest(); } @@ -3903,6 +3905,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_6(uint8_t currentSaturation) { VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", currentSaturation, 0)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", currentSaturation, 254)); NextTest(); } @@ -3985,6 +3988,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_10(uint16_t currentX) { VerifyOrReturn(CheckConstraintType("currentX", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("currentX", currentX, 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentX", currentX, 65279U)); NextTest(); } @@ -4067,6 +4071,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_14(uint16_t currentY) { VerifyOrReturn(CheckConstraintType("currentY", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("currentY", currentY, 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentY", currentY, 65279U)); NextTest(); } @@ -4129,6 +4134,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_17(uint16_t colorTemperature) { VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("colorTemperature", colorTemperature, 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", colorTemperature, 65279U)); NextTest(); } @@ -4149,6 +4155,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_18(uint8_t colorMode) { VerifyOrReturn(CheckConstraintType("colorMode", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("colorMode", colorMode, 0)); VerifyOrReturn(CheckConstraintMaxValue("colorMode", colorMode, 2)); NextTest(); } @@ -4779,6 +4786,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_49(uint16_t colorCapabilities) { VerifyOrReturn(CheckConstraintType("colorCapabilities", "", "map16")); + VerifyOrReturn(CheckConstraintMinValue("colorCapabilities", colorCapabilities, 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorCapabilities", colorCapabilities, 65279U)); NextTest(); } @@ -4861,6 +4869,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_53(uint16_t colorTempPhysicalMin) { VerifyOrReturn(CheckConstraintType("colorTempPhysicalMin", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMin", colorTempPhysicalMin, 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMin", colorTempPhysicalMin, 65279U)); NextTest(); } @@ -4943,6 +4952,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_57(uint16_t colorTempPhysicalMax) { VerifyOrReturn(CheckConstraintType("colorTempPhysicalMax", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMax", colorTempPhysicalMax, 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMax", colorTempPhysicalMax, 65279U)); NextTest(); } @@ -5079,6 +5089,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_63(uint16_t startUpColorTemperatureMireds) { VerifyOrReturn(CheckConstraintType("startUpColorTemperatureMireds", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("startUpColorTemperatureMireds", startUpColorTemperatureMireds, 0U)); VerifyOrReturn(CheckConstraintMaxValue("startUpColorTemperatureMireds", startUpColorTemperatureMireds, 65279U)); NextTest(); } @@ -5171,6 +5182,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_67(uint16_t remainingTime) { VerifyOrReturn(CheckConstraintType("remainingTime", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("remainingTime", remainingTime, 0U)); VerifyOrReturn(CheckConstraintMaxValue("remainingTime", remainingTime, 254U)); NextTest(); } @@ -5239,6 +5251,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_70(uint8_t driftCompensation) { VerifyOrReturn(CheckConstraintType("driftCompensation", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("driftCompensation", driftCompensation, 0)); VerifyOrReturn(CheckConstraintMaxValue("driftCompensation", driftCompensation, 4)); NextTest(); } @@ -5372,6 +5385,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_76(uint8_t numberOfPrimaries) { VerifyOrReturn(CheckConstraintType("numberOfPrimaries", "", "uint8")); + VerifyOrReturn(CheckConstraintMinValue("numberOfPrimaries", numberOfPrimaries, 0)); VerifyOrReturn(CheckConstraintMaxValue("numberOfPrimaries", numberOfPrimaries, 6)); NextTest(); } @@ -5434,6 +5448,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_79(uint16_t primary1X) { VerifyOrReturn(CheckConstraintType("primary1X", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary1X", primary1X, 0U)); VerifyOrReturn(CheckConstraintMaxValue("primary1X", primary1X, 65279U)); NextTest(); } @@ -5496,6 +5511,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_82(uint16_t primary1Y) { VerifyOrReturn(CheckConstraintType("primary1Y", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary1Y", primary1Y, 0U)); VerifyOrReturn(CheckConstraintMaxValue("primary1Y", primary1Y, 65279U)); NextTest(); } @@ -5577,6 +5593,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_86(uint16_t primary2X) { VerifyOrReturn(CheckConstraintType("primary2X", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary2X", primary2X, 0U)); VerifyOrReturn(CheckConstraintMaxValue("primary2X", primary2X, 65279U)); NextTest(); } @@ -5639,6 +5656,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_89(uint16_t primary2Y) { VerifyOrReturn(CheckConstraintType("primary2Y", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary2Y", primary2Y, 0U)); VerifyOrReturn(CheckConstraintMaxValue("primary2Y", primary2Y, 65279U)); NextTest(); } @@ -5720,6 +5738,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_93(uint16_t primary3X) { VerifyOrReturn(CheckConstraintType("primary3X", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary3X", primary3X, 0U)); VerifyOrReturn(CheckConstraintMaxValue("primary3X", primary3X, 65279U)); NextTest(); } @@ -5782,6 +5801,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_96(uint16_t primary3Y) { VerifyOrReturn(CheckConstraintType("primary3Y", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary3Y", primary3Y, 0U)); VerifyOrReturn(CheckConstraintMaxValue("primary3Y", primary3Y, 65279U)); NextTest(); } @@ -5863,6 +5883,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_100(uint16_t primary4X) { VerifyOrReturn(CheckConstraintType("primary4X", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary4X", primary4X, 0U)); VerifyOrReturn(CheckConstraintMaxValue("primary4X", primary4X, 65279U)); NextTest(); } @@ -5925,6 +5946,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_103(uint16_t primary4Y) { VerifyOrReturn(CheckConstraintType("primary4Y", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary4Y", primary4Y, 0U)); VerifyOrReturn(CheckConstraintMaxValue("primary4Y", primary4Y, 65279U)); NextTest(); } @@ -6006,6 +6028,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_107(uint16_t primary5X) { VerifyOrReturn(CheckConstraintType("primary5X", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary5X", primary5X, 0U)); VerifyOrReturn(CheckConstraintMaxValue("primary5X", primary5X, 65279U)); NextTest(); } @@ -6068,6 +6091,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_110(uint16_t primary5Y) { VerifyOrReturn(CheckConstraintType("primary5Y", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary5Y", primary5Y, 0U)); VerifyOrReturn(CheckConstraintMaxValue("primary5Y", primary5Y, 65279U)); NextTest(); } @@ -6149,6 +6173,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_114(uint16_t primary6X) { VerifyOrReturn(CheckConstraintType("primary6X", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary6X", primary6X, 0U)); VerifyOrReturn(CheckConstraintMaxValue("primary6X", primary6X, 65279U)); NextTest(); } @@ -6211,6 +6236,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_117(uint16_t primary6Y) { VerifyOrReturn(CheckConstraintType("primary6Y", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary6Y", primary6Y, 0U)); VerifyOrReturn(CheckConstraintMaxValue("primary6Y", primary6Y, 65279U)); NextTest(); } @@ -6295,6 +6321,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_121(uint16_t whitePointX) { VerifyOrReturn(CheckConstraintType("whitePointX", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("whitePointX", whitePointX, 0U)); VerifyOrReturn(CheckConstraintMaxValue("whitePointX", whitePointX, 65279U)); NextTest(); } @@ -6362,6 +6389,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_124(uint16_t whitePointY) { VerifyOrReturn(CheckConstraintType("whitePointY", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("whitePointY", whitePointY, 0U)); VerifyOrReturn(CheckConstraintMaxValue("whitePointY", whitePointY, 65279U)); NextTest(); } @@ -6429,6 +6457,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_127(uint16_t colorPointRX) { VerifyOrReturn(CheckConstraintType("colorPointRX", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("colorPointRX", colorPointRX, 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorPointRX", colorPointRX, 65279U)); NextTest(); } @@ -6496,6 +6525,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_130(uint16_t colorPointRY) { VerifyOrReturn(CheckConstraintType("colorPointRY", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("colorPointRY", colorPointRY, 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorPointRY", colorPointRY, 65279U)); NextTest(); } @@ -6629,6 +6659,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_136(uint16_t colorPointGX) { VerifyOrReturn(CheckConstraintType("colorPointGX", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("colorPointGX", colorPointGX, 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorPointGX", colorPointGX, 65279U)); NextTest(); } @@ -6696,6 +6727,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_139(uint16_t colorPointGY) { VerifyOrReturn(CheckConstraintType("colorPointGY", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("colorPointGY", colorPointGY, 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorPointGY", colorPointGY, 65279U)); NextTest(); } @@ -6829,6 +6861,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_145(uint16_t colorPointBX) { VerifyOrReturn(CheckConstraintType("colorPointBX", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("colorPointBX", colorPointBX, 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorPointBX", colorPointBX, 65279U)); NextTest(); } @@ -6896,6 +6929,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnSuccessResponse_148(uint16_t colorPointBY) { VerifyOrReturn(CheckConstraintType("colorPointBY", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("colorPointBY", colorPointBY, 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorPointBY", colorPointBY, 65279U)); NextTest(); } @@ -16805,6 +16839,7 @@ class Test_TC_FLW_2_1 : public TestCommand void OnSuccessResponse_11(uint16_t tolerance) { VerifyOrReturn(CheckConstraintType("tolerance", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("tolerance", tolerance, 0U)); VerifyOrReturn(CheckConstraintMaxValue("tolerance", tolerance, 2048U)); NextTest(); } @@ -20103,6 +20138,7 @@ class Test_TC_OCC_2_1 : public TestCommand void OnSuccessResponse_1(uint8_t occupancy) { VerifyOrReturn(CheckConstraintType("occupancy", "", "map8")); + VerifyOrReturn(CheckConstraintMinValue("occupancy", occupancy, 0)); VerifyOrReturn(CheckConstraintMaxValue("occupancy", occupancy, 1)); NextTest(); } @@ -20166,6 +20202,7 @@ class Test_TC_OCC_2_1 : public TestCommand void OnSuccessResponse_4(uint8_t occupancySensorType) { VerifyOrReturn(CheckConstraintType("occupancySensorType", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("occupancySensorType", occupancySensorType, 0)); VerifyOrReturn(CheckConstraintMaxValue("occupancySensorType", occupancySensorType, 3)); NextTest(); } @@ -26885,6 +26922,7 @@ class Test_TC_RH_2_1 : public TestCommand void OnSuccessResponse_2(uint16_t minMeasuredValue) { VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", minMeasuredValue, 0U)); VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", minMeasuredValue, 9999U)); NextTest(); } @@ -26933,6 +26971,7 @@ class Test_TC_RH_2_1 : public TestCommand void OnSuccessResponse_4(uint16_t tolerance) { VerifyOrReturn(CheckConstraintType("tolerance", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("tolerance", tolerance, 0U)); VerifyOrReturn(CheckConstraintMaxValue("tolerance", tolerance, 2048U)); NextTest(); } @@ -27416,6 +27455,7 @@ class Test_TC_TM_2_1 : public TestCommand void OnSuccessResponse_2(uint16_t tolerance) { VerifyOrReturn(CheckConstraintType("tolerance", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("tolerance", tolerance, 0U)); VerifyOrReturn(CheckConstraintMaxValue("tolerance", tolerance, 2048U)); NextTest(); } @@ -29494,6 +29534,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand void OnSuccessResponse_43(uint8_t controlSequenceOfOperation) { VerifyOrReturn(CheckConstraintType("controlSequenceOfOperation", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("controlSequenceOfOperation", controlSequenceOfOperation, 0)); VerifyOrReturn(CheckConstraintMaxValue("controlSequenceOfOperation", controlSequenceOfOperation, 5)); NextTest(); } @@ -29574,6 +29615,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand void OnSuccessResponse_47(uint8_t systemMode) { VerifyOrReturn(CheckConstraintType("systemMode", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("systemMode", systemMode, 0)); VerifyOrReturn(CheckConstraintMaxValue("systemMode", systemMode, 9)); NextTest(); } @@ -29658,6 +29700,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand void OnSuccessResponse_51(int8_t minSetpointDeadBand) { VerifyOrReturn(CheckConstraintType("minSetpointDeadBand", "", "int8")); + VerifyOrReturn(CheckConstraintMinValue("minSetpointDeadBand", minSetpointDeadBand, 0)); VerifyOrReturn(CheckConstraintMaxValue("minSetpointDeadBand", minSetpointDeadBand, 25)); NextTest(); } @@ -29725,6 +29768,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand void OnSuccessResponse_54(uint8_t startOfWeek) { VerifyOrReturn(CheckConstraintType("startOfWeek", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("startOfWeek", startOfWeek, 0)); VerifyOrReturn(CheckConstraintMaxValue("startOfWeek", startOfWeek, 6)); NextTest(); } @@ -33300,6 +33344,7 @@ class Test_TC_WNCV_1_1 : public TestCommand void OnSuccessResponse_4(uint32_t featureMap) { VerifyOrReturn(CheckConstraintType("featureMap", "", "uint32")); + VerifyOrReturn(CheckConstraintMinValue("featureMap", featureMap, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("featureMap", featureMap, 32768UL)); NextTest(); } @@ -34175,6 +34220,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_1(uint8_t type) { VerifyOrReturn(CheckConstraintType("type", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("type", type, 0)); VerifyOrReturn(CheckConstraintMaxValue("type", type, 9)); NextTest(); } @@ -34238,6 +34284,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_4(uint8_t configStatus) { VerifyOrReturn(CheckConstraintType("configStatus", "", "map8")); + VerifyOrReturn(CheckConstraintMinValue("configStatus", configStatus, 0)); VerifyOrReturn(CheckConstraintMaxValue("configStatus", configStatus, 63)); NextTest(); } @@ -34301,6 +34348,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_7(uint8_t operationalStatus) { VerifyOrReturn(CheckConstraintType("operationalStatus", "", "map8")); + VerifyOrReturn(CheckConstraintMinValue("operationalStatus", operationalStatus, 0)); VerifyOrReturn(CheckConstraintMaxValue("operationalStatus", operationalStatus, 63)); NextTest(); } @@ -34364,6 +34412,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_10(uint8_t endProductType) { VerifyOrReturn(CheckConstraintType("endProductType", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("endProductType", endProductType, 0)); VerifyOrReturn(CheckConstraintMaxValue("endProductType", endProductType, 23)); NextTest(); } @@ -34427,6 +34476,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_13(uint8_t mode) { VerifyOrReturn(CheckConstraintType("mode", "", "map8")); + VerifyOrReturn(CheckConstraintMinValue("mode", mode, 0)); VerifyOrReturn(CheckConstraintMaxValue("mode", mode, 15)); NextTest(); } @@ -34486,6 +34536,8 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_16(const chip::app::DataModel::Nullable & targetPositionLiftPercent100ths) { VerifyOrReturn(CheckConstraintType("targetPositionLiftPercent100ths", "", "Percent100ths")); + VerifyOrReturn( + CheckConstraintMinValue("targetPositionLiftPercent100ths", targetPositionLiftPercent100ths, 0U)); VerifyOrReturn(CheckConstraintMaxValue("targetPositionLiftPercent100ths", targetPositionLiftPercent100ths, 10000U)); NextTest(); @@ -34554,6 +34606,8 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_19(const chip::app::DataModel::Nullable & targetPositionTiltPercent100ths) { VerifyOrReturn(CheckConstraintType("targetPositionTiltPercent100ths", "", "Percent100ths")); + VerifyOrReturn( + CheckConstraintMinValue("targetPositionTiltPercent100ths", targetPositionTiltPercent100ths, 0U)); VerifyOrReturn(CheckConstraintMaxValue("targetPositionTiltPercent100ths", targetPositionTiltPercent100ths, 10000U)); NextTest(); @@ -34622,6 +34676,8 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_22(const chip::app::DataModel::Nullable & currentPositionLiftPercent100ths) { VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "", "Percent100ths")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionLiftPercent100ths", currentPositionLiftPercent100ths, 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentPositionLiftPercent100ths", currentPositionLiftPercent100ths, 10000U)); NextTest(); @@ -34690,6 +34746,8 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_25(const chip::app::DataModel::Nullable & currentPositionTiltPercent100ths) { VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "", "Percent100ths")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionTiltPercent100ths", currentPositionTiltPercent100ths, 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentPositionTiltPercent100ths", currentPositionTiltPercent100ths, 10000U)); NextTest(); @@ -34758,6 +34816,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_28(uint16_t installedOpenLimitLift) { VerifyOrReturn(CheckConstraintType("installedOpenLimitLift", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("installedOpenLimitLift", installedOpenLimitLift, 0U)); VerifyOrReturn(CheckConstraintMaxValue("installedOpenLimitLift", installedOpenLimitLift, 65535U)); NextTest(); } @@ -34802,6 +34861,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_30(uint16_t installedOpenLimitLift) { VerifyOrReturn(CheckConstraintType("installedOpenLimitLift", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("installedOpenLimitLift", installedOpenLimitLift, 0U)); VerifyOrReturn(CheckConstraintMaxValue("installedOpenLimitLift", installedOpenLimitLift, 65535U)); NextTest(); } @@ -34823,6 +34883,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_31(uint16_t installedClosedLimitLift) { VerifyOrReturn(CheckConstraintType("installedClosedLimitLift", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("installedClosedLimitLift", installedClosedLimitLift, 0U)); VerifyOrReturn(CheckConstraintMaxValue("installedClosedLimitLift", installedClosedLimitLift, 65535U)); NextTest(); } @@ -34867,6 +34928,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_33(uint16_t installedClosedLimitLift) { VerifyOrReturn(CheckConstraintType("installedClosedLimitLift", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("installedClosedLimitLift", installedClosedLimitLift, 0U)); VerifyOrReturn(CheckConstraintMaxValue("installedClosedLimitLift", installedClosedLimitLift, 65535U)); NextTest(); } @@ -34888,6 +34950,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_34(uint16_t installedOpenLimitTilt) { VerifyOrReturn(CheckConstraintType("installedOpenLimitTilt", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("installedOpenLimitTilt", installedOpenLimitTilt, 0U)); VerifyOrReturn(CheckConstraintMaxValue("installedOpenLimitTilt", installedOpenLimitTilt, 65535U)); NextTest(); } @@ -34932,6 +34995,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_36(uint16_t installedOpenLimitTilt) { VerifyOrReturn(CheckConstraintType("installedOpenLimitTilt", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("installedOpenLimitTilt", installedOpenLimitTilt, 0U)); VerifyOrReturn(CheckConstraintMaxValue("installedOpenLimitTilt", installedOpenLimitTilt, 65535U)); NextTest(); } @@ -34953,6 +35017,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_37(uint16_t installedClosedLimitTilt) { VerifyOrReturn(CheckConstraintType("installedClosedLimitTilt", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("installedClosedLimitTilt", installedClosedLimitTilt, 0U)); VerifyOrReturn(CheckConstraintMaxValue("installedClosedLimitTilt", installedClosedLimitTilt, 65535U)); NextTest(); } @@ -34997,6 +35062,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_39(uint16_t installedClosedLimitTilt) { VerifyOrReturn(CheckConstraintType("installedClosedLimitTilt", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("installedClosedLimitTilt", installedClosedLimitTilt, 0U)); VerifyOrReturn(CheckConstraintMaxValue("installedClosedLimitTilt", installedClosedLimitTilt, 65535U)); NextTest(); } @@ -35017,6 +35083,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_40(uint16_t safetyStatus) { VerifyOrReturn(CheckConstraintType("safetyStatus", "", "map16")); + VerifyOrReturn(CheckConstraintMinValue("safetyStatus", safetyStatus, 0U)); VerifyOrReturn(CheckConstraintMaxValue("safetyStatus", safetyStatus, 2047U)); NextTest(); } @@ -35080,6 +35147,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_43(const chip::app::DataModel::Nullable & currentPositionLift) { VerifyOrReturn(CheckConstraintType("currentPositionLift", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("currentPositionLift", currentPositionLift, 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentPositionLift", currentPositionLift, 65535U)); NextTest(); } @@ -35123,6 +35191,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_45(const chip::app::DataModel::Nullable & currentPositionLift) { VerifyOrReturn(CheckConstraintType("currentPositionLift", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("currentPositionLift", currentPositionLift, 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentPositionLift", currentPositionLift, 65535U)); NextTest(); } @@ -35143,6 +35212,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_46(const chip::app::DataModel::Nullable & currentPositionTilt) { VerifyOrReturn(CheckConstraintType("currentPositionTilt", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("currentPositionTilt", currentPositionTilt, 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentPositionTilt", currentPositionTilt, 65535U)); NextTest(); } @@ -35186,6 +35256,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_48(const chip::app::DataModel::Nullable & currentPositionTilt) { VerifyOrReturn(CheckConstraintType("currentPositionTilt", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("currentPositionTilt", currentPositionTilt, 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentPositionTilt", currentPositionTilt, 65535U)); NextTest(); } @@ -35207,6 +35278,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_49(const chip::app::DataModel::Nullable & currentPositionLiftPercentage) { VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "", "Percent")); + VerifyOrReturn(CheckConstraintMinValue("currentPositionLiftPercentage", currentPositionLiftPercentage, 0)); VerifyOrReturn(CheckConstraintMaxValue("currentPositionLiftPercentage", currentPositionLiftPercentage, 100)); NextTest(); } @@ -35274,6 +35346,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnSuccessResponse_52(const chip::app::DataModel::Nullable & currentPositionTiltPercentage) { VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "", "Percent")); + VerifyOrReturn(CheckConstraintMinValue("currentPositionTiltPercentage", currentPositionTiltPercentage, 0)); VerifyOrReturn(CheckConstraintMaxValue("currentPositionTiltPercentage", currentPositionTiltPercentage, 100)); NextTest(); } @@ -35528,6 +35601,7 @@ class Test_TC_WNCV_2_4 : public TestCommand void OnSuccessResponse_2(uint8_t type) { VerifyOrReturn(CheckConstraintType("type", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("type", type, 0)); VerifyOrReturn(CheckConstraintMaxValue("type", type, 9)); NextTest(); } @@ -35671,6 +35745,7 @@ class Test_TC_WNCV_2_5 : public TestCommand void OnSuccessResponse_2(uint8_t endProductType) { VerifyOrReturn(CheckConstraintType("endProductType", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("endProductType", endProductType, 0)); VerifyOrReturn(CheckConstraintMaxValue("endProductType", endProductType, 23)); NextTest(); } @@ -49728,6 +49803,7 @@ class TestCluster : public TestCommand void OnSuccessResponse_214(const chip::app::DataModel::Nullable & nullableInt8u) { + VerifyOrReturn(CheckConstraintMinValue("nullableInt8u", nullableInt8u, 0)); VerifyOrReturn(CheckConstraintMaxValue("nullableInt8u", nullableInt8u, 254)); NextTest(); } @@ -49786,6 +49862,7 @@ class TestCluster : public TestCommand void OnSuccessResponse_217(const chip::app::DataModel::Nullable & nullableInt8u) { + VerifyOrReturn(CheckConstraintMinValue("nullableInt8u", nullableInt8u, 0)); VerifyOrReturn(CheckConstraintMaxValue("nullableInt8u", nullableInt8u, 254)); NextTest(); } @@ -49987,6 +50064,7 @@ class TestCluster : public TestCommand void OnSuccessResponse_227(const chip::app::DataModel::Nullable & nullableInt16u) { + VerifyOrReturn(CheckConstraintMinValue("nullableInt16u", nullableInt16u, 0U)); VerifyOrReturn(CheckConstraintMaxValue("nullableInt16u", nullableInt16u, 65534U)); NextTest(); } @@ -50045,6 +50123,7 @@ class TestCluster : public TestCommand void OnSuccessResponse_230(const chip::app::DataModel::Nullable & nullableInt16u) { + VerifyOrReturn(CheckConstraintMinValue("nullableInt16u", nullableInt16u, 0U)); VerifyOrReturn(CheckConstraintMaxValue("nullableInt16u", nullableInt16u, 65534U)); NextTest(); } @@ -50246,6 +50325,7 @@ class TestCluster : public TestCommand void OnSuccessResponse_240(const chip::app::DataModel::Nullable & nullableInt32u) { + VerifyOrReturn(CheckConstraintMinValue("nullableInt32u", nullableInt32u, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("nullableInt32u", nullableInt32u, 4294967294UL)); NextTest(); } @@ -50304,6 +50384,7 @@ class TestCluster : public TestCommand void OnSuccessResponse_243(const chip::app::DataModel::Nullable & nullableInt32u) { + VerifyOrReturn(CheckConstraintMinValue("nullableInt32u", nullableInt32u, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("nullableInt32u", nullableInt32u, 4294967294UL)); NextTest(); } @@ -50505,6 +50586,7 @@ class TestCluster : public TestCommand void OnSuccessResponse_253(const chip::app::DataModel::Nullable & nullableInt64u) { + VerifyOrReturn(CheckConstraintMinValue("nullableInt64u", nullableInt64u, 0ULL)); VerifyOrReturn(CheckConstraintMaxValue("nullableInt64u", nullableInt64u, 18446744073709551614ULL)); NextTest(); } @@ -50563,6 +50645,7 @@ class TestCluster : public TestCommand void OnSuccessResponse_256(const chip::app::DataModel::Nullable & nullableInt64u) { + VerifyOrReturn(CheckConstraintMinValue("nullableInt64u", nullableInt64u, 0ULL)); VerifyOrReturn(CheckConstraintMaxValue("nullableInt64u", nullableInt64u, 18446744073709551614ULL)); NextTest(); } @@ -55871,8 +55954,51 @@ class TestConstraints : public TestCommand err = TestReadAttributeCharStringValueEndsWithConstraints_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Write attribute CHAR_STRING Value Back to Default Value\n"); - err = TestWriteAttributeCharStringValueBackToDefaultValue_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Write attribute CHAR_STRING Value\n"); + err = TestWriteAttributeCharStringValue_11(); + break; + case 12: + ChipLogProgress(chipTool, + " ***** Test Step 12 : Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints\n"); + err = TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Write attribute CHAR_STRING Value\n"); + err = TestWriteAttributeCharStringValue_13(); + break; + case 14: + ChipLogProgress(chipTool, + " ***** Test Step 14 : Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints\n"); + err = TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Write attribute CHAR_STRING Value\n"); + err = TestWriteAttributeCharStringValue_15(); + break; + case 16: + ChipLogProgress(chipTool, + " ***** Test Step 16 : Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints\n"); + err = TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Write attribute CHAR_STRING Value\n"); + err = TestWriteAttributeCharStringValue_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Read attribute CHAR_STRING Value isHexString Constraints\n"); + err = TestReadAttributeCharStringValueIsHexStringConstraints_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Write attribute CHAR_STRING Value\n"); + err = TestWriteAttributeCharStringValue_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Read attribute CHAR_STRING Value isHexString Constraints\n"); + err = TestReadAttributeCharStringValueIsHexStringConstraints_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Write attribute CHAR_STRING Value Back to Default Value\n"); + err = TestWriteAttributeCharStringValueBackToDefaultValue_21(); break; } @@ -55885,7 +56011,7 @@ class TestConstraints : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + const uint16_t mTestCount = 22; chip::Optional mCluster; chip::Optional mEndpoint; @@ -55988,6 +56114,91 @@ class TestConstraints : public TestCommand static void OnSuccessCallback_11(void * context) { (static_cast(context))->OnSuccessResponse_11(); } + static void OnFailureCallback_12(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_12(status); + } + + static void OnSuccessCallback_12(void * context, chip::CharSpan charString) + { + (static_cast(context))->OnSuccessResponse_12(charString); + } + + static void OnFailureCallback_13(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_13(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(status); + } + + static void OnSuccessCallback_14(void * context, chip::CharSpan charString) + { + (static_cast(context))->OnSuccessResponse_14(charString); + } + + static void OnFailureCallback_15(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_15(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(status); + } + + static void OnSuccessCallback_16(void * context, chip::CharSpan charString) + { + (static_cast(context))->OnSuccessResponse_16(charString); + } + + static void OnFailureCallback_17(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_17(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(status); + } + + static void OnSuccessCallback_18(void * context, chip::CharSpan charString) + { + (static_cast(context))->OnSuccessResponse_18(charString); + } + + static void OnFailureCallback_19(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_19(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(status); + } + + static void OnSuccessCallback_20(void * context, chip::CharSpan charString) + { + (static_cast(context))->OnSuccessResponse_20(charString); + } + + static void OnFailureCallback_21(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_21(status); + } + + static void OnSuccessCallback_21(void * context) { (static_cast(context))->OnSuccessResponse_21(); } + // // Tests methods // @@ -56186,14 +56397,14 @@ class TestConstraints : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeCharStringValueBackToDefaultValue_11() + CHIP_ERROR TestWriteAttributeCharStringValue_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::CharSpan charStringArgument; - charStringArgument = chip::Span("garbage: not in length on purpose", 0); + charStringArgument = chip::Span("lowercasegarbage: not in length on purpose", 9); ReturnErrorOnFailure(cluster.WriteAttribute( charStringArgument, this, OnSuccessCallback_11, OnFailureCallback_11)); @@ -56203,6 +56414,194 @@ class TestConstraints : public TestCommand void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } void OnSuccessResponse_11() { NextTest(); } + + CHIP_ERROR TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_12() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_12, OnFailureCallback_12)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_12(chip::CharSpan charString) + { + VerifyOrReturn(CheckConstraintIsUpperCase("charString", charString, false)); + VerifyOrReturn(CheckConstraintIsLowerCase("charString", charString, true)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeCharStringValue_13() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::CharSpan charStringArgument; + charStringArgument = chip::Span("UPPERCASEgarbage: not in length on purpose", 9); + + ReturnErrorOnFailure(cluster.WriteAttribute( + charStringArgument, this, OnSuccessCallback_13, OnFailureCallback_13)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_13(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_13() { NextTest(); } + + CHIP_ERROR TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_14() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_14, OnFailureCallback_14)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_14(chip::CharSpan charString) + { + VerifyOrReturn(CheckConstraintIsUpperCase("charString", charString, true)); + VerifyOrReturn(CheckConstraintIsLowerCase("charString", charString, false)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeCharStringValue_15() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::CharSpan charStringArgument; + charStringArgument = chip::Span("lowUPPERgarbage: not in length on purpose", 8); + + ReturnErrorOnFailure(cluster.WriteAttribute( + charStringArgument, this, OnSuccessCallback_15, OnFailureCallback_15)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_15(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_15() { NextTest(); } + + CHIP_ERROR TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_16() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_16, OnFailureCallback_16)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_16(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_16(chip::CharSpan charString) + { + VerifyOrReturn(CheckConstraintIsUpperCase("charString", charString, false)); + VerifyOrReturn(CheckConstraintIsLowerCase("charString", charString, false)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeCharStringValue_17() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::CharSpan charStringArgument; + charStringArgument = chip::Span("ABCDEF012Vgarbage: not in length on purpose", 10); + + ReturnErrorOnFailure(cluster.WriteAttribute( + charStringArgument, this, OnSuccessCallback_17, OnFailureCallback_17)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_17(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_17() { NextTest(); } + + CHIP_ERROR TestReadAttributeCharStringValueIsHexStringConstraints_18() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_18, OnFailureCallback_18)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_18(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_18(chip::CharSpan charString) + { + VerifyOrReturn(CheckConstraintIsHexString("charString", charString, false)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeCharStringValue_19() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::CharSpan charStringArgument; + charStringArgument = chip::Span("ABCDEF0123garbage: not in length on purpose", 10); + + ReturnErrorOnFailure(cluster.WriteAttribute( + charStringArgument, this, OnSuccessCallback_19, OnFailureCallback_19)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_19(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_19() { NextTest(); } + + CHIP_ERROR TestReadAttributeCharStringValueIsHexStringConstraints_20() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_20, OnFailureCallback_20)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_20(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_20(chip::CharSpan charString) + { + VerifyOrReturn(CheckConstraintIsHexString("charString", charString, true)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeCharStringValueBackToDefaultValue_21() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::CharSpan charStringArgument; + charStringArgument = chip::Span("garbage: not in length on purpose", 0); + + ReturnErrorOnFailure(cluster.WriteAttribute( + charStringArgument, this, OnSuccessCallback_21, OnFailureCallback_21)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_21(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_21() { NextTest(); } }; class TestDelayCommands : public TestCommand From 9ac643d8cde52e9b8fc45ff37244e603ee609823 Mon Sep 17 00:00:00 2001 From: pankore <86098180+pankore@users.noreply.github.com> Date: Wed, 12 Jan 2022 22:00:50 +0800 Subject: [PATCH 58/64] [Ameba] Update dockerfile for NetworkCommissioning (#13488) * Update Dockerfile Update chip_porting to support NetworkCommissioning. Fix tcptest implicit declaration error (Auto-build error in #13408). * Update version * Update ameba sdk Use pvPortMalloc and vPortFree at the right place --- integrations/docker/images/chip-build-ameba/Dockerfile | 2 +- integrations/docker/images/chip-build/version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/integrations/docker/images/chip-build-ameba/Dockerfile b/integrations/docker/images/chip-build-ameba/Dockerfile index 93501e305e3363..d98d6175fc9ee8 100644 --- a/integrations/docker/images/chip-build-ameba/Dockerfile +++ b/integrations/docker/images/chip-build-ameba/Dockerfile @@ -9,7 +9,7 @@ RUN set -x \ && cd ${AMEBA_DIR} \ && git clone --progress -b cmake_build https://github.com/pankore/ambd_sdk_with_chip_non_NDA.git \ && cd ambd_sdk_with_chip_non_NDA \ - && git reset --hard f8c7b9e \ + && git reset --hard dd89725 \ && git submodule update --depth 1 --init --progress \ && cd project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/toolchain \ && cat asdk/asdk-10.3.0-linux-newlib-build-3638-x86_64.tar.bz2.part* > asdk/asdk-10.3.0-linux-newlib-build-3638-x86_64.tar.bz2 \ diff --git a/integrations/docker/images/chip-build/version b/integrations/docker/images/chip-build/version index 3d95b8206e59a3..a46212c537ebda 100644 --- a/integrations/docker/images/chip-build/version +++ b/integrations/docker/images/chip-build/version @@ -1 +1 @@ -0.5.44 Version bump reason: Remove ESP32 workaround for invalid certificates +0.5.45 Version bump reason: [Ameba] Support NetworkCommissioning From 124f590eb02918f8da5fcf0a89b758e09ff78c27 Mon Sep 17 00:00:00 2001 From: Hrishikesh Dhayagude Date: Wed, 12 Jan 2022 19:40:20 +0530 Subject: [PATCH 59/64] Fix the issue of notification not being received from the device (BLE peripheral) to chiptool (#13461) --- src/platform/Linux/bluez/Helper.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/platform/Linux/bluez/Helper.cpp b/src/platform/Linux/bluez/Helper.cpp index feae4149eab7d4..30844ce3bc5eab 100644 --- a/src/platform/Linux/bluez/Helper.cpp +++ b/src/platform/Linux/bluez/Helper.cpp @@ -1660,8 +1660,6 @@ static void SubscribeCharacteristicDone(GObject * aObject, GAsyncResult * aResul VerifyOrExit(success == TRUE, ChipLogError(DeviceLayer, "FAIL: BluezSubscribeCharacteristic : %s", error->message)); - // Get notifications on the TX characteristic change (e.g. indication is received) - g_signal_connect(c2, "g-properties-changed", G_CALLBACK(OnCharacteristicChanged), apConnection); BLEManagerImpl::HandleSubscribeOpComplete(static_cast(apConnection), true); exit: @@ -1671,9 +1669,13 @@ static void SubscribeCharacteristicDone(GObject * aObject, GAsyncResult * aResul static gboolean SubscribeCharacteristicImpl(BluezConnection * connection) { + BluezGattCharacteristic1 * c2 = nullptr; VerifyOrExit(connection != nullptr, ChipLogError(DeviceLayer, "BluezConnection is NULL in %s", __func__)); VerifyOrExit(connection->mpC2 != nullptr, ChipLogError(DeviceLayer, "C2 is NULL in %s", __func__)); + c2 = BLUEZ_GATT_CHARACTERISTIC1(connection->mpC2); + // Get notifications on the TX characteristic change (e.g. indication is received) + g_signal_connect(c2, "g-properties-changed", G_CALLBACK(OnCharacteristicChanged), connection); bluez_gatt_characteristic1_call_start_notify(connection->mpC2, nullptr, SubscribeCharacteristicDone, connection); exit: From 1181e947de4b86a96882c12a28eeb2b1898abb57 Mon Sep 17 00:00:00 2001 From: Wang Qixiang <43193572+wqx6@users.noreply.github.com> Date: Wed, 12 Jan 2022 23:16:06 +0800 Subject: [PATCH 60/64] ESP32:Fix CaseSession fail on ESP32, Add InitClock_ReadTime function (#13492) * Fix CaseSession fail on ESP32, Add InitClock_ReadTime function * Restyled by whitespace Co-authored-by: Restyled.io --- src/platform/ESP32/BUILD.gn | 2 +- src/platform/ESP32/PlatformManagerImpl.cpp | 2 ++ src/platform/ESP32/SystemTimeSupport.cpp | 11 ++++++++- src/platform/ESP32/SystemTimeSupport.h | 28 ++++++++++++++++++++++ 4 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 src/platform/ESP32/SystemTimeSupport.h diff --git a/src/platform/ESP32/BUILD.gn b/src/platform/ESP32/BUILD.gn index f15570aaf92c34..67a8c304661c7b 100644 --- a/src/platform/ESP32/BUILD.gn +++ b/src/platform/ESP32/BUILD.gn @@ -20,7 +20,6 @@ assert(chip_device_platform == "esp32") static_library("ESP32") { sources = [ - "../FreeRTOS/SystemTimeSupport.cpp", "../SingletonConfigurationManager.cpp", "BLEManagerImpl.h", "CHIPDevicePlatformConfig.h", @@ -45,6 +44,7 @@ static_library("ESP32") { "PlatformManagerImpl.cpp", "PlatformManagerImpl.h", "SystemTimeSupport.cpp", + "SystemTimeSupport.h", "bluedroid/BLEManagerImpl.cpp", "nimble/BLEManagerImpl.cpp", ] diff --git a/src/platform/ESP32/PlatformManagerImpl.cpp b/src/platform/ESP32/PlatformManagerImpl.cpp index b3836f1d50f7ab..bd47cdfaf8976c 100644 --- a/src/platform/ESP32/PlatformManagerImpl.cpp +++ b/src/platform/ESP32/PlatformManagerImpl.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -123,6 +124,7 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) // to finish the initialization process. ReturnErrorOnFailure(Internal::GenericPlatformManagerImpl_FreeRTOS::_InitChipStack()); + ReturnErrorOnFailure(System::Clock::InitClock_RealTime()); exit: return chip::DeviceLayer::Internal::ESP32Utils::MapError(err); } diff --git a/src/platform/ESP32/SystemTimeSupport.cpp b/src/platform/ESP32/SystemTimeSupport.cpp index d802ea8ed4d389..67d83ac3153fdc 100644 --- a/src/platform/ESP32/SystemTimeSupport.cpp +++ b/src/platform/ESP32/SystemTimeSupport.cpp @@ -25,8 +25,8 @@ /* this file behaves like a config.h, comes first */ #include -#include #include +#include #include @@ -112,6 +112,15 @@ CHIP_ERROR ClockImpl::SetClock_RealTime(Clock::Microseconds64 aNewCurTime) return CHIP_NO_ERROR; } +CHIP_ERROR InitClock_RealTime() +{ + Clock::Microseconds64 curTime = + Clock::Microseconds64((static_cast(CHIP_SYSTEM_CONFIG_VALID_REAL_TIME_THRESHOLD) * UINT64_C(1000000))); + // Use CHIP_SYSTEM_CONFIG_VALID_REAL_TIME_THRESHOLD as the initial value of RealTime. + // Then the RealTime obtained from GetClock_RealTime will be always valid. + return System::SystemClock().SetClock_RealTime(curTime); +} + } // namespace Clock } // namespace System } // namespace chip diff --git a/src/platform/ESP32/SystemTimeSupport.h b/src/platform/ESP32/SystemTimeSupport.h new file mode 100644 index 00000000000000..da38a26ced25c2 --- /dev/null +++ b/src/platform/ESP32/SystemTimeSupport.h @@ -0,0 +1,28 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +namespace chip { +namespace System { +namespace Clock { + +CHIP_ERROR InitClock_RealTime(); + +} // namespace Clock +} // namespace System +} // namespace chip From 628e86a2d0ada2d0ba00e17e117ca7845847dd2a Mon Sep 17 00:00:00 2001 From: Timothy Maes Date: Wed, 12 Jan 2022 18:38:44 +0100 Subject: [PATCH 61/64] * [OTA] enable ota-requestor cluster in chip data model build (#13256) * Adjust apps with a stub (all-clusters-app, ota-requestor-app, shell) --- .../src/ota-requestor-stub.cpp | 87 ------------------- .../all-clusters-app/ameba/chip_main.cmake | 1 - examples/all-clusters-app/linux/BUILD.gn | 1 - examples/all-clusters-app/mbed/CMakeLists.txt | 4 +- examples/all-clusters-app/p6/BUILD.gn | 1 - .../ota-requestor-common/BUILD.gn | 9 -- examples/shell/shell_common/BUILD.gn | 1 - src/app/chip_data_model.gni | 8 ++ .../clusters/ota-requestor/OTARequestor.cpp | 4 +- src/app/zap_cluster_list.py | 2 +- third_party/qpg_sdk/repo | 2 +- 11 files changed, 15 insertions(+), 105 deletions(-) delete mode 100644 examples/all-clusters-app/all-clusters-common/src/ota-requestor-stub.cpp diff --git a/examples/all-clusters-app/all-clusters-common/src/ota-requestor-stub.cpp b/examples/all-clusters-app/all-clusters-common/src/ota-requestor-stub.cpp deleted file mode 100644 index ceff034374f750..00000000000000 --- a/examples/all-clusters-app/all-clusters-common/src/ota-requestor-stub.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include -#include - -using namespace chip; -using namespace chip::app; -using namespace chip::app::Clusters; -using namespace chip::app::Clusters::OtaSoftwareUpdateRequestor; - -namespace { - -class OtaSoftwareUpdateRequestorAttrAccess : public AttributeAccessInterface -{ -public: - // Register for the OTA Requestor Cluster on all endpoints. - OtaSoftwareUpdateRequestorAttrAccess() : - AttributeAccessInterface(Optional::Missing(), OtaSoftwareUpdateRequestor::Id) - {} - - CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; - CHIP_ERROR Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override; -}; - -OtaSoftwareUpdateRequestorAttrAccess gAttrAccess; - -CHIP_ERROR OtaSoftwareUpdateRequestorAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) -{ - switch (aPath.mAttributeId) - { - case Attributes::DefaultOtaProviders::Id: - return aEncoder.Encode(DataModel::List()); - default: - break; - } - - return CHIP_NO_ERROR; -} - -CHIP_ERROR OtaSoftwareUpdateRequestorAttrAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) -{ - switch (aPath.mAttributeId) - { - case Attributes::DefaultOtaProviders::Id: { - DataModel::DecodableList list; - ReturnErrorOnFailure(aDecoder.Decode(list)); - break; - } - default: - break; - } - return CHIP_NO_ERROR; -} - -} // namespace - -bool emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::DecodableType & commandData) -{ - return false; -} - -// ----------------------------------------------------------------------------- -// Plugin initialization - -void MatterOtaSoftwareUpdateRequestorPluginServerInitCallback(void) -{ - registerAttributeAccessOverride(&gAttrAccess); -} diff --git a/examples/all-clusters-app/ameba/chip_main.cmake b/examples/all-clusters-app/ameba/chip_main.cmake index fa03acfbd1673c..cb86b9f8b23d34 100755 --- a/examples/all-clusters-app/ameba/chip_main.cmake +++ b/examples/all-clusters-app/ameba/chip_main.cmake @@ -121,7 +121,6 @@ list( ${chip_dir}/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp - ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/ota-requestor-stub.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp ${chip_dir}/examples/all-clusters-app/ameba/main/chipinterface.cpp diff --git a/examples/all-clusters-app/linux/BUILD.gn b/examples/all-clusters-app/linux/BUILD.gn index 9f2870d976d65b..3e700fd1af5b5e 100644 --- a/examples/all-clusters-app/linux/BUILD.gn +++ b/examples/all-clusters-app/linux/BUILD.gn @@ -18,7 +18,6 @@ import("//build_overrides/chip.gni") executable("chip-all-clusters-app") { sources = [ "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/ota-requestor-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "include/tv-callbacks.cpp", "include/tv-callbacks.h", diff --git a/examples/all-clusters-app/mbed/CMakeLists.txt b/examples/all-clusters-app/mbed/CMakeLists.txt index e5611b5dc0c14c..809b98c0b5e5d5 100644 --- a/examples/all-clusters-app/mbed/CMakeLists.txt +++ b/examples/all-clusters-app/mbed/CMakeLists.txt @@ -67,7 +67,6 @@ target_sources(${APP_TARGET} PRIVATE ${CHIP_ROOT}/src/app/server/CommissioningWindowManager.cpp ${CHIP_ROOT}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp - ${CHIP_ROOT}/examples/all-clusters-app/all-clusters-common/src/ota-requestor-stub.cpp ${CHIP_ROOT}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp ${APP_UTIL}/DataModelHandler.cpp @@ -139,6 +138,9 @@ target_sources(${APP_TARGET} PRIVATE ${APP_CLUSTERS}/general-diagnostics-server/general-diagnostics-server.cpp ${APP_CLUSTERS}/group-key-mgmt-server/group-key-mgmt-server.cpp ${APP_CLUSTERS}/power-source-configuration-server/power-source-configuration-server.cpp + ${APP_CLUSTERS}/ota-requestor/ota-requestor-server.cpp + ${APP_CLUSTERS}/ota-requestor/BDXDownloader.cpp + ${APP_CLUSTERS}/ota-requestor/OTARequestor.cpp ) target_link_libraries(${APP_TARGET} mbed-os-posix-socket mbed-os mbed-ble mbed-events mbed-netsocket mbed-storage mbed-storage-kv-global-api mbed-mbedtls mbed-emac chip) diff --git a/examples/all-clusters-app/p6/BUILD.gn b/examples/all-clusters-app/p6/BUILD.gn index ccd4ac152789de..5b99c3f3b3b6f6 100644 --- a/examples/all-clusters-app/p6/BUILD.gn +++ b/examples/all-clusters-app/p6/BUILD.gn @@ -61,7 +61,6 @@ p6_executable("clusters_app") { sources = [ "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/ota-requestor-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${examples_plat_dir}/LEDWidget.cpp", "${examples_plat_dir}/init_p6Platform.cpp", diff --git a/examples/ota-requestor-app/ota-requestor-common/BUILD.gn b/examples/ota-requestor-app/ota-requestor-common/BUILD.gn index 1d5d7bf413cd30..4ba7b05ddb2b2e 100644 --- a/examples/ota-requestor-app/ota-requestor-common/BUILD.gn +++ b/examples/ota-requestor-app/ota-requestor-common/BUILD.gn @@ -30,15 +30,6 @@ chip_data_model("ota-requestor-common") { deps = [ "${chip_root}/src/lib" ] - sources = [ - "${chip_root}/src/app/clusters/ota-requestor/BDXDownloader.cpp", - "${chip_root}/src/app/clusters/ota-requestor/BDXDownloader.h", - "${chip_root}/src/app/clusters/ota-requestor/OTARequestor.cpp", - "${chip_root}/src/app/clusters/ota-requestor/ota-requestor-server.cpp", - ] - - is_server = true - public_configs = [ ":config" ] is_server = true diff --git a/examples/shell/shell_common/BUILD.gn b/examples/shell/shell_common/BUILD.gn index efd1a154fedabc..484c3dbbbde058 100644 --- a/examples/shell/shell_common/BUILD.gn +++ b/examples/shell/shell_common/BUILD.gn @@ -74,7 +74,6 @@ static_library("shell_common") { sources += [ "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/ota-requestor-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", ] diff --git a/src/app/chip_data_model.gni b/src/app/chip_data_model.gni index a19f120daa9660..c8134caba0f0f0 100644 --- a/src/app/chip_data_model.gni +++ b/src/app/chip_data_model.gni @@ -148,6 +148,14 @@ template("chip_data_model") { "${_app_root}/util/ContentApp.cpp", "${_app_root}/util/ContentAppPlatform.cpp", ] + } else if (cluster == "ota-requestor") { + sources += [ + # TODO - align name of folder ? + "${_app_root}/clusters/${cluster}/${cluster}-server.cpp", + "${_app_root}/clusters/${cluster}/BDXDownloader.cpp", + "${_app_root}/clusters/${cluster}/BDXDownloader.h", + "${_app_root}/clusters/${cluster}/OTARequestor.cpp", + ] } else { sources += [ "${_app_root}/clusters/${cluster}/${cluster}.cpp" ] } diff --git a/src/app/clusters/ota-requestor/OTARequestor.cpp b/src/app/clusters/ota-requestor/OTARequestor.cpp index d8e4033d9057ae..93961cf7c3de23 100644 --- a/src/app/clusters/ota-requestor/OTARequestor.cpp +++ b/src/app/clusters/ota-requestor/OTARequestor.cpp @@ -323,8 +323,8 @@ void OTARequestor::OnConnectionFailure(void * context, PeerId peerId, CHIP_ERROR OTARequestor * requestorCore = static_cast(context); VerifyOrDie(requestorCore != nullptr); - ChipLogError(SoftwareUpdate, "Failed to connect to node 0x%" PRIX64 ": %" CHIP_ERROR_FORMAT, peerId.GetNodeId(), - error.Format()); + ChipLogError(SoftwareUpdate, "Failed to connect to node 0x" ChipLogFormatX64 ": %" CHIP_ERROR_FORMAT, + ChipLogValueX64(peerId.GetNodeId()), error.Format()); switch (requestorCore->mOnConnectedAction) { diff --git a/src/app/zap_cluster_list.py b/src/app/zap_cluster_list.py index dd763a17eea499..212852d351d5b0 100755 --- a/src/app/zap_cluster_list.py +++ b/src/app/zap_cluster_list.py @@ -59,7 +59,7 @@ 'OPERATIONAL_CREDENTIALS_CLUSTER': ['operational-credentials-server'], 'OTA_BOOTLOAD_CLUSTER': [], 'OTA_PROVIDER_CLUSTER': ['ota-provider'], - 'OTA_REQUESTOR_CLUSTER': [], + 'OTA_REQUESTOR_CLUSTER': ['ota-requestor'], 'POWER_SOURCE_CLUSTER': [], 'POWER_SOURCE_CONFIGURATION_CLUSTER': ['power-source-configuration-server'], 'POLL_CONTROL_CLUSTER': [], diff --git a/third_party/qpg_sdk/repo b/third_party/qpg_sdk/repo index edb134291c9f0c..6bce6f11208c77 160000 --- a/third_party/qpg_sdk/repo +++ b/third_party/qpg_sdk/repo @@ -1 +1 @@ -Subproject commit edb134291c9f0cb661c2e95dcf643cd334dca810 +Subproject commit 6bce6f11208c77dfc6bb1b9256bf01248ff002ab From 0c498e078521e667d0193eeb70569156ef03bead Mon Sep 17 00:00:00 2001 From: chrisbeach59 <33329862+chrisbeach59@users.noreply.github.com> Date: Wed, 12 Jan 2022 13:15:35 -0500 Subject: [PATCH 62/64] Ameba Build Issue (#13498) When moving the files from examples/thermostat/ameba/main to top level of project. GLOBAL_CFLAGS += -DCHIP_PROJECT=1 must be included in the make file. make all would fail with CHIP_PROJECT=1 becuase the type def's for u32, and u64 were removed But when u32 is undefined during the chip_main build connectedhomeip/src/lib/core/CHIPTLVReader.cpp will fail since u32 is used a a variable name. --- src/lib/core/CHIPTLVReader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/core/CHIPTLVReader.cpp b/src/lib/core/CHIPTLVReader.cpp index 4af5d8d9b3d84b..18950d7111e863 100644 --- a/src/lib/core/CHIPTLVReader.cpp +++ b/src/lib/core/CHIPTLVReader.cpp @@ -245,8 +245,8 @@ namespace { float BitCastToFloat(const uint64_t elemLenOrVal) { float f; - auto u32 = static_cast(elemLenOrVal); - memcpy(&f, &u32, sizeof(f)); + auto unsigned32 = static_cast(elemLenOrVal); + memcpy(&f, &unsigned32, sizeof(f)); return f; } } // namespace From 585e9d9b644841103bf21254ff87ab8ac9316400 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Wed, 12 Jan 2022 19:18:51 +0100 Subject: [PATCH 63/64] [YAML] Enable TestEmitTestEventRequest in controller-clusters.zap (#13495) * Enable TestEmitTestEventRequest in controller-clusters.zap * Update generated code --- .../data_model/controller-clusters.zap | 31 ++++++++++ .../java/zap-generated/CHIPCallbackTypes.h | 2 + .../java/zap-generated/CHIPClusters-JNI.cpp | 52 ++++++++++++++++ .../zap-generated/CHIPInvokeCallbacks.cpp | 62 +++++++++++++++++++ .../java/zap-generated/CHIPInvokeCallbacks.h | 15 +++++ .../chip/devicecontroller/ChipClusters.java | 28 +++++++++ .../devicecontroller/ClusterInfoMapping.java | 56 +++++++++++++++++ .../python/chip/clusters/CHIPClusters.py | 9 +++ .../CHIP/zap-generated/CHIPCallbackBridge.mm | 10 +++ .../CHIPCallbackBridge_internal.h | 15 +++++ .../CHIP/zap-generated/CHIPClustersObjc.h | 3 + .../CHIP/zap-generated/CHIPClustersObjc.mm | 18 ++++++ .../zap-generated/cluster/Commands.h | 42 +++++++++++++ .../zap-generated/CHIPClientCallbacks.cpp | 14 +++++ .../zap-generated/CHIPClientCallbacks.h | 1 + .../zap-generated/CHIPClusters.cpp | 47 ++++++++++++++ .../zap-generated/CHIPClusters.h | 2 + .../zap-generated/IMClusterCommandHandler.cpp | 59 ++++++++++++++++++ 18 files changed, 466 insertions(+) diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index c69350722fabee..127fac0778ba39 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -12670,9 +12670,32 @@ "source": "client", "incoming": 0, "outgoing": 1 + }, + { + "name": "TestEmitTestEventRequest", + "code": 20, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 } ], "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -12753,6 +12776,14 @@ "source": "server", "incoming": 1, "outgoing": 0 + }, + { + "name": "TestEmitTestEventResponse", + "code": 10, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 } ], "attributes": [ diff --git a/src/controller/java/zap-generated/CHIPCallbackTypes.h b/src/controller/java/zap-generated/CHIPCallbackTypes.h index 7f604c7534ea12..810ae078cd27c8 100644 --- a/src/controller/java/zap-generated/CHIPCallbackTypes.h +++ b/src/controller/java/zap-generated/CHIPCallbackTypes.h @@ -941,6 +941,8 @@ typedef void (*CHIPTestClusterClusterSimpleStructResponseCallbackType)( void *, const chip::app::Clusters::TestCluster::Commands::SimpleStructResponse::DecodableType &); typedef void (*CHIPTestClusterClusterTestAddArgumentsResponseCallbackType)( void *, const chip::app::Clusters::TestCluster::Commands::TestAddArgumentsResponse::DecodableType &); +typedef void (*CHIPTestClusterClusterTestEmitTestEventResponseCallbackType)( + void *, const chip::app::Clusters::TestCluster::Commands::TestEmitTestEventResponse::DecodableType &); typedef void (*CHIPTestClusterClusterTestEnumsResponseCallbackType)( void *, const chip::app::Clusters::TestCluster::Commands::TestEnumsResponse::DecodableType &); typedef void (*CHIPTestClusterClusterTestListInt8UReverseResponseCallbackType)( diff --git a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp index 2f3a632261a8f1..3dc9e361960549 100644 --- a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp @@ -20286,6 +20286,58 @@ JNI_METHOD(void, TestClusterCluster, testAddArguments) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, TestClusterCluster, testEmitTestEventRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject arg2, jobject arg3, + jobject timedInvokeTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster; + + chip::app::Clusters::TestCluster::Commands::TestEmitTestEventRequest::Type request; + + request.arg1 = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(arg1)); + request.arg2 = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(arg2)); + request.arg3 = static_cast(chip::JniReferences::GetInstance().BooleanToPrimitive(arg3)); + + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + VerifyOrReturn(onFailure.get() != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + + cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } + VerifyOrReturn(err == CHIP_NO_ERROR, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, TestClusterCluster, testEnumsRequest) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject arg2, jobject timedInvokeTimeoutMs) { diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp index 20f677bc24e216..ba3e43d7e1653e 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp @@ -2828,6 +2828,68 @@ void CHIPTestClusterClusterTestAddArgumentsResponseCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, returnValue); } +CHIPTestClusterClusterTestEmitTestEventResponseCallback::CHIPTestClusterClusterTestEmitTestEventResponseCallback( + jobject javaCallback) : + Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterClusterTestEmitTestEventResponseCallback::~CHIPTestClusterClusterTestEmitTestEventResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPTestClusterClusterTestEmitTestEventResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::TestCluster::Commands::TestEmitTestEventResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject value; + + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + dataResponse.value, value); + + env->CallVoidMethod(javaCallbackRef, javaMethod, value); +} CHIPTestClusterClusterTestEnumsResponseCallback::CHIPTestClusterClusterTestEnumsResponseCallback(jobject javaCallback) : Callback::Callback(CallbackFn, this) { diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h index 79fade03a2f5f6..43e6b2fb38c7d6 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h @@ -595,6 +595,21 @@ class CHIPTestClusterClusterTestAddArgumentsResponseCallback jobject javaCallbackRef; }; +class CHIPTestClusterClusterTestEmitTestEventResponseCallback + : public Callback::Callback +{ +public: + CHIPTestClusterClusterTestEmitTestEventResponseCallback(jobject javaCallback); + + ~CHIPTestClusterClusterTestEmitTestEventResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::TestCluster::Commands::TestEmitTestEventResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + class CHIPTestClusterClusterTestEnumsResponseCallback : public Callback::Callback { diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 52dff5986bd32f..685d6d85a0eb2f 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -11576,6 +11576,20 @@ public void testAddArguments( testAddArguments(chipClusterPtr, callback, arg1, arg2, timedInvokeTimeoutMs); } + public void testEmitTestEventRequest( + TestEmitTestEventResponseCallback callback, Integer arg1, Integer arg2, Boolean arg3) { + testEmitTestEventRequest(chipClusterPtr, callback, arg1, arg2, arg3, null); + } + + public void testEmitTestEventRequest( + TestEmitTestEventResponseCallback callback, + Integer arg1, + Integer arg2, + Boolean arg3, + int timedInvokeTimeoutMs) { + testEmitTestEventRequest(chipClusterPtr, callback, arg1, arg2, arg3, timedInvokeTimeoutMs); + } + public void testEnumsRequest(TestEnumsResponseCallback callback, Integer arg1, Integer arg2) { testEnumsRequest(chipClusterPtr, callback, arg1, arg2, null); } @@ -11779,6 +11793,14 @@ private native void testAddArguments( Integer arg2, @Nullable Integer timedInvokeTimeoutMs); + private native void testEmitTestEventRequest( + long chipClusterPtr, + TestEmitTestEventResponseCallback Callback, + Integer arg1, + Integer arg2, + Boolean arg3, + @Nullable Integer timedInvokeTimeoutMs); + private native void testEnumsRequest( long chipClusterPtr, TestEnumsResponseCallback Callback, @@ -11903,6 +11925,12 @@ public interface TestAddArgumentsResponseCallback { void onError(Exception error); } + public interface TestEmitTestEventResponseCallback { + void onSuccess(Long value); + + void onError(Exception error); + } + public interface TestEnumsResponseCallback { void onSuccess(Integer arg1, Integer arg2); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index 730bf738b7b033..460d8fa0dbef1c 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -3485,6 +3485,30 @@ public void onError(Exception error) { } } + public static class DelegatedTestEmitTestEventResponseCallback + implements ChipClusters.TestClusterCluster.TestEmitTestEventResponseCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Long value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo valueResponseValue = new CommandResponseInfo("value", "long"); + responseValues.put(valueResponseValue, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + public static class DelegatedTestEnumsResponseCallback implements ChipClusters.TestClusterCluster.TestEnumsResponseCallback, DelegatedClusterCallback { @@ -8579,6 +8603,38 @@ public Map> getCommandMap() { testClustertestAddArgumentsCommandParams); testClusterClusterInteractionInfoMap.put( "testAddArguments", testClustertestAddArgumentsInteractionInfo); + Map testClustertestEmitTestEventRequestCommandParams = + new LinkedHashMap(); + CommandParameterInfo testClustertestEmitTestEventRequestarg1CommandParameterInfo = + new CommandParameterInfo("arg1", int.class); + testClustertestEmitTestEventRequestCommandParams.put( + "arg1", testClustertestEmitTestEventRequestarg1CommandParameterInfo); + + CommandParameterInfo testClustertestEmitTestEventRequestarg2CommandParameterInfo = + new CommandParameterInfo("arg2", int.class); + testClustertestEmitTestEventRequestCommandParams.put( + "arg2", testClustertestEmitTestEventRequestarg2CommandParameterInfo); + + CommandParameterInfo testClustertestEmitTestEventRequestarg3CommandParameterInfo = + new CommandParameterInfo("arg3", boolean.class); + testClustertestEmitTestEventRequestCommandParams.put( + "arg3", testClustertestEmitTestEventRequestarg3CommandParameterInfo); + + // Populate commands + InteractionInfo testClustertestEmitTestEventRequestInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TestClusterCluster) cluster) + .testEmitTestEventRequest( + (ChipClusters.TestClusterCluster.TestEmitTestEventResponseCallback) callback, + (Integer) commandArguments.get("arg1"), + (Integer) commandArguments.get("arg2"), + (Boolean) commandArguments.get("arg3")); + }, + () -> new DelegatedTestEmitTestEventResponseCallback(), + testClustertestEmitTestEventRequestCommandParams); + testClusterClusterInteractionInfoMap.put( + "testEmitTestEventRequest", testClustertestEmitTestEventRequestInteractionInfo); Map testClustertestEnumsRequestCommandParams = new LinkedHashMap(); CommandParameterInfo testClustertestEnumsRequestarg1CommandParameterInfo = diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 5be5c8d09d65e7..7249c702873c45 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -3961,6 +3961,15 @@ class ChipClusters: "arg2": "int", }, }, + 0x00000014: { + "commandId": 0x00000014, + "commandName": "TestEmitTestEventRequest", + "args": { + "arg1": "int", + "arg2": "int", + "arg3": "bool", + }, + }, 0x0000000E: { "commandId": 0x0000000E, "commandName": "TestEnumsRequest", diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm index ecdf7792c73be0..636032e37de03f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm @@ -5941,6 +5941,16 @@ DispatchSuccess(context, response); }; +void CHIPTestClusterClusterTestEmitTestEventResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::TestCluster::Commands::TestEmitTestEventResponse::DecodableType & data) +{ + auto * response = [CHIPTestClusterClusterTestEmitTestEventResponseParams new]; + { + response.value = [NSNumber numberWithUnsignedLongLong:data.value]; + } + DispatchSuccess(context, response); +}; + void CHIPTestClusterClusterTestEnumsResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::TestCluster::Commands::TestEnumsResponse::DecodableType & data) { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h index 1032d9631181e6..18ec84215ddad8 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h @@ -109,6 +109,8 @@ typedef void (*CHIPTestClusterClusterSimpleStructResponseCallbackType)( void *, const chip::app::Clusters::TestCluster::Commands::SimpleStructResponse::DecodableType &); typedef void (*CHIPTestClusterClusterTestAddArgumentsResponseCallbackType)( void *, const chip::app::Clusters::TestCluster::Commands::TestAddArgumentsResponse::DecodableType &); +typedef void (*CHIPTestClusterClusterTestEmitTestEventResponseCallbackType)( + void *, const chip::app::Clusters::TestCluster::Commands::TestEmitTestEventResponse::DecodableType &); typedef void (*CHIPTestClusterClusterTestEnumsResponseCallbackType)( void *, const chip::app::Clusters::TestCluster::Commands::TestEnumsResponse::DecodableType &); typedef void (*CHIPTestClusterClusterTestListInt8UReverseResponseCallbackType)( @@ -4613,6 +4615,19 @@ class CHIPTestClusterClusterTestAddArgumentsResponseCallbackBridge const chip::app::Clusters::TestCluster::Commands::TestAddArgumentsResponse::DecodableType & data); }; +class CHIPTestClusterClusterTestEmitTestEventResponseCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPTestClusterClusterTestEmitTestEventResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, + const chip::app::Clusters::TestCluster::Commands::TestEmitTestEventResponse::DecodableType & data); +}; + class CHIPTestClusterClusterTestEnumsResponseCallbackBridge : public CHIPCallbackBridge { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h index 7bf08af9c922d3..c44ef20fbb31b9 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h @@ -3521,6 +3521,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)testAddArgumentsWithParams:(CHIPTestClusterClusterTestAddArgumentsParams *)params completionHandler:(void (^)(CHIPTestClusterClusterTestAddArgumentsResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)testEmitTestEventRequestWithParams:(CHIPTestClusterClusterTestEmitTestEventRequestParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterTestEmitTestEventResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)testEnumsRequestWithParams:(CHIPTestClusterClusterTestEnumsRequestParams *)params completionHandler:(void (^)(CHIPTestClusterClusterTestEnumsResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index 529c687976f447..6c432127b44ac5 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -14501,6 +14501,24 @@ new CHIPTestClusterClusterTestAddArgumentsResponseCallbackBridge( }); } +- (void)testEmitTestEventRequestWithParams:(CHIPTestClusterClusterTestEmitTestEventRequestParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterTestEmitTestEventResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + ListFreer listFreer; + TestCluster::Commands::TestEmitTestEventRequest::Type request; + request.arg1 = params.arg1.unsignedCharValue; + request.arg2 = static_cast>(params.arg2.unsignedCharValue); + request.arg3 = params.arg3.boolValue; + + new CHIPTestClusterClusterTestEmitTestEventResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)testEnumsRequestWithParams:(CHIPTestClusterClusterTestEnumsRequestParams *)params completionHandler:(void (^)(CHIPTestClusterClusterTestEnumsResponseParams * _Nullable data, NSError * _Nullable error))completionHandler diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 886cdd82f8f329..a206875590380e 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -3297,6 +3297,20 @@ static void OnTestClusterTestAddArgumentsResponseSuccess( command->SetCommandExitStatus(err); }; +static void OnTestClusterTestEmitTestEventResponseSuccess( + void * context, const chip::app::Clusters::TestCluster::Commands::TestEmitTestEventResponse::DecodableType & data) +{ + ChipLogProgress(Zcl, "Received TestEmitTestEventResponse:"); + CHIP_ERROR err = CHIP_NO_ERROR; + if (err == CHIP_NO_ERROR) + { + err = LogValue("value", 1, data.value); + } + + ModelCommand * command = static_cast(context); + command->SetCommandExitStatus(err); +}; + static void OnTestClusterTestEnumsResponseSuccess(void * context, const chip::app::Clusters::TestCluster::Commands::TestEnumsResponse::DecodableType & data) @@ -33470,6 +33484,7 @@ class ReportTemperatureMeasurementClusterRevision : public ModelCommand | * SimpleStructEchoRequest | 0x11 | | * Test | 0x00 | | * TestAddArguments | 0x04 | +| * TestEmitTestEventRequest | 0x14 | | * TestEnumsRequest | 0x0E | | * TestListInt8UArgumentRequest | 0x0A | | * TestListInt8UReverseRequest | 0x0D | @@ -33637,6 +33652,32 @@ class TestClusterTestAddArguments : public ModelCommand chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type mRequest; }; +/* + * Command TestEmitTestEventRequest + */ +class TestClusterTestEmitTestEventRequest : public ModelCommand +{ +public: + TestClusterTestEmitTestEventRequest() : ModelCommand("test-emit-test-event-request") + { + AddArgument("Arg1", 0, UINT8_MAX, &mRequest.arg1); + AddArgument("Arg2", 0, UINT8_MAX, reinterpret_cast *>(&mRequest.arg2)); + AddArgument("Arg3", 0, 1, &mRequest.arg3); + ModelCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x00000014) on endpoint %" PRIu8, endpointId); + + return chip::Controller::InvokeCommand(device, this, OnTestClusterTestEmitTestEventResponseSuccess, OnDefaultFailure, + endpointId, mRequest, mTimedInteractionTimeoutMs); + } + +private: + chip::app::Clusters::TestCluster::Commands::TestEmitTestEventRequest::Type mRequest; +}; + /* * Command TestEnumsRequest */ @@ -52489,6 +52530,7 @@ void registerClusterTestCluster(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp index de5456c1a8614e..2747ebd5c3e560 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp @@ -2915,6 +2915,20 @@ bool emberAfTestClusterClusterTestAddArgumentsResponseCallback(EndpointId endpoi return true; } +bool emberAfTestClusterClusterTestEmitTestEventResponseCallback(EndpointId endpoint, app::CommandSender * commandObj, + uint64_t value) +{ + ChipLogProgress(Zcl, "TestEmitTestEventResponse:"); + ChipLogProgress(Zcl, " value: %" PRIu64 "", value); + + GET_CLUSTER_RESPONSE_CALLBACKS("TestClusterClusterTestEmitTestEventResponseCallback"); + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, value); + return true; +} + bool emberAfTestClusterClusterTestEnumsResponseCallback(EndpointId endpoint, app::CommandSender * commandObj, chip::VendorId arg1, uint8_t arg2) { diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h index 1f74c841b7950d..5584bf2c23a8f5 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h @@ -101,6 +101,7 @@ typedef void (*TargetNavigatorClusterNavigateTargetResponseCallback)(void * cont typedef void (*TestClusterClusterBooleanResponseCallback)(void * context, bool value); typedef void (*TestClusterClusterSimpleStructResponseCallback)(void * context, SimpleStruct arg1); typedef void (*TestClusterClusterTestAddArgumentsResponseCallback)(void * context, uint8_t returnValue); +typedef void (*TestClusterClusterTestEmitTestEventResponseCallback)(void * context, uint64_t value); typedef void (*TestClusterClusterTestEnumsResponseCallback)(void * context, chip::VendorId arg1, uint8_t arg2); typedef void (*TestClusterClusterTestListInt8UReverseResponseCallback)(void * context, /* TYPE WARNING: array array defaults to */ uint8_t * arg1); diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp index eaad14c95e5f23..8d4586e2f0a1af 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp @@ -6333,6 +6333,53 @@ CHIP_ERROR TestClusterCluster::TestAddArguments(Callback::Cancelable * onSuccess return err; } +CHIP_ERROR TestClusterCluster::TestEmitTestEventRequest(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t arg1, uint8_t arg2, + bool arg3) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + TestCluster::Commands::TestEmitTestEventRequest::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // arg1: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), arg1)); + // arg2: simpleEnum + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), arg2)); + // arg3: boolean + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), arg3)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + CHIP_ERROR TestClusterCluster::TestEnumsRequest(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, chip::VendorId arg1, uint8_t arg2) { diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h index 9945c3a9d07fe1..83eb1a93a8f94c 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h @@ -735,6 +735,8 @@ class DLL_EXPORT TestClusterCluster : public ClusterBase CHIP_ERROR Test(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); CHIP_ERROR TestAddArguments(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t arg1, uint8_t arg2); + CHIP_ERROR TestEmitTestEventRequest(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t arg1, uint8_t arg2, bool arg3); CHIP_ERROR TestEnumsRequest(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, chip::VendorId arg1, uint8_t arg2); CHIP_ERROR TestListInt8UArgumentRequest(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, diff --git a/zzz_generated/controller-clusters/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/controller-clusters/zap-generated/IMClusterCommandHandler.cpp index 5c79540bad0ac2..d981635c673b23 100644 --- a/zzz_generated/controller-clusters/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/controller-clusters/zap-generated/IMClusterCommandHandler.cpp @@ -3259,6 +3259,65 @@ void DispatchClientCommand(CommandSender * apCommandObj, const ConcreteCommandPa } break; } + case Commands::TestEmitTestEventResponse::Id: { + expectArgumentCount = 1; + uint64_t value; + bool argExists[1]; + + memset(argExists, 0, sizeof argExists); + + while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) + { + // Since call to aDataTlv.Next() is CHIP_NO_ERROR, the read head always points to an element. + // Skip this element if it is not a ContextTag, not consider it as an error if other values are valid. + if (!TLV::IsContextTag(aDataTlv.GetTag())) + { + continue; + } + currentDecodeTagId = TLV::TagNumFromTag(aDataTlv.GetTag()); + if (currentDecodeTagId < 1) + { + if (argExists[currentDecodeTagId]) + { + ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); + TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; + break; + } + else + { + argExists[currentDecodeTagId] = true; + validArgumentCount++; + } + } + switch (currentDecodeTagId) + { + case 0: + TLVUnpackError = aDataTlv.Get(value); + break; + default: + // Unsupported tag, ignore it. + ChipLogProgress(Zcl, "Unknown TLV tag during processing."); + break; + } + if (CHIP_NO_ERROR != TLVUnpackError) + { + break; + } + } + + if (CHIP_END_OF_TLV == TLVError) + { + // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. + TLVError = CHIP_NO_ERROR; + } + + if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount) + { + wasHandled = + emberAfTestClusterClusterTestEmitTestEventResponseCallback(aCommandPath.mEndpointId, apCommandObj, value); + } + break; + } case Commands::TestEnumsResponse::Id: { expectArgumentCount = 2; chip::VendorId arg1; From 34e40324467fc553a428b4929faaa9a418fe8e04 Mon Sep 17 00:00:00 2001 From: "Hui.Li-TCL" Date: Thu, 13 Jan 2022 02:55:42 +0800 Subject: [PATCH 64/64] fix memory issue in MediaInputMgr (#13494) --- examples/tv-app/android/java/MediaInputManager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/tv-app/android/java/MediaInputManager.cpp b/examples/tv-app/android/java/MediaInputManager.cpp index 8076ff100ef6f3..610a60dd3c749a 100644 --- a/examples/tv-app/android/java/MediaInputManager.cpp +++ b/examples/tv-app/android/java/MediaInputManager.cpp @@ -223,6 +223,7 @@ bool MediaInputManager::HandleHideInputStatus() bool MediaInputManager::HandleRenameInput(const uint8_t index, const chip::CharSpan & name) { + std::string inputname(name.data(), name.size()); jboolean ret = JNI_FALSE; JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -232,7 +233,7 @@ bool MediaInputManager::HandleRenameInput(const uint8_t index, const chip::CharS VerifyOrExit(env != NULL, ChipLogError(Zcl, "env null")); { - UtfString jniInputname(env, name.data()); + UtfString jniInputname(env, inputname.data()); env->ExceptionClear(); ret = env->CallBooleanMethod(mMediaInputManagerObject, mRenameInputMethod, static_cast(index), jniInputname.jniValue());