diff --git a/examples/chip-tool/BUILD.gn b/examples/chip-tool/BUILD.gn index f8c0af9df1bad5..db1bdce4a54119 100644 --- a/examples/chip-tool/BUILD.gn +++ b/examples/chip-tool/BUILD.gn @@ -69,6 +69,7 @@ static_library("chip-tool-utils") { public_deps = [ "${chip_root}/src/app/server", + "${chip_root}/src/app/tests/suites/commands/discovery", "${chip_root}/src/app/tests/suites/commands/log", "${chip_root}/src/app/tests/suites/commands/system", "${chip_root}/src/app/tests/suites/pics", diff --git a/examples/chip-tool/commands/tests/TestCommand.cpp b/examples/chip-tool/commands/tests/TestCommand.cpp index 72d4fdc870d40d..545e2da4713e2c 100644 --- a/examples/chip-tool/commands/tests/TestCommand.cpp +++ b/examples/chip-tool/commands/tests/TestCommand.cpp @@ -32,6 +32,7 @@ CHIP_ERROR TestCommand::RunCommand() CHIP_ERROR TestCommand::WaitForCommissionee() { + CurrentCommissioner().ReleaseOperationalDevice(mNodeId); return CurrentCommissioner().GetConnectedDevice(mNodeId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); } diff --git a/examples/chip-tool/commands/tests/TestCommand.h b/examples/chip-tool/commands/tests/TestCommand.h index a6aa4fff92d9a4..f798082eb23b86 100644 --- a/examples/chip-tool/commands/tests/TestCommand.h +++ b/examples/chip-tool/commands/tests/TestCommand.h @@ -19,6 +19,7 @@ #pragma once #include "../common/CHIPCommand.h" +#include #include #include #include @@ -34,6 +35,7 @@ class TestCommand : public CHIPCommand, public ConstraintsChecker, public PICSChecker, public LogCommands, + public DiscoveryCommands, public SystemCommands { public: diff --git a/examples/chip-tool/templates/partials/test_cluster.zapt b/examples/chip-tool/templates/partials/test_cluster.zapt index 7fa003afa1a389..daf995e8ef3c33 100644 --- a/examples/chip-tool/templates/partials/test_cluster.zapt +++ b/examples/chip-tool/templates/partials/test_cluster.zapt @@ -98,6 +98,57 @@ class {{filename}}: public TestCommand {{/chip_tests_item_response_parameters}} {{/chip_tests_items}} + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + {{#chip_tests_items}} + {{#if (isStrEqual cluster "DiscoveryCommands")}} + if ((mTestIndex - 1) == {{index}}) + { + isExpectedDnssdResult = true; + {{#chip_tests_item_response_parameters}} + {{#*inline "itemValue"}}nodeData.{{name}}{{#if isOptional}}.Value(){{/if}}{{/inline}} + {{~#if hasExpectedValue}} + {{#if isOptional}}VerifyOrReturn(CheckValuePresent("{{name}}", nodeData.{{name}}));{{/if}} + VerifyOrReturn(CheckValue("{{name}}", {{>itemValue}}, + {{#if (chip_tests_config_has expectedValue)}} + m{{asUpperCamelCase expectedValue}}.HasValue() ? m{{asUpperCamelCase expectedValue}}.Value() : {{asTypedLiteral (chip_tests_config_get_default_value expectedValue) (chip_tests_config_get_type expectedValue)}} + {{else}} + {{expectedValue}} + {{/if}} + )); + {{/if}} + {{#if hasExpectedConstraints}} + {{#if isOptional}}VerifyOrReturn(CheckValuePresent("{{name}}", nodeData.{{name}}));{{/if}} + {{#if (hasProperty expectedConstraints "minLength")}}VerifyOrReturn(CheckConstraintMinLength("{{name}}", {{>itemValue}}.size(), {{expectedConstraints.minLength}}));{{/if}} + {{#if (hasProperty expectedConstraints "maxLength")}}VerifyOrReturn(CheckConstraintMaxLength("{{name}}", {{>itemValue}}.size(), {{expectedConstraints.maxLength}}));{{/if}} + {{#if (hasProperty expectedConstraints "minValue")}}VerifyOrReturn(CheckConstraintMinValue<{{chipType}}>("{{name}}", {{>itemValue}}, {{asTypedLiteral expectedConstraints.minValue type}}));{{/if}} + {{#if (hasProperty expectedConstraints "maxValue")}}VerifyOrReturn(CheckConstraintMaxValue<{{chipType}}>("{{name}}", {{>itemValue}}, {{asTypedLiteral expectedConstraints.maxValue type}}));{{/if}} + {{#if (hasProperty expectedConstraints "notValue")}}VerifyOrReturn(CheckConstraintNotValue("{{name}}", {{>itemValue}}, {{asTypedLiteral expectedConstraints.notValue type}}));{{/if}} + {{/if}} + + {{#if saveAs}} + {{#if (isString type)}} + if ({{saveAs}}Buffer != nullptr) + { + chip::Platform::MemoryFree({{saveAs}}Buffer); + } + {{saveAs}}Buffer = static_cast<{{#if (isOctetString type)}}uint8_t{{else}}char{{/if}} *>(chip::Platform::MemoryAlloc({{>itemValue}}.size())); + memcpy({{saveAs}}Buffer, {{>itemValue}}.data(), {{>itemValue}}.size()); + {{saveAs}} = {{chipType}}({{saveAs}}Buffer, {{>itemValue}}.size()); + {{else}} + {{saveAs}} = {{>itemValue}}; + {{/if}} + {{/if}} + {{/chip_tests_item_response_parameters}} + } + {{/if}} + {{/chip_tests_items}} + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + {{! Helper around zapTypeToDecodableClusterObjectType that lets us set the array/nullable/etc context appropriately.}} {{~#*inline "subscribeResponseDataArgument"~}} @@ -190,7 +241,13 @@ class {{filename}}: public TestCommand CHIP_ERROR {{>testCommand}}() { SetIdentity(kIdentity{{asUpperCamelCase identity}}); - return {{command}}({{#chip_tests_item_parameters}}{{#not_first}}, {{/not_first}}{{#if (isString type)}}"{{/if}}{{definedValue}}{{#if (isString type)}}"{{/if}}{{/chip_tests_item_parameters}}); + return {{command}}({{#chip_tests_item_parameters}}{{#not_first}}, {{/not_first}}{{#if (isString type)}}"{{/if~}} + {{~#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}} + {{definedValue}} + {{~/if~}} + {{~#if (isString type)}}"{{/if}}{{/chip_tests_item_parameters}}); } {{else if isWait}} CHIP_ERROR {{>testCommand}}() diff --git a/examples/chip-tool/templates/tests.js b/examples/chip-tool/templates/tests.js index e099c988c9b84f..47b432c12e9d3a 100644 --- a/examples/chip-tool/templates/tests.js +++ b/examples/chip-tool/templates/tests.js @@ -226,6 +226,7 @@ function getTests() 'TestClusterComplexTypes', 'TestConstraints', 'TestDelayCommands', + 'TestDiscovery', 'TestLogCommands', 'TestSaveAs', 'TestConfigVariables', diff --git a/src/app/tests/suites/TestDiscovery.yaml b/src/app/tests/suites/TestDiscovery.yaml new file mode 100644 index 00000000000000..6cbdd4fbfb5de3 --- /dev/null +++ b/src/app/tests/suites/TestDiscovery.yaml @@ -0,0 +1,298 @@ +# 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 Discovery + +config: + endpoint: 0 + discriminator: + type: INT16U + defaultValue: 3840 + vendorId: + type: INT16U + defaultValue: 65521 + productId: + type: INT16U + defaultValue: 32768 + deviceType: + type: INT16U + defaultValue: 5 + +tests: + - label: "Reboot target device" + cluster: "SystemCommands" + command: "Reboot" + arguments: + values: + - name: "discriminator" + value: discriminator + + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + + - label: "Open Commissioning Window" + cluster: "AdministratorCommissioning" + command: "OpenBasicCommissioningWindow" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 120 + + - label: "Check Instance Name" + cluster: "DiscoveryCommands" + command: "FindCommissionable" + response: + values: + - name: "instanceName" + saveAs: deviceInstanceNameBeforeReboot + constraints: + minLength: 16 + maxLength: 16 + isUpperCase: true + isHexString: true + + # TODO: + # Find a way to validate the service type and the service domain + + - label: "Check Hostname" + PICS: "(WIFI || ETH) && !THREAD" + # On macOS the hostname is the device name and because of it this test is disabled for now. + disabled: true + cluster: "DiscoveryCommands" + command: "FindCommissionable" + response: + values: + - name: "hostName" + constraints: + minLength: 12 + maxLength: 12 + isUpperCase: true + isHexString: true + + - label: "Check Hostname" + PICS: "(!WIFI && !ETH) && THREAD" + # On macOS the hostname is the device name and because of it this test is disabled for now. + disabled: true + cluster: "DiscoveryCommands" + command: "FindCommissionable" + response: + values: + - name: "hostName" + constraints: + minLength: 16 + maxLength: 16 + isUpperCase: true + isHexString: true + + # Commissioning Subtypes + + - label: "Check Long Discriminator _L" + cluster: "DiscoveryCommands" + command: "FindCommissionableByLongDiscriminator" + arguments: + values: + - name: "value" + value: discriminator + + - label: "Check Short Discriminator (_S)" + cluster: "DiscoveryCommands" + command: "FindCommissionableByShortDiscriminator" + arguments: + values: + - name: "value" + value: discriminator + + - label: "Check Commissioning Mode (_CM)" + cluster: "DiscoveryCommands" + command: "FindCommissionableByCommissioningMode" + + - label: "Check Vendor ID (_V)" + PICS: VENDOR_SUBTYPE + cluster: "DiscoveryCommands" + command: "FindCommissionableByVendorId" + arguments: + values: + - name: "value" + value: vendorId + + - label: "Check Device Type ID (_T)" + # The device type is not broadcasted by the accessory under CI. + disabled: true + PICS: DEVTYPE_SUBTYPE + cluster: "DiscoveryCommands" + command: "FindCommissionableByDeviceType" + arguments: + values: + - name: "value" + value: deviceType + + # TXT Records + + - label: "TXT key for discriminator (D)" + cluster: "DiscoveryCommands" + command: "FindCommissionable" + response: + values: + - name: "longDiscriminator" + value: discriminator + constraints: + minValue: 0 + maxValue: 4096 + + - label: "TXT key for Vendor ID and Product ID (VP)" + PICS: VP_KEY + cluster: "DiscoveryCommands" + command: "FindCommissionable" + response: + values: + - name: "vendorId" + value: vendorId + + # Maybe it should be a PICS code to differentiate between manufacturer that wants to broadcast the + # product id ? + - label: "TXT key for Vendor ID and Product ID (VP)" + PICS: VP_KEY + optional: true + cluster: "DiscoveryCommands" + command: "FindCommissionable" + response: + values: + - name: "productId" + value: productId + + - label: "Optional TXT key for MRP Retry Interval Idle (CRI)" + PICS: CRI_COMM_DISCOVERY_KEY + cluster: "DiscoveryCommands" + command: "FindCommissionable" + response: + values: + - name: "mrpRetryIntervalIdle" + constraints: + maxValue: 3600000 + + - label: "Optional TXT key for MRP Retry Interval Active (CRA)" + PICS: CRA_COMM_DISCOVERY_KEY + cluster: "DiscoveryCommands" + command: "FindCommissionable" + response: + values: + - name: "mrpRetryIntervalActive" + constraints: + maxValue: 3600000 + + - label: "TXT key for commissioning mode (CM)" + cluster: "DiscoveryCommands" + command: "FindCommissionable" + response: + values: + - name: "commissioningMode" + value: 1 + + - label: "Optional TXT key for device type (DT)" + disabled: true + PICS: DT_KEY + cluster: "DiscoveryCommands" + command: "FindCommissionable" + response: + values: + - name: "deviceType" + value: deviceType + constraints: + # The specification says this is a number expressed as , but it seems like it can goes + # up to 0xBFFF (49151). + maxValue: 999 + + - label: "Optional TXT key for device name (DN)" + PICS: DN_KEY + cluster: "DiscoveryCommands" + command: "FindCommissionable" + response: + values: + - name: "deviceName" + constraints: + maxLength: 32 + + - label: "Optional TXT key for rotating device identifier (RI)" + PICS: RI_KEY + cluster: "DiscoveryCommands" + command: "FindCommissionable" + response: + values: + - name: "rotatingIdLen" + constraints: + maxValue: 100 + + - label: "Optional TXT key for pairing hint (PH)" + PICS: PH_KEY + cluster: "DiscoveryCommands" + command: "FindCommissionable" + response: + values: + - name: "pairingHint" + notValue: 0 + + - label: "Optional TXT key for pairing instructions (PI)" + PICS: PI_KEY + cluster: "DiscoveryCommands" + command: "FindCommissionable" + response: + values: + - name: "pairingInstruction" + constraints: + maxLength: 128 + + - label: "Check IPs" + cluster: "DiscoveryCommands" + command: "FindCommissionable" + response: + values: + - name: "numIPs" + constraints: + minValue: 1 + + - label: "Reboot target device" + cluster: "SystemCommands" + command: "Reboot" + arguments: + values: + - name: "discriminator" + value: discriminator + + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + + - label: "Open Commissioning Window" + cluster: "AdministratorCommissioning" + command: "OpenBasicCommissioningWindow" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 120 + + - label: "Check Instance Name" + cluster: "DiscoveryCommands" + command: "FindCommissionable" + response: + values: + - name: "instanceName" + constraints: + minLength: 16 + maxLength: 16 + isUpperCase: true + isHexString: true + notValue: deviceInstanceNameBeforeReboot diff --git a/src/app/tests/suites/certification/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml index cb797a2052bf9d..e6939e2e2db644 100644 --- a/src/app/tests/suites/certification/PICS.yaml +++ b/src/app/tests/suites/certification/PICS.yaml @@ -21,9 +21,12 @@ PICS: - label: "Does the device support discovery over WiFi?" id: WIFI - - label: "Does the device support discover over THREAD" + - label: "Does the device support discovery over THREAD" id: THREAD + - label: "Does the device support discovery over Ethernet?" + id: ETH + - label: "Does the device support manufacturing date" id: MANF_DATE @@ -225,3 +228,41 @@ PICS: - label: "Does the device implement receiving the OnWithTimedOff command?" id: CR_ONWITHTIMEOFF + + - label: "Does Dnssd advertisment broadcast Vendor ID" + id: VENDOR_SUBTYPE + + - label: "Does Dnssd advertisment broadcast Device Type ID" + id: DEVTYPE_SUBTYPE + + - label: + "The optional key CRI indicates the MRP_RETRY_INTERVAL_IDLE of the + Node" + id: CRI_COMM_DISCOVERY_KEY + + - label: + "The optional key CRA indicates the MRP_RETRY_INTERVAL_ACTIVE of the + Node" + id: CRA_COMM_DISCOVERY_KEY + + - label: + "The optional key VP, if present, MAY provide Vendor ID and Product ID + information of the device" + id: VP_KEY + + - label: + "The optional key DT MAY provide the publisher’s primary device type." + id: DT_KEY + + - label: "The optional key DN MAY provide a device advertisement name." + id: DN_KEY + + - label: "The optional key RI MAY provide a Rotating Device Identifier." + id: RI_KEY + + - label: "The optional key PH MAY provide a pairing hint." + id: PH_KEY + + - label: + "The optional key PI MAY provide additional information for pairing." + id: PI_KEY diff --git a/src/app/tests/suites/commands/discovery/BUILD.gn b/src/app/tests/suites/commands/discovery/BUILD.gn new file mode 100644 index 00000000000000..8183767c470a36 --- /dev/null +++ b/src/app/tests/suites/commands/discovery/BUILD.gn @@ -0,0 +1,32 @@ +# 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("discovery") { + output_name = "libDiscoveryCommands" + + sources = [ + "DiscoveryCommands.cpp", + "DiscoveryCommands.h", + ] + + cflags = [ "-Wconversion" ] + + public_deps = [ + "${chip_root}/src/lib/dnssd", + "${chip_root}/src/lib/support", + ] +} diff --git a/src/app/tests/suites/commands/discovery/DiscoveryCommands.cpp b/src/app/tests/suites/commands/discovery/DiscoveryCommands.cpp new file mode 100644 index 00000000000000..ceedf0c34410c9 --- /dev/null +++ b/src/app/tests/suites/commands/discovery/DiscoveryCommands.cpp @@ -0,0 +1,157 @@ +/* + * 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 "DiscoveryCommands.h" + +#include +#include + +CHIP_ERROR DiscoveryCommands::FindCommissionable() +{ + ReturnErrorOnFailure(SetupDiscoveryCommands()); + + chip::Dnssd::DiscoveryFilter filter(chip::Dnssd::DiscoveryFilterType::kNone, (uint64_t) 0); + return mDNSResolver.FindCommissionableNodes(filter); +} + +CHIP_ERROR DiscoveryCommands::FindCommissionableByShortDiscriminator(uint64_t value) +{ + ReturnErrorOnFailure(SetupDiscoveryCommands()); + + uint64_t shortDiscriminator = static_cast((value >> 8) & 0x0F); + chip::Dnssd::DiscoveryFilter filter(chip::Dnssd::DiscoveryFilterType::kShortDiscriminator, shortDiscriminator); + return mDNSResolver.FindCommissionableNodes(filter); +} + +CHIP_ERROR DiscoveryCommands::FindCommissionableByLongDiscriminator(uint64_t value) +{ + ReturnErrorOnFailure(SetupDiscoveryCommands()); + + chip::Dnssd::DiscoveryFilter filter(chip::Dnssd::DiscoveryFilterType::kLongDiscriminator, value); + return mDNSResolver.FindCommissionableNodes(filter); +} + +CHIP_ERROR DiscoveryCommands::FindCommissionableByCommissioningMode() +{ + ReturnErrorOnFailure(SetupDiscoveryCommands()); + + chip::Dnssd::DiscoveryFilter filter(chip::Dnssd::DiscoveryFilterType::kCommissioningMode); + return mDNSResolver.FindCommissionableNodes(filter); +} + +CHIP_ERROR DiscoveryCommands::FindCommissionableByVendorId(uint64_t value) +{ + ReturnErrorOnFailure(SetupDiscoveryCommands()); + + chip::Dnssd::DiscoveryFilter filter(chip::Dnssd::DiscoveryFilterType::kVendorId, value); + return mDNSResolver.FindCommissionableNodes(filter); +} + +CHIP_ERROR DiscoveryCommands::FindCommissionableByDeviceType(uint64_t value) +{ + ReturnErrorOnFailure(SetupDiscoveryCommands()); + + chip::Dnssd::DiscoveryFilter filter(chip::Dnssd::DiscoveryFilterType::kDeviceType, value); + return mDNSResolver.FindCommissionableNodes(filter); +} + +CHIP_ERROR DiscoveryCommands::FindCommissioner() +{ + ReturnErrorOnFailure(SetupDiscoveryCommands()); + + chip::Dnssd::DiscoveryFilter filter(chip::Dnssd::DiscoveryFilterType::kCommissioner, 1); + return mDNSResolver.FindCommissioners(filter); +} + +CHIP_ERROR DiscoveryCommands::FindCommissionerByVendorId(uint64_t value) +{ + ReturnErrorOnFailure(SetupDiscoveryCommands()); + + chip::Dnssd::DiscoveryFilter filter(chip::Dnssd::DiscoveryFilterType::kVendorId, value); + return mDNSResolver.FindCommissioners(filter); +} + +CHIP_ERROR DiscoveryCommands::FindCommissionerByDeviceType(uint64_t value) +{ + ReturnErrorOnFailure(SetupDiscoveryCommands()); + + chip::Dnssd::DiscoveryFilter filter(chip::Dnssd::DiscoveryFilterType::kDeviceType, value); + return mDNSResolver.FindCommissioners(filter); +} + +CHIP_ERROR DiscoveryCommands::SetupDiscoveryCommands() +{ + ReturnErrorOnFailure(TearDownDiscoveryCommands()); + + ReturnErrorOnFailure(mDNSResolver.Init(chip::DeviceLayer::UDPEndPointManager())); + mDNSResolver.SetResolverDelegate(this); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DiscoveryCommands::TearDownDiscoveryCommands() +{ + mDNSResolver.Shutdown(); + return CHIP_NO_ERROR; +} + +void DiscoveryCommands::OnNodeDiscoveryComplete(const chip::Dnssd::DiscoveredNodeData & nodeData) +{ + // TODO: If multiple results are found for the same filter, then the test result depends + // on which result comes first. At the moment, the code assume that there is only + // a single match on the network, but if that's not enough, there may be a need + // to implement some sort of list that is built for a given duration before returning + ReturnOnFailure(TearDownDiscoveryCommands()); + + nodeData.LogDetail(); + + DiscoveryCommandResult data; + data.hostName = chip::CharSpan(nodeData.hostName, strlen(nodeData.hostName)); + data.instanceName = chip::CharSpan(nodeData.instanceName, strlen(nodeData.instanceName)); + data.longDiscriminator = nodeData.longDiscriminator; + data.shortDiscriminator = ((nodeData.longDiscriminator >> 8) & 0x0F); + data.vendorId = nodeData.vendorId; + data.productId = nodeData.productId; + data.commissioningMode = nodeData.commissioningMode; + data.deviceType = nodeData.deviceType; + data.deviceName = chip::CharSpan(nodeData.deviceName, strlen(nodeData.deviceName)); + data.rotatingId = chip::ByteSpan(nodeData.rotatingId, nodeData.rotatingIdLen); + data.rotatingIdLen = nodeData.rotatingIdLen; + data.pairingHint = nodeData.pairingHint; + data.pairingInstruction = chip::CharSpan(nodeData.pairingInstruction, strlen(nodeData.pairingInstruction)); + data.supportsTcp = nodeData.supportsTcp; + data.port = nodeData.port; + + if (!chip::CanCastTo(nodeData.numIPs)) + { + ChipLogError(chipTool, "Too many ips."); + return; + } + data.numIPs = static_cast(nodeData.numIPs); + + if (nodeData.mrpRetryIntervalIdle.HasValue()) + { + data.mrpRetryIntervalIdle.SetValue(nodeData.mrpRetryIntervalIdle.Value().count()); + } + + if (nodeData.mrpRetryIntervalActive.HasValue()) + { + data.mrpRetryIntervalActive.SetValue(nodeData.mrpRetryIntervalActive.Value().count()); + } + + OnDiscoveryCommandsResults(data); +} diff --git a/src/app/tests/suites/commands/discovery/DiscoveryCommands.h b/src/app/tests/suites/commands/discovery/DiscoveryCommands.h new file mode 100644 index 00000000000000..a43530b3713c00 --- /dev/null +++ b/src/app/tests/suites/commands/discovery/DiscoveryCommands.h @@ -0,0 +1,76 @@ +/* + * 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 + +struct DiscoveryCommandResult +{ + chip::CharSpan hostName; + chip::CharSpan instanceName; + uint16_t longDiscriminator; + uint8_t shortDiscriminator; + uint16_t vendorId; + uint16_t productId; + uint8_t commissioningMode; + uint16_t deviceType; + chip::CharSpan deviceName; + chip::ByteSpan rotatingId; + uint64_t rotatingIdLen; + uint16_t pairingHint; + chip::CharSpan pairingInstruction; + bool supportsTcp; + uint8_t numIPs; + uint16_t port; + chip::Optional mrpRetryIntervalIdle; + chip::Optional mrpRetryIntervalActive; +}; + +class DiscoveryCommands : public chip::Dnssd::ResolverDelegate +{ +public: + DiscoveryCommands(){}; + virtual ~DiscoveryCommands(){}; + + virtual CHIP_ERROR ContinueOnChipMainThread() = 0; + + CHIP_ERROR FindCommissionable(); + CHIP_ERROR FindCommissionableByShortDiscriminator(uint64_t value); + CHIP_ERROR FindCommissionableByLongDiscriminator(uint64_t value); + CHIP_ERROR FindCommissionableByCommissioningMode(); + CHIP_ERROR FindCommissionableByVendorId(uint64_t vendorId); + CHIP_ERROR FindCommissionableByDeviceType(uint64_t deviceType); + + CHIP_ERROR FindCommissioner(); + CHIP_ERROR FindCommissionerByVendorId(uint64_t vendorId); + CHIP_ERROR FindCommissionerByDeviceType(uint64_t deviceType); + + CHIP_ERROR SetupDiscoveryCommands(); + CHIP_ERROR TearDownDiscoveryCommands(); + virtual void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData){}; + + /////////// ResolverDelegate Interface ///////// + void OnNodeIdResolved(const chip::Dnssd::ResolvedNodeData & nodeData) override{}; + void OnNodeIdResolutionFailed(const chip::PeerId & peerId, CHIP_ERROR error) override{}; + void OnNodeDiscoveryComplete(const chip::Dnssd::DiscoveredNodeData & nodeData) override; + +private: + chip::Dnssd::ResolverProxy mDNSResolver; +}; diff --git a/src/app/zap-templates/common/simulated-clusters/clusters/DiscoveryCommands.js b/src/app/zap-templates/common/simulated-clusters/clusters/DiscoveryCommands.js new file mode 100644 index 00000000000000..a154363b0c6ea1 --- /dev/null +++ b/src/app/zap-templates/common/simulated-clusters/clusters/DiscoveryCommands.js @@ -0,0 +1,162 @@ +/* + * + * 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 declares test suite utility methods for discovery. + * + * Each method declared in this file needs to be implemented on a per-language + * basis and allows exposing methods to the test suites that are not part + * of the regular cluster set of APIs. + * + */ + +const kTypeArgument = { + name : 'type', + type : 'CHAR_STRING', +}; + +const kNumberValueArgument = { + name : 'value', + type : 'INT64U', +}; + +const kStringValueArgument = { + name : 'value', + type : 'CHAR_STRING', +}; + +const kDefaultResponse = { + arguments : [ + { name : 'hostName', type : 'CHAR_STRING', chipType : 'chip::CharSpan' }, // + { name : 'instanceName', type : 'CHAR_STRING', chipType : 'chip::CharSpan' }, // + { name : 'longDiscriminator', type : 'INT16U', chipType : 'uint16_t' }, // + { name : 'shortDiscriminator', type : 'INT8U', chipType : 'uint8_t' }, // + { name : 'vendorId', type : 'INT16U', chipType : 'uint16_t' }, // + { name : 'productId', type : 'INT16U', chipType : 'uint16_t' }, // + { name : 'commissioningMode', type : 'INT8U', chipType : 'uint8_t' }, // + { name : 'deviceType', type : 'INT16U', chipType : 'uint16_t' }, // + { name : 'deviceName', type : 'CHAR_STRING' }, // + { name : 'rotatingId', type : 'OCTET_STRING', chipType : 'chip::ByteSpan' }, // + { name : 'rotatingIdLen', type : 'INT64U', chipType : 'uint64_t' }, // + { name : 'pairingHint', type : 'INT16U', chipType : 'uint16_t' }, // + { name : 'pairingInstruction', type : 'CHAR_STRING' }, // + { name : 'supportsTcp', type : 'BOOLEAN', chipType : 'bool' }, // + { name : 'numIPs', type : 'INT8U', chipType : 'uint8_t' }, // + { name : 'port', type : 'INT16U', chipType : 'uint16_t' }, // + { name : 'mrpRetryIntervalIdle', type : 'INT32U', chipType : 'uint32_t', isOptional : true }, // + { name : 'mrpRetryIntervalActive', type : 'INT32U', chipType : 'uint32_t', isOptional : true }, // + ] +}; + +// +// Commissionable +// + +const FindCommissionable = { + name : 'FindCommissionable', + arguments : [], + response : kDefaultResponse +}; + +const FindCommissionableByShortDiscriminator = { + name : 'FindCommissionableByShortDiscriminator', + arguments : [ kNumberValueArgument ], + response : kDefaultResponse +}; + +const FindCommissionableByLongDiscriminator = { + name : 'FindCommissionableByLongDiscriminator', + arguments : [ kNumberValueArgument ], + response : kDefaultResponse +}; + +const FindCommissionableByCompressedFabricId = { + name : 'FindOperationalByCompressedFabricId', + arguments : [ kNumberValueArgument ], + response : kDefaultResponse +}; + +const FindCommissionableByCommissioningMode = { + name : 'FindCommissionableByCommissioningMode', + arguments : [], + response : kDefaultResponse +}; + +const FindCommissionableByVendorId = { + name : 'FindCommissionableByVendorId', + arguments : [ kNumberValueArgument ], + response : kDefaultResponse +}; + +const FindCommissionableByDeviceType = { + name : 'FindCommissionableByDeviceType', + arguments : [ kNumberValueArgument ], + response : kDefaultResponse +}; + +const FindCommissionableByName = { + name : 'FindCommissionableByName', + arguments : [ kStringValueArgument ], + response : kDefaultResponse +}; + +// +// Commissioner +// + +const FindCommissioner = { + name : 'FindCommissioner', + arguments : [], + response : kDefaultResponse +}; + +const FindCommissionerByVendorId = { + name : 'FindCommissionableByVendorId', + arguments : [ kNumberValueArgument ], + response : kDefaultResponse +}; + +const FindCommissionerByDeviceType = { + name : 'FindCommissionerByDeviceType', + arguments : [ kNumberValueArgument ], + response : kDefaultResponse +}; + +const commands = [ + // Commissionable + FindCommissionable, + FindCommissionableByShortDiscriminator, + FindCommissionableByLongDiscriminator, + FindCommissionableByCommissioningMode, + FindCommissionableByVendorId, + FindCommissionableByDeviceType, + FindCommissionableByName, + // Commissioner + FindCommissioner, + FindCommissionerByVendorId, + FindCommissionerByDeviceType, +]; + +const DiscoveryCommands = { + name : 'DiscoveryCommands', + commands : commands, +}; + +// +// Module exports +// +exports.cluster = DiscoveryCommands; diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 107c8eb95e9789..5ab94e4a83fded 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -162,6 +162,7 @@ class TestList : public Command printf("TestClusterComplexTypes\n"); printf("TestConstraints\n"); printf("TestDelayCommands\n"); + printf("TestDiscovery\n"); printf("TestLogCommands\n"); printf("TestSaveAs\n"); printf("TestConfigVariables\n"); @@ -265,6 +266,14 @@ class Test_TC_BI_1_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -543,6 +552,14 @@ class Test_TC_BI_2_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -1041,6 +1058,14 @@ class Test_TC_BI_2_2 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -1402,6 +1427,14 @@ class Test_TC_BOOL_1_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -1651,6 +1684,14 @@ class Test_TC_BOOL_2_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -1858,6 +1899,14 @@ class Test_TC_BRAC_1_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -2005,6 +2054,14 @@ class Test_TC_CC_1_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -2789,6 +2846,14 @@ class Test_TC_CC_2_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -7934,6 +7999,14 @@ class Test_TC_CC_3_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_2(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_2(error); @@ -8283,6 +8356,14 @@ class Test_TC_CC_3_2 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_2(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_2(error); @@ -8620,6 +8701,14 @@ class Test_TC_CC_3_3 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_2(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_2(error); @@ -8893,6 +8982,14 @@ class Test_TC_CC_4_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_2(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_2(error); @@ -9153,6 +9250,14 @@ class Test_TC_CC_4_2 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_2(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_2(error); @@ -9552,6 +9657,14 @@ class Test_TC_CC_4_3 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_2(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_2(error); @@ -9825,6 +9938,14 @@ class Test_TC_CC_4_4 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_2(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_2(error); @@ -10066,6 +10187,14 @@ class Test_TC_CC_5_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_2(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_2(error); @@ -10311,6 +10440,14 @@ class Test_TC_CC_5_2 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_2(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_2(error); @@ -10580,6 +10717,14 @@ class Test_TC_CC_5_3 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_2(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_2(error); @@ -10821,6 +10966,14 @@ class Test_TC_CC_6_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_2(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_2(error); @@ -11069,6 +11222,14 @@ class Test_TC_CC_6_2 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_2(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_2(error); @@ -11381,6 +11542,14 @@ class Test_TC_CC_6_3 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_2(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_2(error); @@ -11663,6 +11832,14 @@ class Test_TC_CC_7_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_2(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_2(error); @@ -11950,6 +12127,14 @@ class Test_TC_CC_7_2 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_2(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_2(error); @@ -12287,6 +12472,14 @@ class Test_TC_CC_7_3 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_2(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_2(error); @@ -12560,6 +12753,14 @@ class Test_TC_CC_7_4 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_2(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_2(error); @@ -12845,6 +13046,14 @@ class Test_TC_CC_8_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_2(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_2(error); @@ -13747,6 +13956,14 @@ class Test_TC_CC_9_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_2(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_2(error); @@ -15106,6 +15323,14 @@ class Test_TC_CC_9_2 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_2(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_2(error); @@ -15747,6 +15972,14 @@ class Test_TC_CC_9_3 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_2(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_2(error); @@ -16277,6 +16510,14 @@ class Test_TC_DD_1_5 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -16284,8 +16525,8 @@ class Test_TC_DD_1_5 : public TestCommand CHIP_ERROR TestStep1_0() { SetIdentity(kIdentityAlpha); - return Log("Verify that the onboarding payload for NFC tags SHALL use NDEF URI Record Type Definition as defined by NFC " - "Forum in URI Record Type Definition RTD URI"); + return Log(" Verify that the onboarding payload for NFC tags SHALL use NDEF URI Record Type Definition as defined " + "by NFC Forum in URI Record Type Definition RTD URI"); } }; @@ -16353,6 +16594,14 @@ class Test_TC_DD_1_6 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -16360,21 +16609,21 @@ class Test_TC_DD_1_6 : public TestCommand CHIP_ERROR TestStep1_0() { SetIdentity(kIdentityAlpha); - return Log("Scan the DUTs QR code using a QR code reader"); + return Log(" Scan the DUTs QR code using a QR code reader"); } CHIP_ERROR TestStep1Verification_1() { SetIdentity(kIdentityAlpha); - return Log( - "Verify the QR code gets scanned successfully and the QR code must be of sufficient size and contrast respective to " - "surface material as to be readable with standard readers such as smartphones in normal lighting conditions"); + return Log(" Verify the QR code gets scanned successfully and the QR code must be of sufficient size and contrast " + "respective to surface material as to be readable with standard readers such as smartphones in normal lighting " + "conditions"); } CHIP_ERROR TestStep2Verificaiton_2() { SetIdentity(kIdentityAlpha); - return Log("Verify QR code version is 1 or higher"); + return Log(" Verify QR code version is 1 or higher"); } }; @@ -16438,6 +16687,14 @@ class Test_TC_DD_1_7 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -16445,14 +16702,14 @@ class Test_TC_DD_1_7 : public TestCommand CHIP_ERROR TestPrecondition_0() { SetIdentity(kIdentityAlpha); - return Log("Verify manual pairing code is printed on the device or in additional provided materials"); + return Log(" Verify manual pairing code is printed on the device or in additional provided materials"); } CHIP_ERROR TestStep1_1() { SetIdentity(kIdentityAlpha); - return Log("Verify that the Manual Pairing Code should be printed using a minimum font size of 6 points typically " - "producing a typeface height of 2.1 mm"); + return Log(" Verify that the Manual Pairing Code should be printed using a minimum font size of 6 points " + "typically producing a typeface height of 2.1 mm"); } }; @@ -16516,6 +16773,14 @@ class Test_TC_DD_1_8 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -16523,13 +16788,14 @@ class Test_TC_DD_1_8 : public TestCommand CHIP_ERROR TestStep1_0() { SetIdentity(kIdentityAlpha); - return Log("Scan the device QR code using DUT"); + return Log(" Scan the device QR code using DUT"); } CHIP_ERROR TestStep1Verification_1() { SetIdentity(kIdentityAlpha); - return Log("Verify the DUT is able to scan and parse the QR code successfully to onboard the device onto the CHIP network"); + return Log(" Verify the DUT is able to scan and parse the QR code successfully to onboard the device onto the " + "CHIP network"); } }; @@ -16597,6 +16863,14 @@ class Test_TC_DD_1_9 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -16604,20 +16878,21 @@ class Test_TC_DD_1_9 : public TestCommand CHIP_ERROR TestPrecondition_0() { SetIdentity(kIdentityAlpha); - return Log("Verify that the manual pairing code is printed on the device or in additional provided materials"); + return Log(" Verify that the manual pairing code is printed on the device or in additional provided materials"); } CHIP_ERROR TestStep1_1() { SetIdentity(kIdentityAlpha); - return Log("Provide the 11 digit or 21 digit pairing code from the Device in text speech or any format supported by DUT"); + return Log(" Provide the 11 digit or 21 digit pairing code from the Device in text speech or any format supported " + "by DUT"); } CHIP_ERROR TestStep1Verification_2() { SetIdentity(kIdentityAlpha); - return Log( - "Verify that the manual pairing code can be provided to DUT and parsed to onboard the device onto the CHIP network"); + return Log(" Verify that the manual pairing code can be provided to DUT and parsed to onboard the device onto the " + "CHIP network"); } }; @@ -16763,6 +17038,14 @@ class Test_TC_DM_1_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -17484,6 +17767,14 @@ class Test_TC_DM_3_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -17638,6 +17929,14 @@ class Test_TC_DM_2_2 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -17874,6 +18173,14 @@ class Test_TC_EMR_1_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -18110,6 +18417,14 @@ class Test_TC_ETHDIAG_1_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -18178,6 +18493,14 @@ class Test_TC_ETHDIAG_2_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -18258,6 +18581,14 @@ class Test_TC_FLW_1_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -18473,6 +18804,14 @@ class Test_TC_FLW_2_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -18969,6 +19308,14 @@ class Test_TC_FLW_2_2 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -19123,6 +19470,14 @@ class Test_TC_ILL_1_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -19388,6 +19743,14 @@ class Test_TC_LVL_1_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -19742,6 +20105,14 @@ class Test_TC_LVL_2_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_3(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_3(error); @@ -20343,6 +20714,14 @@ class Test_TC_LVL_2_2 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -20956,6 +21335,14 @@ class Test_TC_LVL_3_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -21473,6 +21860,14 @@ class Test_TC_LVL_4_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -22009,6 +22404,14 @@ class Test_TC_LVL_5_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_4(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_4(error); @@ -22427,6 +22830,14 @@ class Test_TC_LVL_6_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_4(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_4(error); @@ -22769,6 +23180,14 @@ class Test_TC_MC_1_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -22936,6 +23355,14 @@ class Test_TC_MC_2_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -23030,6 +23457,14 @@ class Test_TC_MC_3_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -23097,6 +23532,14 @@ class Test_TC_MC_3_2 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -23164,6 +23607,14 @@ class Test_TC_MC_3_3 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -23231,6 +23682,14 @@ class Test_TC_MC_3_4 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -23298,6 +23757,14 @@ class Test_TC_MC_3_5 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -23365,6 +23832,14 @@ class Test_TC_MC_3_6 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -23432,6 +23907,14 @@ class Test_TC_MC_3_7 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -23499,6 +23982,14 @@ class Test_TC_MC_3_8 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -23566,6 +24057,14 @@ class Test_TC_MC_3_9 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -23633,6 +24132,14 @@ class Test_TC_MC_3_10 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -23700,6 +24207,14 @@ class Test_TC_MC_3_11 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -23771,6 +24286,14 @@ class Test_TC_MC_5_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -23878,6 +24401,14 @@ class Test_TC_MC_5_2 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -23891,7 +24422,7 @@ class Test_TC_MC_5_2 : public TestCommand CHIP_ERROR TestLogACommand_1() { SetIdentity(kIdentityAlpha); - return UserPrompt("verify that the channel has changed on the device."); + return UserPrompt(" verify that the channel has changed on the device."); } }; @@ -23955,6 +24486,14 @@ class Test_TC_MC_5_3 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -23968,7 +24507,7 @@ class Test_TC_MC_5_3 : public TestCommand CHIP_ERROR TestLogACommand_1() { SetIdentity(kIdentityAlpha); - return UserPrompt("verify that the channel has changed on the device"); + return UserPrompt(" verify that the channel has changed on the device"); } }; @@ -24048,6 +24587,14 @@ class Test_TC_MC_6_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_3(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_3(error); @@ -24071,13 +24618,13 @@ class Test_TC_MC_6_1 : public TestCommand CHIP_ERROR TestLogACommand_1() { SetIdentity(kIdentityAlpha); - return UserPrompt("Verify that media is paused"); + return UserPrompt(" Verify that media is paused"); } CHIP_ERROR TestLogACommand_2() { SetIdentity(kIdentityAlpha); - return UserPrompt("Physically verify that the media is playing"); + return UserPrompt(" Physically verify that the media is playing"); } CHIP_ERROR TestReadsThePlaybackStateAttribute_3() @@ -24107,13 +24654,13 @@ class Test_TC_MC_6_1 : public TestCommand CHIP_ERROR TestLogACommand_4() { SetIdentity(kIdentityAlpha); - return UserPrompt("Physically verify that the media is paused"); + return UserPrompt(" Physically verify that the media is paused"); } CHIP_ERROR TestLogACommand_5() { SetIdentity(kIdentityAlpha); - return UserPrompt("Physically verify that the media is stoped"); + return UserPrompt(" Physically verify that the media is stoped"); } }; @@ -24205,6 +24752,14 @@ class Test_TC_MC_6_2 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_3(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_3(error); @@ -24228,13 +24783,13 @@ class Test_TC_MC_6_2 : public TestCommand CHIP_ERROR TestLogACommand_1() { SetIdentity(kIdentityAlpha); - return UserPrompt("Verify that media is paused"); + return UserPrompt(" Verify that media is paused"); } CHIP_ERROR TestLogACommand_2() { SetIdentity(kIdentityAlpha); - return UserPrompt("Physically verify that the media is playing"); + return UserPrompt(" Physically verify that the media is playing"); } CHIP_ERROR TestReadsTheCurrentStateAttribute_3() @@ -24264,31 +24819,31 @@ class Test_TC_MC_6_2 : public TestCommand CHIP_ERROR TestLogACommand_4() { SetIdentity(kIdentityAlpha); - return UserPrompt("Physically verify that the media is started over"); + return UserPrompt(" Physically verify that the media is started over"); } CHIP_ERROR TestLogACommand_5() { SetIdentity(kIdentityAlpha); - return UserPrompt("Verify that the next media item in the queue has been loaded"); + return UserPrompt(" Verify that the next media item in the queue has been loaded"); } CHIP_ERROR TestLogACommand_6() { SetIdentity(kIdentityAlpha); - return UserPrompt("Verify that the previous media item in the queue has been loaded"); + return UserPrompt(" Verify that the previous media item in the queue has been loaded"); } CHIP_ERROR TestLogACommand_7() { SetIdentity(kIdentityAlpha); - return UserPrompt("Verify that the media has skipped forward 10 seconds"); + return UserPrompt(" Verify that the media has skipped forward 10 seconds"); } CHIP_ERROR TestLogACommand_8() { SetIdentity(kIdentityAlpha); - return UserPrompt("Verify that the media has skipped backward 10 seconds"); + return UserPrompt(" Verify that the media has skipped backward 10 seconds"); } }; @@ -24360,6 +24915,14 @@ class Test_TC_MC_6_3 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -24373,19 +24936,19 @@ class Test_TC_MC_6_3 : public TestCommand CHIP_ERROR TestLogACommand_1() { SetIdentity(kIdentityAlpha); - return UserPrompt("Verify that media is paused"); + return UserPrompt(" Verify that media is paused"); } CHIP_ERROR TestLogACommand_2() { SetIdentity(kIdentityAlpha); - return UserPrompt("Verify that the media has moved to 10 seconds from the starting point."); + return UserPrompt(" Verify that the media has moved to 10 seconds from the starting point."); } CHIP_ERROR TestLogACommand_3() { SetIdentity(kIdentityAlpha); - return UserPrompt("User prompt needed to enter the value beyond the furthest valid position"); + return UserPrompt(" User prompt needed to enter the value beyond the furthest valid position"); } }; @@ -24481,6 +25044,14 @@ class Test_TC_MC_6_4 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_2(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_2(error); @@ -24524,7 +25095,7 @@ class Test_TC_MC_6_4 : public TestCommand CHIP_ERROR TestLogACommand_1() { SetIdentity(kIdentityAlpha); - return UserPrompt("Verify that media is paused"); + return UserPrompt(" Verify that media is paused"); } CHIP_ERROR TestReadsThePlaybackSpeedAttributeFromTheDut_2() @@ -24554,7 +25125,7 @@ class Test_TC_MC_6_4 : public TestCommand CHIP_ERROR TestLogACommand_3() { SetIdentity(kIdentityAlpha); - return UserPrompt("Verify that the media is playing"); + return UserPrompt(" Verify that the media is playing"); } CHIP_ERROR TestReadsTheCurrentStateAttribute_4() @@ -24584,13 +25155,13 @@ class Test_TC_MC_6_4 : public TestCommand CHIP_ERROR TestLogACommand_5() { SetIdentity(kIdentityAlpha); - return UserPrompt("Verify that the media play speed has increased"); + return UserPrompt(" Verify that the media play speed has increased"); } CHIP_ERROR TestLogACommand_6() { SetIdentity(kIdentityAlpha); - return UserPrompt("Verify that the media play has reversed direction"); + return UserPrompt(" Verify that the media play has reversed direction"); } CHIP_ERROR TestReadsTheCurrentStateAttribute_7() @@ -24620,13 +25191,13 @@ class Test_TC_MC_6_4 : public TestCommand CHIP_ERROR TestLogACommand_8() { SetIdentity(kIdentityAlpha); - return UserPrompt("Verify that the media play has reversed direction"); + return UserPrompt(" Verify that the media play has reversed direction"); } CHIP_ERROR TestLogACommand_9() { SetIdentity(kIdentityAlpha); - return UserPrompt("Verify that the media is has resumed playing forward at the default speed"); + return UserPrompt(" Verify that the media is has resumed playing forward at the default speed"); } }; @@ -24686,6 +25257,14 @@ class Test_TC_MC_7_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -24753,6 +25332,14 @@ class Test_TC_MC_7_2 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -24830,6 +25417,14 @@ class Test_TC_MC_8_1 : public TestCommand uint8_t currentTarget; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -24998,6 +25593,14 @@ class Test_TC_MC_9_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_2(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_2(error); @@ -25071,7 +25674,7 @@ class Test_TC_MC_9_1 : public TestCommand CHIP_ERROR TestPrecondition_1() { SetIdentity(kIdentityAlpha); - return Log("DUT has one or more Content Apps available"); + return Log(" DUT has one or more Content Apps available"); } CHIP_ERROR TestReadsTheVendorNameAttribute_2() @@ -25290,6 +25893,14 @@ class Test_TC_OCC_1_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -25527,6 +26138,14 @@ class Test_TC_OCC_2_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -25915,6 +26534,14 @@ class Test_TC_OCC_2_2 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -26089,6 +26716,14 @@ class Test_TC_OO_1_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_2(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_2(error); @@ -26517,6 +27152,14 @@ class Test_TC_OO_2_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -27127,6 +27770,14 @@ class Test_TC_OO_2_2 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_2(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_2(error); @@ -28020,6 +28671,14 @@ class Test_TC_OO_2_3 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_3(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_3(error); @@ -29518,6 +30177,14 @@ class Test_TC_PS_1_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -29762,6 +30429,14 @@ class Test_TC_PRS_1_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -29962,6 +30637,14 @@ class Test_TC_PRS_2_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -30343,6 +31026,14 @@ class Test_TC_PCC_1_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -30739,6 +31430,14 @@ class Test_TC_PCC_2_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -32504,6 +33203,14 @@ class Test_TC_PCC_2_2 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -32742,6 +33449,14 @@ class Test_TC_PCC_2_3 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -33102,6 +33817,14 @@ class Test_TC_RH_1_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -33284,6 +34007,14 @@ class Test_TC_RH_2_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -33510,6 +34241,14 @@ class Test_TC_RH_2_2 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -33670,6 +34409,14 @@ class Test_TC_SWTCH_2_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -34090,6 +34837,14 @@ class Test_TC_SWTCH_2_2 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_3(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_3(error); @@ -34123,13 +34878,13 @@ class Test_TC_SWTCH_2_2 : public TestCommand CHIP_ERROR TestUserInteractionNeeded_1() { SetIdentity(kIdentityAlpha); - return UserPrompt("Set up subscription to SwitchLatched event"); + return UserPrompt(" Set up subscription to SwitchLatched event"); } CHIP_ERROR TestUserInteractionNeeded_2() { SetIdentity(kIdentityAlpha); - return UserPrompt("Operator sets switch to first position"); + return UserPrompt(" Operator sets switch to first position"); } CHIP_ERROR TestReadCurrentPositionAttribute_3() @@ -34159,19 +34914,19 @@ class Test_TC_SWTCH_2_2 : public TestCommand CHIP_ERROR TestUserInteractionNeeded_4() { SetIdentity(kIdentityAlpha); - return UserPrompt("Operator sets switch to second position"); + return UserPrompt(" Operator sets switch to second position"); } CHIP_ERROR TestUserInteractionNeeded_5() { SetIdentity(kIdentityAlpha); - return UserPrompt("Set up subscription to InitialPress event"); + return UserPrompt(" Set up subscription to InitialPress event"); } CHIP_ERROR TestUserInteractionNeeded_6() { SetIdentity(kIdentityAlpha); - return UserPrompt("Operator does not operate switch"); + return UserPrompt(" Operator does not operate switch"); } CHIP_ERROR TestReadCurrentPositionAttribute_7() @@ -34201,43 +34956,43 @@ class Test_TC_SWTCH_2_2 : public TestCommand CHIP_ERROR TestUserInteractionNeeded_8() { SetIdentity(kIdentityAlpha); - return UserPrompt("Operator sets switch to second position"); + return UserPrompt(" Operator sets switch to second position"); } CHIP_ERROR TestUserInteractionNeeded_9() { SetIdentity(kIdentityAlpha); - return UserPrompt("Operator does not operate switch (release switch)"); + return UserPrompt(" Operator does not operate switch (release switch)"); } CHIP_ERROR TestUserInteractionNeeded_10() { SetIdentity(kIdentityAlpha); - return UserPrompt("Set up subscription to InitialPress and ShortRelease events"); + return UserPrompt(" Set up subscription to InitialPress and ShortRelease events"); } CHIP_ERROR TestUserInteractionNeeded_11() { SetIdentity(kIdentityAlpha); - return UserPrompt("Operator does not operate switch"); + return UserPrompt(" Operator does not operate switch"); } CHIP_ERROR TestUserInteractionNeeded_12() { SetIdentity(kIdentityAlpha); - return UserPrompt("Operator operates switch (press briefly)"); + return UserPrompt(" Operator operates switch (press briefly)"); } CHIP_ERROR TestUserInteractionNeeded_13() { SetIdentity(kIdentityAlpha); - return UserPrompt("Operator releases switch"); + return UserPrompt(" Operator releases switch"); } CHIP_ERROR TestUserInteractionNeeded_14() { SetIdentity(kIdentityAlpha); - return UserPrompt("Operator operates switch for 5 seconds"); + return UserPrompt(" Operator operates switch for 5 seconds"); } CHIP_ERROR TestWait3000ms_15() @@ -34249,37 +35004,37 @@ class Test_TC_SWTCH_2_2 : public TestCommand CHIP_ERROR TestUserInteractionNeeded_16() { SetIdentity(kIdentityAlpha); - return UserPrompt("Operator releases switch"); + return UserPrompt(" Operator releases switch"); } CHIP_ERROR TestUserInteractionNeeded_17() { SetIdentity(kIdentityAlpha); - return UserPrompt("Set up subscription to InitialPress, LongPress, ShortRelease, LongRelease events"); + return UserPrompt(" Set up subscription to InitialPress, LongPress, ShortRelease, LongRelease events"); } CHIP_ERROR TestUserInteractionNeeded_18() { SetIdentity(kIdentityAlpha); - return UserPrompt("Operator does not operate switch"); + return UserPrompt(" Operator does not operate switch"); } CHIP_ERROR TestUserInteractionNeeded_19() { SetIdentity(kIdentityAlpha); - return UserPrompt("Operator operates switch (press briefly)"); + return UserPrompt(" Operator operates switch (press briefly)"); } CHIP_ERROR TestUserInteractionNeeded_20() { SetIdentity(kIdentityAlpha); - return UserPrompt("Operator releases switch"); + return UserPrompt(" Operator releases switch"); } CHIP_ERROR TestUserInteractionNeeded_21() { SetIdentity(kIdentityAlpha); - return UserPrompt("Operator operates switch for 5 seconds"); + return UserPrompt(" Operator operates switch for 5 seconds"); } CHIP_ERROR TestWait3000ms_22() @@ -34291,91 +35046,92 @@ class Test_TC_SWTCH_2_2 : public TestCommand CHIP_ERROR TestUserInteractionNeeded_23() { SetIdentity(kIdentityAlpha); - return UserPrompt("Operator releases switch"); + return UserPrompt(" Operator releases switch"); } CHIP_ERROR TestUserInteractionNeeded_24() { SetIdentity(kIdentityAlpha); - return UserPrompt("Set up subscription to InitialPress, ShortRelease, MultiPressOngoing, MultiPressComplete events"); + return UserPrompt( + " Set up subscription to InitialPress, ShortRelease, MultiPressOngoing, MultiPressComplete events"); } CHIP_ERROR TestUserInteractionNeeded_25() { SetIdentity(kIdentityAlpha); - return UserPrompt("Operator does not operate switch"); + return UserPrompt(" Operator does not operate switch"); } CHIP_ERROR TestUserInteractionNeeded_26() { SetIdentity(kIdentityAlpha); - return UserPrompt("Operator operates switch (press briefly)"); + return UserPrompt(" Operator operates switch (press briefly)"); } CHIP_ERROR TestUserInteractionNeeded_27() { SetIdentity(kIdentityAlpha); - return UserPrompt("Operator releases switch"); + return UserPrompt(" Operator releases switch"); } CHIP_ERROR TestUserInteractionNeeded_28() { SetIdentity(kIdentityAlpha); - return UserPrompt("Operator operates switch (press briefly)"); + return UserPrompt(" Operator operates switch (press briefly)"); } CHIP_ERROR TestUserInteractionNeeded_29() { SetIdentity(kIdentityAlpha); - return UserPrompt("Operator releases switch"); + return UserPrompt(" Operator releases switch"); } CHIP_ERROR TestUserInteractionNeeded_30() { SetIdentity(kIdentityAlpha); - return UserPrompt("Operator operates switch again (press briefly)"); + return UserPrompt(" Operator operates switch again (press briefly)"); } CHIP_ERROR TestUserInteractionNeeded_31() { SetIdentity(kIdentityAlpha); - return UserPrompt("Operator releases switch"); + return UserPrompt(" Operator releases switch"); } CHIP_ERROR TestUserInteractionNeeded_32() { SetIdentity(kIdentityAlpha); - return UserPrompt("Operator operates switch again (press briefly)"); + return UserPrompt(" Operator operates switch again (press briefly)"); } CHIP_ERROR TestUserInteractionNeeded_33() { SetIdentity(kIdentityAlpha); - return UserPrompt("Operator releases switch"); + return UserPrompt(" Operator releases switch"); } CHIP_ERROR TestUserInteractionNeeded_34() { SetIdentity(kIdentityAlpha); - return UserPrompt("Operator operates switch again (press briefly)"); + return UserPrompt(" Operator operates switch again (press briefly)"); } CHIP_ERROR TestUserInteractionNeeded_35() { SetIdentity(kIdentityAlpha); - return UserPrompt("Operator releases switch"); + return UserPrompt(" Operator releases switch"); } CHIP_ERROR TestUserInteractionNeeded_36() { SetIdentity(kIdentityAlpha); - return UserPrompt("Operator operates switch again (press briefly)"); + return UserPrompt(" Operator operates switch again (press briefly)"); } CHIP_ERROR TestUserInteractionNeeded_37() { SetIdentity(kIdentityAlpha); - return UserPrompt("Operator releases switch"); + return UserPrompt(" Operator releases switch"); } }; @@ -34456,6 +35212,14 @@ class Test_TC_TM_1_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -34700,6 +35464,14 @@ class Test_TC_TM_2_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -34854,6 +35626,14 @@ class Test_TC_TM_2_2 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -35007,6 +35787,14 @@ class Test_TC_TSTAT_1_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -35490,6 +36278,14 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -38051,6 +38847,14 @@ class Test_TC_TSTAT_2_2 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -39640,6 +40444,14 @@ class Test_TC_TSUIC_1_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -39868,6 +40680,14 @@ class Test_TC_TSUIC_2_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -40542,6 +41362,14 @@ class Test_TC_TSUIC_2_2 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -40935,6 +41763,14 @@ class Test_TC_DIAGTH_1_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -41180,6 +42016,14 @@ class Test_TC_WIFIDIAG_1_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -41317,6 +42161,14 @@ class Test_TC_WIFIDIAG_3_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -41415,6 +42267,14 @@ class Test_TC_WNCV_1_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -41965,6 +42825,14 @@ class Test_TC_WNCV_2_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -43889,6 +44757,14 @@ class Test_TC_WNCV_2_2 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -43975,6 +44851,14 @@ class Test_TC_WNCV_2_4 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -44130,6 +45014,14 @@ class Test_TC_WNCV_2_5 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -44279,6 +45171,14 @@ class Test_TC_WNCV_3_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_3(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_3(error); @@ -44447,6 +45347,14 @@ class Test_TC_WNCV_3_2 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_3(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_3(error); @@ -44615,6 +45523,14 @@ class Test_TC_WNCV_3_3 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_3(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_3(error); @@ -44783,6 +45699,14 @@ class TV_TargetNavigatorCluster : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -44988,6 +45912,14 @@ class TV_AudioOutputCluster : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -45220,6 +46152,14 @@ class TV_ApplicationLauncherCluster : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -45446,6 +46386,14 @@ class TV_KeypadInputCluster : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -45559,6 +46507,14 @@ class TV_AccountLoginCluster : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -45723,6 +46679,14 @@ class TV_WakeOnLanCluster : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -45849,6 +46813,14 @@ class TV_ApplicationBasicCluster : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -46189,6 +47161,14 @@ class TV_MediaPlaybackCluster : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -46832,6 +47812,14 @@ class TV_ChannelCluster : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -47058,6 +48046,14 @@ class TV_LowPowerCluster : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -47169,6 +48165,14 @@ class TV_ContentLauncherCluster : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -47449,6 +48453,14 @@ class TV_MediaInputCluster : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -49739,6 +50751,14 @@ class TestCluster : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + 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; @@ -66010,6 +67030,14 @@ class TestClusterComplexTypes : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_7(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_7(error); @@ -66904,6 +67932,14 @@ class TestConstraints : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -67637,6 +68673,14 @@ class TestDelayCommands : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -67654,6 +68698,522 @@ class TestDelayCommands : public TestCommand } }; +class TestDiscovery : public TestCommand +{ +public: + TestDiscovery(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("TestDiscovery", credsIssuerConfig), mTestIndex(0) + { + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); + AddArgument("vendorId", 0, UINT16_MAX, &mVendorId); + AddArgument("productId", 0, UINT16_MAX, &mProductId); + AddArgument("deviceType", 0, UINT16_MAX, &mDeviceType); + } + + ~TestDiscovery() + { + if (deviceInstanceNameBeforeRebootBuffer != nullptr) + { + chip::Platform::MemoryFree(deviceInstanceNameBeforeRebootBuffer); + deviceInstanceNameBeforeRebootBuffer = nullptr; + } + } + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: TestDiscovery\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: TestDiscovery\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 : Reboot target device\n"); + err = TestRebootTargetDevice_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Open Commissioning Window\n"); + err = TestOpenCommissioningWindow_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Check Instance Name\n"); + err = TestCheckInstanceName_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Check Long Discriminator _L\n"); + err = TestCheckLongDiscriminatorL_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Check Short Discriminator (_S)\n"); + err = TestCheckShortDiscriminatorS_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Check Commissioning Mode (_CM)\n"); + err = TestCheckCommissioningModeCm_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Check Vendor ID (_V)\n"); + if (ShouldSkip("VENDOR_SUBTYPE")) + { + NextTest(); + return; + } + err = TestCheckVendorIdV_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TXT key for discriminator (D)\n"); + err = TestTxtKeyForDiscriminatorD_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TXT key for Vendor ID and Product ID (VP)\n"); + if (ShouldSkip("VP_KEY")) + { + NextTest(); + return; + } + err = TestTxtKeyForVendorIdAndProductIdVp_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : TXT key for Vendor ID and Product ID (VP)\n"); + if (ShouldSkip("VP_KEY")) + { + NextTest(); + return; + } + err = TestTxtKeyForVendorIdAndProductIdVp_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Optional TXT key for MRP Retry Interval Idle (CRI)\n"); + if (ShouldSkip("CRI_COMM_DISCOVERY_KEY")) + { + NextTest(); + return; + } + err = TestOptionalTxtKeyForMrpRetryIntervalIdleCri_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Optional TXT key for MRP Retry Interval Active (CRA)\n"); + if (ShouldSkip("CRA_COMM_DISCOVERY_KEY")) + { + NextTest(); + return; + } + err = TestOptionalTxtKeyForMrpRetryIntervalActiveCra_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : TXT key for commissioning mode (CM)\n"); + err = TestTxtKeyForCommissioningModeCm_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Optional TXT key for device name (DN)\n"); + if (ShouldSkip("DN_KEY")) + { + NextTest(); + return; + } + err = TestOptionalTxtKeyForDeviceNameDn_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Optional TXT key for rotating device identifier (RI)\n"); + if (ShouldSkip("RI_KEY")) + { + NextTest(); + return; + } + err = TestOptionalTxtKeyForRotatingDeviceIdentifierRi_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Optional TXT key for pairing hint (PH)\n"); + if (ShouldSkip("PH_KEY")) + { + NextTest(); + return; + } + err = TestOptionalTxtKeyForPairingHintPh_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Optional TXT key for pairing instructions (PI)\n"); + if (ShouldSkip("PI_KEY")) + { + NextTest(); + return; + } + err = TestOptionalTxtKeyForPairingInstructionsPi_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Check IPs\n"); + err = TestCheckIPs_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Reboot target device\n"); + err = TestRebootTargetDevice_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Open Commissioning Window\n"); + err = TestOpenCommissioningWindow_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Check Instance Name\n"); + err = TestCheckInstanceName_22(); + 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 = 23; + + chip::Optional mEndpoint; + chip::Optional mDiscriminator; + chip::Optional mVendorId; + chip::Optional mProductId; + chip::Optional mDeviceType; + + char * deviceInstanceNameBeforeRebootBuffer = nullptr; + chip::CharSpan deviceInstanceNameBeforeReboot; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + if ((mTestIndex - 1) == 3) + { + isExpectedDnssdResult = true; + + VerifyOrReturn(CheckConstraintMinLength("instanceName", nodeData.instanceName.size(), 16)); + VerifyOrReturn(CheckConstraintMaxLength("instanceName", nodeData.instanceName.size(), 16)); + + if (deviceInstanceNameBeforeRebootBuffer != nullptr) + { + chip::Platform::MemoryFree(deviceInstanceNameBeforeRebootBuffer); + } + deviceInstanceNameBeforeRebootBuffer = static_cast(chip::Platform::MemoryAlloc(nodeData.instanceName.size())); + memcpy(deviceInstanceNameBeforeRebootBuffer, nodeData.instanceName.data(), nodeData.instanceName.size()); + deviceInstanceNameBeforeReboot = chip::CharSpan(deviceInstanceNameBeforeRebootBuffer, nodeData.instanceName.size()); + } + if ((mTestIndex - 1) == 4) + { + isExpectedDnssdResult = true; + } + if ((mTestIndex - 1) == 5) + { + isExpectedDnssdResult = true; + } + if ((mTestIndex - 1) == 6) + { + isExpectedDnssdResult = true; + } + if ((mTestIndex - 1) == 7) + { + isExpectedDnssdResult = true; + } + if ((mTestIndex - 1) == 8) + { + isExpectedDnssdResult = true; + + VerifyOrReturn(CheckValue("longDiscriminator", nodeData.longDiscriminator, + mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U)); + + VerifyOrReturn(CheckConstraintMinValue("longDiscriminator", nodeData.longDiscriminator, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("longDiscriminator", nodeData.longDiscriminator, 4096U)); + } + if ((mTestIndex - 1) == 9) + { + isExpectedDnssdResult = true; + + VerifyOrReturn(CheckValue("vendorId", nodeData.vendorId, mVendorId.HasValue() ? mVendorId.Value() : 65521U)); + } + if ((mTestIndex - 1) == 10) + { + isExpectedDnssdResult = true; + + VerifyOrReturn(CheckValue("productId", nodeData.productId, mProductId.HasValue() ? mProductId.Value() : 32768U)); + } + if ((mTestIndex - 1) == 11) + { + isExpectedDnssdResult = true; + + VerifyOrReturn(CheckValuePresent("mrpRetryIntervalIdle", nodeData.mrpRetryIntervalIdle)); + + VerifyOrReturn( + CheckConstraintMaxValue("mrpRetryIntervalIdle", nodeData.mrpRetryIntervalIdle.Value(), 3600000UL)); + } + if ((mTestIndex - 1) == 12) + { + isExpectedDnssdResult = true; + + VerifyOrReturn(CheckValuePresent("mrpRetryIntervalActive", nodeData.mrpRetryIntervalActive)); + + VerifyOrReturn( + CheckConstraintMaxValue("mrpRetryIntervalActive", nodeData.mrpRetryIntervalActive.Value(), 3600000UL)); + } + if ((mTestIndex - 1) == 13) + { + isExpectedDnssdResult = true; + + VerifyOrReturn(CheckValue("commissioningMode", nodeData.commissioningMode, 1)); + } + if ((mTestIndex - 1) == 14) + { + isExpectedDnssdResult = true; + + VerifyOrReturn(CheckConstraintMaxLength("deviceName", nodeData.deviceName.size(), 32)); + } + if ((mTestIndex - 1) == 15) + { + isExpectedDnssdResult = true; + + VerifyOrReturn(CheckConstraintMaxValue("rotatingIdLen", nodeData.rotatingIdLen, 100ULL)); + } + if ((mTestIndex - 1) == 16) + { + isExpectedDnssdResult = true; + } + if ((mTestIndex - 1) == 17) + { + isExpectedDnssdResult = true; + + VerifyOrReturn(CheckConstraintMaxLength("pairingInstruction", nodeData.pairingInstruction.size(), 128)); + } + if ((mTestIndex - 1) == 18) + { + isExpectedDnssdResult = true; + + VerifyOrReturn(CheckConstraintMinValue("numIPs", nodeData.numIPs, 1)); + } + if ((mTestIndex - 1) == 22) + { + isExpectedDnssdResult = true; + + VerifyOrReturn(CheckConstraintMinLength("instanceName", nodeData.instanceName.size(), 16)); + VerifyOrReturn(CheckConstraintMaxLength("instanceName", nodeData.instanceName.size(), 16)); + + VerifyOrReturn(CheckConstraintNotValue("instanceName", nodeData.instanceName, deviceInstanceNameBeforeReboot)); + } + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // + + CHIP_ERROR TestRebootTargetDevice_0() + { + SetIdentity(kIdentityAlpha); + return Reboot(mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U); + } + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_1() + { + SetIdentity(kIdentityAlpha); + return WaitForCommissionee(); + } + + CHIP_ERROR TestOpenCommissioningWindow_2() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; + using RequestType = chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type; + + RequestType request; + request.commissioningTimeout = 120U; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_2(); + }; + + auto failure = [](void * context, CHIP_ERROR error) { + (static_cast(context))->OnFailureResponse_2(error); + }; + + ReturnErrorOnFailure( + chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request, 10000)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_2(CHIP_ERROR error) + { + chip::app::StatusIB status(error); + ThrowFailureResponse(); + } + + void OnSuccessResponse_2() { NextTest(); } + + CHIP_ERROR TestCheckInstanceName_3() + { + SetIdentity(kIdentityAlpha); + return FindCommissionable(); + } + + CHIP_ERROR TestCheckLongDiscriminatorL_4() + { + SetIdentity(kIdentityAlpha); + return FindCommissionableByLongDiscriminator(mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U); + } + + CHIP_ERROR TestCheckShortDiscriminatorS_5() + { + SetIdentity(kIdentityAlpha); + return FindCommissionableByShortDiscriminator(mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U); + } + + CHIP_ERROR TestCheckCommissioningModeCm_6() + { + SetIdentity(kIdentityAlpha); + return FindCommissionableByCommissioningMode(); + } + + CHIP_ERROR TestCheckVendorIdV_7() + { + SetIdentity(kIdentityAlpha); + return FindCommissionableByVendorId(mVendorId.HasValue() ? mVendorId.Value() : 65521U); + } + + CHIP_ERROR TestTxtKeyForDiscriminatorD_8() + { + SetIdentity(kIdentityAlpha); + return FindCommissionable(); + } + + CHIP_ERROR TestTxtKeyForVendorIdAndProductIdVp_9() + { + SetIdentity(kIdentityAlpha); + return FindCommissionable(); + } + + CHIP_ERROR TestTxtKeyForVendorIdAndProductIdVp_10() + { + SetIdentity(kIdentityAlpha); + return FindCommissionable(); + } + + CHIP_ERROR TestOptionalTxtKeyForMrpRetryIntervalIdleCri_11() + { + SetIdentity(kIdentityAlpha); + return FindCommissionable(); + } + + CHIP_ERROR TestOptionalTxtKeyForMrpRetryIntervalActiveCra_12() + { + SetIdentity(kIdentityAlpha); + return FindCommissionable(); + } + + CHIP_ERROR TestTxtKeyForCommissioningModeCm_13() + { + SetIdentity(kIdentityAlpha); + return FindCommissionable(); + } + + CHIP_ERROR TestOptionalTxtKeyForDeviceNameDn_14() + { + SetIdentity(kIdentityAlpha); + return FindCommissionable(); + } + + CHIP_ERROR TestOptionalTxtKeyForRotatingDeviceIdentifierRi_15() + { + SetIdentity(kIdentityAlpha); + return FindCommissionable(); + } + + CHIP_ERROR TestOptionalTxtKeyForPairingHintPh_16() + { + SetIdentity(kIdentityAlpha); + return FindCommissionable(); + } + + CHIP_ERROR TestOptionalTxtKeyForPairingInstructionsPi_17() + { + SetIdentity(kIdentityAlpha); + return FindCommissionable(); + } + + CHIP_ERROR TestCheckIPs_18() + { + SetIdentity(kIdentityAlpha); + return FindCommissionable(); + } + + CHIP_ERROR TestRebootTargetDevice_19() + { + SetIdentity(kIdentityAlpha); + return Reboot(mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U); + } + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_20() + { + SetIdentity(kIdentityAlpha); + return WaitForCommissionee(); + } + + CHIP_ERROR TestOpenCommissioningWindow_21() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; + using RequestType = chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type; + + RequestType request; + request.commissioningTimeout = 120U; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_21(); + }; + + auto failure = [](void * context, CHIP_ERROR error) { + (static_cast(context))->OnFailureResponse_21(error); + }; + + ReturnErrorOnFailure( + chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request, 10000)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_21(CHIP_ERROR error) + { + chip::app::StatusIB status(error); + ThrowFailureResponse(); + } + + void OnSuccessResponse_21() { NextTest(); } + + CHIP_ERROR TestCheckInstanceName_22() + { + SetIdentity(kIdentityAlpha); + return FindCommissionable(); + } +}; + class TestLogCommands : public TestCommand { public: @@ -67718,6 +69278,14 @@ class TestLogCommands : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -67731,13 +69299,13 @@ class TestLogCommands : public TestCommand CHIP_ERROR TestLogASimpleMessage_1() { SetIdentity(kIdentityAlpha); - return Log("This is a simple message"); + return Log(" This is a simple message"); } CHIP_ERROR TestDoASimpleUserPromptMessage_2() { SetIdentity(kIdentityAlpha); - return UserPrompt("This is a simple message"); + return UserPrompt(" This is a simple message"); } }; @@ -68289,6 +69857,14 @@ class TestSaveAs : public TestCommand uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr; chip::ByteSpan readAttributeOctetStringNotDefaultValue; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_4(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_4(error); @@ -71914,6 +73490,14 @@ class TestConfigVariables : public TestCommand uint8_t TestAddArgumentDefaultValue; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -72067,6 +73651,14 @@ class TestDescriptorCluster : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -72365,6 +73957,14 @@ class TestBasicInformation : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -72642,6 +74242,14 @@ class TestIdentifyCluster : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -72750,6 +74358,14 @@ class TestOperationalCredentialsCluster : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -72955,6 +74571,14 @@ class TestModeSelectCluster : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -73317,6 +74941,14 @@ class TestSystemCommands : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -73425,6 +75057,14 @@ class Test_TC_SWDIAG_1_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -73589,6 +75229,14 @@ class Test_TC_SWDIAG_2_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -73669,6 +75317,14 @@ class Test_TC_SWDIAG_3_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -73834,6 +75490,14 @@ class TestSubscribe_OnOff : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + typedef void (*Test_TestSubscribe_OnOff_OnOff_ReportCallback)(void * context, bool value); Test_TestSubscribe_OnOff_OnOff_ReportCallback mTest_TestSubscribe_OnOff_OnOff_Reported = nullptr; @@ -74564,6 +76228,14 @@ class DL_UsersAndCredentials : public TestCommand uint16_t NumberOfPINUsersSupported; uint16_t NumberOfRFIDUsersSupported; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_2(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_2(error); @@ -79567,6 +81239,14 @@ class DL_LockUnlock : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_3(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_3(error); @@ -80323,6 +82003,14 @@ class DL_Schedules : public TestCommand uint8_t NumberOfWeekDaySchedulesSupportedPerUser; uint8_t NumberOfYearDaySchedulesSupportedPerUser; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_2(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_2(error); @@ -83557,6 +85245,14 @@ class TestGroupMessaging : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnDoneCallback_3(void * context) { (static_cast(context))->OnDoneResponse_3(); } static void OnFailureCallback_3(void * context, CHIP_ERROR error) @@ -83969,6 +85665,14 @@ class TestGroupsCluster : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -84773,6 +86477,14 @@ class TestGroupDemoCommand : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -85225,6 +86937,14 @@ class TestGroupDemoConfig : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + // // Tests methods // @@ -85337,6 +87057,14 @@ class TestGroupKeyManagementCluster : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & nodeData) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + static void OnFailureCallback_1(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_1(error); @@ -85554,6 +87282,7 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig),