diff --git a/src/app/zap-templates/common/ClustersHelper.js b/src/app/zap-templates/common/ClustersHelper.js index fe6be0bc1ffe91..ecafa3eb7c3eee 100644 --- a/src/app/zap-templates/common/ClustersHelper.js +++ b/src/app/zap-templates/common/ClustersHelper.js @@ -387,7 +387,9 @@ function inlineStructItems(args) return; } - argument.items.forEach(item => { arguments.push(item); }); + argument.items.forEach(item => { + arguments.push(item); + }); }); return arguments; @@ -395,7 +397,11 @@ function inlineStructItems(args) function enhancedCommands(commands, types) { - commands.forEach(command => { command.arguments.forEach(argument => { enhancedItem(argument, types); }); }); + commands.forEach(command => { + command.arguments.forEach(argument => { + enhancedItem(argument, types); + }); + }); commands.forEach(command => { // Flag things ending in "Response" so we can filter out unused responses, diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 256750cb7fadc1..40c03087c7ec0e 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -19,8 +19,8 @@ #pragma once -#include #include +#include #include #include @@ -29,232 +29,310 @@ class TestList : public Command { public: - TestList() : Command("list") {}; + TestList() : Command("list"){}; CHIP_ERROR Run() override { - printf("Test_TC_BI_1_1\n");printf("Test_TC_BI_2_1\n");printf("Test_TC_BI_2_2\n");printf("Test_TC_BOOL_1_1\n");printf("Test_TC_BOOL_2_1\n");printf("Test_TC_CC_1_1\n");printf("Test_TC_CC_2_1\n");printf("Test_TC_CC_3_1\n");printf("Test_TC_CC_3_2\n");printf("Test_TC_CC_3_3\n");printf("Test_TC_CC_4_1\n");printf("Test_TC_CC_4_2\n");printf("Test_TC_CC_4_3\n");printf("Test_TC_CC_4_4\n");printf("Test_TC_CC_5_1\n");printf("Test_TC_CC_5_2\n");printf("Test_TC_CC_5_3\n");printf("Test_TC_CC_6_1\n");printf("Test_TC_CC_6_2\n");printf("Test_TC_CC_6_3\n");printf("Test_TC_CC_7_1\n");printf("Test_TC_CC_7_2\n");printf("Test_TC_CC_7_3\n");printf("Test_TC_CC_7_4\n");printf("Test_TC_CC_8_1\n");printf("Test_TC_CC_9_1\n");printf("Test_TC_CC_9_2\n");printf("Test_TC_CC_9_3\n");printf("Test_TC_DD_1_5\n");printf("Test_TC_DD_1_6\n");printf("Test_TC_DD_1_7\n");printf("Test_TC_DD_1_8\n");printf("Test_TC_DD_1_9\n");printf("Test_TC_DM_1_1\n");printf("Test_TC_DM_3_1\n");printf("Test_TC_DM_2_2\n");printf("Test_TC_EMR_1_1\n");printf("Test_TC_FLW_1_1\n");printf("Test_TC_FLW_2_1\n");printf("Test_TC_FLW_2_2\n");printf("Test_TC_ILL_1_1\n");printf("Test_TC_LVL_1_1\n");printf("Test_TC_LVL_2_1\n");printf("Test_TC_LVL_2_2\n");printf("Test_TC_LVL_3_1\n");printf("Test_TC_LVL_4_1\n");printf("Test_TC_LVL_5_1\n");printf("Test_TC_LVL_6_1\n");printf("Test_TC_MC_1_1\n");printf("Test_TC_MC_2_1\n");printf("Test_TC_MC_3_1\n");printf("Test_TC_MC_3_2\n");printf("Test_TC_MC_3_3\n");printf("Test_TC_MC_3_4\n");printf("Test_TC_MC_3_5\n");printf("Test_TC_MC_3_6\n");printf("Test_TC_MC_3_7\n");printf("Test_TC_MC_3_8\n");printf("Test_TC_MC_3_9\n");printf("Test_TC_MC_3_10\n");printf("Test_TC_MC_3_11\n");printf("Test_TC_MC_5_1\n");printf("Test_TC_MC_5_2\n");printf("Test_TC_MC_5_3\n");printf("Test_TC_MC_6_1\n");printf("Test_TC_MC_6_2\n");printf("Test_TC_MC_6_3\n");printf("Test_TC_MC_6_4\n");printf("Test_TC_MC_7_1\n");printf("Test_TC_MC_7_2\n");printf("Test_TC_MC_8_1\n");printf("Test_TC_MC_9_1\n");printf("Test_TC_OCC_1_1\n");printf("Test_TC_OCC_2_1\n");printf("Test_TC_OCC_2_2\n");printf("Test_TC_OO_1_1\n");printf("Test_TC_OO_2_1\n");printf("Test_TC_OO_2_2\n");printf("Test_TC_OO_2_3\n");printf("Test_TC_PRS_1_1\n");printf("Test_TC_PRS_2_1\n");printf("Test_TC_PCC_1_1\n");printf("Test_TC_PCC_2_1\n");printf("Test_TC_PCC_2_2\n");printf("Test_TC_PCC_2_3\n");printf("Test_TC_RH_1_1\n");printf("Test_TC_RH_2_1\n");printf("Test_TC_RH_2_2\n");printf("Test_TC_TM_1_1\n");printf("Test_TC_TM_2_1\n");printf("Test_TC_TM_2_2\n");printf("Test_TC_TSTAT_1_1\n");printf("Test_TC_TSTAT_2_1\n");printf("Test_TC_TSTAT_2_2\n");printf("Test_TC_TSUIC_1_1\n");printf("Test_TC_TSUIC_2_1\n");printf("Test_TC_TSUIC_2_2\n");printf("Test_TC_DIAGTH_1_1\n");printf("Test_TC_WNCV_1_1\n");printf("Test_TC_WNCV_2_1\n");printf("Test_TC_WNCV_2_2\n");printf("Test_TC_WNCV_2_4\n");printf("Test_TC_WNCV_2_5\n");printf("Test_TC_WNCV_3_1\n");printf("Test_TC_WNCV_3_2\n");printf("Test_TC_WNCV_3_3\n");printf("TV_TargetNavigatorCluster\n");printf("TV_AudioOutputCluster\n");printf("TV_ApplicationLauncherCluster\n");printf("TV_KeypadInputCluster\n");printf("TV_AccountLoginCluster\n");printf("TV_WakeOnLanCluster\n");printf("TV_ApplicationBasicCluster\n");printf("TV_MediaPlaybackCluster\n");printf("TV_ChannelCluster\n");printf("TV_LowPowerCluster\n");printf("TV_ContentLauncherCluster\n");printf("TV_MediaInputCluster\n");printf("TestCluster\n");printf("TestClusterComplexTypes\n");printf("TestConstraints\n");printf("TestDelayCommands\n");printf("TestLogCommands\n");printf("TestSaveAs\n");printf("TestConfigVariables\n");printf("TestDescriptorCluster\n");printf("TestBasicInformation\n");printf("TestIdentifyCluster\n");printf("TestGroupsCluster\n");printf("TestGroupKeyManagementCluster\n");printf("TestOperationalCredentialsCluster\n");printf("TestModeSelectCluster\n");printf("TestGroupMessaging\n");printf("Test_TC_SWDIAG_1_1\n");printf("Test_TC_SWDIAG_2_1\n");printf("Test_TC_SWDIAG_3_1\n");printf("TestSubscribe_OnOff\n"); + printf("Test_TC_BI_1_1\n"); + printf("Test_TC_BI_2_1\n"); + printf("Test_TC_BI_2_2\n"); + printf("Test_TC_BOOL_1_1\n"); + printf("Test_TC_BOOL_2_1\n"); + printf("Test_TC_CC_1_1\n"); + printf("Test_TC_CC_2_1\n"); + printf("Test_TC_CC_3_1\n"); + printf("Test_TC_CC_3_2\n"); + printf("Test_TC_CC_3_3\n"); + printf("Test_TC_CC_4_1\n"); + printf("Test_TC_CC_4_2\n"); + printf("Test_TC_CC_4_3\n"); + printf("Test_TC_CC_4_4\n"); + printf("Test_TC_CC_5_1\n"); + printf("Test_TC_CC_5_2\n"); + printf("Test_TC_CC_5_3\n"); + printf("Test_TC_CC_6_1\n"); + printf("Test_TC_CC_6_2\n"); + printf("Test_TC_CC_6_3\n"); + printf("Test_TC_CC_7_1\n"); + printf("Test_TC_CC_7_2\n"); + printf("Test_TC_CC_7_3\n"); + printf("Test_TC_CC_7_4\n"); + printf("Test_TC_CC_8_1\n"); + printf("Test_TC_CC_9_1\n"); + printf("Test_TC_CC_9_2\n"); + printf("Test_TC_CC_9_3\n"); + printf("Test_TC_DD_1_5\n"); + printf("Test_TC_DD_1_6\n"); + printf("Test_TC_DD_1_7\n"); + printf("Test_TC_DD_1_8\n"); + printf("Test_TC_DD_1_9\n"); + printf("Test_TC_DM_1_1\n"); + printf("Test_TC_DM_3_1\n"); + printf("Test_TC_DM_2_2\n"); + printf("Test_TC_EMR_1_1\n"); + printf("Test_TC_FLW_1_1\n"); + printf("Test_TC_FLW_2_1\n"); + printf("Test_TC_FLW_2_2\n"); + printf("Test_TC_ILL_1_1\n"); + printf("Test_TC_LVL_1_1\n"); + printf("Test_TC_LVL_2_1\n"); + printf("Test_TC_LVL_2_2\n"); + printf("Test_TC_LVL_3_1\n"); + printf("Test_TC_LVL_4_1\n"); + printf("Test_TC_LVL_5_1\n"); + printf("Test_TC_LVL_6_1\n"); + printf("Test_TC_MC_1_1\n"); + printf("Test_TC_MC_2_1\n"); + printf("Test_TC_MC_3_1\n"); + printf("Test_TC_MC_3_2\n"); + printf("Test_TC_MC_3_3\n"); + printf("Test_TC_MC_3_4\n"); + printf("Test_TC_MC_3_5\n"); + printf("Test_TC_MC_3_6\n"); + printf("Test_TC_MC_3_7\n"); + printf("Test_TC_MC_3_8\n"); + printf("Test_TC_MC_3_9\n"); + printf("Test_TC_MC_3_10\n"); + printf("Test_TC_MC_3_11\n"); + printf("Test_TC_MC_5_1\n"); + printf("Test_TC_MC_5_2\n"); + printf("Test_TC_MC_5_3\n"); + printf("Test_TC_MC_6_1\n"); + printf("Test_TC_MC_6_2\n"); + printf("Test_TC_MC_6_3\n"); + printf("Test_TC_MC_6_4\n"); + printf("Test_TC_MC_7_1\n"); + printf("Test_TC_MC_7_2\n"); + printf("Test_TC_MC_8_1\n"); + printf("Test_TC_MC_9_1\n"); + printf("Test_TC_OCC_1_1\n"); + printf("Test_TC_OCC_2_1\n"); + printf("Test_TC_OCC_2_2\n"); + printf("Test_TC_OO_1_1\n"); + printf("Test_TC_OO_2_1\n"); + printf("Test_TC_OO_2_2\n"); + printf("Test_TC_OO_2_3\n"); + printf("Test_TC_PRS_1_1\n"); + printf("Test_TC_PRS_2_1\n"); + printf("Test_TC_PCC_1_1\n"); + printf("Test_TC_PCC_2_1\n"); + printf("Test_TC_PCC_2_2\n"); + printf("Test_TC_PCC_2_3\n"); + printf("Test_TC_RH_1_1\n"); + printf("Test_TC_RH_2_1\n"); + printf("Test_TC_RH_2_2\n"); + printf("Test_TC_TM_1_1\n"); + printf("Test_TC_TM_2_1\n"); + printf("Test_TC_TM_2_2\n"); + printf("Test_TC_TSTAT_1_1\n"); + printf("Test_TC_TSTAT_2_1\n"); + printf("Test_TC_TSTAT_2_2\n"); + printf("Test_TC_TSUIC_1_1\n"); + printf("Test_TC_TSUIC_2_1\n"); + printf("Test_TC_TSUIC_2_2\n"); + printf("Test_TC_DIAGTH_1_1\n"); + printf("Test_TC_WNCV_1_1\n"); + printf("Test_TC_WNCV_2_1\n"); + printf("Test_TC_WNCV_2_2\n"); + printf("Test_TC_WNCV_2_4\n"); + printf("Test_TC_WNCV_2_5\n"); + printf("Test_TC_WNCV_3_1\n"); + printf("Test_TC_WNCV_3_2\n"); + printf("Test_TC_WNCV_3_3\n"); + printf("TV_TargetNavigatorCluster\n"); + printf("TV_AudioOutputCluster\n"); + printf("TV_ApplicationLauncherCluster\n"); + printf("TV_KeypadInputCluster\n"); + printf("TV_AccountLoginCluster\n"); + printf("TV_WakeOnLanCluster\n"); + printf("TV_ApplicationBasicCluster\n"); + printf("TV_MediaPlaybackCluster\n"); + printf("TV_ChannelCluster\n"); + printf("TV_LowPowerCluster\n"); + printf("TV_ContentLauncherCluster\n"); + printf("TV_MediaInputCluster\n"); + printf("TestCluster\n"); + printf("TestClusterComplexTypes\n"); + printf("TestConstraints\n"); + printf("TestDelayCommands\n"); + printf("TestLogCommands\n"); + printf("TestSaveAs\n"); + printf("TestConfigVariables\n"); + printf("TestDescriptorCluster\n"); + printf("TestBasicInformation\n"); + printf("TestIdentifyCluster\n"); + printf("TestGroupsCluster\n"); + printf("TestGroupKeyManagementCluster\n"); + printf("TestOperationalCredentialsCluster\n"); + printf("TestModeSelectCluster\n"); + printf("TestGroupMessaging\n"); + printf("Test_TC_SWDIAG_1_1\n"); + printf("Test_TC_SWDIAG_2_1\n"); + printf("Test_TC_SWDIAG_3_1\n"); + printf("TestSubscribe_OnOff\n"); return CHIP_NO_ERROR; } }; -class Test_TC_BI_1_1: public TestCommand +class Test_TC_BI_1_1 : public TestCommand { - public: - Test_TC_BI_1_1(): TestCommand("Test_TC_BI_1_1"), mTestIndex(0) +public: + Test_TC_BI_1_1() : TestCommand("Test_TC_BI_1_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_BI_1_1() - { - } + ~Test_TC_BI_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_BI_1_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_BI_1_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_BI_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_BI_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); + err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : reads back global attribute: ClusterRevision\n"); - err = TestReadsBackGlobalAttributeClusterRevision_4(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 4 : reads back global attribute: ClusterRevision\n"); + err = TestReadsBackGlobalAttributeClusterRevision_4(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 5; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_1(clusterRevision); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_2(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_2(clusterRevision); } - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context) - { - (static_cast(context))->OnSuccessResponse_3(); - } - - - + static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_4(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_4(clusterRevision); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint16_t clusterRevision) + void OnSuccessResponse_1(uint16_t clusterRevision) { - VerifyOrReturn(CheckValue("clusterRevision", clusterRevision,1U - )); + VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 1U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint16_t clusterRevision) + void OnSuccessResponse_2(uint16_t clusterRevision) { - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -262,389 +340,295 @@ class Test_TC_BI_1_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t clusterRevisionArgument; - clusterRevisionArgument = 1U; - - ReturnErrorOnFailure(cluster.WriteAttribute(clusterRevisionArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + clusterRevisionArgument = 1U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + clusterRevisionArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_3() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_3() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( uint16_t clusterRevision) + void OnSuccessResponse_4(uint16_t clusterRevision) { - VerifyOrReturn(CheckValue("clusterRevision", clusterRevision,1U - )); + VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 1U)); NextTest(); - } - - - }; + } +}; -class Test_TC_BI_2_1: public TestCommand +class Test_TC_BI_2_1 : public TestCommand { - public: - Test_TC_BI_2_1(): TestCommand("Test_TC_BI_2_1"), mTestIndex(0) +public: + Test_TC_BI_2_1() : TestCommand("Test_TC_BI_2_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_BI_2_1() - { - } + ~Test_TC_BI_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_BI_2_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_BI_2_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_BI_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_BI_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read mandatory non-global attribute: OutOfService\n"); - err = TestReadMandatoryNonGlobalAttributeOutOfService_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Read mandatory non-global attribute: OutOfService\n"); + err = TestReadMandatoryNonGlobalAttributeOutOfService_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read mandatory non-global attribute constraints: OutOfService\n"); - err = TestReadMandatoryNonGlobalAttributeConstraintsOutOfService_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Read mandatory non-global attribute constraints: OutOfService\n"); + err = TestReadMandatoryNonGlobalAttributeConstraintsOutOfService_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Write the default values to mandatory non-global attribute: OutOfService\n"); - err = TestWriteTheDefaultValuesToMandatoryNonGlobalAttributeOutOfService_3(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 3 : Write the default values to mandatory non-global attribute: OutOfService\n"); + err = TestWriteTheDefaultValuesToMandatoryNonGlobalAttributeOutOfService_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads back the mandatory non-global attribute: OutOfService\n"); - err = TestReadsBackTheMandatoryNonGlobalAttributeOutOfService_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads back the mandatory non-global attribute: OutOfService\n"); + err = TestReadsBackTheMandatoryNonGlobalAttributeOutOfService_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read mandatory non-global attribute constraints: PresentValue\n"); - err = TestReadMandatoryNonGlobalAttributeConstraintsPresentValue_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Read mandatory non-global attribute constraints: PresentValue\n"); + err = TestReadMandatoryNonGlobalAttributeConstraintsPresentValue_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Write the default values to mandatory non-global attribute: PresentValue\n"); - err = TestWriteTheDefaultValuesToMandatoryNonGlobalAttributePresentValue_6(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 6 : Write the default values to mandatory non-global attribute: PresentValue\n"); + err = TestWriteTheDefaultValuesToMandatoryNonGlobalAttributePresentValue_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads back the mandatory non-global attribute: PresentValue\n"); - err = TestReadsBackTheMandatoryNonGlobalAttributePresentValue_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : Reads back the mandatory non-global attribute: PresentValue\n"); + err = TestReadsBackTheMandatoryNonGlobalAttributePresentValue_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read mandatory non-global attribute: StatusFlags\n"); - err = TestReadMandatoryNonGlobalAttributeStatusFlags_8(); - break; + ChipLogProgress(chipTool, " ***** Test Step 8 : Read mandatory non-global attribute: StatusFlags\n"); + err = TestReadMandatoryNonGlobalAttributeStatusFlags_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read mandatory non-global attribute constraints: StatusFlags\n"); - err = TestReadMandatoryNonGlobalAttributeConstraintsStatusFlags_9(); - break; + ChipLogProgress(chipTool, " ***** Test Step 9 : Read mandatory non-global attribute constraints: StatusFlags\n"); + err = TestReadMandatoryNonGlobalAttributeConstraintsStatusFlags_9(); + break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Write the default values to mandatory non-global attribute: StatusFlags\n"); - err = TestWriteTheDefaultValuesToMandatoryNonGlobalAttributeStatusFlags_10(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 10 : Write the default values to mandatory non-global attribute: StatusFlags\n"); + err = TestWriteTheDefaultValuesToMandatoryNonGlobalAttributeStatusFlags_10(); + break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Reads back the mandatory non-global attribute: StatusFlags\n"); - err = TestReadsBackTheMandatoryNonGlobalAttributeStatusFlags_11(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 11 : Reads back the mandatory non-global attribute: StatusFlags\n"); + err = TestReadsBackTheMandatoryNonGlobalAttributeStatusFlags_11(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 12; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, bool outOfService) + static void OnSuccessCallback_1(void * context, bool outOfService) { (static_cast(context))->OnSuccessResponse_1(outOfService); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, bool outOfService) + static void OnSuccessCallback_2(void * context, bool outOfService) { (static_cast(context))->OnSuccessResponse_2(outOfService); } - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context) - { - (static_cast(context))->OnSuccessResponse_3(); - } - - - + static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, bool outOfService) + static void OnSuccessCallback_4(void * context, bool outOfService) { (static_cast(context))->OnSuccessResponse_4(outOfService); } - - - static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context, bool presentValue) + static void OnSuccessCallback_5(void * context, bool presentValue) { (static_cast(context))->OnSuccessResponse_5(presentValue); } - - - static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context) - { - (static_cast(context))->OnSuccessResponse_6(); - } - - - + static void OnSuccessCallback_6(void * context) { (static_cast(context))->OnSuccessResponse_6(); } static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context, bool presentValue) + static void OnSuccessCallback_7(void * context, bool presentValue) { (static_cast(context))->OnSuccessResponse_7(presentValue); } - - - static void OnFailureCallback_8(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context, uint8_t statusFlags) + static void OnSuccessCallback_8(void * context, uint8_t statusFlags) { (static_cast(context))->OnSuccessResponse_8(statusFlags); } - - - static void OnFailureCallback_9(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_9(status); } - static void OnSuccessCallback_9(void * context, uint8_t statusFlags) + static void OnSuccessCallback_9(void * context, uint8_t statusFlags) { (static_cast(context))->OnSuccessResponse_9(statusFlags); } - - - static void OnFailureCallback_10(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_10(status); } - static void OnSuccessCallback_10(void * context) - { - (static_cast(context))->OnSuccessResponse_10(); - } - - - + static void OnSuccessCallback_10(void * context) { (static_cast(context))->OnSuccessResponse_10(); } static void OnFailureCallback_11(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_11(status); } - static void OnSuccessCallback_11(void * context, uint8_t statusFlags) + static void OnSuccessCallback_11(void * context, uint8_t statusFlags) { (static_cast(context))->OnSuccessResponse_11(statusFlags); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadMandatoryNonGlobalAttributeOutOfService_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( bool outOfService) + void OnSuccessResponse_1(bool outOfService) { - VerifyOrReturn(CheckValue("outOfService", outOfService,0 - )); + VerifyOrReturn(CheckValue("outOfService", outOfService, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadMandatoryNonGlobalAttributeConstraintsOutOfService_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( bool outOfService) + void OnSuccessResponse_2(bool outOfService) { - VerifyOrReturn(CheckConstraintType("outOfService", "", "bool")); + VerifyOrReturn(CheckConstraintType("outOfService", "", "bool")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryNonGlobalAttributeOutOfService_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -652,79 +636,56 @@ class Test_TC_BI_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); bool outOfServiceArgument; - outOfServiceArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(outOfServiceArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + outOfServiceArgument = 0; - void OnSuccessResponse_3() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + outOfServiceArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_3() { NextTest(); } - CHIP_ERROR TestReadsBackTheMandatoryNonGlobalAttributeOutOfService_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( bool outOfService) + void OnSuccessResponse_4(bool outOfService) { - VerifyOrReturn(CheckValue("outOfService", outOfService,0 - )); + VerifyOrReturn(CheckValue("outOfService", outOfService, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadMandatoryNonGlobalAttributeConstraintsPresentValue_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5( bool presentValue) + void OnSuccessResponse_5(bool presentValue) { - VerifyOrReturn(CheckConstraintType("presentValue", "", "bool")); + VerifyOrReturn(CheckConstraintType("presentValue", "", "bool")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryNonGlobalAttributePresentValue_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -732,107 +693,78 @@ class Test_TC_BI_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); bool presentValueArgument; - presentValueArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(presentValueArgument, this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + presentValueArgument = 0; - void OnSuccessResponse_6() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + presentValueArgument, this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_6() { NextTest(); } - CHIP_ERROR TestReadsBackTheMandatoryNonGlobalAttributePresentValue_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_7, OnFailureCallback_7)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7( bool presentValue) + void OnSuccessResponse_7(bool presentValue) { - VerifyOrReturn(CheckValue("presentValue", presentValue,0 - )); + VerifyOrReturn(CheckValue("presentValue", presentValue, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadMandatoryNonGlobalAttributeStatusFlags_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_8, OnFailureCallback_8)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_8, OnFailureCallback_8)); + return CHIP_NO_ERROR; } - void OnFailureResponse_8(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_8( uint8_t statusFlags) + void OnSuccessResponse_8(uint8_t statusFlags) { - VerifyOrReturn(CheckValue("statusFlags", statusFlags,0 - )); + VerifyOrReturn(CheckValue("statusFlags", statusFlags, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadMandatoryNonGlobalAttributeConstraintsStatusFlags_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_9, OnFailureCallback_9)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_9, OnFailureCallback_9)); + return CHIP_NO_ERROR; } - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_9( uint8_t statusFlags) + void OnSuccessResponse_9(uint8_t statusFlags) { - VerifyOrReturn(CheckConstraintType("statusFlags", "", "map8"));VerifyOrReturn(CheckConstraintMinValue("statusFlags", statusFlags, 0));VerifyOrReturn(CheckConstraintMaxValue("statusFlags", statusFlags, 15)); + VerifyOrReturn(CheckConstraintType("statusFlags", "", "map8")); + VerifyOrReturn(CheckConstraintMinValue("statusFlags", statusFlags, 0)); + VerifyOrReturn(CheckConstraintMaxValue("statusFlags", statusFlags, 15)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryNonGlobalAttributeStatusFlags_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -840,764 +772,580 @@ class Test_TC_BI_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t statusFlagsArgument; - statusFlagsArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(statusFlagsArgument, this, OnSuccessCallback_10, OnFailureCallback_10)); - return CHIP_NO_ERROR; + statusFlagsArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + statusFlagsArgument, this, OnSuccessCallback_10, OnFailureCallback_10)); + return CHIP_NO_ERROR; } void OnFailureResponse_10(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_10() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_10() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackTheMandatoryNonGlobalAttributeStatusFlags_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_11, OnFailureCallback_11)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_11, OnFailureCallback_11)); + return CHIP_NO_ERROR; } - void OnFailureResponse_11(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_11( uint8_t statusFlags) + void OnSuccessResponse_11(uint8_t statusFlags) { - VerifyOrReturn(CheckValue("statusFlags", statusFlags,0 - )); + VerifyOrReturn(CheckValue("statusFlags", statusFlags, 0)); NextTest(); - } - - - }; + } +}; -class Test_TC_BI_2_2: public TestCommand +class Test_TC_BI_2_2 : public TestCommand { - public: - Test_TC_BI_2_2(): TestCommand("Test_TC_BI_2_2"), mTestIndex(0) +public: + Test_TC_BI_2_2() : TestCommand("Test_TC_BI_2_2"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_BI_2_2() - { - } + ~Test_TC_BI_2_2() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_BI_2_2\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_BI_2_2\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_BI_2_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_BI_2_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads PresentValue attribute from DUT\n"); - if (ShouldSkip("A_PRESENTVALUE")) - { - NextTest(); - return; - } - err = TestReadsPresentValueAttributeFromDut_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads PresentValue attribute from DUT\n"); + if (ShouldSkip("A_PRESENTVALUE")) + { + NextTest(); + return; + } + err = TestReadsPresentValueAttributeFromDut_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads OutOfService attribute from DUT\n"); - if (ShouldSkip("A_OUTOFSERVICE")) - { - NextTest(); - return; - } - err = TestReadsOutOfServiceAttributeFromDut_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads OutOfService attribute from DUT\n"); + if (ShouldSkip("A_OUTOFSERVICE")) + { + NextTest(); + return; + } + err = TestReadsOutOfServiceAttributeFromDut_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads StatusFlags attribute from DUT\n"); - if (ShouldSkip("A_STATUSFLAGS")) - { - NextTest(); - return; - } - err = TestReadsStatusFlagsAttributeFromDut_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads StatusFlags attribute from DUT\n"); + if (ShouldSkip("A_STATUSFLAGS")) + { + NextTest(); + return; + } + err = TestReadsStatusFlagsAttributeFromDut_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads PresentValue attribute from DUT\n"); - if (ShouldSkip("A_PRESENTVALUE")) - { - NextTest(); - return; - } - err = TestReadsPresentValueAttributeFromDut_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads PresentValue attribute from DUT\n"); + if (ShouldSkip("A_PRESENTVALUE")) + { + NextTest(); + return; + } + err = TestReadsPresentValueAttributeFromDut_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads OutOfService attribute from DUT\n"); - if (ShouldSkip("A_OUTOFSERVICE")) - { - NextTest(); - return; - } - err = TestReadsOutOfServiceAttributeFromDut_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads OutOfService attribute from DUT\n"); + if (ShouldSkip("A_OUTOFSERVICE")) + { + NextTest(); + return; + } + err = TestReadsOutOfServiceAttributeFromDut_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads StatusFlags attribute from DUT\n"); - if (ShouldSkip("A_STATUSFLAGS")) - { - NextTest(); - return; - } - err = TestReadsStatusFlagsAttributeFromDut_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : Reads StatusFlags attribute from DUT\n"); + if (ShouldSkip("A_STATUSFLAGS")) + { + NextTest(); + return; + } + err = TestReadsStatusFlagsAttributeFromDut_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads StatusFlags attribute from DUT\n"); - if (ShouldSkip("A_STATUSFLAGS")) - { - NextTest(); - return; - } - err = TestReadsStatusFlagsAttributeFromDut_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : Reads StatusFlags attribute from DUT\n"); + if (ShouldSkip("A_STATUSFLAGS")) + { + NextTest(); + return; + } + err = TestReadsStatusFlagsAttributeFromDut_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Reads StatusFlags attribute from DUT\n"); - if (ShouldSkip("A_STATUSFLAGS")) - { - NextTest(); - return; - } - err = TestReadsStatusFlagsAttributeFromDut_8(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 8 : Reads StatusFlags attribute from DUT\n"); + if (ShouldSkip("A_STATUSFLAGS")) + { + NextTest(); + return; + } + err = TestReadsStatusFlagsAttributeFromDut_8(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 9; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, bool presentValue) + static void OnSuccessCallback_1(void * context, bool presentValue) { (static_cast(context))->OnSuccessResponse_1(presentValue); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, bool outOfService) + static void OnSuccessCallback_2(void * context, bool outOfService) { (static_cast(context))->OnSuccessResponse_2(outOfService); } - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, uint8_t statusFlags) + static void OnSuccessCallback_3(void * context, uint8_t statusFlags) { (static_cast(context))->OnSuccessResponse_3(statusFlags); } - - - static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, bool presentValue) + static void OnSuccessCallback_4(void * context, bool presentValue) { (static_cast(context))->OnSuccessResponse_4(presentValue); } - - - static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context, bool outOfService) + static void OnSuccessCallback_5(void * context, bool outOfService) { (static_cast(context))->OnSuccessResponse_5(outOfService); } - - - static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, uint8_t statusFlags) + static void OnSuccessCallback_6(void * context, uint8_t statusFlags) { (static_cast(context))->OnSuccessResponse_6(statusFlags); } - - - static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context, uint8_t statusFlags) + static void OnSuccessCallback_7(void * context, uint8_t statusFlags) { (static_cast(context))->OnSuccessResponse_7(statusFlags); } - - - static void OnFailureCallback_8(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context, uint8_t statusFlags) + static void OnSuccessCallback_8(void * context, uint8_t statusFlags) { (static_cast(context))->OnSuccessResponse_8(statusFlags); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadsPresentValueAttributeFromDut_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( bool presentValue) + void OnSuccessResponse_1(bool presentValue) { - VerifyOrReturn(CheckValue("presentValue", presentValue,0 - )); + VerifyOrReturn(CheckValue("presentValue", presentValue, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsOutOfServiceAttributeFromDut_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( bool outOfService) + void OnSuccessResponse_2(bool outOfService) { - VerifyOrReturn(CheckValue("outOfService", outOfService,0 - )); + VerifyOrReturn(CheckValue("outOfService", outOfService, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsStatusFlagsAttributeFromDut_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( uint8_t statusFlags) + void OnSuccessResponse_3(uint8_t statusFlags) { - VerifyOrReturn(CheckValue("statusFlags", statusFlags,0 - )); + VerifyOrReturn(CheckValue("statusFlags", statusFlags, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsPresentValueAttributeFromDut_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( bool presentValue) + void OnSuccessResponse_4(bool presentValue) { - VerifyOrReturn(CheckValue("presentValue", presentValue,0 - )); + VerifyOrReturn(CheckValue("presentValue", presentValue, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsOutOfServiceAttributeFromDut_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5( bool outOfService) + void OnSuccessResponse_5(bool outOfService) { - VerifyOrReturn(CheckValue("outOfService", outOfService,0 - )); + VerifyOrReturn(CheckValue("outOfService", outOfService, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsStatusFlagsAttributeFromDut_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( uint8_t statusFlags) + void OnSuccessResponse_6(uint8_t statusFlags) { - VerifyOrReturn(CheckValue("statusFlags", statusFlags,0 - )); + VerifyOrReturn(CheckValue("statusFlags", statusFlags, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsStatusFlagsAttributeFromDut_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_7, OnFailureCallback_7)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7( uint8_t statusFlags) + void OnSuccessResponse_7(uint8_t statusFlags) { - VerifyOrReturn(CheckValue("statusFlags", statusFlags,0 - )); + VerifyOrReturn(CheckValue("statusFlags", statusFlags, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsStatusFlagsAttributeFromDut_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_8, OnFailureCallback_8)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_8, OnFailureCallback_8)); + return CHIP_NO_ERROR; } - void OnFailureResponse_8(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_8( uint8_t statusFlags) + void OnSuccessResponse_8(uint8_t statusFlags) { - VerifyOrReturn(CheckValue("statusFlags", statusFlags,0 - )); + VerifyOrReturn(CheckValue("statusFlags", statusFlags, 0)); NextTest(); - } - - - }; + } +}; -class Test_TC_BOOL_1_1: public TestCommand +class Test_TC_BOOL_1_1 : public TestCommand { - public: - Test_TC_BOOL_1_1(): TestCommand("Test_TC_BOOL_1_1"), mTestIndex(0) +public: + Test_TC_BOOL_1_1() : TestCommand("Test_TC_BOOL_1_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_BOOL_1_1() - { - } + ~Test_TC_BOOL_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_BOOL_1_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_BOOL_1_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_BOOL_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_BOOL_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); + err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : reads back global attribute: ClusterRevision\n"); - err = TestReadsBackGlobalAttributeClusterRevision_4(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 4 : reads back global attribute: ClusterRevision\n"); + err = TestReadsBackGlobalAttributeClusterRevision_4(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 5; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_1(clusterRevision); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_2(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_2(clusterRevision); } - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context) - { - (static_cast(context))->OnSuccessResponse_3(); - } - - - + static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_4(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_4(clusterRevision); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BooleanStateClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint16_t clusterRevision) + void OnSuccessResponse_1(uint16_t clusterRevision) { - VerifyOrReturn(CheckValue("clusterRevision", clusterRevision,1U - )); + VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 1U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BooleanStateClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint16_t clusterRevision) + void OnSuccessResponse_2(uint16_t clusterRevision) { - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -1605,270 +1353,201 @@ class Test_TC_BOOL_1_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t clusterRevisionArgument; - clusterRevisionArgument = 1U; - - ReturnErrorOnFailure(cluster.WriteAttribute(clusterRevisionArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + clusterRevisionArgument = 1U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + clusterRevisionArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_3() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_3() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BooleanStateClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( uint16_t clusterRevision) + void OnSuccessResponse_4(uint16_t clusterRevision) { - VerifyOrReturn(CheckValue("clusterRevision", clusterRevision,1U - )); + VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 1U)); NextTest(); - } - - - }; + } +}; -class Test_TC_BOOL_2_1: public TestCommand +class Test_TC_BOOL_2_1 : public TestCommand { - public: - Test_TC_BOOL_2_1(): TestCommand("Test_TC_BOOL_2_1"), mTestIndex(0) +public: + Test_TC_BOOL_2_1() : TestCommand("Test_TC_BOOL_2_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_BOOL_2_1() - { - } + ~Test_TC_BOOL_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_BOOL_2_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_BOOL_2_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_BOOL_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_BOOL_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read mandatory non-global attribute: StateValue\n"); - err = TestReadMandatoryNonGlobalAttributeStateValue_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Read mandatory non-global attribute: StateValue\n"); + err = TestReadMandatoryNonGlobalAttributeStateValue_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read mandatory non-global attribute constraints: StateValue\n"); - err = TestReadMandatoryNonGlobalAttributeConstraintsStateValue_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Read mandatory non-global attribute constraints: StateValue\n"); + err = TestReadMandatoryNonGlobalAttributeConstraintsStateValue_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Write the default value to mandatory non-global attribute: StateValue\n"); - err = TestWriteTheDefaultValueToMandatoryNonGlobalAttributeStateValue_3(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 3 : Write the default value to mandatory non-global attribute: StateValue\n"); + err = TestWriteTheDefaultValueToMandatoryNonGlobalAttributeStateValue_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads back the mandatory non-global attribute: StateValue\n"); - err = TestReadsBackTheMandatoryNonGlobalAttributeStateValue_4(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads back the mandatory non-global attribute: StateValue\n"); + err = TestReadsBackTheMandatoryNonGlobalAttributeStateValue_4(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 5; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, bool stateValue) + static void OnSuccessCallback_1(void * context, bool stateValue) { (static_cast(context))->OnSuccessResponse_1(stateValue); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, bool stateValue) + static void OnSuccessCallback_2(void * context, bool stateValue) { (static_cast(context))->OnSuccessResponse_2(stateValue); } - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context) - { - (static_cast(context))->OnSuccessResponse_3(); - } - - - + static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, bool stateValue) + static void OnSuccessCallback_4(void * context, bool stateValue) { (static_cast(context))->OnSuccessResponse_4(stateValue); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadMandatoryNonGlobalAttributeStateValue_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BooleanStateClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( bool stateValue) + void OnSuccessResponse_1(bool stateValue) { - VerifyOrReturn(CheckValue("stateValue", stateValue,0 - )); + VerifyOrReturn(CheckValue("stateValue", stateValue, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadMandatoryNonGlobalAttributeConstraintsStateValue_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BooleanStateClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( bool stateValue) + void OnSuccessResponse_2(bool stateValue) { - VerifyOrReturn(CheckConstraintType("stateValue", "", "bool")); + VerifyOrReturn(CheckConstraintType("stateValue", "", "bool")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValueToMandatoryNonGlobalAttributeStateValue_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -1876,208 +1555,153 @@ class Test_TC_BOOL_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); bool stateValueArgument; - stateValueArgument = 1; - - ReturnErrorOnFailure(cluster.WriteAttribute(stateValueArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + stateValueArgument = 1; + + ReturnErrorOnFailure(cluster.WriteAttribute( + stateValueArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_3() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_3() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackTheMandatoryNonGlobalAttributeStateValue_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BooleanStateClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( bool stateValue) + void OnSuccessResponse_4(bool stateValue) { - VerifyOrReturn(CheckValue("stateValue", stateValue,0 - )); + VerifyOrReturn(CheckValue("stateValue", stateValue, 0)); NextTest(); - } - - - }; + } +}; -class Test_TC_CC_1_1: public TestCommand +class Test_TC_CC_1_1 : public TestCommand { - public: - Test_TC_CC_1_1(): TestCommand("Test_TC_CC_1_1"), mTestIndex(0) +public: + Test_TC_CC_1_1() : TestCommand("Test_TC_CC_1_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_CC_1_1() - { - } + ~Test_TC_CC_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_1_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_1_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute constraints : ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute constraints : ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2(); - break; - } + ChipLogProgress(chipTool, + " ***** Test Step 2 : write the default values to mandatory global attribute: ClusterRevision\n"); + err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_1(clusterRevision); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context) - { - (static_cast(context))->OnSuccessResponse_2(); - } - - - + static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint16_t clusterRevision) + void OnSuccessResponse_1(uint16_t clusterRevision) { - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -2085,2775 +1709,2151 @@ class Test_TC_CC_1_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t clusterRevisionArgument; - clusterRevisionArgument = 4U; - - ReturnErrorOnFailure(cluster.WriteAttribute(clusterRevisionArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + clusterRevisionArgument = 4U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + clusterRevisionArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_2() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_2() { ThrowSuccessResponse(); } +}; - }; - -class Test_TC_CC_2_1: public TestCommand +class Test_TC_CC_2_1 : public TestCommand { - public: - Test_TC_CC_2_1(): TestCommand("Test_TC_CC_2_1"), mTestIndex(0) +public: + Test_TC_CC_2_1() : TestCommand("Test_TC_CC_2_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_CC_2_1() - { - } + ~Test_TC_CC_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_2_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_2_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads mandatory attribute: CurrentHue\n"); - err = TestReadsMandatoryAttributeCurrentHue_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads mandatory attribute: CurrentHue\n"); + err = TestReadsMandatoryAttributeCurrentHue_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Validate constraints of attribute: current hue\n"); - err = TestValidateConstraintsOfAttributeCurrentHue_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Validate constraints of attribute: current hue\n"); + err = TestValidateConstraintsOfAttributeCurrentHue_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Write the default value to mandatory attribute: CurrentHue\n"); - err = TestWriteTheDefaultValueToMandatoryAttributeCurrentHue_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Write the default value to mandatory attribute: CurrentHue\n"); + err = TestWriteTheDefaultValueToMandatoryAttributeCurrentHue_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads back mandatory attribute: CurrentHue\n"); - err = TestReadsBackMandatoryAttributeCurrentHue_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads back mandatory attribute: CurrentHue\n"); + err = TestReadsBackMandatoryAttributeCurrentHue_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads mandatory attribute: CurrentSaturation\n"); - err = TestReadsMandatoryAttributeCurrentSaturation_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads mandatory attribute: CurrentSaturation\n"); + err = TestReadsMandatoryAttributeCurrentSaturation_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Validate constraints of attribute: CurrentSaturation\n"); - err = TestValidateConstraintsOfAttributeCurrentSaturation_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : Validate constraints of attribute: CurrentSaturation\n"); + err = TestValidateConstraintsOfAttributeCurrentSaturation_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Write the default value to mandatory attribute: CurrentSaturation\n"); - err = TestWriteTheDefaultValueToMandatoryAttributeCurrentSaturation_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : Write the default value to mandatory attribute: CurrentSaturation\n"); + err = TestWriteTheDefaultValueToMandatoryAttributeCurrentSaturation_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Reads back mandatory attribute: CurrentSaturation\n"); - err = TestReadsBackMandatoryAttributeCurrentSaturation_8(); - break; + ChipLogProgress(chipTool, " ***** Test Step 8 : Reads back mandatory attribute: CurrentSaturation\n"); + err = TestReadsBackMandatoryAttributeCurrentSaturation_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the mandatory attribute: CurrentX\n"); - err = TestReadTheMandatoryAttributeCurrentX_9(); - break; + ChipLogProgress(chipTool, " ***** Test Step 9 : Read the mandatory attribute: CurrentX\n"); + err = TestReadTheMandatoryAttributeCurrentX_9(); + break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Validate constraints of attribute: CurrentX\n"); - err = TestValidateConstraintsOfAttributeCurrentX_10(); - break; + ChipLogProgress(chipTool, " ***** Test Step 10 : Validate constraints of attribute: CurrentX\n"); + err = TestValidateConstraintsOfAttributeCurrentX_10(); + break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Write the default value to mandatory attribute: CurrentX\n"); - err = TestWriteTheDefaultValueToMandatoryAttributeCurrentX_11(); - break; + ChipLogProgress(chipTool, " ***** Test Step 11 : Write the default value to mandatory attribute: CurrentX\n"); + err = TestWriteTheDefaultValueToMandatoryAttributeCurrentX_11(); + break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Reads back mandatory attribute: CurrentX\n"); - err = TestReadsBackMandatoryAttributeCurrentX_12(); - break; + ChipLogProgress(chipTool, " ***** Test Step 12 : Reads back mandatory attribute: CurrentX\n"); + err = TestReadsBackMandatoryAttributeCurrentX_12(); + break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read the mandatory attribute: CurrentY\n"); - err = TestReadTheMandatoryAttributeCurrentY_13(); - break; + ChipLogProgress(chipTool, " ***** Test Step 13 : Read the mandatory attribute: CurrentY\n"); + err = TestReadTheMandatoryAttributeCurrentY_13(); + break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Validate constraints of attribute: CurrentY\n"); - err = TestValidateConstraintsOfAttributeCurrentY_14(); - break; + ChipLogProgress(chipTool, " ***** Test Step 14 : Validate constraints of attribute: CurrentY\n"); + err = TestValidateConstraintsOfAttributeCurrentY_14(); + break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Write the default values to mandatory attribute: CurrentY\n"); - err = TestWriteTheDefaultValuesToMandatoryAttributeCurrentY_15(); - break; + ChipLogProgress(chipTool, " ***** Test Step 15 : Write the default values to mandatory attribute: CurrentY\n"); + err = TestWriteTheDefaultValuesToMandatoryAttributeCurrentY_15(); + break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Reads back mandatory attribute: CurrentY\n"); - err = TestReadsBackMandatoryAttributeCurrentY_16(); - break; + ChipLogProgress(chipTool, " ***** Test Step 16 : Reads back mandatory attribute: CurrentY\n"); + err = TestReadsBackMandatoryAttributeCurrentY_16(); + break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Validate constraints of attribute: ColorTemperatureMireds\n"); - err = TestValidateConstraintsOfAttributeColorTemperatureMireds_17(); - break; + ChipLogProgress(chipTool, " ***** Test Step 17 : Validate constraints of attribute: ColorTemperatureMireds\n"); + err = TestValidateConstraintsOfAttributeColorTemperatureMireds_17(); + break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Validate constraints of attribute: ColorMode\n"); - err = TestValidateConstraintsOfAttributeColorMode_18(); - break; + ChipLogProgress(chipTool, " ***** Test Step 18 : Validate constraints of attribute: ColorMode\n"); + err = TestValidateConstraintsOfAttributeColorMode_18(); + break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Read the mandatory attribute: Options\n"); - err = TestReadTheMandatoryAttributeOptions_19(); - break; + ChipLogProgress(chipTool, " ***** Test Step 19 : Read the mandatory attribute: Options\n"); + err = TestReadTheMandatoryAttributeOptions_19(); + break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Validate constraints of attribute: Options\n"); - err = TestValidateConstraintsOfAttributeOptions_20(); - break; + ChipLogProgress(chipTool, " ***** Test Step 20 : Validate constraints of attribute: Options\n"); + err = TestValidateConstraintsOfAttributeOptions_20(); + break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Write the default values to mandatory attribute: Options\n"); - err = TestWriteTheDefaultValuesToMandatoryAttributeOptions_21(); - break; + ChipLogProgress(chipTool, " ***** Test Step 21 : Write the default values to mandatory attribute: Options\n"); + err = TestWriteTheDefaultValuesToMandatoryAttributeOptions_21(); + break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Reads back mandatory attribute: Options\n"); - err = TestReadsBackMandatoryAttributeOptions_22(); - break; + ChipLogProgress(chipTool, " ***** Test Step 22 : Reads back mandatory attribute: Options\n"); + err = TestReadsBackMandatoryAttributeOptions_22(); + break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Read the mandatory attribute: EnhancedCurrentHue\n"); - err = TestReadTheMandatoryAttributeEnhancedCurrentHue_23(); - break; + ChipLogProgress(chipTool, " ***** Test Step 23 : Read the mandatory attribute: EnhancedCurrentHue\n"); + err = TestReadTheMandatoryAttributeEnhancedCurrentHue_23(); + break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Validate constraints of attribute: EnhancedCurrentHue\n"); - err = TestValidateConstraintsOfAttributeEnhancedCurrentHue_24(); - break; + ChipLogProgress(chipTool, " ***** Test Step 24 : Validate constraints of attribute: EnhancedCurrentHue\n"); + err = TestValidateConstraintsOfAttributeEnhancedCurrentHue_24(); + break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Write the default values to mandatory attribute: EnhancedCurrentHue\n"); - err = TestWriteTheDefaultValuesToMandatoryAttributeEnhancedCurrentHue_25(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 25 : Write the default values to mandatory attribute: EnhancedCurrentHue\n"); + err = TestWriteTheDefaultValuesToMandatoryAttributeEnhancedCurrentHue_25(); + break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Reads back mandatory attribute: EnhancedCurrentHue\n"); - err = TestReadsBackMandatoryAttributeEnhancedCurrentHue_26(); - break; + ChipLogProgress(chipTool, " ***** Test Step 26 : Reads back mandatory attribute: EnhancedCurrentHue\n"); + err = TestReadsBackMandatoryAttributeEnhancedCurrentHue_26(); + break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Validate constraints of attribute: EnhancedColorMode\n"); - err = TestValidateConstraintsOfAttributeEnhancedColorMode_27(); - break; + ChipLogProgress(chipTool, " ***** Test Step 27 : Validate constraints of attribute: EnhancedColorMode\n"); + err = TestValidateConstraintsOfAttributeEnhancedColorMode_27(); + break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Read the mandatory attribute: ColorLoopActive\n"); - err = TestReadTheMandatoryAttributeColorLoopActive_28(); - break; + ChipLogProgress(chipTool, " ***** Test Step 28 : Read the mandatory attribute: ColorLoopActive\n"); + err = TestReadTheMandatoryAttributeColorLoopActive_28(); + break; case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Validate constraints of attribute: ColorLoopActive\n"); - err = TestValidateConstraintsOfAttributeColorLoopActive_29(); - break; + ChipLogProgress(chipTool, " ***** Test Step 29 : Validate constraints of attribute: ColorLoopActive\n"); + err = TestValidateConstraintsOfAttributeColorLoopActive_29(); + break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Write the default values to mandatory attribute: ColorLoopActive\n"); - err = TestWriteTheDefaultValuesToMandatoryAttributeColorLoopActive_30(); - break; + ChipLogProgress(chipTool, " ***** Test Step 30 : Write the default values to mandatory attribute: ColorLoopActive\n"); + err = TestWriteTheDefaultValuesToMandatoryAttributeColorLoopActive_30(); + break; case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Reads back mandatory attribute: ColorLoopActive\n"); - err = TestReadsBackMandatoryAttributeColorLoopActive_31(); - break; + ChipLogProgress(chipTool, " ***** Test Step 31 : Reads back mandatory attribute: ColorLoopActive\n"); + err = TestReadsBackMandatoryAttributeColorLoopActive_31(); + break; case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Read the mandatory attribute: ColorLoopDirection\n"); - err = TestReadTheMandatoryAttributeColorLoopDirection_32(); - break; + ChipLogProgress(chipTool, " ***** Test Step 32 : Read the mandatory attribute: ColorLoopDirection\n"); + err = TestReadTheMandatoryAttributeColorLoopDirection_32(); + break; case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Validate constraints of attribute: ColorLoopDirection\n"); - err = TestValidateConstraintsOfAttributeColorLoopDirection_33(); - break; + ChipLogProgress(chipTool, " ***** Test Step 33 : Validate constraints of attribute: ColorLoopDirection\n"); + err = TestValidateConstraintsOfAttributeColorLoopDirection_33(); + break; case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Write the default values to mandatory attribute: ColorLoopDirection\n"); - err = TestWriteTheDefaultValuesToMandatoryAttributeColorLoopDirection_34(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 34 : Write the default values to mandatory attribute: ColorLoopDirection\n"); + err = TestWriteTheDefaultValuesToMandatoryAttributeColorLoopDirection_34(); + break; case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Reads back mandatory attribute: ColorLoopDirection\n"); - err = TestReadsBackMandatoryAttributeColorLoopDirection_35(); - break; + ChipLogProgress(chipTool, " ***** Test Step 35 : Reads back mandatory attribute: ColorLoopDirection\n"); + err = TestReadsBackMandatoryAttributeColorLoopDirection_35(); + break; case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Read the mandatory attribute: ColorLoopTime\n"); - err = TestReadTheMandatoryAttributeColorLoopTime_36(); - break; + ChipLogProgress(chipTool, " ***** Test Step 36 : Read the mandatory attribute: ColorLoopTime\n"); + err = TestReadTheMandatoryAttributeColorLoopTime_36(); + break; case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Validate constraints of attribute: ColorLoopTime\n"); - err = TestValidateConstraintsOfAttributeColorLoopTime_37(); - break; + ChipLogProgress(chipTool, " ***** Test Step 37 : Validate constraints of attribute: ColorLoopTime\n"); + err = TestValidateConstraintsOfAttributeColorLoopTime_37(); + break; case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : Write the default values to mandatory attribute: ColorLoopTime\n"); - err = TestWriteTheDefaultValuesToMandatoryAttributeColorLoopTime_38(); - break; + ChipLogProgress(chipTool, " ***** Test Step 38 : Write the default values to mandatory attribute: ColorLoopTime\n"); + err = TestWriteTheDefaultValuesToMandatoryAttributeColorLoopTime_38(); + break; case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : Reads back mandatory attribute: ColorLoopTime\n"); - err = TestReadsBackMandatoryAttributeColorLoopTime_39(); - break; + ChipLogProgress(chipTool, " ***** Test Step 39 : Reads back mandatory attribute: ColorLoopTime\n"); + err = TestReadsBackMandatoryAttributeColorLoopTime_39(); + break; case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : Read the mandatory attribute: ColorLoopStartEnhancedHue\n"); - err = TestReadTheMandatoryAttributeColorLoopStartEnhancedHue_40(); - break; + ChipLogProgress(chipTool, " ***** Test Step 40 : Read the mandatory attribute: ColorLoopStartEnhancedHue\n"); + err = TestReadTheMandatoryAttributeColorLoopStartEnhancedHue_40(); + break; case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : Validate constraints of attribute: ColorLoopStartEnhancedHue\n"); - err = TestValidateConstraintsOfAttributeColorLoopStartEnhancedHue_41(); - break; + ChipLogProgress(chipTool, " ***** Test Step 41 : Validate constraints of attribute: ColorLoopStartEnhancedHue\n"); + err = TestValidateConstraintsOfAttributeColorLoopStartEnhancedHue_41(); + break; case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : Write the default values to mandatory attribute: ColorLoopStartEnhancedHue\n"); - err = TestWriteTheDefaultValuesToMandatoryAttributeColorLoopStartEnhancedHue_42(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 42 : Write the default values to mandatory attribute: ColorLoopStartEnhancedHue\n"); + err = TestWriteTheDefaultValuesToMandatoryAttributeColorLoopStartEnhancedHue_42(); + break; case 43: - ChipLogProgress(chipTool, " ***** Test Step 43 : Reads back mandatory attribute: ColorLoopStartEnhancedHue\n"); - err = TestReadsBackMandatoryAttributeColorLoopStartEnhancedHue_43(); - break; + ChipLogProgress(chipTool, " ***** Test Step 43 : Reads back mandatory attribute: ColorLoopStartEnhancedHue\n"); + err = TestReadsBackMandatoryAttributeColorLoopStartEnhancedHue_43(); + break; case 44: - ChipLogProgress(chipTool, " ***** Test Step 44 : Read the mandatory attribute: ColorLoopStoredEnhancedHue\n"); - err = TestReadTheMandatoryAttributeColorLoopStoredEnhancedHue_44(); - break; + ChipLogProgress(chipTool, " ***** Test Step 44 : Read the mandatory attribute: ColorLoopStoredEnhancedHue\n"); + err = TestReadTheMandatoryAttributeColorLoopStoredEnhancedHue_44(); + break; case 45: - ChipLogProgress(chipTool, " ***** Test Step 45 : Validate constraints of attribute: ColorLoopStoredEnhancedHue\n"); - err = TestValidateConstraintsOfAttributeColorLoopStoredEnhancedHue_45(); - break; + ChipLogProgress(chipTool, " ***** Test Step 45 : Validate constraints of attribute: ColorLoopStoredEnhancedHue\n"); + err = TestValidateConstraintsOfAttributeColorLoopStoredEnhancedHue_45(); + break; case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : Write the default values to mandatory attribute: ColorLoopStoredEnhancedHue\n"); - err = TestWriteTheDefaultValuesToMandatoryAttributeColorLoopStoredEnhancedHue_46(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 46 : Write the default values to mandatory attribute: ColorLoopStoredEnhancedHue\n"); + err = TestWriteTheDefaultValuesToMandatoryAttributeColorLoopStoredEnhancedHue_46(); + break; case 47: - ChipLogProgress(chipTool, " ***** Test Step 47 : Reads back mandatory attribute: ColorLoopStoredEnhancedHue\n"); - err = TestReadsBackMandatoryAttributeColorLoopStoredEnhancedHue_47(); - break; + ChipLogProgress(chipTool, " ***** Test Step 47 : Reads back mandatory attribute: ColorLoopStoredEnhancedHue\n"); + err = TestReadsBackMandatoryAttributeColorLoopStoredEnhancedHue_47(); + break; case 48: - ChipLogProgress(chipTool, " ***** Test Step 48 : Read the mandatory attribute: ColorCapabilities\n"); - err = TestReadTheMandatoryAttributeColorCapabilities_48(); - break; + ChipLogProgress(chipTool, " ***** Test Step 48 : Read the mandatory attribute: ColorCapabilities\n"); + err = TestReadTheMandatoryAttributeColorCapabilities_48(); + break; case 49: - ChipLogProgress(chipTool, " ***** Test Step 49 : Validate constraints of attribute: ColorCapabilities\n"); - err = TestValidateConstraintsOfAttributeColorCapabilities_49(); - break; + ChipLogProgress(chipTool, " ***** Test Step 49 : Validate constraints of attribute: ColorCapabilities\n"); + err = TestValidateConstraintsOfAttributeColorCapabilities_49(); + break; case 50: - ChipLogProgress(chipTool, " ***** Test Step 50 : Write the default values to mandatory attribute: ColorCapabilities\n"); - err = TestWriteTheDefaultValuesToMandatoryAttributeColorCapabilities_50(); - break; + ChipLogProgress(chipTool, " ***** Test Step 50 : Write the default values to mandatory attribute: ColorCapabilities\n"); + err = TestWriteTheDefaultValuesToMandatoryAttributeColorCapabilities_50(); + break; case 51: - ChipLogProgress(chipTool, " ***** Test Step 51 : Reads back mandatory attribute: ColorCapabilities\n"); - err = TestReadsBackMandatoryAttributeColorCapabilities_51(); - break; + ChipLogProgress(chipTool, " ***** Test Step 51 : Reads back mandatory attribute: ColorCapabilities\n"); + err = TestReadsBackMandatoryAttributeColorCapabilities_51(); + break; case 52: - ChipLogProgress(chipTool, " ***** Test Step 52 : Read the mandatory attribute: ColorTempPhysicalMinMireds\n"); - err = TestReadTheMandatoryAttributeColorTempPhysicalMinMireds_52(); - break; + ChipLogProgress(chipTool, " ***** Test Step 52 : Read the mandatory attribute: ColorTempPhysicalMinMireds\n"); + err = TestReadTheMandatoryAttributeColorTempPhysicalMinMireds_52(); + break; case 53: - ChipLogProgress(chipTool, " ***** Test Step 53 : Validate constraints of attribute: ColorTempPhysicalMinMireds\n"); - err = TestValidateConstraintsOfAttributeColorTempPhysicalMinMireds_53(); - break; + ChipLogProgress(chipTool, " ***** Test Step 53 : Validate constraints of attribute: ColorTempPhysicalMinMireds\n"); + err = TestValidateConstraintsOfAttributeColorTempPhysicalMinMireds_53(); + break; case 54: - ChipLogProgress(chipTool, " ***** Test Step 54 : Write the default values to mandatory attribute: ColorTempPhysicalMinMireds\n"); - err = TestWriteTheDefaultValuesToMandatoryAttributeColorTempPhysicalMinMireds_54(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 54 : Write the default values to mandatory attribute: ColorTempPhysicalMinMireds\n"); + err = TestWriteTheDefaultValuesToMandatoryAttributeColorTempPhysicalMinMireds_54(); + break; case 55: - ChipLogProgress(chipTool, " ***** Test Step 55 : Reads back mandatory attribute: ColorTempPhysicalMinMireds\n"); - err = TestReadsBackMandatoryAttributeColorTempPhysicalMinMireds_55(); - break; + ChipLogProgress(chipTool, " ***** Test Step 55 : Reads back mandatory attribute: ColorTempPhysicalMinMireds\n"); + err = TestReadsBackMandatoryAttributeColorTempPhysicalMinMireds_55(); + break; case 56: - ChipLogProgress(chipTool, " ***** Test Step 56 : Read the mandatory attribute: ColorTempPhysicalMaxMireds\n"); - err = TestReadTheMandatoryAttributeColorTempPhysicalMaxMireds_56(); - break; + ChipLogProgress(chipTool, " ***** Test Step 56 : Read the mandatory attribute: ColorTempPhysicalMaxMireds\n"); + err = TestReadTheMandatoryAttributeColorTempPhysicalMaxMireds_56(); + break; case 57: - ChipLogProgress(chipTool, " ***** Test Step 57 : Validate constraints of attribute: ColorTempPhysicalMaxMireds\n"); - err = TestValidateConstraintsOfAttributeColorTempPhysicalMaxMireds_57(); - break; + ChipLogProgress(chipTool, " ***** Test Step 57 : Validate constraints of attribute: ColorTempPhysicalMaxMireds\n"); + err = TestValidateConstraintsOfAttributeColorTempPhysicalMaxMireds_57(); + break; case 58: - ChipLogProgress(chipTool, " ***** Test Step 58 : Write the default values to mandatory attribute: ColorTempPhysicalMaxMireds\n"); - err = TestWriteTheDefaultValuesToMandatoryAttributeColorTempPhysicalMaxMireds_58(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 58 : Write the default values to mandatory attribute: ColorTempPhysicalMaxMireds\n"); + err = TestWriteTheDefaultValuesToMandatoryAttributeColorTempPhysicalMaxMireds_58(); + break; case 59: - ChipLogProgress(chipTool, " ***** Test Step 59 : Reads back mandatory attribute: ColorTempPhysicalMaxMireds\n"); - err = TestReadsBackMandatoryAttributeColorTempPhysicalMaxMireds_59(); - break; + ChipLogProgress(chipTool, " ***** Test Step 59 : Reads back mandatory attribute: ColorTempPhysicalMaxMireds\n"); + err = TestReadsBackMandatoryAttributeColorTempPhysicalMaxMireds_59(); + break; case 60: - ChipLogProgress(chipTool, " ***** Test Step 60 : Read the optional attribute: CoupleColorTempToLevelMinMireds\n"); - err = TestReadTheOptionalAttributeCoupleColorTempToLevelMinMireds_60(); - break; + ChipLogProgress(chipTool, " ***** Test Step 60 : Read the optional attribute: CoupleColorTempToLevelMinMireds\n"); + err = TestReadTheOptionalAttributeCoupleColorTempToLevelMinMireds_60(); + break; case 61: - ChipLogProgress(chipTool, " ***** Test Step 61 : Write the default values to optional attribute: CoupleColorTempToLevelMinMireds\n"); - err = TestWriteTheDefaultValuesToOptionalAttributeCoupleColorTempToLevelMinMireds_61(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 61 : Write the default values to optional attribute: CoupleColorTempToLevelMinMireds\n"); + err = TestWriteTheDefaultValuesToOptionalAttributeCoupleColorTempToLevelMinMireds_61(); + break; case 62: - ChipLogProgress(chipTool, " ***** Test Step 62 : Reads back optional attribute: CoupleColorTempToLevelMinMireds\n"); - err = TestReadsBackOptionalAttributeCoupleColorTempToLevelMinMireds_62(); - break; + ChipLogProgress(chipTool, " ***** Test Step 62 : Reads back optional attribute: CoupleColorTempToLevelMinMireds\n"); + err = TestReadsBackOptionalAttributeCoupleColorTempToLevelMinMireds_62(); + break; case 63: - ChipLogProgress(chipTool, " ***** Test Step 63 : Read the optional attribute: StartUpColorTemperatureMireds\n"); - err = TestReadTheOptionalAttributeStartUpColorTemperatureMireds_63(); - break; + ChipLogProgress(chipTool, " ***** Test Step 63 : Read the optional attribute: StartUpColorTemperatureMireds\n"); + err = TestReadTheOptionalAttributeStartUpColorTemperatureMireds_63(); + break; case 64: - ChipLogProgress(chipTool, " ***** Test Step 64 : Write the default values to optional attribute: StartUpColorTemperatureMireds\n"); - err = TestWriteTheDefaultValuesToOptionalAttributeStartUpColorTemperatureMireds_64(); - break; + ChipLogProgress( + chipTool, " ***** Test Step 64 : Write the default values to optional attribute: StartUpColorTemperatureMireds\n"); + err = TestWriteTheDefaultValuesToOptionalAttributeStartUpColorTemperatureMireds_64(); + break; case 65: - ChipLogProgress(chipTool, " ***** Test Step 65 : Reads back optional attribute: StartUpColorTemperatureMireds\n"); - err = TestReadsBackOptionalAttributeStartUpColorTemperatureMireds_65(); - break; + ChipLogProgress(chipTool, " ***** Test Step 65 : Reads back optional attribute: StartUpColorTemperatureMireds\n"); + err = TestReadsBackOptionalAttributeStartUpColorTemperatureMireds_65(); + break; case 66: - ChipLogProgress(chipTool, " ***** Test Step 66 : Read the Optional attribute: RemainingTime\n"); - err = TestReadTheOptionalAttributeRemainingTime_66(); - break; + ChipLogProgress(chipTool, " ***** Test Step 66 : Read the Optional attribute: RemainingTime\n"); + err = TestReadTheOptionalAttributeRemainingTime_66(); + break; case 67: - ChipLogProgress(chipTool, " ***** Test Step 67 : Validate constraints of attribute: RemainingTime\n"); - err = TestValidateConstraintsOfAttributeRemainingTime_67(); - break; + ChipLogProgress(chipTool, " ***** Test Step 67 : Validate constraints of attribute: RemainingTime\n"); + err = TestValidateConstraintsOfAttributeRemainingTime_67(); + break; case 68: - ChipLogProgress(chipTool, " ***** Test Step 68 : Write the default values to optional attribute: RemainingTime\n"); - err = TestWriteTheDefaultValuesToOptionalAttributeRemainingTime_68(); - break; + ChipLogProgress(chipTool, " ***** Test Step 68 : Write the default values to optional attribute: RemainingTime\n"); + err = TestWriteTheDefaultValuesToOptionalAttributeRemainingTime_68(); + break; case 69: - ChipLogProgress(chipTool, " ***** Test Step 69 : Reads back optional attribute: RemainingTime\n"); - err = TestReadsBackOptionalAttributeRemainingTime_69(); - break; + ChipLogProgress(chipTool, " ***** Test Step 69 : Reads back optional attribute: RemainingTime\n"); + err = TestReadsBackOptionalAttributeRemainingTime_69(); + break; case 70: - ChipLogProgress(chipTool, " ***** Test Step 70 : Read the optional attribute: DriftCompensation\n"); - err = TestReadTheOptionalAttributeDriftCompensation_70(); - break; + ChipLogProgress(chipTool, " ***** Test Step 70 : Read the optional attribute: DriftCompensation\n"); + err = TestReadTheOptionalAttributeDriftCompensation_70(); + break; case 71: - ChipLogProgress(chipTool, " ***** Test Step 71 : Write the default values to optional attribute: DriftCompensation\n"); - err = TestWriteTheDefaultValuesToOptionalAttributeDriftCompensation_71(); - break; + ChipLogProgress(chipTool, " ***** Test Step 71 : Write the default values to optional attribute: DriftCompensation\n"); + err = TestWriteTheDefaultValuesToOptionalAttributeDriftCompensation_71(); + break; case 72: - ChipLogProgress(chipTool, " ***** Test Step 72 : Reads back optional attribute: DriftCompensation\n"); - err = TestReadsBackOptionalAttributeDriftCompensation_72(); - break; + ChipLogProgress(chipTool, " ***** Test Step 72 : Reads back optional attribute: DriftCompensation\n"); + err = TestReadsBackOptionalAttributeDriftCompensation_72(); + break; case 73: - ChipLogProgress(chipTool, " ***** Test Step 73 : Read the optional attribute: CompensationText\n"); - err = TestReadTheOptionalAttributeCompensationText_73(); - break; + ChipLogProgress(chipTool, " ***** Test Step 73 : Read the optional attribute: CompensationText\n"); + err = TestReadTheOptionalAttributeCompensationText_73(); + break; case 74: - ChipLogProgress(chipTool, " ***** Test Step 74 : Write the default values to optional attribute: CompensationText\n"); - err = TestWriteTheDefaultValuesToOptionalAttributeCompensationText_74(); - break; + ChipLogProgress(chipTool, " ***** Test Step 74 : Write the default values to optional attribute: CompensationText\n"); + err = TestWriteTheDefaultValuesToOptionalAttributeCompensationText_74(); + break; case 75: - ChipLogProgress(chipTool, " ***** Test Step 75 : Reads back optional attribute: CompensationText\n"); - err = TestReadsBackOptionalAttributeCompensationText_75(); - break; + ChipLogProgress(chipTool, " ***** Test Step 75 : Reads back optional attribute: CompensationText\n"); + err = TestReadsBackOptionalAttributeCompensationText_75(); + break; case 76: - ChipLogProgress(chipTool, " ***** Test Step 76 : Read the mandatory attribute: NumberOfPrimaries\n"); - err = TestReadTheMandatoryAttributeNumberOfPrimaries_76(); - break; + ChipLogProgress(chipTool, " ***** Test Step 76 : Read the mandatory attribute: NumberOfPrimaries\n"); + err = TestReadTheMandatoryAttributeNumberOfPrimaries_76(); + break; case 77: - ChipLogProgress(chipTool, " ***** Test Step 77 : Write the default mandatory attribute: NumberOfPrimaries\n"); - err = TestWriteTheDefaultMandatoryAttributeNumberOfPrimaries_77(); - break; + ChipLogProgress(chipTool, " ***** Test Step 77 : Write the default mandatory attribute: NumberOfPrimaries\n"); + err = TestWriteTheDefaultMandatoryAttributeNumberOfPrimaries_77(); + break; case 78: - ChipLogProgress(chipTool, " ***** Test Step 78 : Read back the mandatory attribute: NumberOfPrimaries\n"); - err = TestReadBackTheMandatoryAttributeNumberOfPrimaries_78(); - break; + ChipLogProgress(chipTool, " ***** Test Step 78 : Read back the mandatory attribute: NumberOfPrimaries\n"); + err = TestReadBackTheMandatoryAttributeNumberOfPrimaries_78(); + break; case 79: - ChipLogProgress(chipTool, " ***** Test Step 79 : Read the mandatory attribute: Primary1X\n"); - err = TestReadTheMandatoryAttributePrimary1X_79(); - break; + ChipLogProgress(chipTool, " ***** Test Step 79 : Read the mandatory attribute: Primary1X\n"); + err = TestReadTheMandatoryAttributePrimary1X_79(); + break; case 80: - ChipLogProgress(chipTool, " ***** Test Step 80 : Write the default mandatory attribute: Primary1X\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary1X_80(); - break; + ChipLogProgress(chipTool, " ***** Test Step 80 : Write the default mandatory attribute: Primary1X\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary1X_80(); + break; case 81: - ChipLogProgress(chipTool, " ***** Test Step 81 : Read back the mandatory attribute: Primary1X\n"); - err = TestReadBackTheMandatoryAttributePrimary1X_81(); - break; + ChipLogProgress(chipTool, " ***** Test Step 81 : Read back the mandatory attribute: Primary1X\n"); + err = TestReadBackTheMandatoryAttributePrimary1X_81(); + break; case 82: - ChipLogProgress(chipTool, " ***** Test Step 82 : Read the mandatory attribute: Primary1Y\n"); - err = TestReadTheMandatoryAttributePrimary1Y_82(); - break; + ChipLogProgress(chipTool, " ***** Test Step 82 : Read the mandatory attribute: Primary1Y\n"); + err = TestReadTheMandatoryAttributePrimary1Y_82(); + break; case 83: - ChipLogProgress(chipTool, " ***** Test Step 83 : Write the default mandatory attribute: Primary1Y\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary1Y_83(); - break; + ChipLogProgress(chipTool, " ***** Test Step 83 : Write the default mandatory attribute: Primary1Y\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary1Y_83(); + break; case 84: - ChipLogProgress(chipTool, " ***** Test Step 84 : Read back the mandatory attribute: Primary1Y\n"); - err = TestReadBackTheMandatoryAttributePrimary1Y_84(); - break; + ChipLogProgress(chipTool, " ***** Test Step 84 : Read back the mandatory attribute: Primary1Y\n"); + err = TestReadBackTheMandatoryAttributePrimary1Y_84(); + break; case 85: - ChipLogProgress(chipTool, " ***** Test Step 85 : Read the mandatory attribute: Primary1Intensity\n"); - err = TestReadTheMandatoryAttributePrimary1Intensity_85(); - break; + ChipLogProgress(chipTool, " ***** Test Step 85 : Read the mandatory attribute: Primary1Intensity\n"); + err = TestReadTheMandatoryAttributePrimary1Intensity_85(); + break; case 86: - ChipLogProgress(chipTool, " ***** Test Step 86 : Read the mandatory attribute: Primary2X\n"); - err = TestReadTheMandatoryAttributePrimary2X_86(); - break; + ChipLogProgress(chipTool, " ***** Test Step 86 : Read the mandatory attribute: Primary2X\n"); + err = TestReadTheMandatoryAttributePrimary2X_86(); + break; case 87: - ChipLogProgress(chipTool, " ***** Test Step 87 : Write the default mandatory attribute: Primary2X\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary2X_87(); - break; + ChipLogProgress(chipTool, " ***** Test Step 87 : Write the default mandatory attribute: Primary2X\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary2X_87(); + break; case 88: - ChipLogProgress(chipTool, " ***** Test Step 88 : Read back the mandatory attribute: Primary2X\n"); - err = TestReadBackTheMandatoryAttributePrimary2X_88(); - break; + ChipLogProgress(chipTool, " ***** Test Step 88 : Read back the mandatory attribute: Primary2X\n"); + err = TestReadBackTheMandatoryAttributePrimary2X_88(); + break; case 89: - ChipLogProgress(chipTool, " ***** Test Step 89 : Read the mandatory attribute: Primary2Y\n"); - err = TestReadTheMandatoryAttributePrimary2Y_89(); - break; + ChipLogProgress(chipTool, " ***** Test Step 89 : Read the mandatory attribute: Primary2Y\n"); + err = TestReadTheMandatoryAttributePrimary2Y_89(); + break; case 90: - ChipLogProgress(chipTool, " ***** Test Step 90 : Write the default mandatory attribute: Primary2Y\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary2Y_90(); - break; + ChipLogProgress(chipTool, " ***** Test Step 90 : Write the default mandatory attribute: Primary2Y\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary2Y_90(); + break; case 91: - ChipLogProgress(chipTool, " ***** Test Step 91 : Read back the mandatory attribute: Primary2Y\n"); - err = TestReadBackTheMandatoryAttributePrimary2Y_91(); - break; + ChipLogProgress(chipTool, " ***** Test Step 91 : Read back the mandatory attribute: Primary2Y\n"); + err = TestReadBackTheMandatoryAttributePrimary2Y_91(); + break; case 92: - ChipLogProgress(chipTool, " ***** Test Step 92 : Validate constraints of attribute: Primary2Intensity\n"); - err = TestValidateConstraintsOfAttributePrimary2Intensity_92(); - break; + ChipLogProgress(chipTool, " ***** Test Step 92 : Validate constraints of attribute: Primary2Intensity\n"); + err = TestValidateConstraintsOfAttributePrimary2Intensity_92(); + break; case 93: - ChipLogProgress(chipTool, " ***** Test Step 93 : Read the mandatory attribute: Primary3X\n"); - err = TestReadTheMandatoryAttributePrimary3X_93(); - break; + ChipLogProgress(chipTool, " ***** Test Step 93 : Read the mandatory attribute: Primary3X\n"); + err = TestReadTheMandatoryAttributePrimary3X_93(); + break; case 94: - ChipLogProgress(chipTool, " ***** Test Step 94 : Write the default mandatory attribute: Primary3X\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary3X_94(); - break; + ChipLogProgress(chipTool, " ***** Test Step 94 : Write the default mandatory attribute: Primary3X\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary3X_94(); + break; case 95: - ChipLogProgress(chipTool, " ***** Test Step 95 : Read back the mandatory attribute: Primary3X\n"); - err = TestReadBackTheMandatoryAttributePrimary3X_95(); - break; + ChipLogProgress(chipTool, " ***** Test Step 95 : Read back the mandatory attribute: Primary3X\n"); + err = TestReadBackTheMandatoryAttributePrimary3X_95(); + break; case 96: - ChipLogProgress(chipTool, " ***** Test Step 96 : Read the mandatory attribute: Primary3Y\n"); - err = TestReadTheMandatoryAttributePrimary3Y_96(); - break; + ChipLogProgress(chipTool, " ***** Test Step 96 : Read the mandatory attribute: Primary3Y\n"); + err = TestReadTheMandatoryAttributePrimary3Y_96(); + break; case 97: - ChipLogProgress(chipTool, " ***** Test Step 97 : Write the default mandatory attribute: Primary3Y\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary3Y_97(); - break; + ChipLogProgress(chipTool, " ***** Test Step 97 : Write the default mandatory attribute: Primary3Y\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary3Y_97(); + break; case 98: - ChipLogProgress(chipTool, " ***** Test Step 98 : Read back the mandatory attribute: Primary3Y\n"); - err = TestReadBackTheMandatoryAttributePrimary3Y_98(); - break; + ChipLogProgress(chipTool, " ***** Test Step 98 : Read back the mandatory attribute: Primary3Y\n"); + err = TestReadBackTheMandatoryAttributePrimary3Y_98(); + break; case 99: - ChipLogProgress(chipTool, " ***** Test Step 99 : Read the mandatory attribute: Primary3Intensity\n"); - err = TestReadTheMandatoryAttributePrimary3Intensity_99(); - break; + ChipLogProgress(chipTool, " ***** Test Step 99 : Read the mandatory attribute: Primary3Intensity\n"); + err = TestReadTheMandatoryAttributePrimary3Intensity_99(); + break; case 100: - ChipLogProgress(chipTool, " ***** Test Step 100 : Read the mandatory attribute: Primary4X\n"); - err = TestReadTheMandatoryAttributePrimary4X_100(); - break; + ChipLogProgress(chipTool, " ***** Test Step 100 : Read the mandatory attribute: Primary4X\n"); + err = TestReadTheMandatoryAttributePrimary4X_100(); + break; case 101: - ChipLogProgress(chipTool, " ***** Test Step 101 : Write the default mandatory attribute: Primary4X\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary4X_101(); - break; + ChipLogProgress(chipTool, " ***** Test Step 101 : Write the default mandatory attribute: Primary4X\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary4X_101(); + break; case 102: - ChipLogProgress(chipTool, " ***** Test Step 102 : Read back the mandatory attribute: Primary4X\n"); - err = TestReadBackTheMandatoryAttributePrimary4X_102(); - break; + ChipLogProgress(chipTool, " ***** Test Step 102 : Read back the mandatory attribute: Primary4X\n"); + err = TestReadBackTheMandatoryAttributePrimary4X_102(); + break; case 103: - ChipLogProgress(chipTool, " ***** Test Step 103 : Read the mandatory attribute: Primary4Y\n"); - err = TestReadTheMandatoryAttributePrimary4Y_103(); - break; + ChipLogProgress(chipTool, " ***** Test Step 103 : Read the mandatory attribute: Primary4Y\n"); + err = TestReadTheMandatoryAttributePrimary4Y_103(); + break; case 104: - ChipLogProgress(chipTool, " ***** Test Step 104 : Write the default mandatory attribute: Primary4Y\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary4Y_104(); - break; + ChipLogProgress(chipTool, " ***** Test Step 104 : Write the default mandatory attribute: Primary4Y\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary4Y_104(); + break; case 105: - ChipLogProgress(chipTool, " ***** Test Step 105 : Read back the mandatory attribute: Primary4Y\n"); - err = TestReadBackTheMandatoryAttributePrimary4Y_105(); - break; + ChipLogProgress(chipTool, " ***** Test Step 105 : Read back the mandatory attribute: Primary4Y\n"); + err = TestReadBackTheMandatoryAttributePrimary4Y_105(); + break; case 106: - ChipLogProgress(chipTool, " ***** Test Step 106 : Read the mandatory attribute: Primary4Intensity\n"); - err = TestReadTheMandatoryAttributePrimary4Intensity_106(); - break; + ChipLogProgress(chipTool, " ***** Test Step 106 : Read the mandatory attribute: Primary4Intensity\n"); + err = TestReadTheMandatoryAttributePrimary4Intensity_106(); + break; case 107: - ChipLogProgress(chipTool, " ***** Test Step 107 : Read the mandatory attribute: Primary5X\n"); - err = TestReadTheMandatoryAttributePrimary5X_107(); - break; + ChipLogProgress(chipTool, " ***** Test Step 107 : Read the mandatory attribute: Primary5X\n"); + err = TestReadTheMandatoryAttributePrimary5X_107(); + break; case 108: - ChipLogProgress(chipTool, " ***** Test Step 108 : Write the default mandatory attribute: Primary5X\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary5X_108(); - break; + ChipLogProgress(chipTool, " ***** Test Step 108 : Write the default mandatory attribute: Primary5X\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary5X_108(); + break; case 109: - ChipLogProgress(chipTool, " ***** Test Step 109 : Read back the mandatory attribute: Primary5X\n"); - err = TestReadBackTheMandatoryAttributePrimary5X_109(); - break; + ChipLogProgress(chipTool, " ***** Test Step 109 : Read back the mandatory attribute: Primary5X\n"); + err = TestReadBackTheMandatoryAttributePrimary5X_109(); + break; case 110: - ChipLogProgress(chipTool, " ***** Test Step 110 : Read the mandatory attribute: Primary5Y\n"); - err = TestReadTheMandatoryAttributePrimary5Y_110(); - break; + ChipLogProgress(chipTool, " ***** Test Step 110 : Read the mandatory attribute: Primary5Y\n"); + err = TestReadTheMandatoryAttributePrimary5Y_110(); + break; case 111: - ChipLogProgress(chipTool, " ***** Test Step 111 : Write the default mandatory attribute: Primary5Y\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary5Y_111(); - break; + ChipLogProgress(chipTool, " ***** Test Step 111 : Write the default mandatory attribute: Primary5Y\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary5Y_111(); + break; case 112: - ChipLogProgress(chipTool, " ***** Test Step 112 : Read back the mandatory attribute: Primary5Y\n"); - err = TestReadBackTheMandatoryAttributePrimary5Y_112(); - break; + ChipLogProgress(chipTool, " ***** Test Step 112 : Read back the mandatory attribute: Primary5Y\n"); + err = TestReadBackTheMandatoryAttributePrimary5Y_112(); + break; case 113: - ChipLogProgress(chipTool, " ***** Test Step 113 : Read the mandatory attribute: Primary5Intensity\n"); - err = TestReadTheMandatoryAttributePrimary5Intensity_113(); - break; + ChipLogProgress(chipTool, " ***** Test Step 113 : Read the mandatory attribute: Primary5Intensity\n"); + err = TestReadTheMandatoryAttributePrimary5Intensity_113(); + break; case 114: - ChipLogProgress(chipTool, " ***** Test Step 114 : Read the mandatory attribute: Primary6X\n"); - err = TestReadTheMandatoryAttributePrimary6X_114(); - break; + ChipLogProgress(chipTool, " ***** Test Step 114 : Read the mandatory attribute: Primary6X\n"); + err = TestReadTheMandatoryAttributePrimary6X_114(); + break; case 115: - ChipLogProgress(chipTool, " ***** Test Step 115 : Write the default mandatory attribute: Primary6X\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary6X_115(); - break; + ChipLogProgress(chipTool, " ***** Test Step 115 : Write the default mandatory attribute: Primary6X\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary6X_115(); + break; case 116: - ChipLogProgress(chipTool, " ***** Test Step 116 : Read back the mandatory attribute: Primary6X\n"); - err = TestReadBackTheMandatoryAttributePrimary6X_116(); - break; + ChipLogProgress(chipTool, " ***** Test Step 116 : Read back the mandatory attribute: Primary6X\n"); + err = TestReadBackTheMandatoryAttributePrimary6X_116(); + break; case 117: - ChipLogProgress(chipTool, " ***** Test Step 117 : Read the mandatory attribute: Primary6Y\n"); - err = TestReadTheMandatoryAttributePrimary6Y_117(); - break; + ChipLogProgress(chipTool, " ***** Test Step 117 : Read the mandatory attribute: Primary6Y\n"); + err = TestReadTheMandatoryAttributePrimary6Y_117(); + break; case 118: - ChipLogProgress(chipTool, " ***** Test Step 118 : Write the default mandatory attribute: Primary6Y\n"); - err = TestWriteTheDefaultMandatoryAttributePrimary6Y_118(); - break; + ChipLogProgress(chipTool, " ***** Test Step 118 : Write the default mandatory attribute: Primary6Y\n"); + err = TestWriteTheDefaultMandatoryAttributePrimary6Y_118(); + break; case 119: - ChipLogProgress(chipTool, " ***** Test Step 119 : Read back the mandatory attribute: Primary6Y\n"); - err = TestReadBackTheMandatoryAttributePrimary6Y_119(); - break; + ChipLogProgress(chipTool, " ***** Test Step 119 : Read back the mandatory attribute: Primary6Y\n"); + err = TestReadBackTheMandatoryAttributePrimary6Y_119(); + break; case 120: - ChipLogProgress(chipTool, " ***** Test Step 120 : Read the mandatory attribute: Primary6Intensity\n"); - err = TestReadTheMandatoryAttributePrimary6Intensity_120(); - break; + ChipLogProgress(chipTool, " ***** Test Step 120 : Read the mandatory attribute: Primary6Intensity\n"); + err = TestReadTheMandatoryAttributePrimary6Intensity_120(); + break; case 121: - ChipLogProgress(chipTool, " ***** Test Step 121 : Read the optional attribute: WhitePointX\n"); - err = TestReadTheOptionalAttributeWhitePointX_121(); - break; + ChipLogProgress(chipTool, " ***** Test Step 121 : Read the optional attribute: WhitePointX\n"); + err = TestReadTheOptionalAttributeWhitePointX_121(); + break; case 122: - ChipLogProgress(chipTool, " ***** Test Step 122 : Write the default optional attribute: WhitePointX\n"); - err = TestWriteTheDefaultOptionalAttributeWhitePointX_122(); - break; + ChipLogProgress(chipTool, " ***** Test Step 122 : Write the default optional attribute: WhitePointX\n"); + err = TestWriteTheDefaultOptionalAttributeWhitePointX_122(); + break; case 123: - ChipLogProgress(chipTool, " ***** Test Step 123 : Read back the optional attribute: WhitePointX\n"); - err = TestReadBackTheOptionalAttributeWhitePointX_123(); - break; + ChipLogProgress(chipTool, " ***** Test Step 123 : Read back the optional attribute: WhitePointX\n"); + err = TestReadBackTheOptionalAttributeWhitePointX_123(); + break; case 124: - ChipLogProgress(chipTool, " ***** Test Step 124 : Read the optional attribute: WhitePointY\n"); - err = TestReadTheOptionalAttributeWhitePointY_124(); - break; + ChipLogProgress(chipTool, " ***** Test Step 124 : Read the optional attribute: WhitePointY\n"); + err = TestReadTheOptionalAttributeWhitePointY_124(); + break; case 125: - ChipLogProgress(chipTool, " ***** Test Step 125 : Write the default optional attribute: WhitePointY\n"); - err = TestWriteTheDefaultOptionalAttributeWhitePointY_125(); - break; + ChipLogProgress(chipTool, " ***** Test Step 125 : Write the default optional attribute: WhitePointY\n"); + err = TestWriteTheDefaultOptionalAttributeWhitePointY_125(); + break; case 126: - ChipLogProgress(chipTool, " ***** Test Step 126 : Read back the optional attribute: WhitePointY\n"); - err = TestReadBackTheOptionalAttributeWhitePointY_126(); - break; + ChipLogProgress(chipTool, " ***** Test Step 126 : Read back the optional attribute: WhitePointY\n"); + err = TestReadBackTheOptionalAttributeWhitePointY_126(); + break; case 127: - ChipLogProgress(chipTool, " ***** Test Step 127 : Read the optional attribute: ColorPointRX\n"); - err = TestReadTheOptionalAttributeColorPointRX_127(); - break; + ChipLogProgress(chipTool, " ***** Test Step 127 : Read the optional attribute: ColorPointRX\n"); + err = TestReadTheOptionalAttributeColorPointRX_127(); + break; case 128: - ChipLogProgress(chipTool, " ***** Test Step 128 : Write the default optional attribute: ColorPointRX\n"); - err = TestWriteTheDefaultOptionalAttributeColorPointRX_128(); - break; + ChipLogProgress(chipTool, " ***** Test Step 128 : Write the default optional attribute: ColorPointRX\n"); + err = TestWriteTheDefaultOptionalAttributeColorPointRX_128(); + break; case 129: - ChipLogProgress(chipTool, " ***** Test Step 129 : Read back the optional attribute: ColorPointRX\n"); - err = TestReadBackTheOptionalAttributeColorPointRX_129(); - break; + ChipLogProgress(chipTool, " ***** Test Step 129 : Read back the optional attribute: ColorPointRX\n"); + err = TestReadBackTheOptionalAttributeColorPointRX_129(); + break; case 130: - ChipLogProgress(chipTool, " ***** Test Step 130 : Read the optional attribute: ColorPointRY\n"); - err = TestReadTheOptionalAttributeColorPointRY_130(); - break; + ChipLogProgress(chipTool, " ***** Test Step 130 : Read the optional attribute: ColorPointRY\n"); + err = TestReadTheOptionalAttributeColorPointRY_130(); + break; case 131: - ChipLogProgress(chipTool, " ***** Test Step 131 : Write the default optional attribute: ColorPointRY\n"); - err = TestWriteTheDefaultOptionalAttributeColorPointRY_131(); - break; + ChipLogProgress(chipTool, " ***** Test Step 131 : Write the default optional attribute: ColorPointRY\n"); + err = TestWriteTheDefaultOptionalAttributeColorPointRY_131(); + break; case 132: - ChipLogProgress(chipTool, " ***** Test Step 132 : Read back the optional attribute: ColorPointRY\n"); - err = TestReadBackTheOptionalAttributeColorPointRY_132(); - break; + ChipLogProgress(chipTool, " ***** Test Step 132 : Read back the optional attribute: ColorPointRY\n"); + err = TestReadBackTheOptionalAttributeColorPointRY_132(); + break; case 133: - ChipLogProgress(chipTool, " ***** Test Step 133 : Read the optional attribute: ColorPointRIntensity\n"); - err = TestReadTheOptionalAttributeColorPointRIntensity_133(); - break; + ChipLogProgress(chipTool, " ***** Test Step 133 : Read the optional attribute: ColorPointRIntensity\n"); + err = TestReadTheOptionalAttributeColorPointRIntensity_133(); + break; case 134: - ChipLogProgress(chipTool, " ***** Test Step 134 : Write the default optional attribute: ColorPointRIntensity\n"); - err = TestWriteTheDefaultOptionalAttributeColorPointRIntensity_134(); - break; + ChipLogProgress(chipTool, " ***** Test Step 134 : Write the default optional attribute: ColorPointRIntensity\n"); + err = TestWriteTheDefaultOptionalAttributeColorPointRIntensity_134(); + break; case 135: - ChipLogProgress(chipTool, " ***** Test Step 135 : Read back the optional attribute: ColorPointRIntensity\n"); - err = TestReadBackTheOptionalAttributeColorPointRIntensity_135(); - break; + ChipLogProgress(chipTool, " ***** Test Step 135 : Read back the optional attribute: ColorPointRIntensity\n"); + err = TestReadBackTheOptionalAttributeColorPointRIntensity_135(); + break; case 136: - ChipLogProgress(chipTool, " ***** Test Step 136 : Read the optional attribute: ColorPointGX\n"); - err = TestReadTheOptionalAttributeColorPointGX_136(); - break; + ChipLogProgress(chipTool, " ***** Test Step 136 : Read the optional attribute: ColorPointGX\n"); + err = TestReadTheOptionalAttributeColorPointGX_136(); + break; case 137: - ChipLogProgress(chipTool, " ***** Test Step 137 : Write the default optional attribute: ColorPointGX\n"); - err = TestWriteTheDefaultOptionalAttributeColorPointGX_137(); - break; + ChipLogProgress(chipTool, " ***** Test Step 137 : Write the default optional attribute: ColorPointGX\n"); + err = TestWriteTheDefaultOptionalAttributeColorPointGX_137(); + break; case 138: - ChipLogProgress(chipTool, " ***** Test Step 138 : Read back the optional attribute: ColorPointGX\n"); - err = TestReadBackTheOptionalAttributeColorPointGX_138(); - break; + ChipLogProgress(chipTool, " ***** Test Step 138 : Read back the optional attribute: ColorPointGX\n"); + err = TestReadBackTheOptionalAttributeColorPointGX_138(); + break; case 139: - ChipLogProgress(chipTool, " ***** Test Step 139 : Read the optional attribute: ColorPointGY\n"); - err = TestReadTheOptionalAttributeColorPointGY_139(); - break; + ChipLogProgress(chipTool, " ***** Test Step 139 : Read the optional attribute: ColorPointGY\n"); + err = TestReadTheOptionalAttributeColorPointGY_139(); + break; case 140: - ChipLogProgress(chipTool, " ***** Test Step 140 : Write the default optional attribute: ColorPointGY\n"); - err = TestWriteTheDefaultOptionalAttributeColorPointGY_140(); - break; + ChipLogProgress(chipTool, " ***** Test Step 140 : Write the default optional attribute: ColorPointGY\n"); + err = TestWriteTheDefaultOptionalAttributeColorPointGY_140(); + break; case 141: - ChipLogProgress(chipTool, " ***** Test Step 141 : Read back the optional attribute: ColorPointGY\n"); - err = TestReadBackTheOptionalAttributeColorPointGY_141(); - break; + ChipLogProgress(chipTool, " ***** Test Step 141 : Read back the optional attribute: ColorPointGY\n"); + err = TestReadBackTheOptionalAttributeColorPointGY_141(); + break; case 142: - ChipLogProgress(chipTool, " ***** Test Step 142 : Read the optional attribute: ColorPointGIntensity\n"); - err = TestReadTheOptionalAttributeColorPointGIntensity_142(); - break; + ChipLogProgress(chipTool, " ***** Test Step 142 : Read the optional attribute: ColorPointGIntensity\n"); + err = TestReadTheOptionalAttributeColorPointGIntensity_142(); + break; case 143: - ChipLogProgress(chipTool, " ***** Test Step 143 : Write the default optional attribute: ColorPointGIntensity\n"); - err = TestWriteTheDefaultOptionalAttributeColorPointGIntensity_143(); - break; + ChipLogProgress(chipTool, " ***** Test Step 143 : Write the default optional attribute: ColorPointGIntensity\n"); + err = TestWriteTheDefaultOptionalAttributeColorPointGIntensity_143(); + break; case 144: - ChipLogProgress(chipTool, " ***** Test Step 144 : Read back the optional attribute: ColorPointGIntensity\n"); - err = TestReadBackTheOptionalAttributeColorPointGIntensity_144(); - break; + ChipLogProgress(chipTool, " ***** Test Step 144 : Read back the optional attribute: ColorPointGIntensity\n"); + err = TestReadBackTheOptionalAttributeColorPointGIntensity_144(); + break; case 145: - ChipLogProgress(chipTool, " ***** Test Step 145 : Read the optional attribute: ColorPointBX\n"); - err = TestReadTheOptionalAttributeColorPointBX_145(); - break; + ChipLogProgress(chipTool, " ***** Test Step 145 : Read the optional attribute: ColorPointBX\n"); + err = TestReadTheOptionalAttributeColorPointBX_145(); + break; case 146: - ChipLogProgress(chipTool, " ***** Test Step 146 : Write the default optional attribute: ColorPointBX\n"); - err = TestWriteTheDefaultOptionalAttributeColorPointBX_146(); - break; + ChipLogProgress(chipTool, " ***** Test Step 146 : Write the default optional attribute: ColorPointBX\n"); + err = TestWriteTheDefaultOptionalAttributeColorPointBX_146(); + break; case 147: - ChipLogProgress(chipTool, " ***** Test Step 147 : Read back the optional attribute: ColorPointBX\n"); - err = TestReadBackTheOptionalAttributeColorPointBX_147(); - break; + ChipLogProgress(chipTool, " ***** Test Step 147 : Read back the optional attribute: ColorPointBX\n"); + err = TestReadBackTheOptionalAttributeColorPointBX_147(); + break; case 148: - ChipLogProgress(chipTool, " ***** Test Step 148 : Read the optional attribute: ColorPointBY\n"); - err = TestReadTheOptionalAttributeColorPointBY_148(); - break; + ChipLogProgress(chipTool, " ***** Test Step 148 : Read the optional attribute: ColorPointBY\n"); + err = TestReadTheOptionalAttributeColorPointBY_148(); + break; case 149: - ChipLogProgress(chipTool, " ***** Test Step 149 : Write the default optional attribute: ColorPointBY\n"); - err = TestWriteTheDefaultOptionalAttributeColorPointBY_149(); - break; + ChipLogProgress(chipTool, " ***** Test Step 149 : Write the default optional attribute: ColorPointBY\n"); + err = TestWriteTheDefaultOptionalAttributeColorPointBY_149(); + break; case 150: - ChipLogProgress(chipTool, " ***** Test Step 150 : Read back the optional attribute: ColorPointBY\n"); - err = TestReadBackTheOptionalAttributeColorPointBY_150(); - break; + ChipLogProgress(chipTool, " ***** Test Step 150 : Read back the optional attribute: ColorPointBY\n"); + err = TestReadBackTheOptionalAttributeColorPointBY_150(); + break; case 151: - ChipLogProgress(chipTool, " ***** Test Step 151 : Read the optional attribute: ColorPointBIntensity\n"); - err = TestReadTheOptionalAttributeColorPointBIntensity_151(); - break; + ChipLogProgress(chipTool, " ***** Test Step 151 : Read the optional attribute: ColorPointBIntensity\n"); + err = TestReadTheOptionalAttributeColorPointBIntensity_151(); + break; case 152: - ChipLogProgress(chipTool, " ***** Test Step 152 : Write the default optional attribute: ColorPointBIntensity\n"); - err = TestWriteTheDefaultOptionalAttributeColorPointBIntensity_152(); - break; + ChipLogProgress(chipTool, " ***** Test Step 152 : Write the default optional attribute: ColorPointBIntensity\n"); + err = TestWriteTheDefaultOptionalAttributeColorPointBIntensity_152(); + break; case 153: - ChipLogProgress(chipTool, " ***** Test Step 153 : Read back the optional attribute: ColorPointBIntensity\n"); - err = TestReadBackTheOptionalAttributeColorPointBIntensity_153(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 153 : Read back the optional attribute: ColorPointBIntensity\n"); + err = TestReadBackTheOptionalAttributeColorPointBIntensity_153(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 154; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint8_t currentHue) + static void OnSuccessCallback_1(void * context, uint8_t currentHue) { (static_cast(context))->OnSuccessResponse_1(currentHue); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint8_t currentHue) + static void OnSuccessCallback_2(void * context, uint8_t currentHue) { (static_cast(context))->OnSuccessResponse_2(currentHue); } - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context) - { - (static_cast(context))->OnSuccessResponse_3(); - } - - - + static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, uint8_t currentHue) + static void OnSuccessCallback_4(void * context, uint8_t currentHue) { (static_cast(context))->OnSuccessResponse_4(currentHue); } - - - static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context, uint8_t currentSaturation) + static void OnSuccessCallback_5(void * context, uint8_t currentSaturation) { (static_cast(context))->OnSuccessResponse_5(currentSaturation); } - - - static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, uint8_t currentSaturation) + static void OnSuccessCallback_6(void * context, uint8_t currentSaturation) { (static_cast(context))->OnSuccessResponse_6(currentSaturation); } - - - static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context) - { - (static_cast(context))->OnSuccessResponse_7(); - } - - - + static void OnSuccessCallback_7(void * context) { (static_cast(context))->OnSuccessResponse_7(); } static void OnFailureCallback_8(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context, uint8_t currentSaturation) + static void OnSuccessCallback_8(void * context, uint8_t currentSaturation) { (static_cast(context))->OnSuccessResponse_8(currentSaturation); } - - - static void OnFailureCallback_9(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_9(status); } - static void OnSuccessCallback_9(void * context, uint16_t currentX) + static void OnSuccessCallback_9(void * context, uint16_t currentX) { (static_cast(context))->OnSuccessResponse_9(currentX); } - - - static void OnFailureCallback_10(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_10(status); } - static void OnSuccessCallback_10(void * context, uint16_t currentX) + static void OnSuccessCallback_10(void * context, uint16_t currentX) { (static_cast(context))->OnSuccessResponse_10(currentX); } - - - static void OnFailureCallback_11(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_11(status); } - static void OnSuccessCallback_11(void * context) - { - (static_cast(context))->OnSuccessResponse_11(); - } - - - + static void OnSuccessCallback_11(void * context) { (static_cast(context))->OnSuccessResponse_11(); } static void OnFailureCallback_12(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_12(status); } - static void OnSuccessCallback_12(void * context, uint16_t currentX) + static void OnSuccessCallback_12(void * context, uint16_t currentX) { (static_cast(context))->OnSuccessResponse_12(currentX); } - - - static void OnFailureCallback_13(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_13(status); } - static void OnSuccessCallback_13(void * context, uint16_t currentY) + static void OnSuccessCallback_13(void * context, uint16_t currentY) { (static_cast(context))->OnSuccessResponse_13(currentY); } - - - static void OnFailureCallback_14(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_14(status); } - static void OnSuccessCallback_14(void * context, uint16_t currentY) + static void OnSuccessCallback_14(void * context, uint16_t currentY) { (static_cast(context))->OnSuccessResponse_14(currentY); } - - - static void OnFailureCallback_15(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_15(status); } - static void OnSuccessCallback_15(void * context) - { - (static_cast(context))->OnSuccessResponse_15(); - } - - - + static void OnSuccessCallback_15(void * context) { (static_cast(context))->OnSuccessResponse_15(); } static void OnFailureCallback_16(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_16(status); } - static void OnSuccessCallback_16(void * context, uint16_t currentY) + static void OnSuccessCallback_16(void * context, uint16_t currentY) { (static_cast(context))->OnSuccessResponse_16(currentY); } - - - static void OnFailureCallback_17(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_17(status); } - static void OnSuccessCallback_17(void * context, uint16_t colorTemperature) + static void OnSuccessCallback_17(void * context, uint16_t colorTemperature) { (static_cast(context))->OnSuccessResponse_17(colorTemperature); } - - - static void OnFailureCallback_18(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_18(status); } - static void OnSuccessCallback_18(void * context, uint8_t colorMode) + static void OnSuccessCallback_18(void * context, uint8_t colorMode) { (static_cast(context))->OnSuccessResponse_18(colorMode); } - - - static void OnFailureCallback_19(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_19(status); } - static void OnSuccessCallback_19(void * context, uint8_t colorControlOptions) + static void OnSuccessCallback_19(void * context, uint8_t colorControlOptions) { (static_cast(context))->OnSuccessResponse_19(colorControlOptions); } - - - static void OnFailureCallback_20(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_20(status); } - static void OnSuccessCallback_20(void * context, uint8_t colorControlOptions) + static void OnSuccessCallback_20(void * context, uint8_t colorControlOptions) { (static_cast(context))->OnSuccessResponse_20(colorControlOptions); } - - - static void OnFailureCallback_21(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_21(status); } - static void OnSuccessCallback_21(void * context) - { - (static_cast(context))->OnSuccessResponse_21(); - } - - - + static void OnSuccessCallback_21(void * context) { (static_cast(context))->OnSuccessResponse_21(); } static void OnFailureCallback_22(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_22(status); } - static void OnSuccessCallback_22(void * context, uint8_t colorControlOptions) + static void OnSuccessCallback_22(void * context, uint8_t colorControlOptions) { (static_cast(context))->OnSuccessResponse_22(colorControlOptions); } - - - static void OnFailureCallback_23(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_23(status); } - static void OnSuccessCallback_23(void * context, uint16_t enhancedCurrentHue) + static void OnSuccessCallback_23(void * context, uint16_t enhancedCurrentHue) { (static_cast(context))->OnSuccessResponse_23(enhancedCurrentHue); } - - - static void OnFailureCallback_24(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_24(status); } - static void OnSuccessCallback_24(void * context, uint16_t enhancedCurrentHue) + static void OnSuccessCallback_24(void * context, uint16_t enhancedCurrentHue) { (static_cast(context))->OnSuccessResponse_24(enhancedCurrentHue); } - - - static void OnFailureCallback_25(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_25(status); } - static void OnSuccessCallback_25(void * context) - { - (static_cast(context))->OnSuccessResponse_25(); - } - - - + static void OnSuccessCallback_25(void * context) { (static_cast(context))->OnSuccessResponse_25(); } static void OnFailureCallback_26(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_26(status); } - static void OnSuccessCallback_26(void * context, uint16_t enhancedCurrentHue) + static void OnSuccessCallback_26(void * context, uint16_t enhancedCurrentHue) { (static_cast(context))->OnSuccessResponse_26(enhancedCurrentHue); } - - - static void OnFailureCallback_27(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_27(status); } - static void OnSuccessCallback_27(void * context, uint8_t enhancedColorMode) + static void OnSuccessCallback_27(void * context, uint8_t enhancedColorMode) { (static_cast(context))->OnSuccessResponse_27(enhancedColorMode); } - - - static void OnFailureCallback_28(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_28(status); } - static void OnSuccessCallback_28(void * context, uint8_t colorLoopActive) + static void OnSuccessCallback_28(void * context, uint8_t colorLoopActive) { (static_cast(context))->OnSuccessResponse_28(colorLoopActive); } - - - static void OnFailureCallback_29(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_29(status); } - static void OnSuccessCallback_29(void * context, uint8_t colorLoopActive) + static void OnSuccessCallback_29(void * context, uint8_t colorLoopActive) { (static_cast(context))->OnSuccessResponse_29(colorLoopActive); } - - - static void OnFailureCallback_30(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_30(status); } - static void OnSuccessCallback_30(void * context) - { - (static_cast(context))->OnSuccessResponse_30(); - } - - - + static void OnSuccessCallback_30(void * context) { (static_cast(context))->OnSuccessResponse_30(); } static void OnFailureCallback_31(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_31(status); } - static void OnSuccessCallback_31(void * context, uint8_t colorLoopActive) + static void OnSuccessCallback_31(void * context, uint8_t colorLoopActive) { (static_cast(context))->OnSuccessResponse_31(colorLoopActive); } - - - static void OnFailureCallback_32(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_32(status); } - static void OnSuccessCallback_32(void * context, uint8_t colorLoopDirection) + static void OnSuccessCallback_32(void * context, uint8_t colorLoopDirection) { (static_cast(context))->OnSuccessResponse_32(colorLoopDirection); } - - - static void OnFailureCallback_33(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_33(status); } - static void OnSuccessCallback_33(void * context, uint8_t colorLoopDirection) + static void OnSuccessCallback_33(void * context, uint8_t colorLoopDirection) { (static_cast(context))->OnSuccessResponse_33(colorLoopDirection); } - - - static void OnFailureCallback_34(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_34(status); } - static void OnSuccessCallback_34(void * context) - { - (static_cast(context))->OnSuccessResponse_34(); - } - - - + static void OnSuccessCallback_34(void * context) { (static_cast(context))->OnSuccessResponse_34(); } static void OnFailureCallback_35(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_35(status); } - static void OnSuccessCallback_35(void * context, uint8_t colorLoopDirection) + static void OnSuccessCallback_35(void * context, uint8_t colorLoopDirection) { (static_cast(context))->OnSuccessResponse_35(colorLoopDirection); } - - - static void OnFailureCallback_36(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_36(status); } - static void OnSuccessCallback_36(void * context, uint16_t colorLoopTime) + static void OnSuccessCallback_36(void * context, uint16_t colorLoopTime) { (static_cast(context))->OnSuccessResponse_36(colorLoopTime); } - - - static void OnFailureCallback_37(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_37(status); } - static void OnSuccessCallback_37(void * context, uint16_t colorLoopTime) + static void OnSuccessCallback_37(void * context, uint16_t colorLoopTime) { (static_cast(context))->OnSuccessResponse_37(colorLoopTime); } - - - static void OnFailureCallback_38(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_38(status); } - static void OnSuccessCallback_38(void * context) - { - (static_cast(context))->OnSuccessResponse_38(); - } - - - + static void OnSuccessCallback_38(void * context) { (static_cast(context))->OnSuccessResponse_38(); } static void OnFailureCallback_39(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_39(status); } - static void OnSuccessCallback_39(void * context, uint16_t colorLoopTime) + static void OnSuccessCallback_39(void * context, uint16_t colorLoopTime) { (static_cast(context))->OnSuccessResponse_39(colorLoopTime); } - - - static void OnFailureCallback_40(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_40(status); } - static void OnSuccessCallback_40(void * context, uint16_t colorLoopStartEnhancedHue) + static void OnSuccessCallback_40(void * context, uint16_t colorLoopStartEnhancedHue) { (static_cast(context))->OnSuccessResponse_40(colorLoopStartEnhancedHue); } - - - static void OnFailureCallback_41(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_41(status); } - static void OnSuccessCallback_41(void * context, uint16_t colorLoopStartEnhancedHue) + static void OnSuccessCallback_41(void * context, uint16_t colorLoopStartEnhancedHue) { (static_cast(context))->OnSuccessResponse_41(colorLoopStartEnhancedHue); } - - - static void OnFailureCallback_42(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_42(status); } - static void OnSuccessCallback_42(void * context) - { - (static_cast(context))->OnSuccessResponse_42(); - } - - - + static void OnSuccessCallback_42(void * context) { (static_cast(context))->OnSuccessResponse_42(); } static void OnFailureCallback_43(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_43(status); } - static void OnSuccessCallback_43(void * context, uint16_t colorLoopStartEnhancedHue) + static void OnSuccessCallback_43(void * context, uint16_t colorLoopStartEnhancedHue) { (static_cast(context))->OnSuccessResponse_43(colorLoopStartEnhancedHue); } - - - static void OnFailureCallback_44(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_44(status); } - static void OnSuccessCallback_44(void * context, uint16_t colorLoopStoredEnhancedHue) + static void OnSuccessCallback_44(void * context, uint16_t colorLoopStoredEnhancedHue) { (static_cast(context))->OnSuccessResponse_44(colorLoopStoredEnhancedHue); } - - - static void OnFailureCallback_45(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_45(status); } - static void OnSuccessCallback_45(void * context, uint16_t colorLoopStoredEnhancedHue) + static void OnSuccessCallback_45(void * context, uint16_t colorLoopStoredEnhancedHue) { (static_cast(context))->OnSuccessResponse_45(colorLoopStoredEnhancedHue); } - - - static void OnFailureCallback_46(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_46(status); } - static void OnSuccessCallback_46(void * context) - { - (static_cast(context))->OnSuccessResponse_46(); - } - - - + static void OnSuccessCallback_46(void * context) { (static_cast(context))->OnSuccessResponse_46(); } static void OnFailureCallback_47(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_47(status); } - static void OnSuccessCallback_47(void * context, uint16_t colorLoopStoredEnhancedHue) + static void OnSuccessCallback_47(void * context, uint16_t colorLoopStoredEnhancedHue) { (static_cast(context))->OnSuccessResponse_47(colorLoopStoredEnhancedHue); } - - - static void OnFailureCallback_48(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_48(status); } - static void OnSuccessCallback_48(void * context, uint16_t colorCapabilities) + static void OnSuccessCallback_48(void * context, uint16_t colorCapabilities) { (static_cast(context))->OnSuccessResponse_48(colorCapabilities); } - - - static void OnFailureCallback_49(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_49(status); } - static void OnSuccessCallback_49(void * context, uint16_t colorCapabilities) + static void OnSuccessCallback_49(void * context, uint16_t colorCapabilities) { (static_cast(context))->OnSuccessResponse_49(colorCapabilities); } - - - static void OnFailureCallback_50(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_50(status); } - static void OnSuccessCallback_50(void * context) - { - (static_cast(context))->OnSuccessResponse_50(); - } - - - + static void OnSuccessCallback_50(void * context) { (static_cast(context))->OnSuccessResponse_50(); } static void OnFailureCallback_51(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_51(status); } - static void OnSuccessCallback_51(void * context, uint16_t colorCapabilities) + static void OnSuccessCallback_51(void * context, uint16_t colorCapabilities) { (static_cast(context))->OnSuccessResponse_51(colorCapabilities); } - - - static void OnFailureCallback_52(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_52(status); } - static void OnSuccessCallback_52(void * context, uint16_t colorTempPhysicalMin) + static void OnSuccessCallback_52(void * context, uint16_t colorTempPhysicalMin) { (static_cast(context))->OnSuccessResponse_52(colorTempPhysicalMin); } - - - static void OnFailureCallback_53(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_53(status); } - static void OnSuccessCallback_53(void * context, uint16_t colorTempPhysicalMin) + static void OnSuccessCallback_53(void * context, uint16_t colorTempPhysicalMin) { (static_cast(context))->OnSuccessResponse_53(colorTempPhysicalMin); } - - - static void OnFailureCallback_54(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_54(status); } - static void OnSuccessCallback_54(void * context) - { - (static_cast(context))->OnSuccessResponse_54(); - } - - - + static void OnSuccessCallback_54(void * context) { (static_cast(context))->OnSuccessResponse_54(); } static void OnFailureCallback_55(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_55(status); } - static void OnSuccessCallback_55(void * context, uint16_t colorTempPhysicalMin) + static void OnSuccessCallback_55(void * context, uint16_t colorTempPhysicalMin) { (static_cast(context))->OnSuccessResponse_55(colorTempPhysicalMin); } - - - static void OnFailureCallback_56(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_56(status); } - static void OnSuccessCallback_56(void * context, uint16_t colorTempPhysicalMax) + static void OnSuccessCallback_56(void * context, uint16_t colorTempPhysicalMax) { (static_cast(context))->OnSuccessResponse_56(colorTempPhysicalMax); } - - - static void OnFailureCallback_57(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_57(status); } - static void OnSuccessCallback_57(void * context, uint16_t colorTempPhysicalMax) + static void OnSuccessCallback_57(void * context, uint16_t colorTempPhysicalMax) { (static_cast(context))->OnSuccessResponse_57(colorTempPhysicalMax); } - - - static void OnFailureCallback_58(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_58(status); } - static void OnSuccessCallback_58(void * context) - { - (static_cast(context))->OnSuccessResponse_58(); - } - - - + static void OnSuccessCallback_58(void * context) { (static_cast(context))->OnSuccessResponse_58(); } static void OnFailureCallback_59(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_59(status); } - static void OnSuccessCallback_59(void * context, uint16_t colorTempPhysicalMax) + static void OnSuccessCallback_59(void * context, uint16_t colorTempPhysicalMax) { (static_cast(context))->OnSuccessResponse_59(colorTempPhysicalMax); } - - - static void OnFailureCallback_60(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_60(status); } - static void OnSuccessCallback_60(void * context, uint16_t coupleColorTempToLevelMinMireds) + static void OnSuccessCallback_60(void * context, uint16_t coupleColorTempToLevelMinMireds) { (static_cast(context))->OnSuccessResponse_60(coupleColorTempToLevelMinMireds); } - - - static void OnFailureCallback_61(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_61(status); } - static void OnSuccessCallback_61(void * context) - { - (static_cast(context))->OnSuccessResponse_61(); - } - - - + static void OnSuccessCallback_61(void * context) { (static_cast(context))->OnSuccessResponse_61(); } static void OnFailureCallback_62(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_62(status); } - static void OnSuccessCallback_62(void * context, uint16_t coupleColorTempToLevelMinMireds) + static void OnSuccessCallback_62(void * context, uint16_t coupleColorTempToLevelMinMireds) { (static_cast(context))->OnSuccessResponse_62(coupleColorTempToLevelMinMireds); } - - - static void OnFailureCallback_63(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_63(status); } - static void OnSuccessCallback_63(void * context, uint16_t startUpColorTemperatureMireds) + static void OnSuccessCallback_63(void * context, uint16_t startUpColorTemperatureMireds) { (static_cast(context))->OnSuccessResponse_63(startUpColorTemperatureMireds); } - - - static void OnFailureCallback_64(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_64(status); } - static void OnSuccessCallback_64(void * context) - { - (static_cast(context))->OnSuccessResponse_64(); - } - - - + static void OnSuccessCallback_64(void * context) { (static_cast(context))->OnSuccessResponse_64(); } static void OnFailureCallback_65(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_65(status); } - static void OnSuccessCallback_65(void * context, uint16_t startUpColorTemperatureMireds) + static void OnSuccessCallback_65(void * context, uint16_t startUpColorTemperatureMireds) { (static_cast(context))->OnSuccessResponse_65(startUpColorTemperatureMireds); } - - - static void OnFailureCallback_66(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_66(status); } - static void OnSuccessCallback_66(void * context, uint16_t remainingTime) + static void OnSuccessCallback_66(void * context, uint16_t remainingTime) { (static_cast(context))->OnSuccessResponse_66(remainingTime); } - - - static void OnFailureCallback_67(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_67(status); } - static void OnSuccessCallback_67(void * context, uint16_t remainingTime) + static void OnSuccessCallback_67(void * context, uint16_t remainingTime) { (static_cast(context))->OnSuccessResponse_67(remainingTime); } - - - static void OnFailureCallback_68(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_68(status); } - static void OnSuccessCallback_68(void * context) - { - (static_cast(context))->OnSuccessResponse_68(); - } - - - + static void OnSuccessCallback_68(void * context) { (static_cast(context))->OnSuccessResponse_68(); } static void OnFailureCallback_69(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_69(status); } - static void OnSuccessCallback_69(void * context, uint16_t remainingTime) + static void OnSuccessCallback_69(void * context, uint16_t remainingTime) { (static_cast(context))->OnSuccessResponse_69(remainingTime); } - - - static void OnFailureCallback_70(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_70(status); } - static void OnSuccessCallback_70(void * context, uint8_t driftCompensation) + static void OnSuccessCallback_70(void * context, uint8_t driftCompensation) { (static_cast(context))->OnSuccessResponse_70(driftCompensation); } - - - static void OnFailureCallback_71(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_71(status); } - static void OnSuccessCallback_71(void * context) - { - (static_cast(context))->OnSuccessResponse_71(); - } - - - + static void OnSuccessCallback_71(void * context) { (static_cast(context))->OnSuccessResponse_71(); } static void OnFailureCallback_72(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_72(status); } - static void OnSuccessCallback_72(void * context, uint8_t driftCompensation) + static void OnSuccessCallback_72(void * context, uint8_t driftCompensation) { (static_cast(context))->OnSuccessResponse_72(driftCompensation); } - - - static void OnFailureCallback_73(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_73(status); } - static void OnSuccessCallback_73(void * context, chip::CharSpan compensationText) + static void OnSuccessCallback_73(void * context, chip::CharSpan compensationText) { (static_cast(context))->OnSuccessResponse_73(compensationText); } - - - static void OnFailureCallback_74(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_74(status); } - static void OnSuccessCallback_74(void * context) - { - (static_cast(context))->OnSuccessResponse_74(); - } - - - + static void OnSuccessCallback_74(void * context) { (static_cast(context))->OnSuccessResponse_74(); } static void OnFailureCallback_75(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_75(status); } - static void OnSuccessCallback_75(void * context, chip::CharSpan compensationText) + static void OnSuccessCallback_75(void * context, chip::CharSpan compensationText) { (static_cast(context))->OnSuccessResponse_75(compensationText); } - - - static void OnFailureCallback_76(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_76(status); } - static void OnSuccessCallback_76(void * context, uint8_t numberOfPrimaries) + static void OnSuccessCallback_76(void * context, uint8_t numberOfPrimaries) { (static_cast(context))->OnSuccessResponse_76(numberOfPrimaries); } - - - static void OnFailureCallback_77(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_77(status); } - static void OnSuccessCallback_77(void * context) - { - (static_cast(context))->OnSuccessResponse_77(); - } - - - + static void OnSuccessCallback_77(void * context) { (static_cast(context))->OnSuccessResponse_77(); } static void OnFailureCallback_78(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_78(status); } - static void OnSuccessCallback_78(void * context, uint8_t numberOfPrimaries) + static void OnSuccessCallback_78(void * context, uint8_t numberOfPrimaries) { (static_cast(context))->OnSuccessResponse_78(numberOfPrimaries); } - - - static void OnFailureCallback_79(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_79(status); } - static void OnSuccessCallback_79(void * context, uint16_t primary1X) + static void OnSuccessCallback_79(void * context, uint16_t primary1X) { (static_cast(context))->OnSuccessResponse_79(primary1X); } - - - static void OnFailureCallback_80(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_80(status); } - static void OnSuccessCallback_80(void * context) - { - (static_cast(context))->OnSuccessResponse_80(); - } - - - + static void OnSuccessCallback_80(void * context) { (static_cast(context))->OnSuccessResponse_80(); } static void OnFailureCallback_81(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_81(status); } - static void OnSuccessCallback_81(void * context, uint16_t primary1X) + static void OnSuccessCallback_81(void * context, uint16_t primary1X) { (static_cast(context))->OnSuccessResponse_81(primary1X); } - - - static void OnFailureCallback_82(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_82(status); } - static void OnSuccessCallback_82(void * context, uint16_t primary1Y) + static void OnSuccessCallback_82(void * context, uint16_t primary1Y) { (static_cast(context))->OnSuccessResponse_82(primary1Y); } - - - static void OnFailureCallback_83(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_83(status); } - static void OnSuccessCallback_83(void * context) - { - (static_cast(context))->OnSuccessResponse_83(); - } - - - + static void OnSuccessCallback_83(void * context) { (static_cast(context))->OnSuccessResponse_83(); } static void OnFailureCallback_84(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_84(status); } - static void OnSuccessCallback_84(void * context, uint16_t primary1Y) + static void OnSuccessCallback_84(void * context, uint16_t primary1Y) { (static_cast(context))->OnSuccessResponse_84(primary1Y); } - - - static void OnFailureCallback_85(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_85(status); } - static void OnSuccessCallback_85(void * context, uint8_t primary1Intensity) + static void OnSuccessCallback_85(void * context, uint8_t primary1Intensity) { (static_cast(context))->OnSuccessResponse_85(primary1Intensity); } - - - static void OnFailureCallback_86(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_86(status); } - static void OnSuccessCallback_86(void * context, uint16_t primary2X) + static void OnSuccessCallback_86(void * context, uint16_t primary2X) { (static_cast(context))->OnSuccessResponse_86(primary2X); } - - - static void OnFailureCallback_87(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_87(status); } - static void OnSuccessCallback_87(void * context) - { - (static_cast(context))->OnSuccessResponse_87(); - } - - - + static void OnSuccessCallback_87(void * context) { (static_cast(context))->OnSuccessResponse_87(); } static void OnFailureCallback_88(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_88(status); } - static void OnSuccessCallback_88(void * context, uint16_t primary2X) + static void OnSuccessCallback_88(void * context, uint16_t primary2X) { (static_cast(context))->OnSuccessResponse_88(primary2X); } - - - static void OnFailureCallback_89(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_89(status); } - static void OnSuccessCallback_89(void * context, uint16_t primary2Y) + static void OnSuccessCallback_89(void * context, uint16_t primary2Y) { (static_cast(context))->OnSuccessResponse_89(primary2Y); } - - - static void OnFailureCallback_90(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_90(status); } - static void OnSuccessCallback_90(void * context) - { - (static_cast(context))->OnSuccessResponse_90(); - } - - - + static void OnSuccessCallback_90(void * context) { (static_cast(context))->OnSuccessResponse_90(); } static void OnFailureCallback_91(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_91(status); } - static void OnSuccessCallback_91(void * context, uint16_t primary2Y) + static void OnSuccessCallback_91(void * context, uint16_t primary2Y) { (static_cast(context))->OnSuccessResponse_91(primary2Y); } - - - static void OnFailureCallback_92(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_92(status); } - static void OnSuccessCallback_92(void * context, uint8_t primary2Intensity) + static void OnSuccessCallback_92(void * context, uint8_t primary2Intensity) { (static_cast(context))->OnSuccessResponse_92(primary2Intensity); } - - - static void OnFailureCallback_93(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_93(status); } - static void OnSuccessCallback_93(void * context, uint16_t primary3X) + static void OnSuccessCallback_93(void * context, uint16_t primary3X) { (static_cast(context))->OnSuccessResponse_93(primary3X); } - - - static void OnFailureCallback_94(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_94(status); } - static void OnSuccessCallback_94(void * context) - { - (static_cast(context))->OnSuccessResponse_94(); - } - - - + static void OnSuccessCallback_94(void * context) { (static_cast(context))->OnSuccessResponse_94(); } static void OnFailureCallback_95(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_95(status); } - static void OnSuccessCallback_95(void * context, uint16_t primary3X) + static void OnSuccessCallback_95(void * context, uint16_t primary3X) { (static_cast(context))->OnSuccessResponse_95(primary3X); } - - - static void OnFailureCallback_96(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_96(status); } - static void OnSuccessCallback_96(void * context, uint16_t primary3Y) + static void OnSuccessCallback_96(void * context, uint16_t primary3Y) { (static_cast(context))->OnSuccessResponse_96(primary3Y); } - - - static void OnFailureCallback_97(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_97(status); } - static void OnSuccessCallback_97(void * context) - { - (static_cast(context))->OnSuccessResponse_97(); - } - - - + static void OnSuccessCallback_97(void * context) { (static_cast(context))->OnSuccessResponse_97(); } static void OnFailureCallback_98(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_98(status); } - static void OnSuccessCallback_98(void * context, uint16_t primary3Y) + static void OnSuccessCallback_98(void * context, uint16_t primary3Y) { (static_cast(context))->OnSuccessResponse_98(primary3Y); } - - - static void OnFailureCallback_99(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_99(status); } - static void OnSuccessCallback_99(void * context, uint8_t primary3Intensity) + static void OnSuccessCallback_99(void * context, uint8_t primary3Intensity) { (static_cast(context))->OnSuccessResponse_99(primary3Intensity); } - - - static void OnFailureCallback_100(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_100(status); } - static void OnSuccessCallback_100(void * context, uint16_t primary4X) + static void OnSuccessCallback_100(void * context, uint16_t primary4X) { (static_cast(context))->OnSuccessResponse_100(primary4X); } - - - static void OnFailureCallback_101(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_101(status); } - static void OnSuccessCallback_101(void * context) - { - (static_cast(context))->OnSuccessResponse_101(); - } - - - + static void OnSuccessCallback_101(void * context) { (static_cast(context))->OnSuccessResponse_101(); } static void OnFailureCallback_102(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_102(status); } - static void OnSuccessCallback_102(void * context, uint16_t primary4X) + static void OnSuccessCallback_102(void * context, uint16_t primary4X) { (static_cast(context))->OnSuccessResponse_102(primary4X); } - - - static void OnFailureCallback_103(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_103(status); } - static void OnSuccessCallback_103(void * context, uint16_t primary4Y) + static void OnSuccessCallback_103(void * context, uint16_t primary4Y) { (static_cast(context))->OnSuccessResponse_103(primary4Y); } - - - static void OnFailureCallback_104(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_104(status); } - static void OnSuccessCallback_104(void * context) - { - (static_cast(context))->OnSuccessResponse_104(); - } - - - + static void OnSuccessCallback_104(void * context) { (static_cast(context))->OnSuccessResponse_104(); } static void OnFailureCallback_105(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_105(status); } - static void OnSuccessCallback_105(void * context, uint16_t primary4Y) + static void OnSuccessCallback_105(void * context, uint16_t primary4Y) { (static_cast(context))->OnSuccessResponse_105(primary4Y); } - - - static void OnFailureCallback_106(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_106(status); } - static void OnSuccessCallback_106(void * context, uint8_t primary4Intensity) + static void OnSuccessCallback_106(void * context, uint8_t primary4Intensity) { (static_cast(context))->OnSuccessResponse_106(primary4Intensity); } - - - static void OnFailureCallback_107(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_107(status); } - static void OnSuccessCallback_107(void * context, uint16_t primary5X) + static void OnSuccessCallback_107(void * context, uint16_t primary5X) { (static_cast(context))->OnSuccessResponse_107(primary5X); } - - - static void OnFailureCallback_108(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_108(status); } - static void OnSuccessCallback_108(void * context) - { - (static_cast(context))->OnSuccessResponse_108(); - } - - - + static void OnSuccessCallback_108(void * context) { (static_cast(context))->OnSuccessResponse_108(); } static void OnFailureCallback_109(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_109(status); } - static void OnSuccessCallback_109(void * context, uint16_t primary5X) + static void OnSuccessCallback_109(void * context, uint16_t primary5X) { (static_cast(context))->OnSuccessResponse_109(primary5X); } - - - static void OnFailureCallback_110(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_110(status); } - static void OnSuccessCallback_110(void * context, uint16_t primary5Y) + static void OnSuccessCallback_110(void * context, uint16_t primary5Y) { (static_cast(context))->OnSuccessResponse_110(primary5Y); } - - - static void OnFailureCallback_111(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_111(status); } - static void OnSuccessCallback_111(void * context) - { - (static_cast(context))->OnSuccessResponse_111(); - } - - - + static void OnSuccessCallback_111(void * context) { (static_cast(context))->OnSuccessResponse_111(); } static void OnFailureCallback_112(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_112(status); } - static void OnSuccessCallback_112(void * context, uint16_t primary5Y) + static void OnSuccessCallback_112(void * context, uint16_t primary5Y) { (static_cast(context))->OnSuccessResponse_112(primary5Y); } - - - static void OnFailureCallback_113(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_113(status); } - static void OnSuccessCallback_113(void * context, uint8_t primary5Intensity) + static void OnSuccessCallback_113(void * context, uint8_t primary5Intensity) { (static_cast(context))->OnSuccessResponse_113(primary5Intensity); } - - - static void OnFailureCallback_114(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_114(status); } - static void OnSuccessCallback_114(void * context, uint16_t primary6X) + static void OnSuccessCallback_114(void * context, uint16_t primary6X) { (static_cast(context))->OnSuccessResponse_114(primary6X); } - - - static void OnFailureCallback_115(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_115(status); } - static void OnSuccessCallback_115(void * context) - { - (static_cast(context))->OnSuccessResponse_115(); - } - - - + static void OnSuccessCallback_115(void * context) { (static_cast(context))->OnSuccessResponse_115(); } static void OnFailureCallback_116(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_116(status); } - static void OnSuccessCallback_116(void * context, uint16_t primary6X) + static void OnSuccessCallback_116(void * context, uint16_t primary6X) { (static_cast(context))->OnSuccessResponse_116(primary6X); } - - - static void OnFailureCallback_117(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_117(status); } - static void OnSuccessCallback_117(void * context, uint16_t primary6Y) + static void OnSuccessCallback_117(void * context, uint16_t primary6Y) { (static_cast(context))->OnSuccessResponse_117(primary6Y); } - - - static void OnFailureCallback_118(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_118(status); } - static void OnSuccessCallback_118(void * context) - { - (static_cast(context))->OnSuccessResponse_118(); - } - - - + static void OnSuccessCallback_118(void * context) { (static_cast(context))->OnSuccessResponse_118(); } static void OnFailureCallback_119(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_119(status); } - static void OnSuccessCallback_119(void * context, uint16_t primary6Y) + static void OnSuccessCallback_119(void * context, uint16_t primary6Y) { (static_cast(context))->OnSuccessResponse_119(primary6Y); } - - - static void OnFailureCallback_120(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_120(status); } - static void OnSuccessCallback_120(void * context, uint8_t primary6Intensity) + static void OnSuccessCallback_120(void * context, uint8_t primary6Intensity) { (static_cast(context))->OnSuccessResponse_120(primary6Intensity); } - - - static void OnFailureCallback_121(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_121(status); } - static void OnSuccessCallback_121(void * context, uint16_t whitePointX) + static void OnSuccessCallback_121(void * context, uint16_t whitePointX) { (static_cast(context))->OnSuccessResponse_121(whitePointX); } - - - static void OnFailureCallback_122(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_122(status); } - static void OnSuccessCallback_122(void * context) - { - (static_cast(context))->OnSuccessResponse_122(); - } - - - + static void OnSuccessCallback_122(void * context) { (static_cast(context))->OnSuccessResponse_122(); } static void OnFailureCallback_123(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_123(status); } - static void OnSuccessCallback_123(void * context, uint16_t whitePointX) + static void OnSuccessCallback_123(void * context, uint16_t whitePointX) { (static_cast(context))->OnSuccessResponse_123(whitePointX); } - - - static void OnFailureCallback_124(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_124(status); } - static void OnSuccessCallback_124(void * context, uint16_t whitePointY) + static void OnSuccessCallback_124(void * context, uint16_t whitePointY) { (static_cast(context))->OnSuccessResponse_124(whitePointY); } - - - static void OnFailureCallback_125(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_125(status); } - static void OnSuccessCallback_125(void * context) - { - (static_cast(context))->OnSuccessResponse_125(); - } - - - + static void OnSuccessCallback_125(void * context) { (static_cast(context))->OnSuccessResponse_125(); } static void OnFailureCallback_126(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_126(status); } - static void OnSuccessCallback_126(void * context, uint16_t whitePointY) + static void OnSuccessCallback_126(void * context, uint16_t whitePointY) { (static_cast(context))->OnSuccessResponse_126(whitePointY); } - - - static void OnFailureCallback_127(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_127(status); } - static void OnSuccessCallback_127(void * context, uint16_t colorPointRX) + static void OnSuccessCallback_127(void * context, uint16_t colorPointRX) { (static_cast(context))->OnSuccessResponse_127(colorPointRX); } - - - static void OnFailureCallback_128(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_128(status); } - static void OnSuccessCallback_128(void * context) - { - (static_cast(context))->OnSuccessResponse_128(); - } - - - + static void OnSuccessCallback_128(void * context) { (static_cast(context))->OnSuccessResponse_128(); } static void OnFailureCallback_129(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_129(status); } - static void OnSuccessCallback_129(void * context, uint16_t colorPointRX) + static void OnSuccessCallback_129(void * context, uint16_t colorPointRX) { (static_cast(context))->OnSuccessResponse_129(colorPointRX); } - - - static void OnFailureCallback_130(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_130(status); } - static void OnSuccessCallback_130(void * context, uint16_t colorPointRY) + static void OnSuccessCallback_130(void * context, uint16_t colorPointRY) { (static_cast(context))->OnSuccessResponse_130(colorPointRY); } - - - static void OnFailureCallback_131(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_131(status); } - static void OnSuccessCallback_131(void * context) - { - (static_cast(context))->OnSuccessResponse_131(); - } - - - + static void OnSuccessCallback_131(void * context) { (static_cast(context))->OnSuccessResponse_131(); } static void OnFailureCallback_132(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_132(status); } - static void OnSuccessCallback_132(void * context, uint16_t colorPointRY) + static void OnSuccessCallback_132(void * context, uint16_t colorPointRY) { (static_cast(context))->OnSuccessResponse_132(colorPointRY); } - - - static void OnFailureCallback_133(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_133(status); } - static void OnSuccessCallback_133(void * context, uint8_t colorPointRIntensity) + static void OnSuccessCallback_133(void * context, uint8_t colorPointRIntensity) { (static_cast(context))->OnSuccessResponse_133(colorPointRIntensity); } - - - static void OnFailureCallback_134(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_134(status); } - static void OnSuccessCallback_134(void * context) - { - (static_cast(context))->OnSuccessResponse_134(); - } - - - + static void OnSuccessCallback_134(void * context) { (static_cast(context))->OnSuccessResponse_134(); } static void OnFailureCallback_135(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_135(status); } - static void OnSuccessCallback_135(void * context, uint8_t colorPointRIntensity) + static void OnSuccessCallback_135(void * context, uint8_t colorPointRIntensity) { (static_cast(context))->OnSuccessResponse_135(colorPointRIntensity); } - - - static void OnFailureCallback_136(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_136(status); } - static void OnSuccessCallback_136(void * context, uint16_t colorPointGX) + static void OnSuccessCallback_136(void * context, uint16_t colorPointGX) { (static_cast(context))->OnSuccessResponse_136(colorPointGX); } - - - static void OnFailureCallback_137(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_137(status); } - static void OnSuccessCallback_137(void * context) - { - (static_cast(context))->OnSuccessResponse_137(); - } - - - + static void OnSuccessCallback_137(void * context) { (static_cast(context))->OnSuccessResponse_137(); } static void OnFailureCallback_138(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_138(status); } - static void OnSuccessCallback_138(void * context, uint16_t colorPointGX) + static void OnSuccessCallback_138(void * context, uint16_t colorPointGX) { (static_cast(context))->OnSuccessResponse_138(colorPointGX); } - - - static void OnFailureCallback_139(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_139(status); } - static void OnSuccessCallback_139(void * context, uint16_t colorPointGY) + static void OnSuccessCallback_139(void * context, uint16_t colorPointGY) { (static_cast(context))->OnSuccessResponse_139(colorPointGY); } - - - static void OnFailureCallback_140(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_140(status); } - static void OnSuccessCallback_140(void * context) - { - (static_cast(context))->OnSuccessResponse_140(); - } - - - + static void OnSuccessCallback_140(void * context) { (static_cast(context))->OnSuccessResponse_140(); } static void OnFailureCallback_141(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_141(status); } - static void OnSuccessCallback_141(void * context, uint16_t colorPointGY) + static void OnSuccessCallback_141(void * context, uint16_t colorPointGY) { (static_cast(context))->OnSuccessResponse_141(colorPointGY); } - - - static void OnFailureCallback_142(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_142(status); } - static void OnSuccessCallback_142(void * context, uint8_t colorPointGIntensity) + static void OnSuccessCallback_142(void * context, uint8_t colorPointGIntensity) { (static_cast(context))->OnSuccessResponse_142(colorPointGIntensity); } - - - static void OnFailureCallback_143(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_143(status); } - static void OnSuccessCallback_143(void * context) - { - (static_cast(context))->OnSuccessResponse_143(); - } - - - + static void OnSuccessCallback_143(void * context) { (static_cast(context))->OnSuccessResponse_143(); } static void OnFailureCallback_144(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_144(status); } - static void OnSuccessCallback_144(void * context, uint8_t colorPointGIntensity) + static void OnSuccessCallback_144(void * context, uint8_t colorPointGIntensity) { (static_cast(context))->OnSuccessResponse_144(colorPointGIntensity); } - - - static void OnFailureCallback_145(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_145(status); } - static void OnSuccessCallback_145(void * context, uint16_t colorPointBX) + static void OnSuccessCallback_145(void * context, uint16_t colorPointBX) { (static_cast(context))->OnSuccessResponse_145(colorPointBX); } - - - static void OnFailureCallback_146(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_146(status); } - static void OnSuccessCallback_146(void * context) - { - (static_cast(context))->OnSuccessResponse_146(); - } - - - + static void OnSuccessCallback_146(void * context) { (static_cast(context))->OnSuccessResponse_146(); } static void OnFailureCallback_147(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_147(status); } - static void OnSuccessCallback_147(void * context, uint16_t colorPointBX) + static void OnSuccessCallback_147(void * context, uint16_t colorPointBX) { (static_cast(context))->OnSuccessResponse_147(colorPointBX); } - - - static void OnFailureCallback_148(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_148(status); } - static void OnSuccessCallback_148(void * context, uint16_t colorPointBY) + static void OnSuccessCallback_148(void * context, uint16_t colorPointBY) { (static_cast(context))->OnSuccessResponse_148(colorPointBY); } - - - static void OnFailureCallback_149(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_149(status); } - static void OnSuccessCallback_149(void * context) - { - (static_cast(context))->OnSuccessResponse_149(); - } - - - + static void OnSuccessCallback_149(void * context) { (static_cast(context))->OnSuccessResponse_149(); } static void OnFailureCallback_150(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_150(status); } - static void OnSuccessCallback_150(void * context, uint16_t colorPointBY) + static void OnSuccessCallback_150(void * context, uint16_t colorPointBY) { (static_cast(context))->OnSuccessResponse_150(colorPointBY); } - - - static void OnFailureCallback_151(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_151(status); } - static void OnSuccessCallback_151(void * context, uint8_t colorPointBIntensity) + static void OnSuccessCallback_151(void * context, uint8_t colorPointBIntensity) { (static_cast(context))->OnSuccessResponse_151(colorPointBIntensity); } - - - static void OnFailureCallback_152(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_152(status); } - static void OnSuccessCallback_152(void * context) - { - (static_cast(context))->OnSuccessResponse_152(); - } - - - + static void OnSuccessCallback_152(void * context) { (static_cast(context))->OnSuccessResponse_152(); } static void OnFailureCallback_153(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_153(status); } - static void OnSuccessCallback_153(void * context, uint8_t colorPointBIntensity) + static void OnSuccessCallback_153(void * context, uint8_t colorPointBIntensity) { (static_cast(context))->OnSuccessResponse_153(colorPointBIntensity); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadsMandatoryAttributeCurrentHue_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint8_t currentHue) + void OnSuccessResponse_1(uint8_t currentHue) { - VerifyOrReturn(CheckValue("currentHue", currentHue,0 - )); + VerifyOrReturn(CheckValue("currentHue", currentHue, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestValidateConstraintsOfAttributeCurrentHue_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint8_t currentHue) + void OnSuccessResponse_2(uint8_t currentHue) { - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8"));VerifyOrReturn(CheckConstraintMinValue("currentHue", currentHue, 0));VerifyOrReturn(CheckConstraintMaxValue("currentHue", currentHue, 254)); + VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + VerifyOrReturn(CheckConstraintMinValue("currentHue", currentHue, 0)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", currentHue, 254)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValueToMandatoryAttributeCurrentHue_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -4861,108 +3861,82 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t currentHueArgument; - currentHueArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(currentHueArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + currentHueArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + currentHueArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_3() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_3() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackMandatoryAttributeCurrentHue_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( uint8_t currentHue) + void OnSuccessResponse_4(uint8_t currentHue) { - VerifyOrReturn(CheckValue("currentHue", currentHue,0 - )); + VerifyOrReturn(CheckValue("currentHue", currentHue, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsMandatoryAttributeCurrentSaturation_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5( uint8_t currentSaturation) + void OnSuccessResponse_5(uint8_t currentSaturation) { - VerifyOrReturn(CheckValue("currentSaturation", currentSaturation,0 - )); + VerifyOrReturn(CheckValue("currentSaturation", currentSaturation, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestValidateConstraintsOfAttributeCurrentSaturation_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( uint8_t currentSaturation) + void OnSuccessResponse_6(uint8_t currentSaturation) { - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8"));VerifyOrReturn(CheckConstraintMinValue("currentSaturation", currentSaturation, 0));VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", currentSaturation, 254)); + VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", currentSaturation, 0)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", currentSaturation, 254)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValueToMandatoryAttributeCurrentSaturation_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -4970,108 +3944,82 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t currentSaturationArgument; - currentSaturationArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(currentSaturationArgument, this, OnSuccessCallback_7, OnFailureCallback_7)); - return CHIP_NO_ERROR; + currentSaturationArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + currentSaturationArgument, this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; } void OnFailureResponse_7(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_7() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_7() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackMandatoryAttributeCurrentSaturation_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_8, OnFailureCallback_8)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_8, OnFailureCallback_8)); + return CHIP_NO_ERROR; } - void OnFailureResponse_8(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_8( uint8_t currentSaturation) + void OnSuccessResponse_8(uint8_t currentSaturation) { - VerifyOrReturn(CheckValue("currentSaturation", currentSaturation,0 - )); + VerifyOrReturn(CheckValue("currentSaturation", currentSaturation, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeCurrentX_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_9, OnFailureCallback_9)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_9, OnFailureCallback_9)); + return CHIP_NO_ERROR; } - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_9( uint16_t currentX) + void OnSuccessResponse_9(uint16_t currentX) { - VerifyOrReturn(CheckValue("currentX", currentX,24939U - )); + VerifyOrReturn(CheckValue("currentX", currentX, 24939U)); NextTest(); - } - - - + } - CHIP_ERROR TestValidateConstraintsOfAttributeCurrentX_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_10, OnFailureCallback_10)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_10, OnFailureCallback_10)); + return CHIP_NO_ERROR; } - void OnFailureResponse_10(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_10( uint16_t currentX) + void OnSuccessResponse_10(uint16_t currentX) { - VerifyOrReturn(CheckConstraintType("currentX", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("currentX", currentX, 0U));VerifyOrReturn(CheckConstraintMaxValue("currentX", currentX, 65279U)); + VerifyOrReturn(CheckConstraintType("currentX", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("currentX", currentX, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentX", currentX, 65279U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValueToMandatoryAttributeCurrentX_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -5079,108 +4027,82 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t currentXArgument; - currentXArgument = 24939U; - - ReturnErrorOnFailure(cluster.WriteAttribute(currentXArgument, this, OnSuccessCallback_11, OnFailureCallback_11)); - return CHIP_NO_ERROR; + currentXArgument = 24939U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + currentXArgument, this, OnSuccessCallback_11, OnFailureCallback_11)); + return CHIP_NO_ERROR; } void OnFailureResponse_11(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_11() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_11() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackMandatoryAttributeCurrentX_12() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_12, OnFailureCallback_12)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_12, OnFailureCallback_12)); + return CHIP_NO_ERROR; } - void OnFailureResponse_12(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_12( uint16_t currentX) + void OnSuccessResponse_12(uint16_t currentX) { - VerifyOrReturn(CheckValue("currentX", currentX,24939U - )); + VerifyOrReturn(CheckValue("currentX", currentX, 24939U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeCurrentY_13() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_13, OnFailureCallback_13)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_13, OnFailureCallback_13)); + return CHIP_NO_ERROR; } - void OnFailureResponse_13(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_13(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_13( uint16_t currentY) + void OnSuccessResponse_13(uint16_t currentY) { - VerifyOrReturn(CheckValue("currentY", currentY,24701U - )); + VerifyOrReturn(CheckValue("currentY", currentY, 24701U)); NextTest(); - } - - - + } - CHIP_ERROR TestValidateConstraintsOfAttributeCurrentY_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_14, OnFailureCallback_14)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_14, OnFailureCallback_14)); + return CHIP_NO_ERROR; } - void OnFailureResponse_14(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_14( uint16_t currentY) + void OnSuccessResponse_14(uint16_t currentY) { - VerifyOrReturn(CheckConstraintType("currentY", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("currentY", currentY, 0U));VerifyOrReturn(CheckConstraintMaxValue("currentY", currentY, 65279U)); + VerifyOrReturn(CheckConstraintType("currentY", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("currentY", currentY, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentY", currentY, 65279U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeCurrentY_15() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -5188,160 +4110,122 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t currentYArgument; - currentYArgument = 24701U; - - ReturnErrorOnFailure(cluster.WriteAttribute(currentYArgument, this, OnSuccessCallback_15, OnFailureCallback_15)); - return CHIP_NO_ERROR; + currentYArgument = 24701U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + currentYArgument, this, OnSuccessCallback_15, OnFailureCallback_15)); + return CHIP_NO_ERROR; } void OnFailureResponse_15(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_15() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_15() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackMandatoryAttributeCurrentY_16() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_16, OnFailureCallback_16)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_16, OnFailureCallback_16)); + return CHIP_NO_ERROR; } - void OnFailureResponse_16(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_16(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_16( uint16_t currentY) + void OnSuccessResponse_16(uint16_t currentY) { - VerifyOrReturn(CheckValue("currentY", currentY,24701U - )); + VerifyOrReturn(CheckValue("currentY", currentY, 24701U)); NextTest(); - } - - - + } - CHIP_ERROR TestValidateConstraintsOfAttributeColorTemperatureMireds_17() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_17, OnFailureCallback_17)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_17, OnFailureCallback_17)); + return CHIP_NO_ERROR; } - void OnFailureResponse_17(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_17(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_17( uint16_t colorTemperature) + void OnSuccessResponse_17(uint16_t colorTemperature) { - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("colorTemperature", colorTemperature, 0U));VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", colorTemperature, 65279U)); + VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("colorTemperature", colorTemperature, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", colorTemperature, 65279U)); NextTest(); - } - - - + } - CHIP_ERROR TestValidateConstraintsOfAttributeColorMode_18() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_18, OnFailureCallback_18)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_18, OnFailureCallback_18)); + return CHIP_NO_ERROR; } - void OnFailureResponse_18(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_18(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_18( uint8_t colorMode) + void OnSuccessResponse_18(uint8_t colorMode) { - VerifyOrReturn(CheckConstraintType("colorMode", "", "enum8"));VerifyOrReturn(CheckConstraintMinValue("colorMode", colorMode, 0));VerifyOrReturn(CheckConstraintMaxValue("colorMode", colorMode, 2)); + VerifyOrReturn(CheckConstraintType("colorMode", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("colorMode", colorMode, 0)); + VerifyOrReturn(CheckConstraintMaxValue("colorMode", colorMode, 2)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeOptions_19() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_19, OnFailureCallback_19)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_19, OnFailureCallback_19)); + return CHIP_NO_ERROR; } - void OnFailureResponse_19(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_19(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_19( uint8_t colorControlOptions) + void OnSuccessResponse_19(uint8_t colorControlOptions) { - VerifyOrReturn(CheckValue("colorControlOptions", colorControlOptions,0 - )); + VerifyOrReturn(CheckValue("colorControlOptions", colorControlOptions, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestValidateConstraintsOfAttributeOptions_20() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_20, OnFailureCallback_20)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_20, OnFailureCallback_20)); + return CHIP_NO_ERROR; } - void OnFailureResponse_20(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_20(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_20( uint8_t colorControlOptions) + void OnSuccessResponse_20(uint8_t colorControlOptions) { - VerifyOrReturn(CheckConstraintType("colorControlOptions", "", "map8")); + VerifyOrReturn(CheckConstraintType("colorControlOptions", "", "map8")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeOptions_21() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -5349,107 +4233,76 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t colorControlOptionsArgument; - colorControlOptionsArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(colorControlOptionsArgument, this, OnSuccessCallback_21, OnFailureCallback_21)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_21(EmberAfStatus status) - { - ThrowFailureResponse(); - } + colorControlOptionsArgument = 0; - void OnSuccessResponse_21() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + colorControlOptionsArgument, this, OnSuccessCallback_21, OnFailureCallback_21)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_21(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_21() { NextTest(); } - CHIP_ERROR TestReadsBackMandatoryAttributeOptions_22() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_22, OnFailureCallback_22)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_22, OnFailureCallback_22)); + return CHIP_NO_ERROR; } - void OnFailureResponse_22(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_22(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_22( uint8_t colorControlOptions) + void OnSuccessResponse_22(uint8_t colorControlOptions) { - VerifyOrReturn(CheckValue("colorControlOptions", colorControlOptions,0 - )); + VerifyOrReturn(CheckValue("colorControlOptions", colorControlOptions, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeEnhancedCurrentHue_23() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_23, OnFailureCallback_23)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_23, OnFailureCallback_23)); + return CHIP_NO_ERROR; } - void OnFailureResponse_23(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_23(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_23( uint16_t enhancedCurrentHue) + void OnSuccessResponse_23(uint16_t enhancedCurrentHue) { - VerifyOrReturn(CheckValue("enhancedCurrentHue", enhancedCurrentHue,0U - )); + VerifyOrReturn(CheckValue("enhancedCurrentHue", enhancedCurrentHue, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestValidateConstraintsOfAttributeEnhancedCurrentHue_24() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_24, OnFailureCallback_24)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_24, OnFailureCallback_24)); + return CHIP_NO_ERROR; } - void OnFailureResponse_24(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_24(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_24( uint16_t enhancedCurrentHue) + void OnSuccessResponse_24(uint16_t enhancedCurrentHue) { - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeEnhancedCurrentHue_25() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -5457,134 +4310,99 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t enhancedCurrentHueArgument; - enhancedCurrentHueArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(enhancedCurrentHueArgument, this, OnSuccessCallback_25, OnFailureCallback_25)); - return CHIP_NO_ERROR; + enhancedCurrentHueArgument = 0U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + enhancedCurrentHueArgument, this, OnSuccessCallback_25, OnFailureCallback_25)); + return CHIP_NO_ERROR; } void OnFailureResponse_25(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_25() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_25() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackMandatoryAttributeEnhancedCurrentHue_26() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_26, OnFailureCallback_26)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_26, OnFailureCallback_26)); + return CHIP_NO_ERROR; } - void OnFailureResponse_26(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_26(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_26( uint16_t enhancedCurrentHue) + void OnSuccessResponse_26(uint16_t enhancedCurrentHue) { - VerifyOrReturn(CheckValue("enhancedCurrentHue", enhancedCurrentHue,0U - )); + VerifyOrReturn(CheckValue("enhancedCurrentHue", enhancedCurrentHue, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestValidateConstraintsOfAttributeEnhancedColorMode_27() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_27, OnFailureCallback_27)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_27, OnFailureCallback_27)); + return CHIP_NO_ERROR; } - void OnFailureResponse_27(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_27(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_27( uint8_t enhancedColorMode) + void OnSuccessResponse_27(uint8_t enhancedColorMode) { - VerifyOrReturn(CheckConstraintType("enhancedColorMode", "", "enum8")); + VerifyOrReturn(CheckConstraintType("enhancedColorMode", "", "enum8")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeColorLoopActive_28() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_28, OnFailureCallback_28)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_28, OnFailureCallback_28)); + return CHIP_NO_ERROR; } - void OnFailureResponse_28(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_28(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_28( uint8_t colorLoopActive) + void OnSuccessResponse_28(uint8_t colorLoopActive) { - VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive,0 - )); + VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestValidateConstraintsOfAttributeColorLoopActive_29() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_29, OnFailureCallback_29)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_29, OnFailureCallback_29)); + return CHIP_NO_ERROR; } - void OnFailureResponse_29(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_29(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_29( uint8_t colorLoopActive) + void OnSuccessResponse_29(uint8_t colorLoopActive) { - VerifyOrReturn(CheckConstraintType("colorLoopActive", "", "uint8")); + VerifyOrReturn(CheckConstraintType("colorLoopActive", "", "uint8")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeColorLoopActive_30() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -5592,108 +4410,80 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t colorLoopActiveArgument; - colorLoopActiveArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(colorLoopActiveArgument, this, OnSuccessCallback_30, OnFailureCallback_30)); - return CHIP_NO_ERROR; + colorLoopActiveArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + colorLoopActiveArgument, this, OnSuccessCallback_30, OnFailureCallback_30)); + return CHIP_NO_ERROR; } void OnFailureResponse_30(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_30() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_30() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackMandatoryAttributeColorLoopActive_31() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_31, OnFailureCallback_31)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_31, OnFailureCallback_31)); + return CHIP_NO_ERROR; } - void OnFailureResponse_31(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_31(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_31( uint8_t colorLoopActive) + void OnSuccessResponse_31(uint8_t colorLoopActive) { - VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive,0 - )); + VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeColorLoopDirection_32() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_32, OnFailureCallback_32)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_32, OnFailureCallback_32)); + return CHIP_NO_ERROR; } - void OnFailureResponse_32(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_32(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_32( uint8_t colorLoopDirection) + void OnSuccessResponse_32(uint8_t colorLoopDirection) { - VerifyOrReturn(CheckValue("colorLoopDirection", colorLoopDirection,0 - )); + VerifyOrReturn(CheckValue("colorLoopDirection", colorLoopDirection, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestValidateConstraintsOfAttributeColorLoopDirection_33() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_33, OnFailureCallback_33)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_33, OnFailureCallback_33)); + return CHIP_NO_ERROR; } - void OnFailureResponse_33(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_33(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_33( uint8_t colorLoopDirection) + void OnSuccessResponse_33(uint8_t colorLoopDirection) { - VerifyOrReturn(CheckConstraintType("colorLoopDirection", "", "uint8")); + VerifyOrReturn(CheckConstraintType("colorLoopDirection", "", "uint8")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeColorLoopDirection_34() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -5701,108 +4491,80 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t colorLoopDirectionArgument; - colorLoopDirectionArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(colorLoopDirectionArgument, this, OnSuccessCallback_34, OnFailureCallback_34)); - return CHIP_NO_ERROR; + colorLoopDirectionArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + colorLoopDirectionArgument, this, OnSuccessCallback_34, OnFailureCallback_34)); + return CHIP_NO_ERROR; } void OnFailureResponse_34(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_34() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_34() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackMandatoryAttributeColorLoopDirection_35() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_35, OnFailureCallback_35)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_35, OnFailureCallback_35)); + return CHIP_NO_ERROR; } - void OnFailureResponse_35(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_35(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_35( uint8_t colorLoopDirection) + void OnSuccessResponse_35(uint8_t colorLoopDirection) { - VerifyOrReturn(CheckValue("colorLoopDirection", colorLoopDirection,0 - )); + VerifyOrReturn(CheckValue("colorLoopDirection", colorLoopDirection, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeColorLoopTime_36() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_36, OnFailureCallback_36)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_36, OnFailureCallback_36)); + return CHIP_NO_ERROR; } - void OnFailureResponse_36(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_36(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_36( uint16_t colorLoopTime) + void OnSuccessResponse_36(uint16_t colorLoopTime) { - VerifyOrReturn(CheckValue("colorLoopTime", colorLoopTime,25U - )); + VerifyOrReturn(CheckValue("colorLoopTime", colorLoopTime, 25U)); NextTest(); - } - - - + } - CHIP_ERROR TestValidateConstraintsOfAttributeColorLoopTime_37() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_37, OnFailureCallback_37)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_37, OnFailureCallback_37)); + return CHIP_NO_ERROR; } - void OnFailureResponse_37(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_37(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_37( uint16_t colorLoopTime) + void OnSuccessResponse_37(uint16_t colorLoopTime) { - VerifyOrReturn(CheckConstraintType("colorLoopTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorLoopTime", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeColorLoopTime_38() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -5810,108 +4572,82 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t colorLoopTimeArgument; - colorLoopTimeArgument = 25U; - - ReturnErrorOnFailure(cluster.WriteAttribute(colorLoopTimeArgument, this, OnSuccessCallback_38, OnFailureCallback_38)); - return CHIP_NO_ERROR; + colorLoopTimeArgument = 25U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + colorLoopTimeArgument, this, OnSuccessCallback_38, OnFailureCallback_38)); + return CHIP_NO_ERROR; } void OnFailureResponse_38(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_38() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_38() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackMandatoryAttributeColorLoopTime_39() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_39, OnFailureCallback_39)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_39, OnFailureCallback_39)); + return CHIP_NO_ERROR; } - void OnFailureResponse_39(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_39(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_39( uint16_t colorLoopTime) + void OnSuccessResponse_39(uint16_t colorLoopTime) { - VerifyOrReturn(CheckValue("colorLoopTime", colorLoopTime,25U - )); + VerifyOrReturn(CheckValue("colorLoopTime", colorLoopTime, 25U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeColorLoopStartEnhancedHue_40() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_40, OnFailureCallback_40)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_40, OnFailureCallback_40)); + return CHIP_NO_ERROR; } - void OnFailureResponse_40(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_40(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_40( uint16_t colorLoopStartEnhancedHue) + void OnSuccessResponse_40(uint16_t colorLoopStartEnhancedHue) { - VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", colorLoopStartEnhancedHue,8960U - )); + VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", colorLoopStartEnhancedHue, 8960U)); NextTest(); - } - - - + } - CHIP_ERROR TestValidateConstraintsOfAttributeColorLoopStartEnhancedHue_41() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_41, OnFailureCallback_41)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_41, OnFailureCallback_41)); + return CHIP_NO_ERROR; } - void OnFailureResponse_41(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_41(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_41( uint16_t colorLoopStartEnhancedHue) + void OnSuccessResponse_41(uint16_t colorLoopStartEnhancedHue) { - VerifyOrReturn(CheckConstraintType("colorLoopStartEnhancedHue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorLoopStartEnhancedHue", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeColorLoopStartEnhancedHue_42() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -5919,108 +4655,84 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t colorLoopStartEnhancedHueArgument; - colorLoopStartEnhancedHueArgument = 8960U; - - ReturnErrorOnFailure(cluster.WriteAttribute(colorLoopStartEnhancedHueArgument, this, OnSuccessCallback_42, OnFailureCallback_42)); - return CHIP_NO_ERROR; + colorLoopStartEnhancedHueArgument = 8960U; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + colorLoopStartEnhancedHueArgument, this, OnSuccessCallback_42, OnFailureCallback_42)); + return CHIP_NO_ERROR; } void OnFailureResponse_42(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_42() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_42() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackMandatoryAttributeColorLoopStartEnhancedHue_43() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_43, OnFailureCallback_43)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_43, OnFailureCallback_43)); + return CHIP_NO_ERROR; } - void OnFailureResponse_43(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_43(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_43( uint16_t colorLoopStartEnhancedHue) + void OnSuccessResponse_43(uint16_t colorLoopStartEnhancedHue) { - VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", colorLoopStartEnhancedHue,8960U - )); + VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", colorLoopStartEnhancedHue, 8960U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeColorLoopStoredEnhancedHue_44() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_44, OnFailureCallback_44)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_44, OnFailureCallback_44)); + return CHIP_NO_ERROR; } - void OnFailureResponse_44(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_44(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_44( uint16_t colorLoopStoredEnhancedHue) + void OnSuccessResponse_44(uint16_t colorLoopStoredEnhancedHue) { - VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", colorLoopStoredEnhancedHue,0U - )); + VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", colorLoopStoredEnhancedHue, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestValidateConstraintsOfAttributeColorLoopStoredEnhancedHue_45() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_45, OnFailureCallback_45)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_45, OnFailureCallback_45)); + return CHIP_NO_ERROR; } - void OnFailureResponse_45(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_45(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_45( uint16_t colorLoopStoredEnhancedHue) + void OnSuccessResponse_45(uint16_t colorLoopStoredEnhancedHue) { - VerifyOrReturn(CheckConstraintType("colorLoopStoredEnhancedHue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorLoopStoredEnhancedHue", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeColorLoopStoredEnhancedHue_46() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -6028,108 +4740,84 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t colorLoopStoredEnhancedHueArgument; - colorLoopStoredEnhancedHueArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(colorLoopStoredEnhancedHueArgument, this, OnSuccessCallback_46, OnFailureCallback_46)); - return CHIP_NO_ERROR; + colorLoopStoredEnhancedHueArgument = 0U; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + colorLoopStoredEnhancedHueArgument, this, OnSuccessCallback_46, OnFailureCallback_46)); + return CHIP_NO_ERROR; } void OnFailureResponse_46(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_46() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_46() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackMandatoryAttributeColorLoopStoredEnhancedHue_47() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_47, OnFailureCallback_47)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_47, OnFailureCallback_47)); + return CHIP_NO_ERROR; } - void OnFailureResponse_47(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_47(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_47( uint16_t colorLoopStoredEnhancedHue) + void OnSuccessResponse_47(uint16_t colorLoopStoredEnhancedHue) { - VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", colorLoopStoredEnhancedHue,0U - )); + VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", colorLoopStoredEnhancedHue, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeColorCapabilities_48() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_48, OnFailureCallback_48)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_48, OnFailureCallback_48)); + return CHIP_NO_ERROR; } - void OnFailureResponse_48(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_48(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_48( uint16_t colorCapabilities) + void OnSuccessResponse_48(uint16_t colorCapabilities) { - VerifyOrReturn(CheckValue("colorCapabilities", colorCapabilities,0U - )); + VerifyOrReturn(CheckValue("colorCapabilities", colorCapabilities, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestValidateConstraintsOfAttributeColorCapabilities_49() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_49, OnFailureCallback_49)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_49, OnFailureCallback_49)); + return CHIP_NO_ERROR; } - void OnFailureResponse_49(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_49(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_49( uint16_t colorCapabilities) + void OnSuccessResponse_49(uint16_t colorCapabilities) { - VerifyOrReturn(CheckConstraintType("colorCapabilities", "", "map16"));VerifyOrReturn(CheckConstraintMinValue("colorCapabilities", colorCapabilities, 0U));VerifyOrReturn(CheckConstraintMaxValue("colorCapabilities", colorCapabilities, 65279U)); + VerifyOrReturn(CheckConstraintType("colorCapabilities", "", "map16")); + VerifyOrReturn(CheckConstraintMinValue("colorCapabilities", colorCapabilities, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorCapabilities", colorCapabilities, 65279U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeColorCapabilities_50() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -6137,108 +4825,82 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t colorCapabilitiesArgument; - colorCapabilitiesArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(colorCapabilitiesArgument, this, OnSuccessCallback_50, OnFailureCallback_50)); - return CHIP_NO_ERROR; + colorCapabilitiesArgument = 0U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + colorCapabilitiesArgument, this, OnSuccessCallback_50, OnFailureCallback_50)); + return CHIP_NO_ERROR; } void OnFailureResponse_50(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_50() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_50() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackMandatoryAttributeColorCapabilities_51() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_51, OnFailureCallback_51)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_51, OnFailureCallback_51)); + return CHIP_NO_ERROR; } - void OnFailureResponse_51(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_51(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_51( uint16_t colorCapabilities) + void OnSuccessResponse_51(uint16_t colorCapabilities) { - VerifyOrReturn(CheckValue("colorCapabilities", colorCapabilities,0U - )); + VerifyOrReturn(CheckValue("colorCapabilities", colorCapabilities, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeColorTempPhysicalMinMireds_52() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_52, OnFailureCallback_52)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_52, OnFailureCallback_52)); + return CHIP_NO_ERROR; } - void OnFailureResponse_52(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_52(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_52( uint16_t colorTempPhysicalMin) + void OnSuccessResponse_52(uint16_t colorTempPhysicalMin) { - VerifyOrReturn(CheckValue("colorTempPhysicalMin", colorTempPhysicalMin,0U - )); + VerifyOrReturn(CheckValue("colorTempPhysicalMin", colorTempPhysicalMin, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestValidateConstraintsOfAttributeColorTempPhysicalMinMireds_53() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_53, OnFailureCallback_53)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_53, OnFailureCallback_53)); + return CHIP_NO_ERROR; } - void OnFailureResponse_53(EmberAfStatus status) + void OnFailureResponse_53(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_53(uint16_t colorTempPhysicalMin) { - ThrowFailureResponse(); - } - - void OnSuccessResponse_53( uint16_t colorTempPhysicalMin) - { - VerifyOrReturn(CheckConstraintType("colorTempPhysicalMin", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMin", colorTempPhysicalMin, 0U));VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMin", colorTempPhysicalMin, 65279U)); + VerifyOrReturn(CheckConstraintType("colorTempPhysicalMin", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMin", colorTempPhysicalMin, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMin", colorTempPhysicalMin, 65279U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeColorTempPhysicalMinMireds_54() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -6246,108 +4908,82 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t colorTempPhysicalMinArgument; - colorTempPhysicalMinArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(colorTempPhysicalMinArgument, this, OnSuccessCallback_54, OnFailureCallback_54)); - return CHIP_NO_ERROR; + colorTempPhysicalMinArgument = 0U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + colorTempPhysicalMinArgument, this, OnSuccessCallback_54, OnFailureCallback_54)); + return CHIP_NO_ERROR; } void OnFailureResponse_54(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_54() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_54() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackMandatoryAttributeColorTempPhysicalMinMireds_55() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_55, OnFailureCallback_55)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_55, OnFailureCallback_55)); + return CHIP_NO_ERROR; } - void OnFailureResponse_55(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_55(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_55( uint16_t colorTempPhysicalMin) + void OnSuccessResponse_55(uint16_t colorTempPhysicalMin) { - VerifyOrReturn(CheckValue("colorTempPhysicalMin", colorTempPhysicalMin,0U - )); + VerifyOrReturn(CheckValue("colorTempPhysicalMin", colorTempPhysicalMin, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeColorTempPhysicalMaxMireds_56() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_56, OnFailureCallback_56)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_56, OnFailureCallback_56)); + return CHIP_NO_ERROR; } - void OnFailureResponse_56(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_56(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_56( uint16_t colorTempPhysicalMax) + void OnSuccessResponse_56(uint16_t colorTempPhysicalMax) { - VerifyOrReturn(CheckValue("colorTempPhysicalMax", colorTempPhysicalMax,65279U - )); + VerifyOrReturn(CheckValue("colorTempPhysicalMax", colorTempPhysicalMax, 65279U)); NextTest(); - } - - - + } - CHIP_ERROR TestValidateConstraintsOfAttributeColorTempPhysicalMaxMireds_57() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_57, OnFailureCallback_57)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_57, OnFailureCallback_57)); + return CHIP_NO_ERROR; } - void OnFailureResponse_57(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_57(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_57( uint16_t colorTempPhysicalMax) + void OnSuccessResponse_57(uint16_t colorTempPhysicalMax) { - VerifyOrReturn(CheckConstraintType("colorTempPhysicalMax", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMax", colorTempPhysicalMax, 0U));VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMax", colorTempPhysicalMax, 65279U)); + VerifyOrReturn(CheckConstraintType("colorTempPhysicalMax", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMax", colorTempPhysicalMax, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMax", colorTempPhysicalMax, 65279U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeColorTempPhysicalMaxMireds_58() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -6355,80 +4991,64 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t colorTempPhysicalMaxArgument; - colorTempPhysicalMaxArgument = 65279U; - - ReturnErrorOnFailure(cluster.WriteAttribute(colorTempPhysicalMaxArgument, this, OnSuccessCallback_58, OnFailureCallback_58)); - return CHIP_NO_ERROR; + colorTempPhysicalMaxArgument = 65279U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + colorTempPhysicalMaxArgument, this, OnSuccessCallback_58, OnFailureCallback_58)); + return CHIP_NO_ERROR; } void OnFailureResponse_58(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_58() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_58() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackMandatoryAttributeColorTempPhysicalMaxMireds_59() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_59, OnFailureCallback_59)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_59, OnFailureCallback_59)); + return CHIP_NO_ERROR; } - void OnFailureResponse_59(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_59(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_59( uint16_t colorTempPhysicalMax) + void OnSuccessResponse_59(uint16_t colorTempPhysicalMax) { - VerifyOrReturn(CheckValue("colorTempPhysicalMax", colorTempPhysicalMax,65279U - )); + VerifyOrReturn(CheckValue("colorTempPhysicalMax", colorTempPhysicalMax, 65279U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeCoupleColorTempToLevelMinMireds_60() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_60, OnFailureCallback_60)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_60, OnFailureCallback_60)); + return CHIP_NO_ERROR; } void OnFailureResponse_60(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_60( uint16_t coupleColorTempToLevelMinMireds) + void OnSuccessResponse_60(uint16_t coupleColorTempToLevelMinMireds) { - VerifyOrReturn(CheckConstraintType("coupleColorTempToLevelMinMireds", "", "uint16")); + VerifyOrReturn(CheckConstraintType("coupleColorTempToLevelMinMireds", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToOptionalAttributeCoupleColorTempToLevelMinMireds_61() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -6436,80 +5056,71 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t coupleColorTempToLevelMinMiredsArgument; - coupleColorTempToLevelMinMiredsArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(coupleColorTempToLevelMinMiredsArgument, this, OnSuccessCallback_61, OnFailureCallback_61)); - return CHIP_NO_ERROR; + coupleColorTempToLevelMinMiredsArgument = 0U; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + coupleColorTempToLevelMinMiredsArgument, this, OnSuccessCallback_61, OnFailureCallback_61)); + return CHIP_NO_ERROR; } void OnFailureResponse_61(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_61() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_61() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackOptionalAttributeCoupleColorTempToLevelMinMireds_62() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_62, OnFailureCallback_62)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_62, OnFailureCallback_62)); + return CHIP_NO_ERROR; } void OnFailureResponse_62(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_62( uint16_t coupleColorTempToLevelMinMireds) + void OnSuccessResponse_62(uint16_t coupleColorTempToLevelMinMireds) { - VerifyOrReturn(CheckValue("coupleColorTempToLevelMinMireds", coupleColorTempToLevelMinMireds,0U - )); + VerifyOrReturn(CheckValue("coupleColorTempToLevelMinMireds", coupleColorTempToLevelMinMireds, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeStartUpColorTemperatureMireds_63() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_63, OnFailureCallback_63)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_63, OnFailureCallback_63)); + return CHIP_NO_ERROR; } void OnFailureResponse_63(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_63( uint16_t startUpColorTemperatureMireds) + void OnSuccessResponse_63(uint16_t startUpColorTemperatureMireds) { - VerifyOrReturn(CheckConstraintType("startUpColorTemperatureMireds", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("startUpColorTemperatureMireds", startUpColorTemperatureMireds, 0U));VerifyOrReturn(CheckConstraintMaxValue("startUpColorTemperatureMireds", startUpColorTemperatureMireds, 65279U)); + VerifyOrReturn(CheckConstraintType("startUpColorTemperatureMireds", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("startUpColorTemperatureMireds", startUpColorTemperatureMireds, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("startUpColorTemperatureMireds", startUpColorTemperatureMireds, 65279U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToOptionalAttributeStartUpColorTemperatureMireds_64() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -6517,107 +5128,92 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t startUpColorTemperatureMiredsArgument; - startUpColorTemperatureMiredsArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(startUpColorTemperatureMiredsArgument, this, OnSuccessCallback_64, OnFailureCallback_64)); - return CHIP_NO_ERROR; + startUpColorTemperatureMiredsArgument = 0U; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + startUpColorTemperatureMiredsArgument, this, OnSuccessCallback_64, OnFailureCallback_64)); + return CHIP_NO_ERROR; } void OnFailureResponse_64(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } - - void OnSuccessResponse_64() - { NextTest(); - } - + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - + void OnSuccessResponse_64() { NextTest(); } - CHIP_ERROR TestReadsBackOptionalAttributeStartUpColorTemperatureMireds_65() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_65, OnFailureCallback_65)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_65, OnFailureCallback_65)); + return CHIP_NO_ERROR; } void OnFailureResponse_65(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_65( uint16_t startUpColorTemperatureMireds) + void OnSuccessResponse_65(uint16_t startUpColorTemperatureMireds) { - VerifyOrReturn(CheckValue("startUpColorTemperatureMireds", startUpColorTemperatureMireds,0U - )); + VerifyOrReturn(CheckValue("startUpColorTemperatureMireds", startUpColorTemperatureMireds, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeRemainingTime_66() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_66, OnFailureCallback_66)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_66, OnFailureCallback_66)); + return CHIP_NO_ERROR; } void OnFailureResponse_66(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_66( uint16_t remainingTime) + void OnSuccessResponse_66(uint16_t remainingTime) { - VerifyOrReturn(CheckValue("remainingTime", remainingTime,0U - )); + VerifyOrReturn(CheckValue("remainingTime", remainingTime, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestValidateConstraintsOfAttributeRemainingTime_67() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_67, OnFailureCallback_67)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_67, OnFailureCallback_67)); + return CHIP_NO_ERROR; } void OnFailureResponse_67(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_67( uint16_t remainingTime) + void OnSuccessResponse_67(uint16_t remainingTime) { - VerifyOrReturn(CheckConstraintType("remainingTime", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("remainingTime", remainingTime, 0U));VerifyOrReturn(CheckConstraintMaxValue("remainingTime", remainingTime, 254U)); + VerifyOrReturn(CheckConstraintType("remainingTime", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("remainingTime", remainingTime, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("remainingTime", remainingTime, 254U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToOptionalAttributeRemainingTime_68() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -6625,80 +5221,68 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t remainingTimeArgument; - remainingTimeArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(remainingTimeArgument, this, OnSuccessCallback_68, OnFailureCallback_68)); - return CHIP_NO_ERROR; + remainingTimeArgument = 0U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + remainingTimeArgument, this, OnSuccessCallback_68, OnFailureCallback_68)); + return CHIP_NO_ERROR; } void OnFailureResponse_68(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_68() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_68() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackOptionalAttributeRemainingTime_69() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_69, OnFailureCallback_69)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_69, OnFailureCallback_69)); + return CHIP_NO_ERROR; } void OnFailureResponse_69(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_69( uint16_t remainingTime) + void OnSuccessResponse_69(uint16_t remainingTime) { - VerifyOrReturn(CheckValue("remainingTime", remainingTime,0U - )); + VerifyOrReturn(CheckValue("remainingTime", remainingTime, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeDriftCompensation_70() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_70, OnFailureCallback_70)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_70, OnFailureCallback_70)); + return CHIP_NO_ERROR; } void OnFailureResponse_70(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_70( uint8_t driftCompensation) + void OnSuccessResponse_70(uint8_t driftCompensation) { - VerifyOrReturn(CheckConstraintType("driftCompensation", "", "enum8"));VerifyOrReturn(CheckConstraintMinValue("driftCompensation", driftCompensation, 0));VerifyOrReturn(CheckConstraintMaxValue("driftCompensation", driftCompensation, 4)); + VerifyOrReturn(CheckConstraintType("driftCompensation", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("driftCompensation", driftCompensation, 0)); + VerifyOrReturn(CheckConstraintMaxValue("driftCompensation", driftCompensation, 4)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToOptionalAttributeDriftCompensation_71() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -6706,80 +5290,67 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t driftCompensationArgument; - driftCompensationArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(driftCompensationArgument, this, OnSuccessCallback_71, OnFailureCallback_71)); - return CHIP_NO_ERROR; + driftCompensationArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + driftCompensationArgument, this, OnSuccessCallback_71, OnFailureCallback_71)); + return CHIP_NO_ERROR; } void OnFailureResponse_71(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_71() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_71() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackOptionalAttributeDriftCompensation_72() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_72, OnFailureCallback_72)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_72, OnFailureCallback_72)); + return CHIP_NO_ERROR; } void OnFailureResponse_72(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_72( uint8_t driftCompensation) + void OnSuccessResponse_72(uint8_t driftCompensation) { - VerifyOrReturn(CheckValue("driftCompensation", driftCompensation,0 - )); + VerifyOrReturn(CheckValue("driftCompensation", driftCompensation, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeCompensationText_73() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_73, OnFailureCallback_73)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_73, OnFailureCallback_73)); + return CHIP_NO_ERROR; } void OnFailureResponse_73(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_73( chip::CharSpan compensationText) + void OnSuccessResponse_73(chip::CharSpan compensationText) { - VerifyOrReturn(CheckConstraintType("compensationText", "", "string"));VerifyOrReturn(CheckConstraintMaxLength("compensationText", compensationText.size(), 254)); + VerifyOrReturn(CheckConstraintType("compensationText", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("compensationText", compensationText.size(), 254)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToOptionalAttributeCompensationText_74() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -6787,80 +5358,65 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::CharSpan compensationTextArgument; - compensationTextArgument = chip::Span("garbage: not in length on purpose", 0); + compensationTextArgument = chip::Span("garbage: not in length on purpose", 0); - ReturnErrorOnFailure(cluster.WriteAttribute(compensationTextArgument, this, OnSuccessCallback_74, OnFailureCallback_74)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + compensationTextArgument, this, OnSuccessCallback_74, OnFailureCallback_74)); + return CHIP_NO_ERROR; } void OnFailureResponse_74(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_74() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_74() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackOptionalAttributeCompensationText_75() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_75, OnFailureCallback_75)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_75, OnFailureCallback_75)); + return CHIP_NO_ERROR; } void OnFailureResponse_75(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_75( chip::CharSpan compensationText) + void OnSuccessResponse_75(chip::CharSpan compensationText) { - VerifyOrReturn(CheckValueAsString("compensationText", compensationText,chip::CharSpan("", 0) - )); + VerifyOrReturn(CheckValueAsString("compensationText", compensationText, chip::CharSpan("", 0))); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeNumberOfPrimaries_76() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_76, OnFailureCallback_76)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_76, OnFailureCallback_76)); + return CHIP_NO_ERROR; } - void OnFailureResponse_76(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_76(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_76( uint8_t numberOfPrimaries) + void OnSuccessResponse_76(uint8_t numberOfPrimaries) { - VerifyOrReturn(CheckConstraintType("numberOfPrimaries", "", "uint8"));VerifyOrReturn(CheckConstraintMinValue("numberOfPrimaries", numberOfPrimaries, 0));VerifyOrReturn(CheckConstraintMaxValue("numberOfPrimaries", numberOfPrimaries, 6)); + VerifyOrReturn(CheckConstraintType("numberOfPrimaries", "", "uint8")); + VerifyOrReturn(CheckConstraintMinValue("numberOfPrimaries", numberOfPrimaries, 0)); + VerifyOrReturn(CheckConstraintMaxValue("numberOfPrimaries", numberOfPrimaries, 6)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributeNumberOfPrimaries_77() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -6868,80 +5424,62 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t numberOfPrimariesArgument; - numberOfPrimariesArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(numberOfPrimariesArgument, this, OnSuccessCallback_77, OnFailureCallback_77)); - return CHIP_NO_ERROR; + numberOfPrimariesArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + numberOfPrimariesArgument, this, OnSuccessCallback_77, OnFailureCallback_77)); + return CHIP_NO_ERROR; } void OnFailureResponse_77(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_77() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_77() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadBackTheMandatoryAttributeNumberOfPrimaries_78() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_78, OnFailureCallback_78)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_78, OnFailureCallback_78)); + return CHIP_NO_ERROR; } - void OnFailureResponse_78(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_78(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_78( uint8_t numberOfPrimaries) + void OnSuccessResponse_78(uint8_t numberOfPrimaries) { - VerifyOrReturn(CheckValue("numberOfPrimaries", numberOfPrimaries,0 - )); + VerifyOrReturn(CheckValue("numberOfPrimaries", numberOfPrimaries, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributePrimary1X_79() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_79, OnFailureCallback_79)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_79, OnFailureCallback_79)); + return CHIP_NO_ERROR; } - void OnFailureResponse_79(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_79(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_79( uint16_t primary1X) + void OnSuccessResponse_79(uint16_t primary1X) { - VerifyOrReturn(CheckConstraintType("primary1X", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("primary1X", primary1X, 0U));VerifyOrReturn(CheckConstraintMaxValue("primary1X", primary1X, 65279U)); + VerifyOrReturn(CheckConstraintType("primary1X", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary1X", primary1X, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("primary1X", primary1X, 65279U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary1X_80() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -6949,80 +5487,62 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t primary1XArgument; - primary1XArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(primary1XArgument, this, OnSuccessCallback_80, OnFailureCallback_80)); - return CHIP_NO_ERROR; + primary1XArgument = 0U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + primary1XArgument, this, OnSuccessCallback_80, OnFailureCallback_80)); + return CHIP_NO_ERROR; } void OnFailureResponse_80(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_80() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_80() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary1X_81() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_81, OnFailureCallback_81)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_81, OnFailureCallback_81)); + return CHIP_NO_ERROR; } - void OnFailureResponse_81(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_81(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_81( uint16_t primary1X) + void OnSuccessResponse_81(uint16_t primary1X) { - VerifyOrReturn(CheckValue("primary1X", primary1X,0U - )); + VerifyOrReturn(CheckValue("primary1X", primary1X, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributePrimary1Y_82() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_82, OnFailureCallback_82)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_82, OnFailureCallback_82)); + return CHIP_NO_ERROR; } - void OnFailureResponse_82(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_82(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_82( uint16_t primary1Y) + void OnSuccessResponse_82(uint16_t primary1Y) { - VerifyOrReturn(CheckConstraintType("primary1Y", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("primary1Y", primary1Y, 0U));VerifyOrReturn(CheckConstraintMaxValue("primary1Y", primary1Y, 65279U)); + VerifyOrReturn(CheckConstraintType("primary1Y", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary1Y", primary1Y, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("primary1Y", primary1Y, 65279U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary1Y_83() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -7030,106 +5550,81 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t primary1YArgument; - primary1YArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(primary1YArgument, this, OnSuccessCallback_83, OnFailureCallback_83)); - return CHIP_NO_ERROR; + primary1YArgument = 0U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + primary1YArgument, this, OnSuccessCallback_83, OnFailureCallback_83)); + return CHIP_NO_ERROR; } void OnFailureResponse_83(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_83() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_83() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary1Y_84() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_84, OnFailureCallback_84)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_84, OnFailureCallback_84)); + return CHIP_NO_ERROR; } - void OnFailureResponse_84(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_84(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_84( uint16_t primary1Y) + void OnSuccessResponse_84(uint16_t primary1Y) { - VerifyOrReturn(CheckValue("primary1Y", primary1Y,0U - )); + VerifyOrReturn(CheckValue("primary1Y", primary1Y, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributePrimary1Intensity_85() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_85, OnFailureCallback_85)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_85, OnFailureCallback_85)); + return CHIP_NO_ERROR; } - void OnFailureResponse_85(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_85(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_85( uint8_t primary1Intensity) + void OnSuccessResponse_85(uint8_t primary1Intensity) { - VerifyOrReturn(CheckConstraintType("primary1Intensity", "", "uint8")); + VerifyOrReturn(CheckConstraintType("primary1Intensity", "", "uint8")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributePrimary2X_86() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_86, OnFailureCallback_86)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_86, OnFailureCallback_86)); + return CHIP_NO_ERROR; } - void OnFailureResponse_86(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_86(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_86( uint16_t primary2X) + void OnSuccessResponse_86(uint16_t primary2X) { - VerifyOrReturn(CheckConstraintType("primary2X", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("primary2X", primary2X, 0U));VerifyOrReturn(CheckConstraintMaxValue("primary2X", primary2X, 65279U)); + VerifyOrReturn(CheckConstraintType("primary2X", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary2X", primary2X, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("primary2X", primary2X, 65279U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary2X_87() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -7137,80 +5632,62 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t primary2XArgument; - primary2XArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(primary2XArgument, this, OnSuccessCallback_87, OnFailureCallback_87)); - return CHIP_NO_ERROR; + primary2XArgument = 0U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + primary2XArgument, this, OnSuccessCallback_87, OnFailureCallback_87)); + return CHIP_NO_ERROR; } void OnFailureResponse_87(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_87() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_87() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary2X_88() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_88, OnFailureCallback_88)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_88, OnFailureCallback_88)); + return CHIP_NO_ERROR; } - void OnFailureResponse_88(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_88(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_88( uint16_t primary2X) + void OnSuccessResponse_88(uint16_t primary2X) { - VerifyOrReturn(CheckValue("primary2X", primary2X,0U - )); + VerifyOrReturn(CheckValue("primary2X", primary2X, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributePrimary2Y_89() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_89, OnFailureCallback_89)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_89, OnFailureCallback_89)); + return CHIP_NO_ERROR; } - void OnFailureResponse_89(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_89(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_89( uint16_t primary2Y) + void OnSuccessResponse_89(uint16_t primary2Y) { - VerifyOrReturn(CheckConstraintType("primary2Y", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("primary2Y", primary2Y, 0U));VerifyOrReturn(CheckConstraintMaxValue("primary2Y", primary2Y, 65279U)); + VerifyOrReturn(CheckConstraintType("primary2Y", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary2Y", primary2Y, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("primary2Y", primary2Y, 65279U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary2Y_90() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -7218,106 +5695,81 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t primary2YArgument; - primary2YArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(primary2YArgument, this, OnSuccessCallback_90, OnFailureCallback_90)); - return CHIP_NO_ERROR; + primary2YArgument = 0U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + primary2YArgument, this, OnSuccessCallback_90, OnFailureCallback_90)); + return CHIP_NO_ERROR; } void OnFailureResponse_90(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_90() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_90() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary2Y_91() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_91, OnFailureCallback_91)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_91, OnFailureCallback_91)); + return CHIP_NO_ERROR; } - void OnFailureResponse_91(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_91(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_91( uint16_t primary2Y) + void OnSuccessResponse_91(uint16_t primary2Y) { - VerifyOrReturn(CheckValue("primary2Y", primary2Y,0U - )); + VerifyOrReturn(CheckValue("primary2Y", primary2Y, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestValidateConstraintsOfAttributePrimary2Intensity_92() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_92, OnFailureCallback_92)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_92, OnFailureCallback_92)); + return CHIP_NO_ERROR; } - void OnFailureResponse_92(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_92(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_92( uint8_t primary2Intensity) + void OnSuccessResponse_92(uint8_t primary2Intensity) { - VerifyOrReturn(CheckConstraintType("primary2Intensity", "", "uint8")); + VerifyOrReturn(CheckConstraintType("primary2Intensity", "", "uint8")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributePrimary3X_93() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_93, OnFailureCallback_93)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_93, OnFailureCallback_93)); + return CHIP_NO_ERROR; } - void OnFailureResponse_93(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_93(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_93( uint16_t primary3X) + void OnSuccessResponse_93(uint16_t primary3X) { - VerifyOrReturn(CheckConstraintType("primary3X", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("primary3X", primary3X, 0U));VerifyOrReturn(CheckConstraintMaxValue("primary3X", primary3X, 65279U)); + VerifyOrReturn(CheckConstraintType("primary3X", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary3X", primary3X, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("primary3X", primary3X, 65279U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary3X_94() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -7325,80 +5777,62 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t primary3XArgument; - primary3XArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(primary3XArgument, this, OnSuccessCallback_94, OnFailureCallback_94)); - return CHIP_NO_ERROR; + primary3XArgument = 0U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + primary3XArgument, this, OnSuccessCallback_94, OnFailureCallback_94)); + return CHIP_NO_ERROR; } void OnFailureResponse_94(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_94() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_94() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary3X_95() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_95, OnFailureCallback_95)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_95, OnFailureCallback_95)); + return CHIP_NO_ERROR; } - void OnFailureResponse_95(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_95(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_95( uint16_t primary3X) + void OnSuccessResponse_95(uint16_t primary3X) { - VerifyOrReturn(CheckValue("primary3X", primary3X,0U - )); + VerifyOrReturn(CheckValue("primary3X", primary3X, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributePrimary3Y_96() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_96, OnFailureCallback_96)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_96, OnFailureCallback_96)); + return CHIP_NO_ERROR; } - void OnFailureResponse_96(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_96(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_96( uint16_t primary3Y) + void OnSuccessResponse_96(uint16_t primary3Y) { - VerifyOrReturn(CheckConstraintType("primary3Y", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("primary3Y", primary3Y, 0U));VerifyOrReturn(CheckConstraintMaxValue("primary3Y", primary3Y, 65279U)); + VerifyOrReturn(CheckConstraintType("primary3Y", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary3Y", primary3Y, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("primary3Y", primary3Y, 65279U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary3Y_97() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -7406,106 +5840,81 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t primary3YArgument; - primary3YArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(primary3YArgument, this, OnSuccessCallback_97, OnFailureCallback_97)); - return CHIP_NO_ERROR; + primary3YArgument = 0U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + primary3YArgument, this, OnSuccessCallback_97, OnFailureCallback_97)); + return CHIP_NO_ERROR; } void OnFailureResponse_97(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_97() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_97() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary3Y_98() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_98, OnFailureCallback_98)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_98, OnFailureCallback_98)); + return CHIP_NO_ERROR; } - void OnFailureResponse_98(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_98(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_98( uint16_t primary3Y) + void OnSuccessResponse_98(uint16_t primary3Y) { - VerifyOrReturn(CheckValue("primary3Y", primary3Y,0U - )); + VerifyOrReturn(CheckValue("primary3Y", primary3Y, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributePrimary3Intensity_99() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_99, OnFailureCallback_99)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_99, OnFailureCallback_99)); + return CHIP_NO_ERROR; } - void OnFailureResponse_99(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_99(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_99( uint8_t primary3Intensity) + void OnSuccessResponse_99(uint8_t primary3Intensity) { - VerifyOrReturn(CheckConstraintType("primary3Intensity", "", "uint8")); + VerifyOrReturn(CheckConstraintType("primary3Intensity", "", "uint8")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributePrimary4X_100() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_100, OnFailureCallback_100)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_100, OnFailureCallback_100)); + return CHIP_NO_ERROR; } - void OnFailureResponse_100(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_100(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_100( uint16_t primary4X) + void OnSuccessResponse_100(uint16_t primary4X) { - VerifyOrReturn(CheckConstraintType("primary4X", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("primary4X", primary4X, 0U));VerifyOrReturn(CheckConstraintMaxValue("primary4X", primary4X, 65279U)); + VerifyOrReturn(CheckConstraintType("primary4X", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary4X", primary4X, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("primary4X", primary4X, 65279U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary4X_101() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -7513,80 +5922,62 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t primary4XArgument; - primary4XArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(primary4XArgument, this, OnSuccessCallback_101, OnFailureCallback_101)); - return CHIP_NO_ERROR; + primary4XArgument = 0U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + primary4XArgument, this, OnSuccessCallback_101, OnFailureCallback_101)); + return CHIP_NO_ERROR; } void OnFailureResponse_101(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_101() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_101() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary4X_102() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_102, OnFailureCallback_102)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_102, OnFailureCallback_102)); + return CHIP_NO_ERROR; } - void OnFailureResponse_102(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_102(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_102( uint16_t primary4X) + void OnSuccessResponse_102(uint16_t primary4X) { - VerifyOrReturn(CheckValue("primary4X", primary4X,0U - )); + VerifyOrReturn(CheckValue("primary4X", primary4X, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributePrimary4Y_103() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_103, OnFailureCallback_103)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_103, OnFailureCallback_103)); + return CHIP_NO_ERROR; } - void OnFailureResponse_103(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_103(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_103( uint16_t primary4Y) + void OnSuccessResponse_103(uint16_t primary4Y) { - VerifyOrReturn(CheckConstraintType("primary4Y", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("primary4Y", primary4Y, 0U));VerifyOrReturn(CheckConstraintMaxValue("primary4Y", primary4Y, 65279U)); + VerifyOrReturn(CheckConstraintType("primary4Y", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary4Y", primary4Y, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("primary4Y", primary4Y, 65279U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary4Y_104() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -7594,106 +5985,81 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t primary4YArgument; - primary4YArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(primary4YArgument, this, OnSuccessCallback_104, OnFailureCallback_104)); - return CHIP_NO_ERROR; + primary4YArgument = 0U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + primary4YArgument, this, OnSuccessCallback_104, OnFailureCallback_104)); + return CHIP_NO_ERROR; } void OnFailureResponse_104(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_104() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_104() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary4Y_105() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_105, OnFailureCallback_105)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_105, OnFailureCallback_105)); + return CHIP_NO_ERROR; } - void OnFailureResponse_105(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_105(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_105( uint16_t primary4Y) + void OnSuccessResponse_105(uint16_t primary4Y) { - VerifyOrReturn(CheckValue("primary4Y", primary4Y,0U - )); + VerifyOrReturn(CheckValue("primary4Y", primary4Y, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributePrimary4Intensity_106() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_106, OnFailureCallback_106)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_106, OnFailureCallback_106)); + return CHIP_NO_ERROR; } - void OnFailureResponse_106(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_106(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_106( uint8_t primary4Intensity) + void OnSuccessResponse_106(uint8_t primary4Intensity) { - VerifyOrReturn(CheckConstraintType("primary4Intensity", "", "uint8")); + VerifyOrReturn(CheckConstraintType("primary4Intensity", "", "uint8")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributePrimary5X_107() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_107, OnFailureCallback_107)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_107, OnFailureCallback_107)); + return CHIP_NO_ERROR; } - void OnFailureResponse_107(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_107(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_107( uint16_t primary5X) + void OnSuccessResponse_107(uint16_t primary5X) { - VerifyOrReturn(CheckConstraintType("primary5X", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("primary5X", primary5X, 0U));VerifyOrReturn(CheckConstraintMaxValue("primary5X", primary5X, 65279U)); + VerifyOrReturn(CheckConstraintType("primary5X", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary5X", primary5X, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("primary5X", primary5X, 65279U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary5X_108() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -7701,80 +6067,62 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t primary5XArgument; - primary5XArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(primary5XArgument, this, OnSuccessCallback_108, OnFailureCallback_108)); - return CHIP_NO_ERROR; + primary5XArgument = 0U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + primary5XArgument, this, OnSuccessCallback_108, OnFailureCallback_108)); + return CHIP_NO_ERROR; } void OnFailureResponse_108(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_108() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_108() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary5X_109() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_109, OnFailureCallback_109)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_109, OnFailureCallback_109)); + return CHIP_NO_ERROR; } - void OnFailureResponse_109(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_109(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_109( uint16_t primary5X) + void OnSuccessResponse_109(uint16_t primary5X) { - VerifyOrReturn(CheckValue("primary5X", primary5X,0U - )); + VerifyOrReturn(CheckValue("primary5X", primary5X, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributePrimary5Y_110() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_110, OnFailureCallback_110)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_110, OnFailureCallback_110)); + return CHIP_NO_ERROR; } - void OnFailureResponse_110(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_110(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_110( uint16_t primary5Y) + void OnSuccessResponse_110(uint16_t primary5Y) { - VerifyOrReturn(CheckConstraintType("primary5Y", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("primary5Y", primary5Y, 0U));VerifyOrReturn(CheckConstraintMaxValue("primary5Y", primary5Y, 65279U)); + VerifyOrReturn(CheckConstraintType("primary5Y", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary5Y", primary5Y, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("primary5Y", primary5Y, 65279U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary5Y_111() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -7782,106 +6130,81 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t primary5YArgument; - primary5YArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(primary5YArgument, this, OnSuccessCallback_111, OnFailureCallback_111)); - return CHIP_NO_ERROR; + primary5YArgument = 0U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + primary5YArgument, this, OnSuccessCallback_111, OnFailureCallback_111)); + return CHIP_NO_ERROR; } void OnFailureResponse_111(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_111() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_111() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary5Y_112() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_112, OnFailureCallback_112)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_112, OnFailureCallback_112)); + return CHIP_NO_ERROR; } - void OnFailureResponse_112(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_112(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_112( uint16_t primary5Y) + void OnSuccessResponse_112(uint16_t primary5Y) { - VerifyOrReturn(CheckValue("primary5Y", primary5Y,0U - )); + VerifyOrReturn(CheckValue("primary5Y", primary5Y, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributePrimary5Intensity_113() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_113, OnFailureCallback_113)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_113, OnFailureCallback_113)); + return CHIP_NO_ERROR; } - void OnFailureResponse_113(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_113(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_113( uint8_t primary5Intensity) + void OnSuccessResponse_113(uint8_t primary5Intensity) { - VerifyOrReturn(CheckConstraintType("primary5Intensity", "", "uint8")); + VerifyOrReturn(CheckConstraintType("primary5Intensity", "", "uint8")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributePrimary6X_114() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_114, OnFailureCallback_114)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_114, OnFailureCallback_114)); + return CHIP_NO_ERROR; } - void OnFailureResponse_114(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_114(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_114( uint16_t primary6X) + void OnSuccessResponse_114(uint16_t primary6X) { - VerifyOrReturn(CheckConstraintType("primary6X", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("primary6X", primary6X, 0U));VerifyOrReturn(CheckConstraintMaxValue("primary6X", primary6X, 65279U)); + VerifyOrReturn(CheckConstraintType("primary6X", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary6X", primary6X, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("primary6X", primary6X, 65279U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary6X_115() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -7889,80 +6212,62 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t primary6XArgument; - primary6XArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(primary6XArgument, this, OnSuccessCallback_115, OnFailureCallback_115)); - return CHIP_NO_ERROR; + primary6XArgument = 0U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + primary6XArgument, this, OnSuccessCallback_115, OnFailureCallback_115)); + return CHIP_NO_ERROR; } void OnFailureResponse_115(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_115() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_115() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary6X_116() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_116, OnFailureCallback_116)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_116, OnFailureCallback_116)); + return CHIP_NO_ERROR; } - void OnFailureResponse_116(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_116(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_116( uint16_t primary6X) + void OnSuccessResponse_116(uint16_t primary6X) { - VerifyOrReturn(CheckValue("primary6X", primary6X,0U - )); + VerifyOrReturn(CheckValue("primary6X", primary6X, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributePrimary6Y_117() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_117, OnFailureCallback_117)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_117, OnFailureCallback_117)); + return CHIP_NO_ERROR; } - void OnFailureResponse_117(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_117(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_117( uint16_t primary6Y) + void OnSuccessResponse_117(uint16_t primary6Y) { - VerifyOrReturn(CheckConstraintType("primary6Y", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("primary6Y", primary6Y, 0U));VerifyOrReturn(CheckConstraintMaxValue("primary6Y", primary6Y, 65279U)); + VerifyOrReturn(CheckConstraintType("primary6Y", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("primary6Y", primary6Y, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("primary6Y", primary6Y, 65279U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary6Y_118() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -7970,106 +6275,84 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t primary6YArgument; - primary6YArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(primary6YArgument, this, OnSuccessCallback_118, OnFailureCallback_118)); - return CHIP_NO_ERROR; + primary6YArgument = 0U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + primary6YArgument, this, OnSuccessCallback_118, OnFailureCallback_118)); + return CHIP_NO_ERROR; } void OnFailureResponse_118(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_118() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_118() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadBackTheMandatoryAttributePrimary6Y_119() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_119, OnFailureCallback_119)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_119, OnFailureCallback_119)); + return CHIP_NO_ERROR; } - void OnFailureResponse_119(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_119(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_119( uint16_t primary6Y) + void OnSuccessResponse_119(uint16_t primary6Y) { - VerifyOrReturn(CheckValue("primary6Y", primary6Y,0U - )); + VerifyOrReturn(CheckValue("primary6Y", primary6Y, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributePrimary6Intensity_120() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_120, OnFailureCallback_120)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_120, OnFailureCallback_120)); + return CHIP_NO_ERROR; } - void OnFailureResponse_120(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_120(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_120( uint8_t primary6Intensity) + void OnSuccessResponse_120(uint8_t primary6Intensity) { - VerifyOrReturn(CheckConstraintType("primary6Intensity", "", "uint8")); + VerifyOrReturn(CheckConstraintType("primary6Intensity", "", "uint8")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeWhitePointX_121() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_121, OnFailureCallback_121)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_121, OnFailureCallback_121)); + return CHIP_NO_ERROR; } void OnFailureResponse_121(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_121( uint16_t whitePointX) + void OnSuccessResponse_121(uint16_t whitePointX) { - VerifyOrReturn(CheckConstraintType("whitePointX", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("whitePointX", whitePointX, 0U));VerifyOrReturn(CheckConstraintMaxValue("whitePointX", whitePointX, 65279U)); + VerifyOrReturn(CheckConstraintType("whitePointX", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("whitePointX", whitePointX, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("whitePointX", whitePointX, 65279U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultOptionalAttributeWhitePointX_122() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -8077,79 +6360,67 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t whitePointXArgument; - whitePointXArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(whitePointXArgument, this, OnSuccessCallback_122, OnFailureCallback_122)); - return CHIP_NO_ERROR; + whitePointXArgument = 0U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + whitePointXArgument, this, OnSuccessCallback_122, OnFailureCallback_122)); + return CHIP_NO_ERROR; } void OnFailureResponse_122(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } - - void OnSuccessResponse_122() - { NextTest(); - } - + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - + void OnSuccessResponse_122() { NextTest(); } - CHIP_ERROR TestReadBackTheOptionalAttributeWhitePointX_123() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_123, OnFailureCallback_123)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_123, OnFailureCallback_123)); + return CHIP_NO_ERROR; } void OnFailureResponse_123(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_123( uint16_t whitePointX) + void OnSuccessResponse_123(uint16_t whitePointX) { - VerifyOrReturn(CheckValue("whitePointX", whitePointX,0U - )); + VerifyOrReturn(CheckValue("whitePointX", whitePointX, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeWhitePointY_124() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_124, OnFailureCallback_124)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_124, OnFailureCallback_124)); + return CHIP_NO_ERROR; } void OnFailureResponse_124(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_124( uint16_t whitePointY) + void OnSuccessResponse_124(uint16_t whitePointY) { - VerifyOrReturn(CheckConstraintType("whitePointY", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("whitePointY", whitePointY, 0U));VerifyOrReturn(CheckConstraintMaxValue("whitePointY", whitePointY, 65279U)); + VerifyOrReturn(CheckConstraintType("whitePointY", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("whitePointY", whitePointY, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("whitePointY", whitePointY, 65279U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultOptionalAttributeWhitePointY_125() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -8157,79 +6428,67 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t whitePointYArgument; - whitePointYArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(whitePointYArgument, this, OnSuccessCallback_125, OnFailureCallback_125)); - return CHIP_NO_ERROR; + whitePointYArgument = 0U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + whitePointYArgument, this, OnSuccessCallback_125, OnFailureCallback_125)); + return CHIP_NO_ERROR; } void OnFailureResponse_125(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } - - void OnSuccessResponse_125() - { NextTest(); - } - + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - + void OnSuccessResponse_125() { NextTest(); } - CHIP_ERROR TestReadBackTheOptionalAttributeWhitePointY_126() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_126, OnFailureCallback_126)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_126, OnFailureCallback_126)); + return CHIP_NO_ERROR; } void OnFailureResponse_126(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_126( uint16_t whitePointY) + void OnSuccessResponse_126(uint16_t whitePointY) { - VerifyOrReturn(CheckValue("whitePointY", whitePointY,0U - )); + VerifyOrReturn(CheckValue("whitePointY", whitePointY, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeColorPointRX_127() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_127, OnFailureCallback_127)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_127, OnFailureCallback_127)); + return CHIP_NO_ERROR; } void OnFailureResponse_127(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_127( uint16_t colorPointRX) + void OnSuccessResponse_127(uint16_t colorPointRX) { - VerifyOrReturn(CheckConstraintType("colorPointRX", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("colorPointRX", colorPointRX, 0U));VerifyOrReturn(CheckConstraintMaxValue("colorPointRX", colorPointRX, 65279U)); + VerifyOrReturn(CheckConstraintType("colorPointRX", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("colorPointRX", colorPointRX, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorPointRX", colorPointRX, 65279U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointRX_128() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -8237,79 +6496,67 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t colorPointRXArgument; - colorPointRXArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(colorPointRXArgument, this, OnSuccessCallback_128, OnFailureCallback_128)); - return CHIP_NO_ERROR; + colorPointRXArgument = 0U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + colorPointRXArgument, this, OnSuccessCallback_128, OnFailureCallback_128)); + return CHIP_NO_ERROR; } void OnFailureResponse_128(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } - - void OnSuccessResponse_128() - { NextTest(); - } - + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - + void OnSuccessResponse_128() { NextTest(); } - CHIP_ERROR TestReadBackTheOptionalAttributeColorPointRX_129() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_129, OnFailureCallback_129)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_129, OnFailureCallback_129)); + return CHIP_NO_ERROR; } void OnFailureResponse_129(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_129( uint16_t colorPointRX) + void OnSuccessResponse_129(uint16_t colorPointRX) { - VerifyOrReturn(CheckValue("colorPointRX", colorPointRX,0U - )); + VerifyOrReturn(CheckValue("colorPointRX", colorPointRX, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeColorPointRY_130() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_130, OnFailureCallback_130)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_130, OnFailureCallback_130)); + return CHIP_NO_ERROR; } void OnFailureResponse_130(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_130( uint16_t colorPointRY) + void OnSuccessResponse_130(uint16_t colorPointRY) { - VerifyOrReturn(CheckConstraintType("colorPointRY", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("colorPointRY", colorPointRY, 0U));VerifyOrReturn(CheckConstraintMaxValue("colorPointRY", colorPointRY, 65279U)); + VerifyOrReturn(CheckConstraintType("colorPointRY", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("colorPointRY", colorPointRY, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorPointRY", colorPointRY, 65279U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointRY_131() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -8317,79 +6564,65 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t colorPointRYArgument; - colorPointRYArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(colorPointRYArgument, this, OnSuccessCallback_131, OnFailureCallback_131)); - return CHIP_NO_ERROR; + colorPointRYArgument = 0U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + colorPointRYArgument, this, OnSuccessCallback_131, OnFailureCallback_131)); + return CHIP_NO_ERROR; } void OnFailureResponse_131(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } - - void OnSuccessResponse_131() - { NextTest(); - } - + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - + void OnSuccessResponse_131() { NextTest(); } - CHIP_ERROR TestReadBackTheOptionalAttributeColorPointRY_132() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_132, OnFailureCallback_132)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_132, OnFailureCallback_132)); + return CHIP_NO_ERROR; } void OnFailureResponse_132(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_132( uint16_t colorPointRY) + void OnSuccessResponse_132(uint16_t colorPointRY) { - VerifyOrReturn(CheckValue("colorPointRY", colorPointRY,0U - )); + VerifyOrReturn(CheckValue("colorPointRY", colorPointRY, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeColorPointRIntensity_133() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_133, OnFailureCallback_133)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_133, OnFailureCallback_133)); + return CHIP_NO_ERROR; } void OnFailureResponse_133(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_133( uint8_t colorPointRIntensity) + void OnSuccessResponse_133(uint8_t colorPointRIntensity) { - VerifyOrReturn(CheckConstraintType("colorPointRIntensity", "", "uint8")); + VerifyOrReturn(CheckConstraintType("colorPointRIntensity", "", "uint8")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointRIntensity_134() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -8397,79 +6630,67 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t colorPointRIntensityArgument; - colorPointRIntensityArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(colorPointRIntensityArgument, this, OnSuccessCallback_134, OnFailureCallback_134)); - return CHIP_NO_ERROR; + colorPointRIntensityArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + colorPointRIntensityArgument, this, OnSuccessCallback_134, OnFailureCallback_134)); + return CHIP_NO_ERROR; } void OnFailureResponse_134(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } - - void OnSuccessResponse_134() - { NextTest(); - } - + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - + void OnSuccessResponse_134() { NextTest(); } - CHIP_ERROR TestReadBackTheOptionalAttributeColorPointRIntensity_135() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_135, OnFailureCallback_135)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_135, OnFailureCallback_135)); + return CHIP_NO_ERROR; } void OnFailureResponse_135(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_135( uint8_t colorPointRIntensity) + void OnSuccessResponse_135(uint8_t colorPointRIntensity) { - VerifyOrReturn(CheckValue("colorPointRIntensity", colorPointRIntensity,0 - )); + VerifyOrReturn(CheckValue("colorPointRIntensity", colorPointRIntensity, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeColorPointGX_136() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_136, OnFailureCallback_136)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_136, OnFailureCallback_136)); + return CHIP_NO_ERROR; } void OnFailureResponse_136(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_136( uint16_t colorPointGX) + void OnSuccessResponse_136(uint16_t colorPointGX) { - VerifyOrReturn(CheckConstraintType("colorPointGX", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("colorPointGX", colorPointGX, 0U));VerifyOrReturn(CheckConstraintMaxValue("colorPointGX", colorPointGX, 65279U)); + VerifyOrReturn(CheckConstraintType("colorPointGX", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("colorPointGX", colorPointGX, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorPointGX", colorPointGX, 65279U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointGX_137() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -8477,79 +6698,67 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t colorPointGXArgument; - colorPointGXArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(colorPointGXArgument, this, OnSuccessCallback_137, OnFailureCallback_137)); - return CHIP_NO_ERROR; + colorPointGXArgument = 0U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + colorPointGXArgument, this, OnSuccessCallback_137, OnFailureCallback_137)); + return CHIP_NO_ERROR; } void OnFailureResponse_137(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } - - void OnSuccessResponse_137() - { NextTest(); - } - + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - + void OnSuccessResponse_137() { NextTest(); } - CHIP_ERROR TestReadBackTheOptionalAttributeColorPointGX_138() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_138, OnFailureCallback_138)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_138, OnFailureCallback_138)); + return CHIP_NO_ERROR; } void OnFailureResponse_138(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_138( uint16_t colorPointGX) + void OnSuccessResponse_138(uint16_t colorPointGX) { - VerifyOrReturn(CheckValue("colorPointGX", colorPointGX,0U - )); + VerifyOrReturn(CheckValue("colorPointGX", colorPointGX, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeColorPointGY_139() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_139, OnFailureCallback_139)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_139, OnFailureCallback_139)); + return CHIP_NO_ERROR; } void OnFailureResponse_139(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_139( uint16_t colorPointGY) + void OnSuccessResponse_139(uint16_t colorPointGY) { - VerifyOrReturn(CheckConstraintType("colorPointGY", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("colorPointGY", colorPointGY, 0U));VerifyOrReturn(CheckConstraintMaxValue("colorPointGY", colorPointGY, 65279U)); + VerifyOrReturn(CheckConstraintType("colorPointGY", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("colorPointGY", colorPointGY, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorPointGY", colorPointGY, 65279U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointGY_140() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -8557,79 +6766,65 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t colorPointGYArgument; - colorPointGYArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(colorPointGYArgument, this, OnSuccessCallback_140, OnFailureCallback_140)); - return CHIP_NO_ERROR; + colorPointGYArgument = 0U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + colorPointGYArgument, this, OnSuccessCallback_140, OnFailureCallback_140)); + return CHIP_NO_ERROR; } void OnFailureResponse_140(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } - - void OnSuccessResponse_140() - { NextTest(); - } - + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - + void OnSuccessResponse_140() { NextTest(); } - CHIP_ERROR TestReadBackTheOptionalAttributeColorPointGY_141() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_141, OnFailureCallback_141)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_141, OnFailureCallback_141)); + return CHIP_NO_ERROR; } void OnFailureResponse_141(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_141( uint16_t colorPointGY) + void OnSuccessResponse_141(uint16_t colorPointGY) { - VerifyOrReturn(CheckValue("colorPointGY", colorPointGY,0U - )); + VerifyOrReturn(CheckValue("colorPointGY", colorPointGY, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeColorPointGIntensity_142() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_142, OnFailureCallback_142)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_142, OnFailureCallback_142)); + return CHIP_NO_ERROR; } void OnFailureResponse_142(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_142( uint8_t colorPointGIntensity) + void OnSuccessResponse_142(uint8_t colorPointGIntensity) { - VerifyOrReturn(CheckConstraintType("colorPointGIntensity", "", "uint8")); + VerifyOrReturn(CheckConstraintType("colorPointGIntensity", "", "uint8")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointGIntensity_143() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -8637,79 +6832,67 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t colorPointGIntensityArgument; - colorPointGIntensityArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(colorPointGIntensityArgument, this, OnSuccessCallback_143, OnFailureCallback_143)); - return CHIP_NO_ERROR; + colorPointGIntensityArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + colorPointGIntensityArgument, this, OnSuccessCallback_143, OnFailureCallback_143)); + return CHIP_NO_ERROR; } void OnFailureResponse_143(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } - - void OnSuccessResponse_143() - { NextTest(); - } - + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - + void OnSuccessResponse_143() { NextTest(); } - CHIP_ERROR TestReadBackTheOptionalAttributeColorPointGIntensity_144() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_144, OnFailureCallback_144)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_144, OnFailureCallback_144)); + return CHIP_NO_ERROR; } void OnFailureResponse_144(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_144( uint8_t colorPointGIntensity) + void OnSuccessResponse_144(uint8_t colorPointGIntensity) { - VerifyOrReturn(CheckValue("colorPointGIntensity", colorPointGIntensity,0 - )); + VerifyOrReturn(CheckValue("colorPointGIntensity", colorPointGIntensity, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeColorPointBX_145() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_145, OnFailureCallback_145)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_145, OnFailureCallback_145)); + return CHIP_NO_ERROR; } void OnFailureResponse_145(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_145( uint16_t colorPointBX) + void OnSuccessResponse_145(uint16_t colorPointBX) { - VerifyOrReturn(CheckConstraintType("colorPointBX", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("colorPointBX", colorPointBX, 0U));VerifyOrReturn(CheckConstraintMaxValue("colorPointBX", colorPointBX, 65279U)); + VerifyOrReturn(CheckConstraintType("colorPointBX", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("colorPointBX", colorPointBX, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorPointBX", colorPointBX, 65279U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointBX_146() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -8717,79 +6900,67 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t colorPointBXArgument; - colorPointBXArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(colorPointBXArgument, this, OnSuccessCallback_146, OnFailureCallback_146)); - return CHIP_NO_ERROR; + colorPointBXArgument = 0U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + colorPointBXArgument, this, OnSuccessCallback_146, OnFailureCallback_146)); + return CHIP_NO_ERROR; } void OnFailureResponse_146(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } - - void OnSuccessResponse_146() - { NextTest(); - } - + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - + void OnSuccessResponse_146() { NextTest(); } - CHIP_ERROR TestReadBackTheOptionalAttributeColorPointBX_147() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_147, OnFailureCallback_147)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_147, OnFailureCallback_147)); + return CHIP_NO_ERROR; } void OnFailureResponse_147(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_147( uint16_t colorPointBX) + void OnSuccessResponse_147(uint16_t colorPointBX) { - VerifyOrReturn(CheckValue("colorPointBX", colorPointBX,0U - )); + VerifyOrReturn(CheckValue("colorPointBX", colorPointBX, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeColorPointBY_148() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_148, OnFailureCallback_148)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_148, OnFailureCallback_148)); + return CHIP_NO_ERROR; } void OnFailureResponse_148(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_148( uint16_t colorPointBY) + void OnSuccessResponse_148(uint16_t colorPointBY) { - VerifyOrReturn(CheckConstraintType("colorPointBY", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("colorPointBY", colorPointBY, 0U));VerifyOrReturn(CheckConstraintMaxValue("colorPointBY", colorPointBY, 65279U)); + VerifyOrReturn(CheckConstraintType("colorPointBY", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("colorPointBY", colorPointBY, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorPointBY", colorPointBY, 65279U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointBY_149() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -8797,79 +6968,65 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t colorPointBYArgument; - colorPointBYArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(colorPointBYArgument, this, OnSuccessCallback_149, OnFailureCallback_149)); - return CHIP_NO_ERROR; + colorPointBYArgument = 0U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + colorPointBYArgument, this, OnSuccessCallback_149, OnFailureCallback_149)); + return CHIP_NO_ERROR; } void OnFailureResponse_149(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } - - void OnSuccessResponse_149() - { NextTest(); - } - + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - + void OnSuccessResponse_149() { NextTest(); } - CHIP_ERROR TestReadBackTheOptionalAttributeColorPointBY_150() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_150, OnFailureCallback_150)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_150, OnFailureCallback_150)); + return CHIP_NO_ERROR; } void OnFailureResponse_150(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_150( uint16_t colorPointBY) + void OnSuccessResponse_150(uint16_t colorPointBY) { - VerifyOrReturn(CheckValue("colorPointBY", colorPointBY,0U - )); + VerifyOrReturn(CheckValue("colorPointBY", colorPointBY, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeColorPointBIntensity_151() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_151, OnFailureCallback_151)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_151, OnFailureCallback_151)); + return CHIP_NO_ERROR; } void OnFailureResponse_151(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_151( uint8_t colorPointBIntensity) + void OnSuccessResponse_151(uint8_t colorPointBIntensity) { - VerifyOrReturn(CheckConstraintType("colorPointBIntensity", "", "uint8")); + VerifyOrReturn(CheckConstraintType("colorPointBIntensity", "", "uint8")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointBIntensity_152() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -8877,209 +7034,166 @@ class Test_TC_CC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t colorPointBIntensityArgument; - colorPointBIntensityArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(colorPointBIntensityArgument, this, OnSuccessCallback_152, OnFailureCallback_152)); - return CHIP_NO_ERROR; + colorPointBIntensityArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + colorPointBIntensityArgument, this, OnSuccessCallback_152, OnFailureCallback_152)); + return CHIP_NO_ERROR; } void OnFailureResponse_152(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } - - void OnSuccessResponse_152() - { NextTest(); - } - + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - + void OnSuccessResponse_152() { NextTest(); } - CHIP_ERROR TestReadBackTheOptionalAttributeColorPointBIntensity_153() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_153, OnFailureCallback_153)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_153, OnFailureCallback_153)); + return CHIP_NO_ERROR; } void OnFailureResponse_153(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_153( uint8_t colorPointBIntensity) + void OnSuccessResponse_153(uint8_t colorPointBIntensity) { - VerifyOrReturn(CheckValue("colorPointBIntensity", colorPointBIntensity,0 - )); + VerifyOrReturn(CheckValue("colorPointBIntensity", colorPointBIntensity, 0)); NextTest(); - } - - - }; + } +}; -class Test_TC_CC_3_1: public TestCommand +class Test_TC_CC_3_1 : public TestCommand { - public: - Test_TC_CC_3_1(): TestCommand("Test_TC_CC_3_1"), mTestIndex(0) +public: + Test_TC_CC_3_1() : TestCommand("Test_TC_CC_3_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_CC_3_1() - { - } + ~Test_TC_CC_3_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_3_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_3_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_3_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_3_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); - err = TestTurnOnLightForColorControlTests_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); + err = TestTurnOnLightForColorControlTests_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Move to hue shortest distance command\n"); - err = TestMoveToHueShortestDistanceCommand_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Move to hue shortest distance command\n"); + err = TestMoveToHueShortestDistanceCommand_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Move to hue longest distance command\n"); - err = TestMoveToHueLongestDistanceCommand_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Move to hue longest distance command\n"); + err = TestMoveToHueLongestDistanceCommand_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Move to hue up command\n"); - err = TestMoveToHueUpCommand_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Move to hue up command\n"); + err = TestMoveToHueUpCommand_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Move to hue down command\n"); - err = TestMoveToHueDownCommand_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : Move to hue down command\n"); + err = TestMoveToHueDownCommand_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_8(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 8 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_8(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 9; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, bool onOff) + static void OnSuccessCallback_2(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_2(onOff); } - - - static void OnFailureCallback_8(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context, bool onOff) + static void OnSuccessCallback_8(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_8(onOff); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestTurnOnLightForColorControlTests_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -9091,66 +7205,46 @@ class Test_TC_CC_3_1: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1() - { NextTest(); - } + void OnSuccessResponse_1() { NextTest(); } - - - - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( bool onOff) + void OnSuccessResponse_2(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,1 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestMoveToHueShortestDistanceCommand_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveToHue::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::MoveToHue::Type; RequestType request; - request.hue = 150; - request.direction =static_cast(0); - request.transitionTime = 100U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.hue = 150; + request.direction = static_cast(0); + request.transitionTime = 100U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(); }; @@ -9159,38 +7253,26 @@ class Test_TC_CC_3_1: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_3() - { NextTest(); - } - + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_3() { NextTest(); } - CHIP_ERROR TestMoveToHueLongestDistanceCommand_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveToHue::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::MoveToHue::Type; RequestType request; - request.hue = 200; - request.direction =static_cast(1); - request.transitionTime = 100U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.hue = 200; + request.direction = static_cast(1); + request.transitionTime = 100U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_4(); }; @@ -9199,38 +7281,26 @@ class Test_TC_CC_3_1: public TestCommand (static_cast(context))->OnFailureResponse_4(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_4() - { NextTest(); - } - + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_4() { NextTest(); } - CHIP_ERROR TestMoveToHueUpCommand_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveToHue::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::MoveToHue::Type; RequestType request; - request.hue = 250; - request.direction =static_cast(2); - request.transitionTime = 100U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.hue = 250; + request.direction = static_cast(2); + request.transitionTime = 100U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_5(); }; @@ -9239,38 +7309,26 @@ class Test_TC_CC_3_1: public TestCommand (static_cast(context))->OnFailureResponse_5(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_5() - { NextTest(); - } - + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_5() { NextTest(); } - CHIP_ERROR TestMoveToHueDownCommand_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveToHue::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::MoveToHue::Type; RequestType request; - request.hue = 225; - request.direction =static_cast(3); - request.transitionTime = 100U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.hue = 225; + request.direction = static_cast(3); + request.transitionTime = 100U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_6(); }; @@ -9279,30 +7337,18 @@ class Test_TC_CC_3_1: public TestCommand (static_cast(context))->OnFailureResponse_6(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_6() - { NextTest(); - } - + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_6() { NextTest(); } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -9314,210 +7360,157 @@ class Test_TC_CC_3_1: public TestCommand (static_cast(context))->OnFailureResponse_7(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_7() - { NextTest(); - } - + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_7() { NextTest(); } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_8, OnFailureCallback_8)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_8, OnFailureCallback_8)); + return CHIP_NO_ERROR; } - void OnFailureResponse_8(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_8( bool onOff) + void OnSuccessResponse_8(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,0 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 0)); NextTest(); - } - - - }; + } +}; -class Test_TC_CC_3_2: public TestCommand +class Test_TC_CC_3_2 : public TestCommand { - public: - Test_TC_CC_3_2(): TestCommand("Test_TC_CC_3_2"), mTestIndex(0) +public: + Test_TC_CC_3_2() : TestCommand("Test_TC_CC_3_2"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_CC_3_2() - { - } + ~Test_TC_CC_3_2() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_3_2\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_3_2\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_3_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_3_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); - err = TestTurnOnLightForColorControlTests_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); + err = TestTurnOnLightForColorControlTests_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Move hue up command\n"); - err = TestMoveHueUpCommand_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Move hue up command\n"); + err = TestMoveHueUpCommand_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Move hue stop command\n"); - err = TestMoveHueStopCommand_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Move hue stop command\n"); + err = TestMoveHueStopCommand_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Move hue down command\n"); - err = TestMoveHueDownCommand_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Move hue down command\n"); + err = TestMoveHueDownCommand_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Move hue stop command\n"); - err = TestMoveHueStopCommand_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : Move hue stop command\n"); + err = TestMoveHueStopCommand_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_8(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 8 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_8(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 9; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, bool onOff) + static void OnSuccessCallback_2(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_2(onOff); } - - - static void OnFailureCallback_8(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context, bool onOff) + static void OnSuccessCallback_8(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_8(onOff); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestTurnOnLightForColorControlTests_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -9529,65 +7522,45 @@ class Test_TC_CC_3_2: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_1() - { NextTest(); - } - + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( bool onOff) + void OnSuccessResponse_2(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,1 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestMoveHueUpCommand_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveHue::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::MoveHue::Type; RequestType request; - request.moveMode =static_cast(1); - request.rate = 50; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.moveMode = static_cast(1); + request.rate = 50; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(); }; @@ -9596,37 +7569,25 @@ class Test_TC_CC_3_2: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_3() - { NextTest(); - } - + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_3() { NextTest(); } - CHIP_ERROR TestMoveHueStopCommand_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveHue::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::MoveHue::Type; RequestType request; - request.moveMode =static_cast(0); - request.rate = 50; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.moveMode = static_cast(0); + request.rate = 50; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_4(); }; @@ -9635,37 +7596,25 @@ class Test_TC_CC_3_2: public TestCommand (static_cast(context))->OnFailureResponse_4(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_4() - { NextTest(); - } - + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_4() { NextTest(); } - CHIP_ERROR TestMoveHueDownCommand_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveHue::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::MoveHue::Type; RequestType request; - request.moveMode =static_cast(3); - request.rate = 50; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.moveMode = static_cast(3); + request.rate = 50; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_5(); }; @@ -9674,37 +7623,25 @@ class Test_TC_CC_3_2: public TestCommand (static_cast(context))->OnFailureResponse_5(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5() - { NextTest(); - } + void OnSuccessResponse_5() { NextTest(); } - - - - CHIP_ERROR TestMoveHueStopCommand_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveHue::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::MoveHue::Type; RequestType request; - request.moveMode =static_cast(0); - request.rate = 50; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.moveMode = static_cast(0); + request.rate = 50; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_6(); }; @@ -9713,30 +7650,18 @@ class Test_TC_CC_3_2: public TestCommand (static_cast(context))->OnFailureResponse_6(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_6() - { NextTest(); - } - + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_6() { NextTest(); } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -9748,202 +7673,149 @@ class Test_TC_CC_3_2: public TestCommand (static_cast(context))->OnFailureResponse_7(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_7() - { NextTest(); - } - + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_7() { NextTest(); } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_8, OnFailureCallback_8)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_8, OnFailureCallback_8)); + return CHIP_NO_ERROR; } - void OnFailureResponse_8(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_8( bool onOff) + void OnSuccessResponse_8(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,0 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 0)); NextTest(); - } - - - }; + } +}; -class Test_TC_CC_3_3: public TestCommand +class Test_TC_CC_3_3 : public TestCommand { - public: - Test_TC_CC_3_3(): TestCommand("Test_TC_CC_3_3"), mTestIndex(0) +public: + Test_TC_CC_3_3() : TestCommand("Test_TC_CC_3_3"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_CC_3_3() - { - } + ~Test_TC_CC_3_3() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_3_3\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_3_3\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_3_3\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_3_3\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); - err = TestTurnOnLightForColorControlTests_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); + err = TestTurnOnLightForColorControlTests_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step hue up command\n"); - err = TestStepHueUpCommand_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Step hue up command\n"); + err = TestStepHueUpCommand_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step hue down command\n"); - err = TestStepHueDownCommand_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Step hue down command\n"); + err = TestStepHueDownCommand_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_6(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 6 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_6(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 7; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, bool onOff) + static void OnSuccessCallback_2(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_2(onOff); } - - - static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, bool onOff) + static void OnSuccessCallback_6(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_6(onOff); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestTurnOnLightForColorControlTests_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -9955,66 +7827,46 @@ class Test_TC_CC_3_3: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_1() - { NextTest(); - } - + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( bool onOff) + void OnSuccessResponse_2(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,1 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestStepHueUpCommand_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::StepHue::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::StepHue::Type; RequestType request; - request.stepMode =static_cast(1); - request.stepSize = 5; - request.transitionTime = 25; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.stepMode = static_cast(1); + request.stepSize = 5; + request.transitionTime = 25; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(); }; @@ -10023,38 +7875,26 @@ class Test_TC_CC_3_3: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_3() - { NextTest(); - } - + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_3() { NextTest(); } - CHIP_ERROR TestStepHueDownCommand_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::StepHue::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::StepHue::Type; RequestType request; - request.stepMode =static_cast(3); - request.stepSize = 5; - request.transitionTime = 25; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.stepMode = static_cast(3); + request.stepSize = 5; + request.transitionTime = 25; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_4(); }; @@ -10063,30 +7903,18 @@ class Test_TC_CC_3_3: public TestCommand (static_cast(context))->OnFailureResponse_4(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_4() - { NextTest(); - } - + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_4() { NextTest(); } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -10098,198 +7926,145 @@ class Test_TC_CC_3_3: public TestCommand (static_cast(context))->OnFailureResponse_5(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_5() - { NextTest(); - } - + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_5() { NextTest(); } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( bool onOff) + void OnSuccessResponse_6(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,0 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 0)); NextTest(); - } - - - }; + } +}; -class Test_TC_CC_4_1: public TestCommand +class Test_TC_CC_4_1 : public TestCommand { - public: - Test_TC_CC_4_1(): TestCommand("Test_TC_CC_4_1"), mTestIndex(0) +public: + Test_TC_CC_4_1() : TestCommand("Test_TC_CC_4_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_CC_4_1() - { - } + ~Test_TC_CC_4_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_4_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_4_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_4_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_4_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); - err = TestTurnOnLightForColorControlTests_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); + err = TestTurnOnLightForColorControlTests_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Move to saturation command\n"); - err = TestMoveToSaturationCommand_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Move to saturation command\n"); + err = TestMoveToSaturationCommand_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_5(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 5 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_5(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 6; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, bool onOff) + static void OnSuccessCallback_2(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_2(onOff); } - - - static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context, bool onOff) + static void OnSuccessCallback_5(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_5(onOff); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestTurnOnLightForColorControlTests_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -10301,65 +8076,45 @@ class Test_TC_CC_4_1: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_1() - { NextTest(); - } - + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( bool onOff) + void OnSuccessResponse_2(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,1 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestMoveToSaturationCommand_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type; RequestType request; - request.saturation = 90; - request.transitionTime = 10U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.saturation = 90; + request.transitionTime = 10U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(); }; @@ -10368,30 +8123,18 @@ class Test_TC_CC_4_1: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_3() - { NextTest(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_3() { NextTest(); } - - - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -10403,218 +8146,165 @@ class Test_TC_CC_4_1: public TestCommand (static_cast(context))->OnFailureResponse_4(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_4() - { NextTest(); - } - + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_4() { NextTest(); } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5( bool onOff) + void OnSuccessResponse_5(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,0 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 0)); NextTest(); - } - - - }; + } +}; -class Test_TC_CC_4_2: public TestCommand +class Test_TC_CC_4_2 : public TestCommand { - public: - Test_TC_CC_4_2(): TestCommand("Test_TC_CC_4_2"), mTestIndex(0) +public: + Test_TC_CC_4_2() : TestCommand("Test_TC_CC_4_2"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_CC_4_2() - { - } + ~Test_TC_CC_4_2() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_4_2\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_4_2\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_4_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_4_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); - err = TestTurnOnLightForColorControlTests_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); + err = TestTurnOnLightForColorControlTests_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Move saturation up command\n"); - err = TestMoveSaturationUpCommand_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Move saturation up command\n"); + err = TestMoveSaturationUpCommand_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Move saturation down command\n"); - err = TestMoveSaturationDownCommand_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Move saturation down command\n"); + err = TestMoveSaturationDownCommand_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Move saturation up command\n"); - err = TestMoveSaturationUpCommand_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Move saturation up command\n"); + err = TestMoveSaturationUpCommand_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Move saturation stop command\n"); - err = TestMoveSaturationStopCommand_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : Move saturation stop command\n"); + err = TestMoveSaturationStopCommand_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Move saturation down command\n"); - err = TestMoveSaturationDownCommand_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : Move saturation down command\n"); + err = TestMoveSaturationDownCommand_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Move saturation stop command\n"); - err = TestMoveSaturationStopCommand_8(); - break; + ChipLogProgress(chipTool, " ***** Test Step 8 : Move saturation stop command\n"); + err = TestMoveSaturationStopCommand_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_9(); - break; + ChipLogProgress(chipTool, " ***** Test Step 9 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_9(); + break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 10 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 11; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, bool onOff) + static void OnSuccessCallback_2(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_2(onOff); } - - - static void OnFailureCallback_10(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_10(status); } - static void OnSuccessCallback_10(void * context, bool onOff) + static void OnSuccessCallback_10(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_10(onOff); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestTurnOnLightForColorControlTests_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -10626,65 +8316,45 @@ class Test_TC_CC_4_2: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_1() - { NextTest(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_1() { NextTest(); } - - - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( bool onOff) + void OnSuccessResponse_2(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,1 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestMoveSaturationUpCommand_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type; RequestType request; - request.moveMode =static_cast(1); - request.rate = 5; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.moveMode = static_cast(1); + request.rate = 5; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(); }; @@ -10693,37 +8363,25 @@ class Test_TC_CC_4_2: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_3() - { NextTest(); - } - + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_3() { NextTest(); } - CHIP_ERROR TestMoveSaturationDownCommand_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type; RequestType request; - request.moveMode =static_cast(3); - request.rate = 5; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.moveMode = static_cast(3); + request.rate = 5; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_4(); }; @@ -10732,37 +8390,25 @@ class Test_TC_CC_4_2: public TestCommand (static_cast(context))->OnFailureResponse_4(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_4() - { NextTest(); - } - + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_4() { NextTest(); } - CHIP_ERROR TestMoveSaturationUpCommand_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type; RequestType request; - request.moveMode =static_cast(1); - request.rate = 5; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.moveMode = static_cast(1); + request.rate = 5; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_5(); }; @@ -10771,37 +8417,25 @@ class Test_TC_CC_4_2: public TestCommand (static_cast(context))->OnFailureResponse_5(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_5() - { NextTest(); - } - + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_5() { NextTest(); } - CHIP_ERROR TestMoveSaturationStopCommand_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type; RequestType request; - request.moveMode =static_cast(0); - request.rate = 5; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.moveMode = static_cast(0); + request.rate = 5; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_6(); }; @@ -10810,37 +8444,25 @@ class Test_TC_CC_4_2: public TestCommand (static_cast(context))->OnFailureResponse_6(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_6() - { NextTest(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_6() { NextTest(); } - - - CHIP_ERROR TestMoveSaturationDownCommand_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type; RequestType request; - request.moveMode =static_cast(3); - request.rate = 5; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.moveMode = static_cast(3); + request.rate = 5; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_7(); }; @@ -10849,37 +8471,25 @@ class Test_TC_CC_4_2: public TestCommand (static_cast(context))->OnFailureResponse_7(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_7() - { NextTest(); - } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_7() { NextTest(); } - - - CHIP_ERROR TestMoveSaturationStopCommand_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type; RequestType request; - request.moveMode =static_cast(0); - request.rate = 5; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.moveMode = static_cast(0); + request.rate = 5; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_8(); }; @@ -10888,30 +8498,18 @@ class Test_TC_CC_4_2: public TestCommand (static_cast(context))->OnFailureResponse_8(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_8(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_8() - { NextTest(); - } - + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_8() { NextTest(); } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -10923,202 +8521,149 @@ class Test_TC_CC_4_2: public TestCommand (static_cast(context))->OnFailureResponse_9(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_9() - { NextTest(); - } - + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_9() { NextTest(); } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_10, OnFailureCallback_10)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_10, OnFailureCallback_10)); + return CHIP_NO_ERROR; } - void OnFailureResponse_10(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_10( bool onOff) + void OnSuccessResponse_10(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,0 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 0)); NextTest(); - } - - - }; + } +}; -class Test_TC_CC_4_3: public TestCommand +class Test_TC_CC_4_3 : public TestCommand { - public: - Test_TC_CC_4_3(): TestCommand("Test_TC_CC_4_3"), mTestIndex(0) +public: + Test_TC_CC_4_3() : TestCommand("Test_TC_CC_4_3"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_CC_4_3() - { - } + ~Test_TC_CC_4_3() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_4_3\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_4_3\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_4_3\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_4_3\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); - err = TestTurnOnLightForColorControlTests_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); + err = TestTurnOnLightForColorControlTests_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step saturation up command\n"); - err = TestStepSaturationUpCommand_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Step saturation up command\n"); + err = TestStepSaturationUpCommand_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step saturation down command\n"); - err = TestStepSaturationDownCommand_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Step saturation down command\n"); + err = TestStepSaturationDownCommand_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_6(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 6 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_6(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 7; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, bool onOff) + static void OnSuccessCallback_2(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_2(onOff); } - - - static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, bool onOff) + static void OnSuccessCallback_6(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_6(onOff); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestTurnOnLightForColorControlTests_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -11130,66 +8675,46 @@ class Test_TC_CC_4_3: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_1() - { NextTest(); - } - + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( bool onOff) + void OnSuccessResponse_2(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,1 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestStepSaturationUpCommand_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::StepSaturation::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::StepSaturation::Type; RequestType request; - request.stepMode =static_cast(1); - request.stepSize = 15; - request.transitionTime = 10; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.stepMode = static_cast(1); + request.stepSize = 15; + request.transitionTime = 10; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(); }; @@ -11198,38 +8723,26 @@ class Test_TC_CC_4_3: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_3() - { NextTest(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_3() { NextTest(); } - - - CHIP_ERROR TestStepSaturationDownCommand_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::StepSaturation::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::StepSaturation::Type; RequestType request; - request.stepMode =static_cast(3); - request.stepSize = 20; - request.transitionTime = 10; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.stepMode = static_cast(3); + request.stepSize = 20; + request.transitionTime = 10; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_4(); }; @@ -11238,30 +8751,18 @@ class Test_TC_CC_4_3: public TestCommand (static_cast(context))->OnFailureResponse_4(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_4() - { NextTest(); - } - + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_4() { NextTest(); } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -11273,198 +8774,145 @@ class Test_TC_CC_4_3: public TestCommand (static_cast(context))->OnFailureResponse_5(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_5() - { NextTest(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_5() { NextTest(); } - - - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( bool onOff) + void OnSuccessResponse_6(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,0 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 0)); NextTest(); - } - - - }; + } +}; -class Test_TC_CC_4_4: public TestCommand +class Test_TC_CC_4_4 : public TestCommand { - public: - Test_TC_CC_4_4(): TestCommand("Test_TC_CC_4_4"), mTestIndex(0) +public: + Test_TC_CC_4_4() : TestCommand("Test_TC_CC_4_4"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_CC_4_4() - { - } + ~Test_TC_CC_4_4() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_4_4\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_4_4\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_4_4\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_4_4\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); - err = TestTurnOnLightForColorControlTests_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); + err = TestTurnOnLightForColorControlTests_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Move To current hue and saturation command\n"); - err = TestMoveToCurrentHueAndSaturationCommand_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Move To current hue and saturation command\n"); + err = TestMoveToCurrentHueAndSaturationCommand_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_5(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 5 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_5(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 6; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, bool onOff) + static void OnSuccessCallback_2(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_2(onOff); } - - - static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context, bool onOff) + static void OnSuccessCallback_5(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_5(onOff); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestTurnOnLightForColorControlTests_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -11476,66 +8924,46 @@ class Test_TC_CC_4_4: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_1() - { NextTest(); - } - + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( bool onOff) + void OnSuccessResponse_2(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,1 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestMoveToCurrentHueAndSaturationCommand_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Type; RequestType request; - request.hue = 40; - request.saturation = 160; - request.transitionTime = 10U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.hue = 40; + request.saturation = 160; + request.transitionTime = 10U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(); }; @@ -11544,30 +8972,18 @@ class Test_TC_CC_4_4: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_3() - { NextTest(); - } - + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_3() { NextTest(); } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -11579,198 +8995,145 @@ class Test_TC_CC_4_4: public TestCommand (static_cast(context))->OnFailureResponse_4(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_4() - { NextTest(); - } - + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_4() { NextTest(); } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5( bool onOff) + void OnSuccessResponse_5(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,0 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 0)); NextTest(); - } - - - }; + } +}; -class Test_TC_CC_5_1: public TestCommand +class Test_TC_CC_5_1 : public TestCommand { - public: - Test_TC_CC_5_1(): TestCommand("Test_TC_CC_5_1"), mTestIndex(0) +public: + Test_TC_CC_5_1() : TestCommand("Test_TC_CC_5_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_CC_5_1() - { - } + ~Test_TC_CC_5_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_5_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_5_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_5_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_5_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); - err = TestTurnOnLightForColorControlTests_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); + err = TestTurnOnLightForColorControlTests_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Move to Color command\n"); - err = TestMoveToColorCommand_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Move to Color command\n"); + err = TestMoveToColorCommand_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_5(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 5 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_5(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 6; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, bool onOff) + static void OnSuccessCallback_2(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_2(onOff); } - - - static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context, bool onOff) + static void OnSuccessCallback_5(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_5(onOff); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestTurnOnLightForColorControlTests_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -11782,66 +9145,46 @@ class Test_TC_CC_5_1: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1() - { NextTest(); - } + void OnSuccessResponse_1() { NextTest(); } - - - - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( bool onOff) + void OnSuccessResponse_2(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,1 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestMoveToColorCommand_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveToColor::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::MoveToColor::Type; RequestType request; - request.colorX = 200U; - request.colorY = 300U; - request.transitionTime = 20U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.colorX = 200U; + request.colorY = 300U; + request.transitionTime = 20U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(); }; @@ -11850,30 +9193,18 @@ class Test_TC_CC_5_1: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_3() - { NextTest(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_3() { NextTest(); } - - - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -11885,202 +9216,149 @@ class Test_TC_CC_5_1: public TestCommand (static_cast(context))->OnFailureResponse_4(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_4() - { NextTest(); - } - + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_4() { NextTest(); } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5( bool onOff) + void OnSuccessResponse_5(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,0 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 0)); NextTest(); - } - - - }; + } +}; -class Test_TC_CC_5_2: public TestCommand +class Test_TC_CC_5_2 : public TestCommand { - public: - Test_TC_CC_5_2(): TestCommand("Test_TC_CC_5_2"), mTestIndex(0) +public: + Test_TC_CC_5_2() : TestCommand("Test_TC_CC_5_2"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_CC_5_2() - { - } + ~Test_TC_CC_5_2() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_5_2\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_5_2\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_5_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_5_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); - err = TestTurnOnLightForColorControlTests_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); + err = TestTurnOnLightForColorControlTests_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Move Color command\n"); - err = TestMoveColorCommand_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Move Color command\n"); + err = TestMoveColorCommand_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Stop Move Step command\n"); - err = TestStopMoveStepCommand_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Stop Move Step command\n"); + err = TestStopMoveStepCommand_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_6(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 6 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_6(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 7; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, bool onOff) + static void OnSuccessCallback_2(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_2(onOff); } - - - static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, bool onOff) + static void OnSuccessCallback_6(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_6(onOff); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestTurnOnLightForColorControlTests_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -12092,65 +9370,45 @@ class Test_TC_CC_5_2: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_1() - { NextTest(); - } - + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( bool onOff) + void OnSuccessResponse_2(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,1 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestMoveColorCommand_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveColor::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::MoveColor::Type; RequestType request; - request.rateX = 15; - request.rateY = 20; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.rateX = 15; + request.rateY = 20; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(); }; @@ -12159,35 +9417,23 @@ class Test_TC_CC_5_2: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_3() - { NextTest(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_3() { NextTest(); } - - - CHIP_ERROR TestStopMoveStepCommand_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type; RequestType request; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_4(); }; @@ -12196,30 +9442,18 @@ class Test_TC_CC_5_2: public TestCommand (static_cast(context))->OnFailureResponse_4(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_4() - { NextTest(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_4() { NextTest(); } - - - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -12231,198 +9465,145 @@ class Test_TC_CC_5_2: public TestCommand (static_cast(context))->OnFailureResponse_5(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5() - { NextTest(); - } + void OnSuccessResponse_5() { NextTest(); } - - - - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( bool onOff) + void OnSuccessResponse_6(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,0 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 0)); NextTest(); - } - - - }; + } +}; -class Test_TC_CC_5_3: public TestCommand +class Test_TC_CC_5_3 : public TestCommand { - public: - Test_TC_CC_5_3(): TestCommand("Test_TC_CC_5_3"), mTestIndex(0) +public: + Test_TC_CC_5_3() : TestCommand("Test_TC_CC_5_3"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_CC_5_3() - { - } + ~Test_TC_CC_5_3() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_5_3\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_5_3\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_5_3\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_5_3\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); - err = TestTurnOnLightForColorControlTests_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); + err = TestTurnOnLightForColorControlTests_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step Color command\n"); - err = TestStepColorCommand_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Step Color command\n"); + err = TestStepColorCommand_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_5(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 5 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_5(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 6; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, bool onOff) + static void OnSuccessCallback_2(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_2(onOff); } - - - static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context, bool onOff) + static void OnSuccessCallback_5(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_5(onOff); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestTurnOnLightForColorControlTests_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -12434,66 +9615,46 @@ class Test_TC_CC_5_3: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_1() - { NextTest(); - } - + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( bool onOff) + void OnSuccessResponse_2(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,1 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestStepColorCommand_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::StepColor::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::StepColor::Type; RequestType request; - request.stepX = 15; - request.stepY = 20; - request.transitionTime = 50U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.stepX = 15; + request.stepY = 20; + request.transitionTime = 50U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(); }; @@ -12502,30 +9663,18 @@ class Test_TC_CC_5_3: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_3() - { NextTest(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_3() { NextTest(); } - - - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -12537,198 +9686,145 @@ class Test_TC_CC_5_3: public TestCommand (static_cast(context))->OnFailureResponse_4(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_4() - { NextTest(); - } - + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_4() { NextTest(); } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5( bool onOff) + void OnSuccessResponse_5(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,0 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 0)); NextTest(); - } - - - }; + } +}; -class Test_TC_CC_6_1: public TestCommand +class Test_TC_CC_6_1 : public TestCommand { - public: - Test_TC_CC_6_1(): TestCommand("Test_TC_CC_6_1"), mTestIndex(0) +public: + Test_TC_CC_6_1() : TestCommand("Test_TC_CC_6_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_CC_6_1() - { - } + ~Test_TC_CC_6_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_6_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_6_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_6_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_6_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); - err = TestTurnOnLightForColorControlTests_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); + err = TestTurnOnLightForColorControlTests_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Move To Color Temperature command\n"); - err = TestMoveToColorTemperatureCommand_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Move To Color Temperature command\n"); + err = TestMoveToColorTemperatureCommand_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_5(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 5 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_5(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 6; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, bool onOff) + static void OnSuccessCallback_2(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_2(onOff); } - - - static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context, bool onOff) + static void OnSuccessCallback_5(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_5(onOff); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestTurnOnLightForColorControlTests_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -12740,65 +9836,45 @@ class Test_TC_CC_6_1: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_1() - { NextTest(); - } - + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( bool onOff) + void OnSuccessResponse_2(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,1 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestMoveToColorTemperatureCommand_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type; RequestType request; - request.colorTemperature = 100U; - request.transitionTime = 10U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.colorTemperature = 100U; + request.transitionTime = 10U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(); }; @@ -12807,30 +9883,18 @@ class Test_TC_CC_6_1: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_3() - { NextTest(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_3() { NextTest(); } - - - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -12842,206 +9906,153 @@ class Test_TC_CC_6_1: public TestCommand (static_cast(context))->OnFailureResponse_4(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_4() - { NextTest(); - } - + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_4() { NextTest(); } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5( bool onOff) + void OnSuccessResponse_5(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,0 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 0)); NextTest(); - } - - - }; + } +}; -class Test_TC_CC_6_2: public TestCommand +class Test_TC_CC_6_2 : public TestCommand { - public: - Test_TC_CC_6_2(): TestCommand("Test_TC_CC_6_2"), mTestIndex(0) +public: + Test_TC_CC_6_2() : TestCommand("Test_TC_CC_6_2"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_CC_6_2() - { - } + ~Test_TC_CC_6_2() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_6_2\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_6_2\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_6_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_6_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); - err = TestTurnOnLightForColorControlTests_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); + err = TestTurnOnLightForColorControlTests_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Move up color temperature command\n"); - err = TestMoveUpColorTemperatureCommand_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Move up color temperature command\n"); + err = TestMoveUpColorTemperatureCommand_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Stop Color Temperature command\n"); - err = TestStopColorTemperatureCommand_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Stop Color Temperature command\n"); + err = TestStopColorTemperatureCommand_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Move down color temperature command\n"); - err = TestMoveDownColorTemperatureCommand_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Move down color temperature command\n"); + err = TestMoveDownColorTemperatureCommand_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_7(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 7 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_7(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 8; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, bool onOff) + static void OnSuccessCallback_2(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_2(onOff); } - - - static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context, bool onOff) + static void OnSuccessCallback_7(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_7(onOff); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestTurnOnLightForColorControlTests_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -13053,67 +10064,47 @@ class Test_TC_CC_6_2: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_1() - { NextTest(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_1() { NextTest(); } - - - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( bool onOff) + void OnSuccessResponse_2(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,1 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestMoveUpColorTemperatureCommand_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type; RequestType request; - request.moveMode =static_cast(1); - request.rate = 10U; - request.colorTemperatureMinimum = 1U; - request.colorTemperatureMaximum = 255U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.moveMode = static_cast(1); + request.rate = 10U; + request.colorTemperatureMinimum = 1U; + request.colorTemperatureMaximum = 255U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(); }; @@ -13122,39 +10113,27 @@ class Test_TC_CC_6_2: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3() - { NextTest(); - } - - - + void OnSuccessResponse_3() { NextTest(); } - CHIP_ERROR TestStopColorTemperatureCommand_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type; RequestType request; - request.moveMode =static_cast(0); - request.rate = 10U; - request.colorTemperatureMinimum = 1U; - request.colorTemperatureMaximum = 255U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.moveMode = static_cast(0); + request.rate = 10U; + request.colorTemperatureMinimum = 1U; + request.colorTemperatureMaximum = 255U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_4(); }; @@ -13163,39 +10142,27 @@ class Test_TC_CC_6_2: public TestCommand (static_cast(context))->OnFailureResponse_4(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_4() - { NextTest(); - } - + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_4() { NextTest(); } - CHIP_ERROR TestMoveDownColorTemperatureCommand_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type; RequestType request; - request.moveMode =static_cast(3); - request.rate = 20U; - request.colorTemperatureMinimum = 1U; - request.colorTemperatureMaximum = 255U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.moveMode = static_cast(3); + request.rate = 20U; + request.colorTemperatureMinimum = 1U; + request.colorTemperatureMaximum = 255U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_5(); }; @@ -13204,30 +10171,18 @@ class Test_TC_CC_6_2: public TestCommand (static_cast(context))->OnFailureResponse_5(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_5() - { NextTest(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_5() { NextTest(); } - - - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -13239,202 +10194,149 @@ class Test_TC_CC_6_2: public TestCommand (static_cast(context))->OnFailureResponse_6(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_6() - { NextTest(); - } - + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_6() { NextTest(); } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_7, OnFailureCallback_7)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7( bool onOff) + void OnSuccessResponse_7(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,0 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 0)); NextTest(); - } - - - }; + } +}; -class Test_TC_CC_6_3: public TestCommand +class Test_TC_CC_6_3 : public TestCommand { - public: - Test_TC_CC_6_3(): TestCommand("Test_TC_CC_6_3"), mTestIndex(0) +public: + Test_TC_CC_6_3() : TestCommand("Test_TC_CC_6_3"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_CC_6_3() - { - } + ~Test_TC_CC_6_3() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_6_3\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_6_3\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_6_3\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_6_3\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); - err = TestTurnOnLightForColorControlTests_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); + err = TestTurnOnLightForColorControlTests_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step up color temperature command\n"); - err = TestStepUpColorTemperatureCommand_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Step up color temperature command\n"); + err = TestStepUpColorTemperatureCommand_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step down color temperature command\n"); - err = TestStepDownColorTemperatureCommand_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Step down color temperature command\n"); + err = TestStepDownColorTemperatureCommand_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_6(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 6 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_6(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 7; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, bool onOff) + static void OnSuccessCallback_2(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_2(onOff); } - - - static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, bool onOff) + static void OnSuccessCallback_6(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_6(onOff); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestTurnOnLightForColorControlTests_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -13446,68 +10348,48 @@ class Test_TC_CC_6_3: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1() - { NextTest(); - } + void OnSuccessResponse_1() { NextTest(); } - - - - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( bool onOff) + void OnSuccessResponse_2(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,1 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestStepUpColorTemperatureCommand_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type; RequestType request; - request.stepMode =static_cast(1); - request.stepSize = 5U; - request.transitionTime = 50U; - request.colorTemperatureMinimum = 5U; - request.colorTemperatureMaximum = 100U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.stepMode = static_cast(1); + request.stepSize = 5U; + request.transitionTime = 50U; + request.colorTemperatureMinimum = 5U; + request.colorTemperatureMaximum = 100U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(); }; @@ -13516,40 +10398,28 @@ class Test_TC_CC_6_3: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_3() - { NextTest(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_3() { NextTest(); } - - - CHIP_ERROR TestStepDownColorTemperatureCommand_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type; RequestType request; - request.stepMode =static_cast(3); - request.stepSize = 5U; - request.transitionTime = 50U; - request.colorTemperatureMinimum = 5U; - request.colorTemperatureMaximum = 100U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.stepMode = static_cast(3); + request.stepSize = 5U; + request.transitionTime = 50U; + request.colorTemperatureMinimum = 5U; + request.colorTemperatureMaximum = 100U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_4(); }; @@ -13558,30 +10428,18 @@ class Test_TC_CC_6_3: public TestCommand (static_cast(context))->OnFailureResponse_4(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_4() - { NextTest(); - } - + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_4() { NextTest(); } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -13593,215 +10451,160 @@ class Test_TC_CC_6_3: public TestCommand (static_cast(context))->OnFailureResponse_5(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_5() - { NextTest(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_5() { NextTest(); } - - - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( bool onOff) + void OnSuccessResponse_6(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,0 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 0)); NextTest(); - } - - - }; + } +}; -class Test_TC_CC_7_1: public TestCommand +class Test_TC_CC_7_1 : public TestCommand { - public: - Test_TC_CC_7_1(): TestCommand("Test_TC_CC_7_1"), mTestIndex(0) +public: + Test_TC_CC_7_1() : TestCommand("Test_TC_CC_7_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_CC_7_1() - { - } + ~Test_TC_CC_7_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_7_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_7_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_7_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_7_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); - err = TestTurnOnLightForColorControlTests_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); + err = TestTurnOnLightForColorControlTests_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Enhanced Move To Hue command\n"); - err = TestEnhancedMoveToHueCommand_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Enhanced Move To Hue command\n"); + err = TestEnhancedMoveToHueCommand_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Check Remaining time attribute value matched the value sent by the last command\n"); - err = TestCheckRemainingTimeAttributeValueMatchedTheValueSentByTheLastCommand_4(); - break; + ChipLogProgress( + chipTool, " ***** Test Step 4 : Check Remaining time attribute value matched the value sent by the last command\n"); + err = TestCheckRemainingTimeAttributeValueMatchedTheValueSentByTheLastCommand_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_6(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 6 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_6(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 7; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, bool onOff) + static void OnSuccessCallback_2(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_2(onOff); } - - - static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, uint16_t remainingTime) + static void OnSuccessCallback_4(void * context, uint16_t remainingTime) { (static_cast(context))->OnSuccessResponse_4(remainingTime); } - - - static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, bool onOff) + static void OnSuccessCallback_6(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_6(onOff); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestTurnOnLightForColorControlTests_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -13813,66 +10616,46 @@ class Test_TC_CC_7_1: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_1() - { NextTest(); - } - + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( bool onOff) + void OnSuccessResponse_2(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,1 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestEnhancedMoveToHueCommand_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type; RequestType request; - request.enhancedHue = 1025U; - request.direction =static_cast(0); - request.transitionTime = 1U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.enhancedHue = 1025U; + request.direction = static_cast(0); + request.transitionTime = 1U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(); }; @@ -13881,58 +10664,38 @@ class Test_TC_CC_7_1: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_3() - { NextTest(); - } - + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_3() { NextTest(); } - CHIP_ERROR TestCheckRemainingTimeAttributeValueMatchedTheValueSentByTheLastCommand_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( uint16_t remainingTime) + void OnSuccessResponse_4(uint16_t remainingTime) { - VerifyOrReturn(CheckValue("remainingTime", remainingTime,1U - )); + VerifyOrReturn(CheckValue("remainingTime", remainingTime, 1U)); NextTest(); - } - - - + } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -13944,210 +10707,157 @@ class Test_TC_CC_7_1: public TestCommand (static_cast(context))->OnFailureResponse_5(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_5() - { NextTest(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_5() { NextTest(); } - - - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( bool onOff) + void OnSuccessResponse_6(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,0 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 0)); NextTest(); - } - - - }; + } +}; -class Test_TC_CC_7_2: public TestCommand +class Test_TC_CC_7_2 : public TestCommand { - public: - Test_TC_CC_7_2(): TestCommand("Test_TC_CC_7_2"), mTestIndex(0) +public: + Test_TC_CC_7_2() : TestCommand("Test_TC_CC_7_2"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_CC_7_2() - { - } + ~Test_TC_CC_7_2() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_7_2\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_7_2\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_7_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_7_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); - err = TestTurnOnLightForColorControlTests_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); + err = TestTurnOnLightForColorControlTests_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Enhanced Move Hue Down command \n"); - err = TestEnhancedMoveHueDownCommand_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Enhanced Move Hue Down command \n"); + err = TestEnhancedMoveHueDownCommand_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Enhanced Move Hue Stop command\n"); - err = TestEnhancedMoveHueStopCommand_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Enhanced Move Hue Stop command\n"); + err = TestEnhancedMoveHueStopCommand_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Enhanced Move Hue Up command\n"); - err = TestEnhancedMoveHueUpCommand_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Enhanced Move Hue Up command\n"); + err = TestEnhancedMoveHueUpCommand_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Enhanced Move Hue Stop command\n"); - err = TestEnhancedMoveHueStopCommand_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : Enhanced Move Hue Stop command\n"); + err = TestEnhancedMoveHueStopCommand_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_8(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 8 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_8(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 9; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, bool onOff) + static void OnSuccessCallback_2(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_2(onOff); } - - - static void OnFailureCallback_8(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context, bool onOff) + static void OnSuccessCallback_8(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_8(onOff); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestTurnOnLightForColorControlTests_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -14159,65 +10869,45 @@ class Test_TC_CC_7_2: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_1() - { NextTest(); - } - + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( bool onOff) + void OnSuccessResponse_2(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,1 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestEnhancedMoveHueDownCommand_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type; RequestType request; - request.moveMode =static_cast(3); - request.rate = 5U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.moveMode = static_cast(3); + request.rate = 5U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(); }; @@ -14226,37 +10916,25 @@ class Test_TC_CC_7_2: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_3() - { NextTest(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_3() { NextTest(); } - - - CHIP_ERROR TestEnhancedMoveHueStopCommand_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type; RequestType request; - request.moveMode =static_cast(0); - request.rate = 0U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.moveMode = static_cast(0); + request.rate = 0U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_4(); }; @@ -14265,37 +10943,25 @@ class Test_TC_CC_7_2: public TestCommand (static_cast(context))->OnFailureResponse_4(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4() - { NextTest(); - } + void OnSuccessResponse_4() { NextTest(); } - - - - CHIP_ERROR TestEnhancedMoveHueUpCommand_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type; RequestType request; - request.moveMode =static_cast(1); - request.rate = 50U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.moveMode = static_cast(1); + request.rate = 50U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_5(); }; @@ -14304,37 +10970,25 @@ class Test_TC_CC_7_2: public TestCommand (static_cast(context))->OnFailureResponse_5(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_5() - { NextTest(); - } - + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_5() { NextTest(); } - CHIP_ERROR TestEnhancedMoveHueStopCommand_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type; RequestType request; - request.moveMode =static_cast(0); - request.rate = 0U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.moveMode = static_cast(0); + request.rate = 0U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_6(); }; @@ -14343,30 +10997,18 @@ class Test_TC_CC_7_2: public TestCommand (static_cast(context))->OnFailureResponse_6(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_6() - { NextTest(); - } - + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_6() { NextTest(); } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -14378,202 +11020,149 @@ class Test_TC_CC_7_2: public TestCommand (static_cast(context))->OnFailureResponse_7(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_7() - { NextTest(); - } - + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_7() { NextTest(); } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_8, OnFailureCallback_8)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_8, OnFailureCallback_8)); + return CHIP_NO_ERROR; } - void OnFailureResponse_8(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_8( bool onOff) + void OnSuccessResponse_8(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,0 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 0)); NextTest(); - } - - - }; + } +}; -class Test_TC_CC_7_3: public TestCommand +class Test_TC_CC_7_3 : public TestCommand { - public: - Test_TC_CC_7_3(): TestCommand("Test_TC_CC_7_3"), mTestIndex(0) +public: + Test_TC_CC_7_3() : TestCommand("Test_TC_CC_7_3"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_CC_7_3() - { - } + ~Test_TC_CC_7_3() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_7_3\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_7_3\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_7_3\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_7_3\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); - err = TestTurnOnLightForColorControlTests_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); + err = TestTurnOnLightForColorControlTests_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Enhanced Step Hue Up command\n"); - err = TestEnhancedStepHueUpCommand_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Enhanced Step Hue Up command\n"); + err = TestEnhancedStepHueUpCommand_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Enhanced Step Hue Down command\n"); - err = TestEnhancedStepHueDownCommand_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Enhanced Step Hue Down command\n"); + err = TestEnhancedStepHueDownCommand_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_6(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 6 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_6(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 7; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, bool onOff) + static void OnSuccessCallback_2(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_2(onOff); } - - - static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, bool onOff) + static void OnSuccessCallback_6(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_6(onOff); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestTurnOnLightForColorControlTests_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -14585,66 +11174,46 @@ class Test_TC_CC_7_3: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_1() - { NextTest(); - } - + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( bool onOff) + void OnSuccessResponse_2(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,1 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestEnhancedStepHueUpCommand_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type; RequestType request; - request.stepMode =static_cast(0); - request.stepSize = 50U; - request.transitionTime = 1U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.stepMode = static_cast(0); + request.stepSize = 50U; + request.transitionTime = 1U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(); }; @@ -14653,38 +11222,26 @@ class Test_TC_CC_7_3: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_3() - { NextTest(); - } - + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_3() { NextTest(); } - CHIP_ERROR TestEnhancedStepHueDownCommand_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type; RequestType request; - request.stepMode =static_cast(1); - request.stepSize = 75U; - request.transitionTime = 1U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.stepMode = static_cast(1); + request.stepSize = 75U; + request.transitionTime = 1U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_4(); }; @@ -14693,30 +11250,18 @@ class Test_TC_CC_7_3: public TestCommand (static_cast(context))->OnFailureResponse_4(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_4() - { NextTest(); - } - + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_4() { NextTest(); } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -14728,198 +11273,145 @@ class Test_TC_CC_7_3: public TestCommand (static_cast(context))->OnFailureResponse_5(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_5() - { NextTest(); - } - + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_5() { NextTest(); } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( bool onOff) + void OnSuccessResponse_6(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,0 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 0)); NextTest(); - } - - - }; + } +}; -class Test_TC_CC_7_4: public TestCommand +class Test_TC_CC_7_4 : public TestCommand { - public: - Test_TC_CC_7_4(): TestCommand("Test_TC_CC_7_4"), mTestIndex(0) +public: + Test_TC_CC_7_4() : TestCommand("Test_TC_CC_7_4"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_CC_7_4() - { - } + ~Test_TC_CC_7_4() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_7_4\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_7_4\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_7_4\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_7_4\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); - err = TestTurnOnLightForColorControlTests_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); + err = TestTurnOnLightForColorControlTests_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Enhanced move to hue and saturation command\n"); - err = TestEnhancedMoveToHueAndSaturationCommand_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Enhanced move to hue and saturation command\n"); + err = TestEnhancedMoveToHueAndSaturationCommand_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_5(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 5 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_5(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 6; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, bool onOff) + static void OnSuccessCallback_2(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_2(onOff); } - - - static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context, bool onOff) + static void OnSuccessCallback_5(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_5(onOff); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestTurnOnLightForColorControlTests_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -14931,66 +11423,46 @@ class Test_TC_CC_7_4: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1() - { NextTest(); - } + void OnSuccessResponse_1() { NextTest(); } - - - - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( bool onOff) + void OnSuccessResponse_2(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,1 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestEnhancedMoveToHueAndSaturationCommand_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type; RequestType request; - request.enhancedHue = 1200U; - request.saturation = 90; - request.transitionTime = 10U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.enhancedHue = 1200U; + request.saturation = 90; + request.transitionTime = 10U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(); }; @@ -14999,30 +11471,18 @@ class Test_TC_CC_7_4: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3() - { NextTest(); - } + void OnSuccessResponse_3() { NextTest(); } - - - - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -15034,346 +11494,269 @@ class Test_TC_CC_7_4: public TestCommand (static_cast(context))->OnFailureResponse_4(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4() - { NextTest(); - } + void OnSuccessResponse_4() { NextTest(); } - - - - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5( bool onOff) + void OnSuccessResponse_5(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,0 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 0)); NextTest(); - } - - - }; + } +}; -class Test_TC_CC_8_1: public TestCommand +class Test_TC_CC_8_1 : public TestCommand { - public: - Test_TC_CC_8_1(): TestCommand("Test_TC_CC_8_1"), mTestIndex(0) +public: + Test_TC_CC_8_1() : TestCommand("Test_TC_CC_8_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_CC_8_1() - { - } + ~Test_TC_CC_8_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_8_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_8_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_8_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_8_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); - err = TestTurnOnLightForColorControlTests_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); + err = TestTurnOnLightForColorControlTests_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Color Loop Set Command - Set all Attributes\n"); - err = TestColorLoopSetCommandSetAllAttributes_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Color Loop Set Command - Set all Attributes\n"); + err = TestColorLoopSetCommandSetAllAttributes_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Check ColorLoopDirection Value\n"); - err = TestCheckColorLoopDirectionValue_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Check ColorLoopDirection Value\n"); + err = TestCheckColorLoopDirectionValue_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Check ColorLoopTime Value\n"); - err = TestCheckColorLoopTimeValue_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Check ColorLoopTime Value\n"); + err = TestCheckColorLoopTimeValue_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Check ColorLoopStartEnhancedHue Value\n"); - err = TestCheckColorLoopStartEnhancedHueValue_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : Check ColorLoopStartEnhancedHue Value\n"); + err = TestCheckColorLoopStartEnhancedHueValue_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Check ColorLoopActive Value\n"); - err = TestCheckColorLoopActiveValue_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : Check ColorLoopActive Value\n"); + err = TestCheckColorLoopActiveValue_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Color Loop Set Command - Start Color Loop\n"); - err = TestColorLoopSetCommandStartColorLoop_8(); - break; + ChipLogProgress(chipTool, " ***** Test Step 8 : Color Loop Set Command - Start Color Loop\n"); + err = TestColorLoopSetCommandStartColorLoop_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Check ColorLoopActive Value\n"); - err = TestCheckColorLoopActiveValue_9(); - break; + ChipLogProgress(chipTool, " ***** Test Step 9 : Check ColorLoopActive Value\n"); + err = TestCheckColorLoopActiveValue_9(); + break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Color Loop Set Command - Set direction and time while running\n"); - err = TestColorLoopSetCommandSetDirectionAndTimeWhileRunning_10(); - break; + ChipLogProgress(chipTool, " ***** Test Step 10 : Color Loop Set Command - Set direction and time while running\n"); + err = TestColorLoopSetCommandSetDirectionAndTimeWhileRunning_10(); + break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Check ColorLoopDirection Value\n"); - err = TestCheckColorLoopDirectionValue_11(); - break; + ChipLogProgress(chipTool, " ***** Test Step 11 : Check ColorLoopDirection Value\n"); + err = TestCheckColorLoopDirectionValue_11(); + break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Check ColorLoopTime Value\n"); - err = TestCheckColorLoopTimeValue_12(); - break; + ChipLogProgress(chipTool, " ***** Test Step 12 : Check ColorLoopTime Value\n"); + err = TestCheckColorLoopTimeValue_12(); + break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Color Loop Set Command - Set direction while running\n"); - err = TestColorLoopSetCommandSetDirectionWhileRunning_13(); - break; + ChipLogProgress(chipTool, " ***** Test Step 13 : Color Loop Set Command - Set direction while running\n"); + err = TestColorLoopSetCommandSetDirectionWhileRunning_13(); + break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Check ColorLoopDirection Value\n"); - err = TestCheckColorLoopDirectionValue_14(); - break; + ChipLogProgress(chipTool, " ***** Test Step 14 : Check ColorLoopDirection Value\n"); + err = TestCheckColorLoopDirectionValue_14(); + break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_15(); - break; + ChipLogProgress(chipTool, " ***** Test Step 15 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_15(); + break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_16(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 16 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_16(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 17; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, bool onOff) + static void OnSuccessCallback_2(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_2(onOff); } - - - static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, uint8_t colorLoopDirection) + static void OnSuccessCallback_4(void * context, uint8_t colorLoopDirection) { (static_cast(context))->OnSuccessResponse_4(colorLoopDirection); } - - - static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context, uint16_t colorLoopTime) + static void OnSuccessCallback_5(void * context, uint16_t colorLoopTime) { (static_cast(context))->OnSuccessResponse_5(colorLoopTime); } - - - static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, uint16_t colorLoopStartEnhancedHue) + static void OnSuccessCallback_6(void * context, uint16_t colorLoopStartEnhancedHue) { (static_cast(context))->OnSuccessResponse_6(colorLoopStartEnhancedHue); } - - - static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context, uint8_t colorLoopActive) + static void OnSuccessCallback_7(void * context, uint8_t colorLoopActive) { (static_cast(context))->OnSuccessResponse_7(colorLoopActive); } - - - static void OnFailureCallback_9(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_9(status); } - static void OnSuccessCallback_9(void * context, uint8_t colorLoopActive) + static void OnSuccessCallback_9(void * context, uint8_t colorLoopActive) { (static_cast(context))->OnSuccessResponse_9(colorLoopActive); } - - - static void OnFailureCallback_11(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_11(status); } - static void OnSuccessCallback_11(void * context, uint8_t colorLoopDirection) + static void OnSuccessCallback_11(void * context, uint8_t colorLoopDirection) { (static_cast(context))->OnSuccessResponse_11(colorLoopDirection); } - - - static void OnFailureCallback_12(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_12(status); } - static void OnSuccessCallback_12(void * context, uint16_t colorLoopTime) + static void OnSuccessCallback_12(void * context, uint16_t colorLoopTime) { (static_cast(context))->OnSuccessResponse_12(colorLoopTime); } - - - static void OnFailureCallback_14(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_14(status); } - static void OnSuccessCallback_14(void * context, uint8_t colorLoopDirection) + static void OnSuccessCallback_14(void * context, uint8_t colorLoopDirection) { (static_cast(context))->OnSuccessResponse_14(colorLoopDirection); } - - - static void OnFailureCallback_16(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_16(status); } - static void OnSuccessCallback_16(void * context, bool onOff) + static void OnSuccessCallback_16(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_16(onOff); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestTurnOnLightForColorControlTests_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -15385,68 +11768,48 @@ class Test_TC_CC_8_1: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_1() - { NextTest(); - } - + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( bool onOff) + void OnSuccessResponse_2(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,1 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestColorLoopSetCommandSetAllAttributes_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; - request.updateFlags = static_cast>(14); - request.action =static_cast(0); - request.direction =static_cast(1); - request.time = 100U; - request.startHue = 500U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.updateFlags = static_cast>(14); + request.action = static_cast(0); + request.direction = static_cast(1); + request.time = 100U; + request.startHue = 500U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(); }; @@ -15455,152 +11818,109 @@ class Test_TC_CC_8_1: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_3() - { NextTest(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_3() { NextTest(); } - - - CHIP_ERROR TestCheckColorLoopDirectionValue_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( uint8_t colorLoopDirection) + void OnSuccessResponse_4(uint8_t colorLoopDirection) { - VerifyOrReturn(CheckValue("colorLoopDirection", colorLoopDirection,1 - )); + VerifyOrReturn(CheckValue("colorLoopDirection", colorLoopDirection, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestCheckColorLoopTimeValue_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5( uint16_t colorLoopTime) + void OnSuccessResponse_5(uint16_t colorLoopTime) { - VerifyOrReturn(CheckValue("colorLoopTime", colorLoopTime,100U - )); + VerifyOrReturn(CheckValue("colorLoopTime", colorLoopTime, 100U)); NextTest(); - } - - - + } - CHIP_ERROR TestCheckColorLoopStartEnhancedHueValue_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( uint16_t colorLoopStartEnhancedHue) + void OnSuccessResponse_6(uint16_t colorLoopStartEnhancedHue) { - VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", colorLoopStartEnhancedHue,500U - )); + VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", colorLoopStartEnhancedHue, 500U)); NextTest(); - } - - - + } - CHIP_ERROR TestCheckColorLoopActiveValue_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_7, OnFailureCallback_7)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7( uint8_t colorLoopActive) + void OnSuccessResponse_7(uint8_t colorLoopActive) { - VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive,0 - )); + VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestColorLoopSetCommandStartColorLoop_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; - request.updateFlags = static_cast>(1); - request.action =static_cast(1); - request.direction =static_cast(0); - request.time = 0U; - request.startHue = 0U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.updateFlags = static_cast>(1); + request.action = static_cast(1); + request.direction = static_cast(0); + request.time = 0U; + request.startHue = 0U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_8(); }; @@ -15609,68 +11929,48 @@ class Test_TC_CC_8_1: public TestCommand (static_cast(context))->OnFailureResponse_8(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_8(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_8() - { NextTest(); - } - + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_8() { NextTest(); } - CHIP_ERROR TestCheckColorLoopActiveValue_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_9, OnFailureCallback_9)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_9, OnFailureCallback_9)); + return CHIP_NO_ERROR; } - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_9( uint8_t colorLoopActive) + void OnSuccessResponse_9(uint8_t colorLoopActive) { - VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive,1 - )); + VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestColorLoopSetCommandSetDirectionAndTimeWhileRunning_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; - request.updateFlags = static_cast>(6); - request.action =static_cast(0); - request.direction =static_cast(0); - request.time = 3500U; - request.startHue = 0U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.updateFlags = static_cast>(6); + request.action = static_cast(0); + request.direction = static_cast(0); + request.time = 3500U; + request.startHue = 0U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_10(); }; @@ -15679,96 +11979,68 @@ class Test_TC_CC_8_1: public TestCommand (static_cast(context))->OnFailureResponse_10(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_10(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_10() - { NextTest(); - } + void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_10() { NextTest(); } - - - CHIP_ERROR TestCheckColorLoopDirectionValue_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_11, OnFailureCallback_11)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_11, OnFailureCallback_11)); + return CHIP_NO_ERROR; } - void OnFailureResponse_11(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_11( uint8_t colorLoopDirection) + void OnSuccessResponse_11(uint8_t colorLoopDirection) { - VerifyOrReturn(CheckValue("colorLoopDirection", colorLoopDirection,0 - )); + VerifyOrReturn(CheckValue("colorLoopDirection", colorLoopDirection, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestCheckColorLoopTimeValue_12() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_12, OnFailureCallback_12)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_12, OnFailureCallback_12)); + return CHIP_NO_ERROR; } - void OnFailureResponse_12(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_12( uint16_t colorLoopTime) + void OnSuccessResponse_12(uint16_t colorLoopTime) { - VerifyOrReturn(CheckValue("colorLoopTime", colorLoopTime,3500U - )); + VerifyOrReturn(CheckValue("colorLoopTime", colorLoopTime, 3500U)); NextTest(); - } - - - + } - CHIP_ERROR TestColorLoopSetCommandSetDirectionWhileRunning_13() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; - request.updateFlags = static_cast>(2); - request.action =static_cast(0); - request.direction =static_cast(1); - request.time = 0U; - request.startHue = 0U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.updateFlags = static_cast>(2); + request.action = static_cast(0); + request.direction = static_cast(1); + request.time = 0U; + request.startHue = 0U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_13(); }; @@ -15777,58 +12049,38 @@ class Test_TC_CC_8_1: public TestCommand (static_cast(context))->OnFailureResponse_13(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_13(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_13(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_13() - { NextTest(); - } + void OnSuccessResponse_13() { NextTest(); } - - - - CHIP_ERROR TestCheckColorLoopDirectionValue_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_14, OnFailureCallback_14)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_14, OnFailureCallback_14)); + return CHIP_NO_ERROR; } - void OnFailureResponse_14(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_14( uint8_t colorLoopDirection) + void OnSuccessResponse_14(uint8_t colorLoopDirection) { - VerifyOrReturn(CheckValue("colorLoopDirection", colorLoopDirection,1 - )); + VerifyOrReturn(CheckValue("colorLoopDirection", colorLoopDirection, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_15() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -15840,677 +12092,579 @@ class Test_TC_CC_8_1: public TestCommand (static_cast(context))->OnFailureResponse_15(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_15(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_15() - { NextTest(); - } - + void OnFailureResponse_15(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_15() { NextTest(); } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_16() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_16, OnFailureCallback_16)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_16, OnFailureCallback_16)); + return CHIP_NO_ERROR; } - void OnFailureResponse_16(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_16(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_16( bool onOff) + void OnSuccessResponse_16(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,0 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 0)); NextTest(); - } - - - }; + } +}; -class Test_TC_CC_9_1: public TestCommand +class Test_TC_CC_9_1 : public TestCommand { - public: - Test_TC_CC_9_1(): TestCommand("Test_TC_CC_9_1"), mTestIndex(0) +public: + Test_TC_CC_9_1() : TestCommand("Test_TC_CC_9_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_CC_9_1() - { - } + ~Test_TC_CC_9_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_9_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_9_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_9_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_9_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition : Turn on light for color control tests\n"); - err = TestPreconditionTurnOnLightForColorControlTests_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition : Turn on light for color control tests\n"); + err = TestPreconditionTurnOnLightForColorControlTests_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) - { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Sends ColorLoopSet Command - Set all Attributes\n"); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read ColorLoopActive attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPACTIVE")) - { - NextTest(); - return; - } - err = TestReadColorLoopActiveAttributeFromDut_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Read ColorLoopActive attribute from DUT\n"); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) - { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Sends ColorLoopSet Command - Set all Attributes\n"); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read ColorLoopDirection attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPDIRECTION")) - { - NextTest(); - return; - } - err = TestReadColorLoopDirectionAttributeFromDut_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : Read ColorLoopDirection attribute from DUT\n"); + if (ShouldSkip("A_COLORLOOPDIRECTION")) + { + NextTest(); + return; + } + err = TestReadColorLoopDirectionAttributeFromDut_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) - { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : Sends ColorLoopSet Command - Set all Attributes\n"); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read ColorLoopTime attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPTIME")) - { - NextTest(); - return; - } - err = TestReadColorLoopTimeAttributeFromDut_8(); - break; + ChipLogProgress(chipTool, " ***** Test Step 8 : Read ColorLoopTime attribute from DUT\n"); + if (ShouldSkip("A_COLORLOOPTIME")) + { + NextTest(); + return; + } + err = TestReadColorLoopTimeAttributeFromDut_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) - { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_9(); - break; + ChipLogProgress(chipTool, " ***** Test Step 9 : Sends ColorLoopSet Command - Set all Attributes\n"); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_9(); + break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read ColorLoopStartEnhancedHue attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPSTARTENHANCEDHUE")) - { - NextTest(); - return; - } - err = TestReadColorLoopStartEnhancedHueAttributeFromDut_10(); - break; + ChipLogProgress(chipTool, " ***** Test Step 10 : Read ColorLoopStartEnhancedHue attribute from DUT\n"); + if (ShouldSkip("A_COLORLOOPSTARTENHANCEDHUE")) + { + NextTest(); + return; + } + err = TestReadColorLoopStartEnhancedHueAttributeFromDut_10(); + break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) - { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_11(); - break; + ChipLogProgress(chipTool, " ***** Test Step 11 : Sends ColorLoopSet Command - Set all Attributes\n"); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_11(); + break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Read ColorLoopActive attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPACTIVE")) - { - NextTest(); - return; - } - err = TestReadColorLoopActiveAttributeFromDut_12(); - break; + ChipLogProgress(chipTool, " ***** Test Step 12 : Read ColorLoopActive attribute from DUT\n"); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_12(); + break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) - { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_13(); - break; + ChipLogProgress(chipTool, " ***** Test Step 13 : Sends ColorLoopSet Command - Set all Attributes\n"); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_13(); + break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read ColorLoopActive attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPACTIVE")) - { - NextTest(); - return; - } - err = TestReadColorLoopActiveAttributeFromDut_14(); - break; + ChipLogProgress(chipTool, " ***** Test Step 14 : Read ColorLoopActive attribute from DUT\n"); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_14(); + break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) - { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_15(); - break; + ChipLogProgress(chipTool, " ***** Test Step 15 : Sends ColorLoopSet Command - Set all Attributes\n"); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_15(); + break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Read ColorLoopDirection attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPDIRECTION")) - { - NextTest(); - return; - } - err = TestReadColorLoopDirectionAttributeFromDut_16(); - break; + ChipLogProgress(chipTool, " ***** Test Step 16 : Read ColorLoopDirection attribute from DUT\n"); + if (ShouldSkip("A_COLORLOOPDIRECTION")) + { + NextTest(); + return; + } + err = TestReadColorLoopDirectionAttributeFromDut_16(); + break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) - { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_17(); - break; + ChipLogProgress(chipTool, " ***** Test Step 17 : Sends ColorLoopSet Command - Set all Attributes\n"); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_17(); + break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Read ColorLoopActive attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPACTIVE")) - { - NextTest(); - return; - } - err = TestReadColorLoopActiveAttributeFromDut_18(); - break; + ChipLogProgress(chipTool, " ***** Test Step 18 : Read ColorLoopActive attribute from DUT\n"); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_18(); + break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) - { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_19(); - break; + ChipLogProgress(chipTool, " ***** Test Step 19 : Sends ColorLoopSet Command - Set all Attributes\n"); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_19(); + break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Read ColorLoopActive attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPACTIVE")) - { - NextTest(); - return; - } - err = TestReadColorLoopActiveAttributeFromDut_20(); - break; + ChipLogProgress(chipTool, " ***** Test Step 20 : Read ColorLoopActive attribute from DUT\n"); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_20(); + break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Enhanced Move To Hue command 10\n"); - if (ShouldSkip("CR_ENHANCEDMOVETOHUE")) - { - NextTest(); - return; - } - err = TestEnhancedMoveToHueCommand10_21(); - break; + ChipLogProgress(chipTool, " ***** Test Step 21 : Enhanced Move To Hue command 10\n"); + if (ShouldSkip("CR_ENHANCEDMOVETOHUE")) + { + NextTest(); + return; + } + err = TestEnhancedMoveToHueCommand10_21(); + break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Wait 2000ms\n"); - err = TestWait2000ms_22(); - break; + ChipLogProgress(chipTool, " ***** Test Step 22 : Wait 2000ms\n"); + err = TestWait2000ms_22(); + break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Read EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("A_ENHANCEDCURRENTHUE")) - { - NextTest(); - return; - } - err = TestReadEnhancedCurrentHueAttributeFromDut_23(); - break; + ChipLogProgress(chipTool, " ***** Test Step 23 : Read EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("A_ENHANCEDCURRENTHUE")) + { + NextTest(); + return; + } + err = TestReadEnhancedCurrentHueAttributeFromDut_23(); + break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) - { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_24(); - break; + ChipLogProgress(chipTool, " ***** Test Step 24 : Sends ColorLoopSet Command - Set all Attributes\n"); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_24(); + break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Read ColorLoopDirection attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPDIRECTION")) - { - NextTest(); - return; - } - err = TestReadColorLoopDirectionAttributeFromDut_25(); - break; + ChipLogProgress(chipTool, " ***** Test Step 25 : Read ColorLoopDirection attribute from DUT\n"); + if (ShouldSkip("A_COLORLOOPDIRECTION")) + { + NextTest(); + return; + } + err = TestReadColorLoopDirectionAttributeFromDut_25(); + break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) - { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_26(); - break; + ChipLogProgress(chipTool, " ***** Test Step 26 : Sends ColorLoopSet Command - Set all Attributes\n"); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_26(); + break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Read ColorLoopActive attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPACTIVE")) - { - NextTest(); - return; - } - err = TestReadColorLoopActiveAttributeFromDut_27(); - break; + ChipLogProgress(chipTool, " ***** Test Step 27 : Read ColorLoopActive attribute from DUT\n"); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_27(); + break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) - { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_28(); - break; + ChipLogProgress(chipTool, " ***** Test Step 28 : Sends ColorLoopSet Command - Set all Attributes\n"); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_28(); + break; case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Read ColorLoopActive attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPACTIVE")) - { - NextTest(); - return; - } - err = TestReadColorLoopActiveAttributeFromDut_29(); - break; + ChipLogProgress(chipTool, " ***** Test Step 29 : Read ColorLoopActive attribute from DUT\n"); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_29(); + break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) - { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_30(); - break; + ChipLogProgress(chipTool, " ***** Test Step 30 : Sends ColorLoopSet Command - Set all Attributes\n"); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_30(); + break; case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Read ColorLoopDirection attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPDIRECTION")) - { - NextTest(); - return; - } - err = TestReadColorLoopDirectionAttributeFromDut_31(); - break; + ChipLogProgress(chipTool, " ***** Test Step 31 : Read ColorLoopDirection attribute from DUT\n"); + if (ShouldSkip("A_COLORLOOPDIRECTION")) + { + NextTest(); + return; + } + err = TestReadColorLoopDirectionAttributeFromDut_31(); + break; case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) - { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_32(); - break; + ChipLogProgress(chipTool, " ***** Test Step 32 : Sends ColorLoopSet Command - Set all Attributes\n"); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_32(); + break; case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Read ColorLoopActive attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPACTIVE")) - { - NextTest(); - return; - } - err = TestReadColorLoopActiveAttributeFromDut_33(); - break; + ChipLogProgress(chipTool, " ***** Test Step 33 : Read ColorLoopActive attribute from DUT\n"); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_33(); + break; case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) - { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_34(); - break; + ChipLogProgress(chipTool, " ***** Test Step 34 : Sends ColorLoopSet Command - Set all Attributes\n"); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_34(); + break; case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Read ColorLoopActive attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPACTIVE")) - { - NextTest(); - return; - } - err = TestReadColorLoopActiveAttributeFromDut_35(); - break; + ChipLogProgress(chipTool, " ***** Test Step 35 : Read ColorLoopActive attribute from DUT\n"); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_35(); + break; case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Turn Off light for color control tests\n"); - err = TestTurnOffLightForColorControlTests_36(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 36 : Turn Off light for color control tests\n"); + err = TestTurnOffLightForColorControlTests_36(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 37; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, bool onOff) + static void OnSuccessCallback_2(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_2(onOff); } - - - static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, uint8_t colorLoopActive) + static void OnSuccessCallback_4(void * context, uint8_t colorLoopActive) { (static_cast(context))->OnSuccessResponse_4(colorLoopActive); } - - - static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, uint8_t colorLoopDirection) + static void OnSuccessCallback_6(void * context, uint8_t colorLoopDirection) { (static_cast(context))->OnSuccessResponse_6(colorLoopDirection); } - - - static void OnFailureCallback_8(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context, uint16_t colorLoopTime) + static void OnSuccessCallback_8(void * context, uint16_t colorLoopTime) { (static_cast(context))->OnSuccessResponse_8(colorLoopTime); } - - - static void OnFailureCallback_10(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_10(status); } - static void OnSuccessCallback_10(void * context, uint16_t colorLoopStartEnhancedHue) + static void OnSuccessCallback_10(void * context, uint16_t colorLoopStartEnhancedHue) { (static_cast(context))->OnSuccessResponse_10(colorLoopStartEnhancedHue); } - - - static void OnFailureCallback_12(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_12(status); } - static void OnSuccessCallback_12(void * context, uint8_t colorLoopActive) + static void OnSuccessCallback_12(void * context, uint8_t colorLoopActive) { (static_cast(context))->OnSuccessResponse_12(colorLoopActive); } - - - static void OnFailureCallback_14(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_14(status); } - static void OnSuccessCallback_14(void * context, uint8_t colorLoopActive) + static void OnSuccessCallback_14(void * context, uint8_t colorLoopActive) { (static_cast(context))->OnSuccessResponse_14(colorLoopActive); } - - - static void OnFailureCallback_16(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_16(status); } - static void OnSuccessCallback_16(void * context, uint8_t colorLoopDirection) + static void OnSuccessCallback_16(void * context, uint8_t colorLoopDirection) { (static_cast(context))->OnSuccessResponse_16(colorLoopDirection); } - - - static void OnFailureCallback_18(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_18(status); } - static void OnSuccessCallback_18(void * context, uint8_t colorLoopActive) + static void OnSuccessCallback_18(void * context, uint8_t colorLoopActive) { (static_cast(context))->OnSuccessResponse_18(colorLoopActive); } - - - static void OnFailureCallback_20(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_20(status); } - static void OnSuccessCallback_20(void * context, uint8_t colorLoopActive) + static void OnSuccessCallback_20(void * context, uint8_t colorLoopActive) { (static_cast(context))->OnSuccessResponse_20(colorLoopActive); } - - - static void OnFailureCallback_23(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_23(status); } - static void OnSuccessCallback_23(void * context, uint16_t enhancedCurrentHue) + static void OnSuccessCallback_23(void * context, uint16_t enhancedCurrentHue) { (static_cast(context))->OnSuccessResponse_23(enhancedCurrentHue); } - - - static void OnFailureCallback_25(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_25(status); } - static void OnSuccessCallback_25(void * context, uint8_t colorLoopDirection) + static void OnSuccessCallback_25(void * context, uint8_t colorLoopDirection) { (static_cast(context))->OnSuccessResponse_25(colorLoopDirection); } - - - static void OnFailureCallback_27(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_27(status); } - static void OnSuccessCallback_27(void * context, uint8_t colorLoopActive) + static void OnSuccessCallback_27(void * context, uint8_t colorLoopActive) { (static_cast(context))->OnSuccessResponse_27(colorLoopActive); } - - - static void OnFailureCallback_29(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_29(status); } - static void OnSuccessCallback_29(void * context, uint8_t colorLoopActive) + static void OnSuccessCallback_29(void * context, uint8_t colorLoopActive) { (static_cast(context))->OnSuccessResponse_29(colorLoopActive); } - - - static void OnFailureCallback_31(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_31(status); } - static void OnSuccessCallback_31(void * context, uint8_t colorLoopDirection) + static void OnSuccessCallback_31(void * context, uint8_t colorLoopDirection) { (static_cast(context))->OnSuccessResponse_31(colorLoopDirection); } - - - static void OnFailureCallback_33(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_33(status); } - static void OnSuccessCallback_33(void * context, uint8_t colorLoopActive) + static void OnSuccessCallback_33(void * context, uint8_t colorLoopActive) { (static_cast(context))->OnSuccessResponse_33(colorLoopActive); } - - - static void OnFailureCallback_35(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_35(status); } - static void OnSuccessCallback_35(void * context, uint8_t colorLoopActive) + static void OnSuccessCallback_35(void * context, uint8_t colorLoopActive) { (static_cast(context))->OnSuccessResponse_35(colorLoopActive); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestPreconditionTurnOnLightForColorControlTests_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -16522,68 +12676,48 @@ class Test_TC_CC_9_1: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_1() - { NextTest(); - } - + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( bool onOff) + void OnSuccessResponse_2(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,1 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; - request.updateFlags = static_cast>(1); - request.action =static_cast(0); - request.direction =static_cast(0); - request.time = 0U; - request.startHue = 0U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.updateFlags = static_cast>(1); + request.action = static_cast(0); + request.direction = static_cast(0); + request.time = 0U; + request.startHue = 0U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(); }; @@ -16592,68 +12726,48 @@ class Test_TC_CC_9_1: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_3() - { NextTest(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_3() { NextTest(); } - - - CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( uint8_t colorLoopActive) + void OnSuccessResponse_4(uint8_t colorLoopActive) { - VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive,0 - )); + VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; - request.updateFlags = static_cast>(2); - request.action =static_cast(0); - request.direction =static_cast(0); - request.time = 0U; - request.startHue = 0U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.updateFlags = static_cast>(2); + request.action = static_cast(0); + request.direction = static_cast(0); + request.time = 0U; + request.startHue = 0U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_5(); }; @@ -16662,68 +12776,48 @@ class Test_TC_CC_9_1: public TestCommand (static_cast(context))->OnFailureResponse_5(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_5() - { NextTest(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_5() { NextTest(); } - - - CHIP_ERROR TestReadColorLoopDirectionAttributeFromDut_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( uint8_t colorLoopDirection) + void OnSuccessResponse_6(uint8_t colorLoopDirection) { - VerifyOrReturn(CheckValue("colorLoopDirection", colorLoopDirection,0 - )); + VerifyOrReturn(CheckValue("colorLoopDirection", colorLoopDirection, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; - request.updateFlags = static_cast>(4); - request.action =static_cast(0); - request.direction =static_cast(0); - request.time = 30U; - request.startHue = 0U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.updateFlags = static_cast>(4); + request.action = static_cast(0); + request.direction = static_cast(0); + request.time = 30U; + request.startHue = 0U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_7(); }; @@ -16732,68 +12826,48 @@ class Test_TC_CC_9_1: public TestCommand (static_cast(context))->OnFailureResponse_7(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_7() - { NextTest(); - } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_7() { NextTest(); } - - - CHIP_ERROR TestReadColorLoopTimeAttributeFromDut_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_8, OnFailureCallback_8)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_8, OnFailureCallback_8)); + return CHIP_NO_ERROR; } - void OnFailureResponse_8(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_8( uint16_t colorLoopTime) + void OnSuccessResponse_8(uint16_t colorLoopTime) { - VerifyOrReturn(CheckValue("colorLoopTime", colorLoopTime,30U - )); + VerifyOrReturn(CheckValue("colorLoopTime", colorLoopTime, 30U)); NextTest(); - } - - - + } - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; - request.updateFlags = static_cast>(8); - request.action =static_cast(0); - request.direction =static_cast(0); - request.time = 0U; - request.startHue = 160U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.updateFlags = static_cast>(8); + request.action = static_cast(0); + request.direction = static_cast(0); + request.time = 0U; + request.startHue = 160U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_9(); }; @@ -16802,68 +12876,49 @@ class Test_TC_CC_9_1: public TestCommand (static_cast(context))->OnFailureResponse_9(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_9() - { NextTest(); - } - + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_9() { NextTest(); } - CHIP_ERROR TestReadColorLoopStartEnhancedHueAttributeFromDut_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_10, OnFailureCallback_10)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_10, OnFailureCallback_10)); + return CHIP_NO_ERROR; } - void OnFailureResponse_10(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_10( uint16_t colorLoopStartEnhancedHue) + void OnSuccessResponse_10(uint16_t colorLoopStartEnhancedHue) { - VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", colorLoopStartEnhancedHue,160U - )); + VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", colorLoopStartEnhancedHue, 160U)); NextTest(); - } - - - + } - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; - request.updateFlags = static_cast>(1); - request.action =static_cast(1); - request.direction =static_cast(0); - request.time = 0U; - request.startHue = 0U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.updateFlags = static_cast>(1); + request.action = static_cast(1); + request.direction = static_cast(0); + request.time = 0U; + request.startHue = 0U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_11(); }; @@ -16872,68 +12927,48 @@ class Test_TC_CC_9_1: public TestCommand (static_cast(context))->OnFailureResponse_11(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_11(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_11() - { NextTest(); - } - + void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_11() { NextTest(); } - CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_12() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_12, OnFailureCallback_12)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_12, OnFailureCallback_12)); + return CHIP_NO_ERROR; } - void OnFailureResponse_12(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_12( uint8_t colorLoopActive) + void OnSuccessResponse_12(uint8_t colorLoopActive) { - VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive,1 - )); + VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_13() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; - request.updateFlags = static_cast>(1); - request.action =static_cast(0); - request.direction =static_cast(0); - request.time = 0U; - request.startHue = 0U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.updateFlags = static_cast>(1); + request.action = static_cast(0); + request.direction = static_cast(0); + request.time = 0U; + request.startHue = 0U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_13(); }; @@ -16942,68 +12977,48 @@ class Test_TC_CC_9_1: public TestCommand (static_cast(context))->OnFailureResponse_13(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_13(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_13() - { NextTest(); - } - + void OnFailureResponse_13(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_13() { NextTest(); } - CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_14, OnFailureCallback_14)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_14, OnFailureCallback_14)); + return CHIP_NO_ERROR; } - void OnFailureResponse_14(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_14( uint8_t colorLoopActive) + void OnSuccessResponse_14(uint8_t colorLoopActive) { - VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive,0 - )); + VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_15() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; - request.updateFlags = static_cast>(2); - request.action =static_cast(0); - request.direction =static_cast(1); - request.time = 0U; - request.startHue = 0U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.updateFlags = static_cast>(2); + request.action = static_cast(0); + request.direction = static_cast(1); + request.time = 0U; + request.startHue = 0U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_15(); }; @@ -17012,68 +13027,48 @@ class Test_TC_CC_9_1: public TestCommand (static_cast(context))->OnFailureResponse_15(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_15(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_15() - { NextTest(); - } - + void OnFailureResponse_15(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_15() { NextTest(); } - CHIP_ERROR TestReadColorLoopDirectionAttributeFromDut_16() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_16, OnFailureCallback_16)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_16, OnFailureCallback_16)); + return CHIP_NO_ERROR; } - void OnFailureResponse_16(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_16(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_16( uint8_t colorLoopDirection) + void OnSuccessResponse_16(uint8_t colorLoopDirection) { - VerifyOrReturn(CheckValue("colorLoopDirection", colorLoopDirection,1 - )); + VerifyOrReturn(CheckValue("colorLoopDirection", colorLoopDirection, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_17() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; - request.updateFlags = static_cast>(1); - request.action =static_cast(1); - request.direction =static_cast(0); - request.time = 0U; - request.startHue = 0U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.updateFlags = static_cast>(1); + request.action = static_cast(1); + request.direction = static_cast(0); + request.time = 0U; + request.startHue = 0U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_17(); }; @@ -17082,68 +13077,48 @@ class Test_TC_CC_9_1: public TestCommand (static_cast(context))->OnFailureResponse_17(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_17(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_17() - { NextTest(); - } - + void OnFailureResponse_17(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_17() { NextTest(); } - CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_18() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_18, OnFailureCallback_18)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_18, OnFailureCallback_18)); + return CHIP_NO_ERROR; } - void OnFailureResponse_18(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_18(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_18( uint8_t colorLoopActive) + void OnSuccessResponse_18(uint8_t colorLoopActive) { - VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive,1 - )); + VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_19() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; - request.updateFlags = static_cast>(1); - request.action =static_cast(0); - request.direction =static_cast(0); - request.time = 0U; - request.startHue = 0U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.updateFlags = static_cast>(1); + request.action = static_cast(0); + request.direction = static_cast(0); + request.time = 0U; + request.startHue = 0U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_19(); }; @@ -17152,66 +13127,46 @@ class Test_TC_CC_9_1: public TestCommand (static_cast(context))->OnFailureResponse_19(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_19(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_19() - { NextTest(); - } + void OnFailureResponse_19(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_19() { NextTest(); } - - - CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_20() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_20, OnFailureCallback_20)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_20, OnFailureCallback_20)); + return CHIP_NO_ERROR; } - void OnFailureResponse_20(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_20(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_20( uint8_t colorLoopActive) + void OnSuccessResponse_20(uint8_t colorLoopActive) { - VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive,0 - )); + VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestEnhancedMoveToHueCommand10_21() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type; RequestType request; - request.enhancedHue = 40960U; - request.direction =static_cast(0); - request.transitionTime = 0U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.enhancedHue = 40960U; + request.direction = static_cast(0); + request.transitionTime = 0U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_21(); }; @@ -17220,74 +13175,54 @@ class Test_TC_CC_9_1: public TestCommand (static_cast(context))->OnFailureResponse_21(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_21(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_21() - { NextTest(); - } + void OnFailureResponse_21(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_21() { NextTest(); } - CHIP_ERROR TestWait2000ms_22() { SetIdentity(kIdentityAlpha); return WaitForMs(2000); } - - CHIP_ERROR TestReadEnhancedCurrentHueAttributeFromDut_23() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_23, OnFailureCallback_23)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_23, OnFailureCallback_23)); + return CHIP_NO_ERROR; } - void OnFailureResponse_23(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_23(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_23( uint16_t enhancedCurrentHue) + void OnSuccessResponse_23(uint16_t enhancedCurrentHue) { - VerifyOrReturn(CheckValue("enhancedCurrentHue", enhancedCurrentHue,40960U - )); + VerifyOrReturn(CheckValue("enhancedCurrentHue", enhancedCurrentHue, 40960U)); NextTest(); - } - - - + } - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_24() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; - request.updateFlags = static_cast>(2); - request.action =static_cast(0); - request.direction =static_cast(0); - request.time = 0U; - request.startHue = 0U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.updateFlags = static_cast>(2); + request.action = static_cast(0); + request.direction = static_cast(0); + request.time = 0U; + request.startHue = 0U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_24(); }; @@ -17296,68 +13231,48 @@ class Test_TC_CC_9_1: public TestCommand (static_cast(context))->OnFailureResponse_24(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_24(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_24() - { NextTest(); - } - + void OnFailureResponse_24(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_24() { NextTest(); } - CHIP_ERROR TestReadColorLoopDirectionAttributeFromDut_25() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_25, OnFailureCallback_25)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_25, OnFailureCallback_25)); + return CHIP_NO_ERROR; } - void OnFailureResponse_25(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_25(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_25( uint8_t colorLoopDirection) + void OnSuccessResponse_25(uint8_t colorLoopDirection) { - VerifyOrReturn(CheckValue("colorLoopDirection", colorLoopDirection,0 - )); + VerifyOrReturn(CheckValue("colorLoopDirection", colorLoopDirection, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_26() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; - request.updateFlags = static_cast>(1); - request.action =static_cast(2); - request.direction =static_cast(0); - request.time = 0U; - request.startHue = 0U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.updateFlags = static_cast>(1); + request.action = static_cast(2); + request.direction = static_cast(0); + request.time = 0U; + request.startHue = 0U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_26(); }; @@ -17366,68 +13281,48 @@ class Test_TC_CC_9_1: public TestCommand (static_cast(context))->OnFailureResponse_26(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_26(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_26() - { NextTest(); - } - + void OnFailureResponse_26(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_26() { NextTest(); } - CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_27() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_27, OnFailureCallback_27)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_27, OnFailureCallback_27)); + return CHIP_NO_ERROR; } - void OnFailureResponse_27(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_27(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_27( uint8_t colorLoopActive) + void OnSuccessResponse_27(uint8_t colorLoopActive) { - VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive,1 - )); + VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_28() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; - request.updateFlags = static_cast>(1); - request.action =static_cast(0); - request.direction =static_cast(0); - request.time = 0U; - request.startHue = 0U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.updateFlags = static_cast>(1); + request.action = static_cast(0); + request.direction = static_cast(0); + request.time = 0U; + request.startHue = 0U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_28(); }; @@ -17436,68 +13331,48 @@ class Test_TC_CC_9_1: public TestCommand (static_cast(context))->OnFailureResponse_28(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_28(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_28() - { NextTest(); - } - + void OnFailureResponse_28(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_28() { NextTest(); } - CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_29() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_29, OnFailureCallback_29)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_29, OnFailureCallback_29)); + return CHIP_NO_ERROR; } - void OnFailureResponse_29(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_29(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_29( uint8_t colorLoopActive) + void OnSuccessResponse_29(uint8_t colorLoopActive) { - VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive,0 - )); + VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_30() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; - request.updateFlags = static_cast>(2); - request.action =static_cast(0); - request.direction =static_cast(1); - request.time = 0U; - request.startHue = 0U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.updateFlags = static_cast>(2); + request.action = static_cast(0); + request.direction = static_cast(1); + request.time = 0U; + request.startHue = 0U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_30(); }; @@ -17506,68 +13381,48 @@ class Test_TC_CC_9_1: public TestCommand (static_cast(context))->OnFailureResponse_30(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_30(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_30() - { NextTest(); - } - + void OnFailureResponse_30(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_30() { NextTest(); } - CHIP_ERROR TestReadColorLoopDirectionAttributeFromDut_31() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_31, OnFailureCallback_31)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_31, OnFailureCallback_31)); + return CHIP_NO_ERROR; } - void OnFailureResponse_31(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_31(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_31( uint8_t colorLoopDirection) + void OnSuccessResponse_31(uint8_t colorLoopDirection) { - VerifyOrReturn(CheckValue("colorLoopDirection", colorLoopDirection,1 - )); + VerifyOrReturn(CheckValue("colorLoopDirection", colorLoopDirection, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_32() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; - request.updateFlags = static_cast>(1); - request.action =static_cast(2); - request.direction =static_cast(0); - request.time = 0U; - request.startHue = 0U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.updateFlags = static_cast>(1); + request.action = static_cast(2); + request.direction = static_cast(0); + request.time = 0U; + request.startHue = 0U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_32(); }; @@ -17576,68 +13431,48 @@ class Test_TC_CC_9_1: public TestCommand (static_cast(context))->OnFailureResponse_32(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_32(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_32() - { NextTest(); - } - + void OnFailureResponse_32(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_32() { NextTest(); } - CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_33() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_33, OnFailureCallback_33)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_33, OnFailureCallback_33)); + return CHIP_NO_ERROR; } - void OnFailureResponse_33(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_33(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_33( uint8_t colorLoopActive) + void OnSuccessResponse_33(uint8_t colorLoopActive) { - VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive,1 - )); + VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_34() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; - request.updateFlags = static_cast>(1); - request.action =static_cast(0); - request.direction =static_cast(0); - request.time = 0U; - request.startHue = 0U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.updateFlags = static_cast>(1); + request.action = static_cast(0); + request.direction = static_cast(0); + request.time = 0U; + request.startHue = 0U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_34(); }; @@ -17646,58 +13481,38 @@ class Test_TC_CC_9_1: public TestCommand (static_cast(context))->OnFailureResponse_34(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_34(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_34() - { NextTest(); - } - + void OnFailureResponse_34(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_34() { NextTest(); } - CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_35() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_35, OnFailureCallback_35)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_35, OnFailureCallback_35)); + return CHIP_NO_ERROR; } - void OnFailureResponse_35(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_35(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_35( uint8_t colorLoopActive) + void OnSuccessResponse_35(uint8_t colorLoopActive) { - VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive,0 - )); + VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestTurnOffLightForColorControlTests_36() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -17709,339 +13524,276 @@ class Test_TC_CC_9_1: public TestCommand (static_cast(context))->OnFailureResponse_36(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_36(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_36() - { NextTest(); - } - + void OnFailureResponse_36(EmberAfStatus status) { ThrowFailureResponse(); } - }; + void OnSuccessResponse_36() { NextTest(); } +}; -class Test_TC_CC_9_2: public TestCommand +class Test_TC_CC_9_2 : public TestCommand { - public: - Test_TC_CC_9_2(): TestCommand("Test_TC_CC_9_2"), mTestIndex(0) +public: + Test_TC_CC_9_2() : TestCommand("Test_TC_CC_9_2"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_CC_9_2() - { - } + ~Test_TC_CC_9_2() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_9_2\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_9_2\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_9_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_9_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition: Turn on light for color control tests\n"); - err = TestPreconditionTurnOnLightForColorControlTests_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition: Turn on light for color control tests\n"); + err = TestPreconditionTurnOnLightForColorControlTests_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Precondition: Check on/off attribute value is true after on command\n"); - err = TestPreconditionCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Precondition: Check on/off attribute value is true after on command\n"); + err = TestPreconditionCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) - { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Sends ColorLoopSet Command - Set all Attributes\n"); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read ColorLoopActive attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPACTIVE")) - { - NextTest(); - return; - } - err = TestReadColorLoopActiveAttributeFromDut_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Read ColorLoopActive attribute from DUT\n"); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read ColorLoopDirection attribute from DUT.\n"); - if (ShouldSkip("A_COLORLOOPDIRECTION")) - { - NextTest(); - return; - } - err = TestReadColorLoopDirectionAttributeFromDut_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Read ColorLoopDirection attribute from DUT.\n"); + if (ShouldSkip("A_COLORLOOPDIRECTION")) + { + NextTest(); + return; + } + err = TestReadColorLoopDirectionAttributeFromDut_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read ColorLoopTime attribute from DUT.\n"); - if (ShouldSkip("A_COLORLOOPTIME")) - { - NextTest(); - return; - } - err = TestReadColorLoopTimeAttributeFromDut_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : Read ColorLoopTime attribute from DUT.\n"); + if (ShouldSkip("A_COLORLOOPTIME")) + { + NextTest(); + return; + } + err = TestReadColorLoopTimeAttributeFromDut_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read ColorLoopStartEnhancedHue attribute from DUT.\n"); - if (ShouldSkip("A_COLORLOOPSTARTENHANCEDHUE")) - { - NextTest(); - return; - } - err = TestReadColorLoopStartEnhancedHueAttributeFromDut_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : Read ColorLoopStartEnhancedHue attribute from DUT.\n"); + if (ShouldSkip("A_COLORLOOPSTARTENHANCEDHUE")) + { + NextTest(); + return; + } + err = TestReadColorLoopStartEnhancedHueAttributeFromDut_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Color Loop Set Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) - { - NextTest(); - return; - } - err = TestColorLoopSetCommandSetAllAttributes_8(); - break; + ChipLogProgress(chipTool, " ***** Test Step 8 : Color Loop Set Command - Set all Attributes\n"); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestColorLoopSetCommandSetAllAttributes_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read ColorLoopActive attribute from DUT.\n"); - if (ShouldSkip("A_COLORLOOPACTIVE")) - { - NextTest(); - return; - } - err = TestReadColorLoopActiveAttributeFromDut_9(); - break; + ChipLogProgress(chipTool, " ***** Test Step 9 : Read ColorLoopActive attribute from DUT.\n"); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_9(); + break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Color Loop Set Command - Start Color Loop\n"); - if (ShouldSkip("CR_COLORLOOPSET")) - { - NextTest(); - return; - } - err = TestColorLoopSetCommandStartColorLoop_10(); - break; + ChipLogProgress(chipTool, " ***** Test Step 10 : Color Loop Set Command - Start Color Loop\n"); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestColorLoopSetCommandStartColorLoop_10(); + break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read ColorLoopDirection attribute from DUT.\n"); - if (ShouldSkip("A_COLORLOOPDIRECTION")) - { - NextTest(); - return; - } - err = TestReadColorLoopDirectionAttributeFromDut_11(); - break; + ChipLogProgress(chipTool, " ***** Test Step 11 : Read ColorLoopDirection attribute from DUT.\n"); + if (ShouldSkip("A_COLORLOOPDIRECTION")) + { + NextTest(); + return; + } + err = TestReadColorLoopDirectionAttributeFromDut_11(); + break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Color Loop Set Command - Start Color Loop\n"); - if (ShouldSkip("CR_COLORLOOPSET")) - { - NextTest(); - return; - } - err = TestColorLoopSetCommandStartColorLoop_12(); - break; + ChipLogProgress(chipTool, " ***** Test Step 12 : Color Loop Set Command - Start Color Loop\n"); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestColorLoopSetCommandStartColorLoop_12(); + break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read ColorLoopActive attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPACTIVE")) - { - NextTest(); - return; - } - err = TestReadColorLoopActiveAttributeFromDut_13(); - break; + ChipLogProgress(chipTool, " ***** Test Step 13 : Read ColorLoopActive attribute from DUT\n"); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_13(); + break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Turn off light for color control tests\n"); - err = TestTurnOffLightForColorControlTests_14(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 14 : Turn off light for color control tests\n"); + err = TestTurnOffLightForColorControlTests_14(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 15; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, bool onOff) + static void OnSuccessCallback_2(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_2(onOff); } - - - static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, uint8_t colorLoopActive) + static void OnSuccessCallback_4(void * context, uint8_t colorLoopActive) { (static_cast(context))->OnSuccessResponse_4(colorLoopActive); } - - - static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context, uint8_t colorLoopDirection) + static void OnSuccessCallback_5(void * context, uint8_t colorLoopDirection) { (static_cast(context))->OnSuccessResponse_5(colorLoopDirection); } - - - static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, uint16_t colorLoopTime) + static void OnSuccessCallback_6(void * context, uint16_t colorLoopTime) { (static_cast(context))->OnSuccessResponse_6(colorLoopTime); } - - - static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context, uint16_t colorLoopStartEnhancedHue) + static void OnSuccessCallback_7(void * context, uint16_t colorLoopStartEnhancedHue) { (static_cast(context))->OnSuccessResponse_7(colorLoopStartEnhancedHue); } - - - static void OnFailureCallback_9(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_9(status); } - static void OnSuccessCallback_9(void * context, uint8_t colorLoopActive) + static void OnSuccessCallback_9(void * context, uint8_t colorLoopActive) { (static_cast(context))->OnSuccessResponse_9(colorLoopActive); } - - - static void OnFailureCallback_11(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_11(status); } - static void OnSuccessCallback_11(void * context, uint8_t colorLoopDirection) + static void OnSuccessCallback_11(void * context, uint8_t colorLoopDirection) { (static_cast(context))->OnSuccessResponse_11(colorLoopDirection); } - - - static void OnFailureCallback_13(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_13(status); } - static void OnSuccessCallback_13(void * context, uint8_t colorLoopActive) + static void OnSuccessCallback_13(void * context, uint8_t colorLoopActive) { (static_cast(context))->OnSuccessResponse_13(colorLoopActive); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestPreconditionTurnOnLightForColorControlTests_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -18053,68 +13805,48 @@ class Test_TC_CC_9_2: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_1() - { NextTest(); - } - + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestPreconditionCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( bool onOff) + void OnSuccessResponse_2(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,1 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; - request.updateFlags = static_cast>(15); - request.action =static_cast(0); - request.direction =static_cast(0); - request.time = 30U; - request.startHue = 160U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.updateFlags = static_cast>(15); + request.action = static_cast(0); + request.direction = static_cast(0); + request.time = 30U; + request.startHue = 160U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(); }; @@ -18123,152 +13855,109 @@ class Test_TC_CC_9_2: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_3() - { NextTest(); - } - + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_3() { NextTest(); } - CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( uint8_t colorLoopActive) + void OnSuccessResponse_4(uint8_t colorLoopActive) { - VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive,0 - )); + VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadColorLoopDirectionAttributeFromDut_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5( uint8_t colorLoopDirection) + void OnSuccessResponse_5(uint8_t colorLoopDirection) { - VerifyOrReturn(CheckValue("colorLoopDirection", colorLoopDirection,0 - )); + VerifyOrReturn(CheckValue("colorLoopDirection", colorLoopDirection, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadColorLoopTimeAttributeFromDut_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( uint16_t colorLoopTime) + void OnSuccessResponse_6(uint16_t colorLoopTime) { - VerifyOrReturn(CheckValue("colorLoopTime", colorLoopTime,30U - )); + VerifyOrReturn(CheckValue("colorLoopTime", colorLoopTime, 30U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadColorLoopStartEnhancedHueAttributeFromDut_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_7, OnFailureCallback_7)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7( uint16_t colorLoopStartEnhancedHue) + void OnSuccessResponse_7(uint16_t colorLoopStartEnhancedHue) { - VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", colorLoopStartEnhancedHue,160U - )); + VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", colorLoopStartEnhancedHue, 160U)); NextTest(); - } - - - + } - CHIP_ERROR TestColorLoopSetCommandSetAllAttributes_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; - request.updateFlags = static_cast>(1); - request.action =static_cast(1); - request.direction =static_cast(0); - request.time = 0U; - request.startHue = 0U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.updateFlags = static_cast>(1); + request.action = static_cast(1); + request.direction = static_cast(0); + request.time = 0U; + request.startHue = 0U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_8(); }; @@ -18277,68 +13966,48 @@ class Test_TC_CC_9_2: public TestCommand (static_cast(context))->OnFailureResponse_8(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_8(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_8() - { NextTest(); - } - + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_8() { NextTest(); } - CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_9, OnFailureCallback_9)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_9, OnFailureCallback_9)); + return CHIP_NO_ERROR; } - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_9( uint8_t colorLoopActive) + void OnSuccessResponse_9(uint8_t colorLoopActive) { - VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive,1 - )); + VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestColorLoopSetCommandStartColorLoop_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; - request.updateFlags = static_cast>(2); - request.action =static_cast(0); - request.direction =static_cast(1); - request.time = 0U; - request.startHue = 0U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.updateFlags = static_cast>(2); + request.action = static_cast(0); + request.direction = static_cast(1); + request.time = 0U; + request.startHue = 0U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_10(); }; @@ -18347,68 +14016,48 @@ class Test_TC_CC_9_2: public TestCommand (static_cast(context))->OnFailureResponse_10(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_10(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_10() - { NextTest(); - } - + void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_10() { NextTest(); } - CHIP_ERROR TestReadColorLoopDirectionAttributeFromDut_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_11, OnFailureCallback_11)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_11, OnFailureCallback_11)); + return CHIP_NO_ERROR; } - void OnFailureResponse_11(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_11( uint8_t colorLoopDirection) + void OnSuccessResponse_11(uint8_t colorLoopDirection) { - VerifyOrReturn(CheckValue("colorLoopDirection", colorLoopDirection,1 - )); + VerifyOrReturn(CheckValue("colorLoopDirection", colorLoopDirection, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestColorLoopSetCommandStartColorLoop_12() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; - request.updateFlags = static_cast>(1); - request.action =static_cast(0); - request.direction =static_cast(0); - request.time = 0U; - request.startHue = 0U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.updateFlags = static_cast>(1); + request.action = static_cast(0); + request.direction = static_cast(0); + request.time = 0U; + request.startHue = 0U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_12(); }; @@ -18417,58 +14066,38 @@ class Test_TC_CC_9_2: public TestCommand (static_cast(context))->OnFailureResponse_12(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_12(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_12() - { NextTest(); - } - + void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_12() { NextTest(); } - CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_13() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_13, OnFailureCallback_13)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_13, OnFailureCallback_13)); + return CHIP_NO_ERROR; } - void OnFailureResponse_13(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_13(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_13( uint8_t colorLoopActive) + void OnSuccessResponse_13(uint8_t colorLoopActive) { - VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive,0 - )); + VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestTurnOffLightForColorControlTests_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -18480,339 +14109,276 @@ class Test_TC_CC_9_2: public TestCommand (static_cast(context))->OnFailureResponse_14(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_14(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_14() - { NextTest(); - } - + void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - }; + void OnSuccessResponse_14() { NextTest(); } +}; -class Test_TC_CC_9_3: public TestCommand +class Test_TC_CC_9_3 : public TestCommand { - public: - Test_TC_CC_9_3(): TestCommand("Test_TC_CC_9_3"), mTestIndex(0) +public: + Test_TC_CC_9_3() : TestCommand("Test_TC_CC_9_3"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_CC_9_3() - { - } + ~Test_TC_CC_9_3() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_9_3\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_9_3\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_9_3\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_9_3\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition: Turn on light for color control tests\n"); - err = TestPreconditionTurnOnLightForColorControlTests_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition: Turn on light for color control tests\n"); + err = TestPreconditionTurnOnLightForColorControlTests_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Precondition: Check on/off attribute value is true after on command\n"); - err = TestPreconditionCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Precondition: Check on/off attribute value is true after on command\n"); + err = TestPreconditionCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) - { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Sends ColorLoopSet Command - Set all Attributes\n"); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestSendsColorLoopSetCommandSetAllAttributes_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read ColorLoopActive attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPACTIVE")) - { - NextTest(); - return; - } - err = TestReadColorLoopActiveAttributeFromDut_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Read ColorLoopActive attribute from DUT\n"); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read ColorLoopDirection attribute from DUT.\n"); - if (ShouldSkip("A_COLORLOOPDIRECTION")) - { - NextTest(); - return; - } - err = TestReadColorLoopDirectionAttributeFromDut_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Read ColorLoopDirection attribute from DUT.\n"); + if (ShouldSkip("A_COLORLOOPDIRECTION")) + { + NextTest(); + return; + } + err = TestReadColorLoopDirectionAttributeFromDut_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read ColorLoopTime attribute from DUT.\n"); - if (ShouldSkip("A_COLORLOOPTIME")) - { - NextTest(); - return; - } - err = TestReadColorLoopTimeAttributeFromDut_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : Read ColorLoopTime attribute from DUT.\n"); + if (ShouldSkip("A_COLORLOOPTIME")) + { + NextTest(); + return; + } + err = TestReadColorLoopTimeAttributeFromDut_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read ColorLoopStartEnhancedHue attribute from DUT.\n"); - if (ShouldSkip("A_COLORLOOPSTARTENHANCEDHUE")) - { - NextTest(); - return; - } - err = TestReadColorLoopStartEnhancedHueAttributeFromDut_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : Read ColorLoopStartEnhancedHue attribute from DUT.\n"); + if (ShouldSkip("A_COLORLOOPSTARTENHANCEDHUE")) + { + NextTest(); + return; + } + err = TestReadColorLoopStartEnhancedHueAttributeFromDut_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Color Loop Set Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) - { - NextTest(); - return; - } - err = TestColorLoopSetCommandSetAllAttributes_8(); - break; + ChipLogProgress(chipTool, " ***** Test Step 8 : Color Loop Set Command - Set all Attributes\n"); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestColorLoopSetCommandSetAllAttributes_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read ColorLoopActive attribute from DUT.\n"); - if (ShouldSkip("A_COLORLOOPACTIVE")) - { - NextTest(); - return; - } - err = TestReadColorLoopActiveAttributeFromDut_9(); - break; + ChipLogProgress(chipTool, " ***** Test Step 9 : Read ColorLoopActive attribute from DUT.\n"); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_9(); + break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Color Loop Set Command - Start Color Loop\n"); - if (ShouldSkip("CR_COLORLOOPSET")) - { - NextTest(); - return; - } - err = TestColorLoopSetCommandStartColorLoop_10(); - break; + ChipLogProgress(chipTool, " ***** Test Step 10 : Color Loop Set Command - Start Color Loop\n"); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestColorLoopSetCommandStartColorLoop_10(); + break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read ColorLoopTime attribute from DUT.\n"); - if (ShouldSkip("A_COLORLOOPTIME")) - { - NextTest(); - return; - } - err = TestReadColorLoopTimeAttributeFromDut_11(); - break; + ChipLogProgress(chipTool, " ***** Test Step 11 : Read ColorLoopTime attribute from DUT.\n"); + if (ShouldSkip("A_COLORLOOPTIME")) + { + NextTest(); + return; + } + err = TestReadColorLoopTimeAttributeFromDut_11(); + break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Color Loop Set Command - Start Color Loop\n"); - if (ShouldSkip("CR_COLORLOOPSET")) - { - NextTest(); - return; - } - err = TestColorLoopSetCommandStartColorLoop_12(); - break; + ChipLogProgress(chipTool, " ***** Test Step 12 : Color Loop Set Command - Start Color Loop\n"); + if (ShouldSkip("CR_COLORLOOPSET")) + { + NextTest(); + return; + } + err = TestColorLoopSetCommandStartColorLoop_12(); + break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read ColorLoopActive attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPACTIVE")) - { - NextTest(); - return; - } - err = TestReadColorLoopActiveAttributeFromDut_13(); - break; + ChipLogProgress(chipTool, " ***** Test Step 13 : Read ColorLoopActive attribute from DUT\n"); + if (ShouldSkip("A_COLORLOOPACTIVE")) + { + NextTest(); + return; + } + err = TestReadColorLoopActiveAttributeFromDut_13(); + break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Turn off light for color control tests\n"); - err = TestTurnOffLightForColorControlTests_14(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 14 : Turn off light for color control tests\n"); + err = TestTurnOffLightForColorControlTests_14(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 15; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, bool onOff) + static void OnSuccessCallback_2(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_2(onOff); } - - - static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, uint8_t colorLoopActive) + static void OnSuccessCallback_4(void * context, uint8_t colorLoopActive) { (static_cast(context))->OnSuccessResponse_4(colorLoopActive); } - - - static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context, uint8_t colorLoopDirection) + static void OnSuccessCallback_5(void * context, uint8_t colorLoopDirection) { (static_cast(context))->OnSuccessResponse_5(colorLoopDirection); } - - - static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, uint16_t colorLoopTime) + static void OnSuccessCallback_6(void * context, uint16_t colorLoopTime) { (static_cast(context))->OnSuccessResponse_6(colorLoopTime); } - - - static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context, uint16_t colorLoopStartEnhancedHue) + static void OnSuccessCallback_7(void * context, uint16_t colorLoopStartEnhancedHue) { (static_cast(context))->OnSuccessResponse_7(colorLoopStartEnhancedHue); } - - - static void OnFailureCallback_9(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_9(status); } - static void OnSuccessCallback_9(void * context, uint8_t colorLoopActive) + static void OnSuccessCallback_9(void * context, uint8_t colorLoopActive) { (static_cast(context))->OnSuccessResponse_9(colorLoopActive); } - - - static void OnFailureCallback_11(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_11(status); } - static void OnSuccessCallback_11(void * context, uint16_t colorLoopTime) + static void OnSuccessCallback_11(void * context, uint16_t colorLoopTime) { (static_cast(context))->OnSuccessResponse_11(colorLoopTime); } - - - static void OnFailureCallback_13(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_13(status); } - static void OnSuccessCallback_13(void * context, uint8_t colorLoopActive) + static void OnSuccessCallback_13(void * context, uint8_t colorLoopActive) { (static_cast(context))->OnSuccessResponse_13(colorLoopActive); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestPreconditionTurnOnLightForColorControlTests_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -18824,68 +14390,48 @@ class Test_TC_CC_9_3: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_1() - { NextTest(); - } - + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestPreconditionCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( bool onOff) + void OnSuccessResponse_2(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,1 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; - request.updateFlags = static_cast>(15); - request.action =static_cast(0); - request.direction =static_cast(0); - request.time = 30U; - request.startHue = 160U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.updateFlags = static_cast>(15); + request.action = static_cast(0); + request.direction = static_cast(0); + request.time = 30U; + request.startHue = 160U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(); }; @@ -18894,152 +14440,109 @@ class Test_TC_CC_9_3: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_3() - { NextTest(); - } - + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_3() { NextTest(); } - CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( uint8_t colorLoopActive) + void OnSuccessResponse_4(uint8_t colorLoopActive) { - VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive,0 - )); + VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadColorLoopDirectionAttributeFromDut_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5( uint8_t colorLoopDirection) + void OnSuccessResponse_5(uint8_t colorLoopDirection) { - VerifyOrReturn(CheckValue("colorLoopDirection", colorLoopDirection,0 - )); + VerifyOrReturn(CheckValue("colorLoopDirection", colorLoopDirection, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadColorLoopTimeAttributeFromDut_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( uint16_t colorLoopTime) + void OnSuccessResponse_6(uint16_t colorLoopTime) { - VerifyOrReturn(CheckValue("colorLoopTime", colorLoopTime,30U - )); + VerifyOrReturn(CheckValue("colorLoopTime", colorLoopTime, 30U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadColorLoopStartEnhancedHueAttributeFromDut_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_7, OnFailureCallback_7)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7( uint16_t colorLoopStartEnhancedHue) + void OnSuccessResponse_7(uint16_t colorLoopStartEnhancedHue) { - VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", colorLoopStartEnhancedHue,160U - )); + VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", colorLoopStartEnhancedHue, 160U)); NextTest(); - } - - - + } - CHIP_ERROR TestColorLoopSetCommandSetAllAttributes_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; - request.updateFlags = static_cast>(1); - request.action =static_cast(1); - request.direction =static_cast(0); - request.time = 0U; - request.startHue = 0U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.updateFlags = static_cast>(1); + request.action = static_cast(1); + request.direction = static_cast(0); + request.time = 0U; + request.startHue = 0U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_8(); }; @@ -19048,68 +14551,48 @@ class Test_TC_CC_9_3: public TestCommand (static_cast(context))->OnFailureResponse_8(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_8(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_8() - { NextTest(); - } - + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_8() { NextTest(); } - CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_9, OnFailureCallback_9)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_9, OnFailureCallback_9)); + return CHIP_NO_ERROR; } - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_9( uint8_t colorLoopActive) + void OnSuccessResponse_9(uint8_t colorLoopActive) { - VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive,1 - )); + VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestColorLoopSetCommandStartColorLoop_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; - request.updateFlags = static_cast>(4); - request.action =static_cast(0); - request.direction =static_cast(0); - request.time = 60U; - request.startHue = 0U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.updateFlags = static_cast>(4); + request.action = static_cast(0); + request.direction = static_cast(0); + request.time = 60U; + request.startHue = 0U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_10(); }; @@ -19118,68 +14601,48 @@ class Test_TC_CC_9_3: public TestCommand (static_cast(context))->OnFailureResponse_10(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_10(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_10() - { NextTest(); - } - + void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_10() { NextTest(); } - CHIP_ERROR TestReadColorLoopTimeAttributeFromDut_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_11, OnFailureCallback_11)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_11, OnFailureCallback_11)); + return CHIP_NO_ERROR; } - void OnFailureResponse_11(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_11( uint16_t colorLoopTime) + void OnSuccessResponse_11(uint16_t colorLoopTime) { - VerifyOrReturn(CheckValue("colorLoopTime", colorLoopTime,60U - )); + VerifyOrReturn(CheckValue("colorLoopTime", colorLoopTime, 60U)); NextTest(); - } - - - + } - CHIP_ERROR TestColorLoopSetCommandStartColorLoop_12() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; + using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; - request.updateFlags = static_cast>(1); - request.action =static_cast(0); - request.direction =static_cast(0); - request.time = 0U; - request.startHue = 0U; - request.optionsMask = 0; - request.optionsOverride = 0; - + request.updateFlags = static_cast>(1); + request.action = static_cast(0); + request.direction = static_cast(0); + request.time = 0U; + request.startHue = 0U; + request.optionsMask = 0; + request.optionsOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_12(); }; @@ -19188,58 +14651,38 @@ class Test_TC_CC_9_3: public TestCommand (static_cast(context))->OnFailureResponse_12(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_12(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_12() - { NextTest(); - } - + void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_12() { NextTest(); } - CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_13() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_13, OnFailureCallback_13)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_13, OnFailureCallback_13)); + return CHIP_NO_ERROR; } - void OnFailureResponse_13(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_13(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_13( uint8_t colorLoopActive) + void OnSuccessResponse_13(uint8_t colorLoopActive) { - VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive,0 - )); + VerifyOrReturn(CheckValue("colorLoopActive", colorLoopActive, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestTurnOffLightForColorControlTests_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -19251,226 +14694,165 @@ class Test_TC_CC_9_3: public TestCommand (static_cast(context))->OnFailureResponse_14(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_14(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_14() - { NextTest(); - } - + void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - }; + void OnSuccessResponse_14() { NextTest(); } +}; -class Test_TC_DD_1_5: public TestCommand +class Test_TC_DD_1_5 : public TestCommand { - public: - Test_TC_DD_1_5(): TestCommand("Test_TC_DD_1_5"), mTestIndex(0) +public: + Test_TC_DD_1_5() : TestCommand("Test_TC_DD_1_5"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_DD_1_5() - { - } + ~Test_TC_DD_1_5() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DD_1_5\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DD_1_5\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DD_1_5\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DD_1_5\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // 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 : Step 1\n"); - err = TestStep1_0(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1\n"); + err = TestStep1_0(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 1; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - // // Tests methods // - 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"); } }; -class Test_TC_DD_1_6: public TestCommand +class Test_TC_DD_1_6 : public TestCommand { - public: - Test_TC_DD_1_6(): TestCommand("Test_TC_DD_1_6"), mTestIndex(0) +public: + Test_TC_DD_1_6() : TestCommand("Test_TC_DD_1_6"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_DD_1_6() - { - } + ~Test_TC_DD_1_6() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DD_1_6\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DD_1_6\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DD_1_6\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DD_1_6\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // 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 : Step 1\n"); - err = TestStep1_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1\n"); + err = TestStep1_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Step 1 verification\n"); - err = TestStep1Verification_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 1 verification\n"); + err = TestStep1Verification_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 2 verificaiton\n"); - err = TestStep2Verificaiton_2(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 2 verificaiton\n"); + err = TestStep2Verificaiton_2(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - // // Tests methods // - CHIP_ERROR TestStep1_0() { SetIdentity(kIdentityAlpha); 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); @@ -19478,207 +14860,154 @@ class Test_TC_DD_1_6: public TestCommand } }; -class Test_TC_DD_1_7: public TestCommand +class Test_TC_DD_1_7 : public TestCommand { - public: - Test_TC_DD_1_7(): TestCommand("Test_TC_DD_1_7"), mTestIndex(0) +public: + Test_TC_DD_1_7() : TestCommand("Test_TC_DD_1_7"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_DD_1_7() - { - } + ~Test_TC_DD_1_7() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DD_1_7\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DD_1_7\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DD_1_7\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DD_1_7\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // 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 : Precondition\n"); - err = TestPrecondition_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Precondition\n"); + err = TestPrecondition_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Step 1\n"); - err = TestStep1_1(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 1\n"); + err = TestStep1_1(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 2; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - // // Tests methods // - CHIP_ERROR TestPrecondition_0() { SetIdentity(kIdentityAlpha); 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"); } }; -class Test_TC_DD_1_8: public TestCommand +class Test_TC_DD_1_8 : public TestCommand { - public: - Test_TC_DD_1_8(): TestCommand("Test_TC_DD_1_8"), mTestIndex(0) +public: + Test_TC_DD_1_8() : TestCommand("Test_TC_DD_1_8"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_DD_1_8() - { - } + ~Test_TC_DD_1_8() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DD_1_8\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DD_1_8\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DD_1_8\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DD_1_8\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // 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 : Step 1\n"); - err = TestStep1_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1\n"); + err = TestStep1_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Step 1 verification\n"); - err = TestStep1Verification_1(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 1 verification\n"); + err = TestStep1Verification_1(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 2; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - // // Tests methods // - CHIP_ERROR TestStep1_0() { SetIdentity(kIdentityAlpha); return Log("Scan the device QR code using DUT"); } - + CHIP_ERROR TestStep1Verification_1() { SetIdentity(kIdentityAlpha); @@ -19686,1128 +15015,901 @@ class Test_TC_DD_1_8: public TestCommand } }; -class Test_TC_DD_1_9: public TestCommand +class Test_TC_DD_1_9 : public TestCommand { - public: - Test_TC_DD_1_9(): TestCommand("Test_TC_DD_1_9"), mTestIndex(0) +public: + Test_TC_DD_1_9() : TestCommand("Test_TC_DD_1_9"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_DD_1_9() - { - } + ~Test_TC_DD_1_9() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DD_1_9\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DD_1_9\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DD_1_9\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DD_1_9\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // 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 : Precondition\n"); - err = TestPrecondition_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Precondition\n"); + err = TestPrecondition_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Step 1\n"); - err = TestStep1_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 1\n"); + err = TestStep1_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 1 verification\n"); - err = TestStep1Verification_2(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 1 verification\n"); + err = TestStep1Verification_2(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - // // Tests methods // - CHIP_ERROR TestPrecondition_0() { SetIdentity(kIdentityAlpha); 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"); } - + 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"); } }; -class Test_TC_DM_1_1: public TestCommand +class Test_TC_DM_1_1 : public TestCommand { - public: - Test_TC_DM_1_1(): TestCommand("Test_TC_DM_1_1"), mTestIndex(0) +public: + Test_TC_DM_1_1() : TestCommand("Test_TC_DM_1_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_DM_1_1() - { - } + ~Test_TC_DM_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DM_1_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DM_1_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DM_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DM_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Query Interaction Model Version\n"); - err = TestQueryInteractionModelVersion_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Query Interaction Model Version\n"); + err = TestQueryInteractionModelVersion_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Query Vendor Name\n"); - err = TestQueryVendorName_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Query Vendor Name\n"); + err = TestQueryVendorName_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Query VendorID\n"); - err = TestQueryVendorID_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Query VendorID\n"); + err = TestQueryVendorID_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Query Product Name\n"); - err = TestQueryProductName_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Query Product Name\n"); + err = TestQueryProductName_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Query ProductID\n"); - err = TestQueryProductID_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Query ProductID\n"); + err = TestQueryProductID_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Query Node Label\n"); - err = TestQueryNodeLabel_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : Query Node Label\n"); + err = TestQueryNodeLabel_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Query User Location\n"); - err = TestQueryUserLocation_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : Query User Location\n"); + err = TestQueryUserLocation_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Query HardwareVersion\n"); - err = TestQueryHardwareVersion_8(); - break; + ChipLogProgress(chipTool, " ***** Test Step 8 : Query HardwareVersion\n"); + err = TestQueryHardwareVersion_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Query HardwareVersionString\n"); - err = TestQueryHardwareVersionString_9(); - break; + ChipLogProgress(chipTool, " ***** Test Step 9 : Query HardwareVersionString\n"); + err = TestQueryHardwareVersionString_9(); + break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Query SoftwareVersion\n"); - err = TestQuerySoftwareVersion_10(); - break; + ChipLogProgress(chipTool, " ***** Test Step 10 : Query SoftwareVersion\n"); + err = TestQuerySoftwareVersion_10(); + break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Query SoftwareVersionString\n"); - err = TestQuerySoftwareVersionString_11(); - break; + ChipLogProgress(chipTool, " ***** Test Step 11 : Query SoftwareVersionString\n"); + err = TestQuerySoftwareVersionString_11(); + break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Query ManufacturingDate\n"); - if (ShouldSkip("MANF_DATE")) - { - NextTest(); - return; - } - err = TestQueryManufacturingDate_12(); - break; + ChipLogProgress(chipTool, " ***** Test Step 12 : Query ManufacturingDate\n"); + if (ShouldSkip("MANF_DATE")) + { + NextTest(); + return; + } + err = TestQueryManufacturingDate_12(); + break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Query PartNumber\n"); - if (ShouldSkip("PART_NUM")) - { - NextTest(); - return; - } - err = TestQueryPartNumber_13(); - break; + ChipLogProgress(chipTool, " ***** Test Step 13 : Query PartNumber\n"); + if (ShouldSkip("PART_NUM")) + { + NextTest(); + return; + } + err = TestQueryPartNumber_13(); + break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Query ProductURL\n"); - err = TestQueryProductURL_14(); - break; + ChipLogProgress(chipTool, " ***** Test Step 14 : Query ProductURL\n"); + err = TestQueryProductURL_14(); + break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Query ProductLabel\n"); - err = TestQueryProductLabel_15(); - break; + ChipLogProgress(chipTool, " ***** Test Step 15 : Query ProductLabel\n"); + err = TestQueryProductLabel_15(); + break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Query SerialNumber\n"); - err = TestQuerySerialNumber_16(); - break; + ChipLogProgress(chipTool, " ***** Test Step 16 : Query SerialNumber\n"); + err = TestQuerySerialNumber_16(); + break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Query LocalConfigDisabled\n"); - err = TestQueryLocalConfigDisabled_17(); - break; + ChipLogProgress(chipTool, " ***** Test Step 17 : Query LocalConfigDisabled\n"); + err = TestQueryLocalConfigDisabled_17(); + break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Query Reachable\n"); - err = TestQueryReachable_18(); - break; + ChipLogProgress(chipTool, " ***** Test Step 18 : Query Reachable\n"); + err = TestQueryReachable_18(); + break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Query UniqueID\n"); - err = TestQueryUniqueID_19(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 19 : Query UniqueID\n"); + err = TestQueryUniqueID_19(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 20; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint16_t interactionModelVersion) + static void OnSuccessCallback_1(void * context, uint16_t interactionModelVersion) { (static_cast(context))->OnSuccessResponse_1(interactionModelVersion); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, chip::CharSpan vendorName) + static void OnSuccessCallback_2(void * context, chip::CharSpan vendorName) { (static_cast(context))->OnSuccessResponse_2(vendorName); } - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, chip::VendorId vendorID) + static void OnSuccessCallback_3(void * context, chip::VendorId vendorID) { (static_cast(context))->OnSuccessResponse_3(vendorID); } - - - static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, chip::CharSpan productName) + static void OnSuccessCallback_4(void * context, chip::CharSpan productName) { (static_cast(context))->OnSuccessResponse_4(productName); } - - - static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context, uint16_t productID) + static void OnSuccessCallback_5(void * context, uint16_t productID) { (static_cast(context))->OnSuccessResponse_5(productID); } - - - static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, chip::CharSpan nodeLabel) + static void OnSuccessCallback_6(void * context, chip::CharSpan nodeLabel) { (static_cast(context))->OnSuccessResponse_6(nodeLabel); } - - - static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context, chip::CharSpan location) + static void OnSuccessCallback_7(void * context, chip::CharSpan location) { (static_cast(context))->OnSuccessResponse_7(location); } - - - static void OnFailureCallback_8(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context, uint16_t hardwareVersion) + static void OnSuccessCallback_8(void * context, uint16_t hardwareVersion) { (static_cast(context))->OnSuccessResponse_8(hardwareVersion); } - - - static void OnFailureCallback_9(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_9(status); } - static void OnSuccessCallback_9(void * context, chip::CharSpan hardwareVersionString) + static void OnSuccessCallback_9(void * context, chip::CharSpan hardwareVersionString) { (static_cast(context))->OnSuccessResponse_9(hardwareVersionString); } - - - static void OnFailureCallback_10(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_10(status); } - static void OnSuccessCallback_10(void * context, uint32_t softwareVersion) + static void OnSuccessCallback_10(void * context, uint32_t softwareVersion) { (static_cast(context))->OnSuccessResponse_10(softwareVersion); } - - - static void OnFailureCallback_11(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_11(status); } - static void OnSuccessCallback_11(void * context, chip::CharSpan softwareVersionString) + static void OnSuccessCallback_11(void * context, chip::CharSpan softwareVersionString) { (static_cast(context))->OnSuccessResponse_11(softwareVersionString); } - - - static void OnFailureCallback_12(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_12(status); } - static void OnSuccessCallback_12(void * context, chip::CharSpan manufacturingDate) + static void OnSuccessCallback_12(void * context, chip::CharSpan manufacturingDate) { (static_cast(context))->OnSuccessResponse_12(manufacturingDate); } - - - static void OnFailureCallback_13(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_13(status); } - static void OnSuccessCallback_13(void * context, chip::CharSpan partNumber) + static void OnSuccessCallback_13(void * context, chip::CharSpan partNumber) { (static_cast(context))->OnSuccessResponse_13(partNumber); } - - - static void OnFailureCallback_14(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_14(status); } - static void OnSuccessCallback_14(void * context, chip::CharSpan productURL) + static void OnSuccessCallback_14(void * context, chip::CharSpan productURL) { (static_cast(context))->OnSuccessResponse_14(productURL); } - - - static void OnFailureCallback_15(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_15(status); } - static void OnSuccessCallback_15(void * context, chip::CharSpan productLabel) + static void OnSuccessCallback_15(void * context, chip::CharSpan productLabel) { (static_cast(context))->OnSuccessResponse_15(productLabel); } - - - static void OnFailureCallback_16(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_16(status); } - static void OnSuccessCallback_16(void * context, chip::CharSpan serialNumber) + static void OnSuccessCallback_16(void * context, chip::CharSpan serialNumber) { (static_cast(context))->OnSuccessResponse_16(serialNumber); } - - - static void OnFailureCallback_17(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_17(status); } - static void OnSuccessCallback_17(void * context, bool localConfigDisabled) + static void OnSuccessCallback_17(void * context, bool localConfigDisabled) { (static_cast(context))->OnSuccessResponse_17(localConfigDisabled); } - - - static void OnFailureCallback_18(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_18(status); } - static void OnSuccessCallback_18(void * context, bool reachable) + static void OnSuccessCallback_18(void * context, bool reachable) { (static_cast(context))->OnSuccessResponse_18(reachable); } - - - static void OnFailureCallback_19(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_19(status); } - static void OnSuccessCallback_19(void * context, chip::CharSpan uniqueID) + static void OnSuccessCallback_19(void * context, chip::CharSpan uniqueID) { (static_cast(context))->OnSuccessResponse_19(uniqueID); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestQueryInteractionModelVersion_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint16_t interactionModelVersion) + void OnSuccessResponse_1(uint16_t interactionModelVersion) { - VerifyOrReturn(CheckConstraintType("interactionModelVersion", "", "uint16")); + VerifyOrReturn(CheckConstraintType("interactionModelVersion", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestQueryVendorName_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( chip::CharSpan vendorName) + void OnSuccessResponse_2(chip::CharSpan vendorName) { - VerifyOrReturn(CheckConstraintType("vendorName", "", "string"));VerifyOrReturn(CheckConstraintMaxLength("vendorName", vendorName.size(), 32)); + VerifyOrReturn(CheckConstraintType("vendorName", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("vendorName", vendorName.size(), 32)); NextTest(); - } - - - + } - CHIP_ERROR TestQueryVendorID_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( chip::VendorId vendorID) + void OnSuccessResponse_3(chip::VendorId vendorID) { - VerifyOrReturn(CheckConstraintType("vendorID", "", "uint16")); + VerifyOrReturn(CheckConstraintType("vendorID", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestQueryProductName_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( chip::CharSpan productName) + void OnSuccessResponse_4(chip::CharSpan productName) { - VerifyOrReturn(CheckConstraintType("productName", "", "string"));VerifyOrReturn(CheckConstraintMaxLength("productName", productName.size(), 32)); + VerifyOrReturn(CheckConstraintType("productName", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("productName", productName.size(), 32)); NextTest(); - } - - - + } - CHIP_ERROR TestQueryProductID_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5( uint16_t productID) + void OnSuccessResponse_5(uint16_t productID) { - VerifyOrReturn(CheckConstraintType("productID", "", "uint16")); + VerifyOrReturn(CheckConstraintType("productID", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestQueryNodeLabel_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( chip::CharSpan nodeLabel) + void OnSuccessResponse_6(chip::CharSpan nodeLabel) { - VerifyOrReturn(CheckConstraintType("nodeLabel", "", "string"));VerifyOrReturn(CheckConstraintMaxLength("nodeLabel", nodeLabel.size(), 32)); + VerifyOrReturn(CheckConstraintType("nodeLabel", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("nodeLabel", nodeLabel.size(), 32)); NextTest(); - } - - - + } - CHIP_ERROR TestQueryUserLocation_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_7, OnFailureCallback_7)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7( chip::CharSpan location) + void OnSuccessResponse_7(chip::CharSpan location) { - VerifyOrReturn(CheckConstraintType("location", "", "string"));VerifyOrReturn(CheckConstraintFormat("location", "", "ISO 3166-1 alpha-2"));VerifyOrReturn(CheckConstraintMaxLength("location", location.size(), 2)); + VerifyOrReturn(CheckConstraintType("location", "", "string")); + VerifyOrReturn(CheckConstraintFormat("location", "", "ISO 3166-1 alpha-2")); + VerifyOrReturn(CheckConstraintMaxLength("location", location.size(), 2)); NextTest(); - } - - - + } - CHIP_ERROR TestQueryHardwareVersion_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_8, OnFailureCallback_8)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_8, OnFailureCallback_8)); + return CHIP_NO_ERROR; } - void OnFailureResponse_8(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_8( uint16_t hardwareVersion) + void OnSuccessResponse_8(uint16_t hardwareVersion) { - VerifyOrReturn(CheckConstraintType("hardwareVersion", "", "uint16")); + VerifyOrReturn(CheckConstraintType("hardwareVersion", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestQueryHardwareVersionString_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_9, OnFailureCallback_9)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_9, OnFailureCallback_9)); + return CHIP_NO_ERROR; } - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_9( chip::CharSpan hardwareVersionString) + void OnSuccessResponse_9(chip::CharSpan hardwareVersionString) { - VerifyOrReturn(CheckConstraintType("hardwareVersionString", "", "string"));VerifyOrReturn(CheckConstraintMinLength("hardwareVersionString", hardwareVersionString.size(), 1));VerifyOrReturn(CheckConstraintMaxLength("hardwareVersionString", hardwareVersionString.size(), 64)); + VerifyOrReturn(CheckConstraintType("hardwareVersionString", "", "string")); + VerifyOrReturn(CheckConstraintMinLength("hardwareVersionString", hardwareVersionString.size(), 1)); + VerifyOrReturn(CheckConstraintMaxLength("hardwareVersionString", hardwareVersionString.size(), 64)); NextTest(); - } - - - + } - CHIP_ERROR TestQuerySoftwareVersion_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_10, OnFailureCallback_10)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_10, OnFailureCallback_10)); + return CHIP_NO_ERROR; } - void OnFailureResponse_10(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_10( uint32_t softwareVersion) + void OnSuccessResponse_10(uint32_t softwareVersion) { - VerifyOrReturn(CheckConstraintType("softwareVersion", "", "uint32")); + VerifyOrReturn(CheckConstraintType("softwareVersion", "", "uint32")); NextTest(); - } - - - + } - CHIP_ERROR TestQuerySoftwareVersionString_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_11, OnFailureCallback_11)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_11, OnFailureCallback_11)); + return CHIP_NO_ERROR; } - void OnFailureResponse_11(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_11( chip::CharSpan softwareVersionString) + void OnSuccessResponse_11(chip::CharSpan softwareVersionString) { - VerifyOrReturn(CheckConstraintType("softwareVersionString", "", "string"));VerifyOrReturn(CheckConstraintFormat("softwareVersionString", "", "ASCII"));VerifyOrReturn(CheckConstraintMinLength("softwareVersionString", softwareVersionString.size(), 1));VerifyOrReturn(CheckConstraintMaxLength("softwareVersionString", softwareVersionString.size(), 64)); + VerifyOrReturn(CheckConstraintType("softwareVersionString", "", "string")); + VerifyOrReturn(CheckConstraintFormat("softwareVersionString", "", "ASCII")); + VerifyOrReturn(CheckConstraintMinLength("softwareVersionString", softwareVersionString.size(), 1)); + VerifyOrReturn(CheckConstraintMaxLength("softwareVersionString", softwareVersionString.size(), 64)); NextTest(); - } - - - + } - CHIP_ERROR TestQueryManufacturingDate_12() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_12, OnFailureCallback_12)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_12, OnFailureCallback_12)); + return CHIP_NO_ERROR; } void OnFailureResponse_12(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_12( chip::CharSpan manufacturingDate) + void OnSuccessResponse_12(chip::CharSpan manufacturingDate) { - VerifyOrReturn(CheckConstraintType("manufacturingDate", "", "string"));VerifyOrReturn(CheckConstraintFormat("manufacturingDate", "", "ISO 8601"));VerifyOrReturn(CheckConstraintMinLength("manufacturingDate", manufacturingDate.size(), 8));VerifyOrReturn(CheckConstraintMaxLength("manufacturingDate", manufacturingDate.size(), 16)); + VerifyOrReturn(CheckConstraintType("manufacturingDate", "", "string")); + VerifyOrReturn(CheckConstraintFormat("manufacturingDate", "", "ISO 8601")); + VerifyOrReturn(CheckConstraintMinLength("manufacturingDate", manufacturingDate.size(), 8)); + VerifyOrReturn(CheckConstraintMaxLength("manufacturingDate", manufacturingDate.size(), 16)); NextTest(); - } - - - + } - CHIP_ERROR TestQueryPartNumber_13() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_13, OnFailureCallback_13)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_13, OnFailureCallback_13)); + return CHIP_NO_ERROR; } void OnFailureResponse_13(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_13( chip::CharSpan partNumber) + void OnSuccessResponse_13(chip::CharSpan partNumber) { - VerifyOrReturn(CheckConstraintType("partNumber", "", "string"));VerifyOrReturn(CheckConstraintMaxLength("partNumber", partNumber.size(), 32)); + VerifyOrReturn(CheckConstraintType("partNumber", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("partNumber", partNumber.size(), 32)); NextTest(); - } - - - + } - CHIP_ERROR TestQueryProductURL_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_14, OnFailureCallback_14)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_14, OnFailureCallback_14)); + return CHIP_NO_ERROR; } void OnFailureResponse_14(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_14( chip::CharSpan productURL) + void OnSuccessResponse_14(chip::CharSpan productURL) { - VerifyOrReturn(CheckConstraintType("productURL", "", "string"));VerifyOrReturn(CheckConstraintFormat("productURL", "", "RFC3986"));VerifyOrReturn(CheckConstraintMaxLength("productURL", productURL.size(), 256)); + VerifyOrReturn(CheckConstraintType("productURL", "", "string")); + VerifyOrReturn(CheckConstraintFormat("productURL", "", "RFC3986")); + VerifyOrReturn(CheckConstraintMaxLength("productURL", productURL.size(), 256)); NextTest(); - } - - - + } - CHIP_ERROR TestQueryProductLabel_15() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_15, OnFailureCallback_15)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_15, OnFailureCallback_15)); + return CHIP_NO_ERROR; } void OnFailureResponse_15(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_15( chip::CharSpan productLabel) + void OnSuccessResponse_15(chip::CharSpan productLabel) { - VerifyOrReturn(CheckConstraintType("productLabel", "", "string"));VerifyOrReturn(CheckConstraintMaxLength("productLabel", productLabel.size(), 64)); + VerifyOrReturn(CheckConstraintType("productLabel", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("productLabel", productLabel.size(), 64)); NextTest(); - } - - - + } - CHIP_ERROR TestQuerySerialNumber_16() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_16, OnFailureCallback_16)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_16, OnFailureCallback_16)); + return CHIP_NO_ERROR; } void OnFailureResponse_16(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_16( chip::CharSpan serialNumber) + void OnSuccessResponse_16(chip::CharSpan serialNumber) { - VerifyOrReturn(CheckConstraintType("serialNumber", "", "string"));VerifyOrReturn(CheckConstraintMaxLength("serialNumber", serialNumber.size(), 32)); + VerifyOrReturn(CheckConstraintType("serialNumber", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("serialNumber", serialNumber.size(), 32)); NextTest(); - } - - - + } - CHIP_ERROR TestQueryLocalConfigDisabled_17() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_17, OnFailureCallback_17)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_17, OnFailureCallback_17)); + return CHIP_NO_ERROR; } void OnFailureResponse_17(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_17( bool localConfigDisabled) + void OnSuccessResponse_17(bool localConfigDisabled) { - VerifyOrReturn(CheckConstraintType("localConfigDisabled", "", "boolean")); + VerifyOrReturn(CheckConstraintType("localConfigDisabled", "", "boolean")); NextTest(); - } - - - + } - CHIP_ERROR TestQueryReachable_18() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_18, OnFailureCallback_18)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_18, OnFailureCallback_18)); + return CHIP_NO_ERROR; } void OnFailureResponse_18(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_18( bool reachable) + void OnSuccessResponse_18(bool reachable) { - VerifyOrReturn(CheckConstraintType("reachable", "", "boolean")); + VerifyOrReturn(CheckConstraintType("reachable", "", "boolean")); NextTest(); - } - - - + } - CHIP_ERROR TestQueryUniqueID_19() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_19, OnFailureCallback_19)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_19, OnFailureCallback_19)); + return CHIP_NO_ERROR; } void OnFailureResponse_19(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_19( chip::CharSpan uniqueID) + void OnSuccessResponse_19(chip::CharSpan uniqueID) { - VerifyOrReturn(CheckConstraintType("uniqueID", "", "string"));VerifyOrReturn(CheckConstraintMaxLength("uniqueID", uniqueID.size(), 32)); + VerifyOrReturn(CheckConstraintType("uniqueID", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("uniqueID", uniqueID.size(), 32)); NextTest(); - } - - - }; + } +}; -class Test_TC_DM_3_1: public TestCommand +class Test_TC_DM_3_1 : public TestCommand { - public: - Test_TC_DM_3_1(): TestCommand("Test_TC_DM_3_1"), mTestIndex(0) +public: + Test_TC_DM_3_1() : TestCommand("Test_TC_DM_3_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_DM_3_1() - { - } + ~Test_TC_DM_3_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DM_3_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DM_3_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DM_3_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DM_3_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 1; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); @@ -20815,500 +15917,382 @@ class Test_TC_DM_3_1: public TestCommand } }; -class Test_TC_DM_2_2: public TestCommand +class Test_TC_DM_2_2 : public TestCommand { - public: - Test_TC_DM_2_2(): TestCommand("Test_TC_DM_2_2"), mTestIndex(0) +public: + Test_TC_DM_2_2() : TestCommand("Test_TC_DM_2_2"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_DM_2_2() - { - } + ~Test_TC_DM_2_2() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DM_2_2\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DM_2_2\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DM_2_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DM_2_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Query fabrics list\n"); - err = TestQueryFabricsList_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Query fabrics list\n"); + err = TestQueryFabricsList_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Query Supported Fabrics\n"); - err = TestQuerySupportedFabrics_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Query Supported Fabrics\n"); + err = TestQuerySupportedFabrics_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Query Commissioned Fabrics\n"); - err = TestQueryCommissionedFabrics_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Query Commissioned Fabrics\n"); + err = TestQueryCommissionedFabrics_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Query User Trusted Root Certificates\n"); - err = TestQueryUserTrustedRootCertificates_4(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 4 : Query User Trusted Root Certificates\n"); + err = TestQueryUserTrustedRootCertificates_4(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 5; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, const chip::app::DataModel::DecodableList & fabricsList) + static void + OnSuccessCallback_1(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> & fabricsList) { (static_cast(context))->OnSuccessResponse_1(fabricsList); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint8_t supportedFabrics) + static void OnSuccessCallback_2(void * context, uint8_t supportedFabrics) { (static_cast(context))->OnSuccessResponse_2(supportedFabrics); } - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, uint8_t commissionedFabrics) + static void OnSuccessCallback_3(void * context, uint8_t commissionedFabrics) { (static_cast(context))->OnSuccessResponse_3(commissionedFabrics); } - - - static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, const chip::app::DataModel::DecodableList & trustedRootCertificates) + static void OnSuccessCallback_4(void * context, + const chip::app::DataModel::DecodableList & trustedRootCertificates) { (static_cast(context))->OnSuccessResponse_4(trustedRootCertificates); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestQueryFabricsList_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::OperationalCredentialsClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( const chip::app::DataModel::DecodableList & fabricsList) + void OnSuccessResponse_1(const chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> & fabricsList) { - { - auto iter_0 = fabricsList.begin(); - VerifyOrReturn(CheckNextListItemDecodes("fabricsList", iter_0, 0)); - VerifyOrReturn(CheckValueAsString("fabricsList[0].label", iter_0.GetValue().label,chip::CharSpan("", 0) - )); - VerifyOrReturn(CheckNoMoreListItems("fabricsList", iter_0, 1)); - } + { + auto iter_0 = fabricsList.begin(); + VerifyOrReturn(CheckNextListItemDecodes("fabricsList", iter_0, 0)); + VerifyOrReturn(CheckValueAsString("fabricsList[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckNoMoreListItems("fabricsList", iter_0, 1)); + } NextTest(); - } - - - + } - CHIP_ERROR TestQuerySupportedFabrics_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::OperationalCredentialsClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint8_t supportedFabrics) + void OnSuccessResponse_2(uint8_t supportedFabrics) { - VerifyOrReturn(CheckValue("supportedFabrics", supportedFabrics,16 - )); + VerifyOrReturn(CheckValue("supportedFabrics", supportedFabrics, 16)); NextTest(); - } - - - + } - CHIP_ERROR TestQueryCommissionedFabrics_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::OperationalCredentialsClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( uint8_t commissionedFabrics) + void OnSuccessResponse_3(uint8_t commissionedFabrics) { - VerifyOrReturn(CheckValue("commissionedFabrics", commissionedFabrics,1 - )); + VerifyOrReturn(CheckValue("commissionedFabrics", commissionedFabrics, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestQueryUserTrustedRootCertificates_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::OperationalCredentialsClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( const chip::app::DataModel::DecodableList & trustedRootCertificates) + void OnSuccessResponse_4(const chip::app::DataModel::DecodableList & trustedRootCertificates) { - VerifyOrReturn(CheckConstraintType("trustedRootCertificates", "", "list")); + VerifyOrReturn(CheckConstraintType("trustedRootCertificates", "", "list")); NextTest(); - } - - - }; + } +}; -class Test_TC_EMR_1_1: public TestCommand +class Test_TC_EMR_1_1 : public TestCommand { - public: - Test_TC_EMR_1_1(): TestCommand("Test_TC_EMR_1_1"), mTestIndex(0) +public: + Test_TC_EMR_1_1() : TestCommand("Test_TC_EMR_1_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_EMR_1_1() - { - } + ~Test_TC_EMR_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_EMR_1_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_EMR_1_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_EMR_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_EMR_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); + err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : reads back global attribute: ClusterRevision\n"); - err = TestReadsBackGlobalAttributeClusterRevision_4(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 4 : reads back global attribute: ClusterRevision\n"); + err = TestReadsBackGlobalAttributeClusterRevision_4(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 5; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_1(clusterRevision); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_2(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_2(clusterRevision); } - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context) - { - (static_cast(context))->OnSuccessResponse_3(); - } - - - + static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_4(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_4(clusterRevision); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ElectricalMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint16_t clusterRevision) + void OnSuccessResponse_1(uint16_t clusterRevision) { - VerifyOrReturn(CheckValue("clusterRevision", clusterRevision,3U - )); + VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 3U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ElectricalMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint16_t clusterRevision) + void OnSuccessResponse_2(uint16_t clusterRevision) { - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -21316,208 +16300,155 @@ class Test_TC_EMR_1_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t clusterRevisionArgument; - clusterRevisionArgument = 1U; - - ReturnErrorOnFailure(cluster.WriteAttribute(clusterRevisionArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + clusterRevisionArgument = 1U; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + clusterRevisionArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_3() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_3() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ElectricalMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( uint16_t clusterRevision) + void OnSuccessResponse_4(uint16_t clusterRevision) { - VerifyOrReturn(CheckValue("clusterRevision", clusterRevision,3U - )); + VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 3U)); NextTest(); - } - - - }; + } +}; -class Test_TC_FLW_1_1: public TestCommand +class Test_TC_FLW_1_1 : public TestCommand { - public: - Test_TC_FLW_1_1(): TestCommand("Test_TC_FLW_1_1"), mTestIndex(0) +public: + Test_TC_FLW_1_1() : TestCommand("Test_TC_FLW_1_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_FLW_1_1() - { - } + ~Test_TC_FLW_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_FLW_1_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_FLW_1_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FLW_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FLW_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2(); - break; - } + ChipLogProgress(chipTool, + " ***** Test Step 2 : write the default values to mandatory global attribute: ClusterRevision\n"); + err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_1(clusterRevision); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context) - { - (static_cast(context))->OnSuccessResponse_2(); - } - - - + static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::FlowMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint16_t clusterRevision) + void OnSuccessResponse_1(uint16_t clusterRevision) { - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -21525,419 +16456,315 @@ class Test_TC_FLW_1_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t clusterRevisionArgument; - clusterRevisionArgument = 2U; - - ReturnErrorOnFailure(cluster.WriteAttribute(clusterRevisionArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + clusterRevisionArgument = 2U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + clusterRevisionArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_2() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_2() { ThrowSuccessResponse(); } +}; - }; - -class Test_TC_FLW_2_1: public TestCommand +class Test_TC_FLW_2_1 : public TestCommand { - public: - Test_TC_FLW_2_1(): TestCommand("Test_TC_FLW_2_1"), mTestIndex(0) +public: + Test_TC_FLW_2_1() : TestCommand("Test_TC_FLW_2_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_FLW_2_1() - { - } + ~Test_TC_FLW_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_FLW_2_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_FLW_2_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FLW_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FLW_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the mandatory attribute: MeasuredValue\n"); - err = TestReadTheMandatoryAttributeMeasuredValue_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : read the mandatory attribute: MeasuredValue\n"); + err = TestReadTheMandatoryAttributeMeasuredValue_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : read the mandatory attribute: MinMeasuredValue\n"); - err = TestReadTheMandatoryAttributeMinMeasuredValue_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : read the mandatory attribute: MinMeasuredValue\n"); + err = TestReadTheMandatoryAttributeMinMeasuredValue_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : read the mandatory attribute: MaxMeasuredValue\n"); - err = TestReadTheMandatoryAttributeMaxMeasuredValue_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : read the mandatory attribute: MaxMeasuredValue\n"); + err = TestReadTheMandatoryAttributeMaxMeasuredValue_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : write the default value to optional attribute: MeasuredValue\n"); - err = TestWriteTheDefaultValueToOptionalAttributeMeasuredValue_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : write the default value to optional attribute: MeasuredValue\n"); + err = TestWriteTheDefaultValueToOptionalAttributeMeasuredValue_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : write the default value to optional attribute: MinMeasuredValue\n"); - err = TestWriteTheDefaultValueToOptionalAttributeMinMeasuredValue_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : write the default value to optional attribute: MinMeasuredValue\n"); + err = TestWriteTheDefaultValueToOptionalAttributeMinMeasuredValue_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : write the default value to optional attribute: MaxMeasuredValue\n"); - err = TestWriteTheDefaultValueToOptionalAttributeMaxMeasuredValue_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : write the default value to optional attribute: MaxMeasuredValue\n"); + err = TestWriteTheDefaultValueToOptionalAttributeMaxMeasuredValue_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : read the mandatory attribute: MeasuredValue\n"); - err = TestReadTheMandatoryAttributeMeasuredValue_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : read the mandatory attribute: MeasuredValue\n"); + err = TestReadTheMandatoryAttributeMeasuredValue_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : read the mandatory attribute: MinMeasuredValue\n"); - err = TestReadTheMandatoryAttributeMinMeasuredValue_8(); - break; + ChipLogProgress(chipTool, " ***** Test Step 8 : read the mandatory attribute: MinMeasuredValue\n"); + err = TestReadTheMandatoryAttributeMinMeasuredValue_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : read the mandatory attribute: MaxMeasuredValue\n"); - err = TestReadTheMandatoryAttributeMaxMeasuredValue_9(); - break; + ChipLogProgress(chipTool, " ***** Test Step 9 : read the mandatory attribute: MaxMeasuredValue\n"); + err = TestReadTheMandatoryAttributeMaxMeasuredValue_9(); + break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : read the optional attribute: Tolerance\n"); - err = TestReadTheOptionalAttributeTolerance_10(); - break; + ChipLogProgress(chipTool, " ***** Test Step 10 : read the optional attribute: Tolerance\n"); + err = TestReadTheOptionalAttributeTolerance_10(); + break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : read the optional attribute: Tolerance\n"); - err = TestReadTheOptionalAttributeTolerance_11(); - break; + ChipLogProgress(chipTool, " ***** Test Step 11 : read the optional attribute: Tolerance\n"); + err = TestReadTheOptionalAttributeTolerance_11(); + break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : write the default value to optional attribute: Tolerance\n"); - err = TestWriteTheDefaultValueToOptionalAttributeTolerance_12(); - break; + ChipLogProgress(chipTool, " ***** Test Step 12 : write the default value to optional attribute: Tolerance\n"); + err = TestWriteTheDefaultValueToOptionalAttributeTolerance_12(); + break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : read the optional attribute: Tolerance\n"); - err = TestReadTheOptionalAttributeTolerance_13(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 13 : read the optional attribute: Tolerance\n"); + err = TestReadTheOptionalAttributeTolerance_13(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 14; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, int16_t measuredValue) + static void OnSuccessCallback_1(void * context, int16_t measuredValue) { (static_cast(context))->OnSuccessResponse_1(measuredValue); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, int16_t minMeasuredValue) + static void OnSuccessCallback_2(void * context, int16_t minMeasuredValue) { (static_cast(context))->OnSuccessResponse_2(minMeasuredValue); } - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, int16_t maxMeasuredValue) + static void OnSuccessCallback_3(void * context, int16_t maxMeasuredValue) { (static_cast(context))->OnSuccessResponse_3(maxMeasuredValue); } - - - static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context) - { - (static_cast(context))->OnSuccessResponse_4(); - } - - - + static void OnSuccessCallback_4(void * context) { (static_cast(context))->OnSuccessResponse_4(); } static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context) - { - (static_cast(context))->OnSuccessResponse_5(); - } - - - + static void OnSuccessCallback_5(void * context) { (static_cast(context))->OnSuccessResponse_5(); } static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context) - { - (static_cast(context))->OnSuccessResponse_6(); - } - - - + static void OnSuccessCallback_6(void * context) { (static_cast(context))->OnSuccessResponse_6(); } static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context, int16_t measuredValue) + static void OnSuccessCallback_7(void * context, int16_t measuredValue) { (static_cast(context))->OnSuccessResponse_7(measuredValue); } - - - static void OnFailureCallback_8(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context, int16_t minMeasuredValue) + static void OnSuccessCallback_8(void * context, int16_t minMeasuredValue) { (static_cast(context))->OnSuccessResponse_8(minMeasuredValue); } - - - static void OnFailureCallback_9(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_9(status); } - static void OnSuccessCallback_9(void * context, int16_t maxMeasuredValue) + static void OnSuccessCallback_9(void * context, int16_t maxMeasuredValue) { (static_cast(context))->OnSuccessResponse_9(maxMeasuredValue); } - - - static void OnFailureCallback_10(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_10(status); } - static void OnSuccessCallback_10(void * context, uint16_t tolerance) + static void OnSuccessCallback_10(void * context, uint16_t tolerance) { (static_cast(context))->OnSuccessResponse_10(tolerance); } - - - static void OnFailureCallback_11(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_11(status); } - static void OnSuccessCallback_11(void * context, uint16_t tolerance) + static void OnSuccessCallback_11(void * context, uint16_t tolerance) { (static_cast(context))->OnSuccessResponse_11(tolerance); } - - - static void OnFailureCallback_12(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_12(status); } - static void OnSuccessCallback_12(void * context) - { - (static_cast(context))->OnSuccessResponse_12(); - } - - - + static void OnSuccessCallback_12(void * context) { (static_cast(context))->OnSuccessResponse_12(); } static void OnFailureCallback_13(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_13(status); } - static void OnSuccessCallback_13(void * context, uint16_t tolerance) + static void OnSuccessCallback_13(void * context, uint16_t tolerance) { (static_cast(context))->OnSuccessResponse_13(tolerance); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::FlowMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( int16_t measuredValue) + void OnSuccessResponse_1(int16_t measuredValue) { - VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeMinMeasuredValue_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::FlowMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( int16_t minMeasuredValue) + void OnSuccessResponse_2(int16_t minMeasuredValue) { - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeMaxMeasuredValue_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::FlowMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( int16_t maxMeasuredValue) + void OnSuccessResponse_3(int16_t maxMeasuredValue) { - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValueToOptionalAttributeMeasuredValue_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -21945,26 +16772,21 @@ class Test_TC_FLW_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t measuredValueArgument; - measuredValueArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(measuredValueArgument, this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + measuredValueArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + measuredValueArgument, this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } void OnFailureResponse_4(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_4() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_4() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestWriteTheDefaultValueToOptionalAttributeMinMeasuredValue_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -21972,26 +16794,21 @@ class Test_TC_FLW_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t minMeasuredValueArgument; - minMeasuredValueArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(minMeasuredValueArgument, this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; + minMeasuredValueArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + minMeasuredValueArgument, this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; } void OnFailureResponse_5(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_5() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_5() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestWriteTheDefaultValueToOptionalAttributeMaxMeasuredValue_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -21999,158 +16816,125 @@ class Test_TC_FLW_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t maxMeasuredValueArgument; - maxMeasuredValueArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(maxMeasuredValueArgument, this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + maxMeasuredValueArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + maxMeasuredValueArgument, this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } void OnFailureResponse_6(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_6() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_6() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::FlowMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_7, OnFailureCallback_7)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7( int16_t measuredValue) + void OnSuccessResponse_7(int16_t measuredValue) { - VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeMinMeasuredValue_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::FlowMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_8, OnFailureCallback_8)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_8, OnFailureCallback_8)); + return CHIP_NO_ERROR; } - void OnFailureResponse_8(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_8( int16_t minMeasuredValue) + void OnSuccessResponse_8(int16_t minMeasuredValue) { - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeMaxMeasuredValue_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::FlowMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_9, OnFailureCallback_9)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_9, OnFailureCallback_9)); + return CHIP_NO_ERROR; } - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_9( int16_t maxMeasuredValue) + void OnSuccessResponse_9(int16_t maxMeasuredValue) { - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeTolerance_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::FlowMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_10, OnFailureCallback_10)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_10, OnFailureCallback_10)); + return CHIP_NO_ERROR; } void OnFailureResponse_10(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_10( uint16_t tolerance) + void OnSuccessResponse_10(uint16_t tolerance) { - VerifyOrReturn(CheckValue("tolerance", tolerance,0U - )); + VerifyOrReturn(CheckValue("tolerance", tolerance, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeTolerance_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::FlowMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_11, OnFailureCallback_11)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_11, OnFailureCallback_11)); + return CHIP_NO_ERROR; } void OnFailureResponse_11(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_11( uint16_t tolerance) + void OnSuccessResponse_11(uint16_t tolerance) { - VerifyOrReturn(CheckConstraintType("tolerance", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("tolerance", tolerance, 0U));VerifyOrReturn(CheckConstraintMaxValue("tolerance", tolerance, 2048U)); + VerifyOrReturn(CheckConstraintType("tolerance", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("tolerance", tolerance, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("tolerance", tolerance, 2048U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValueToOptionalAttributeTolerance_12() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -22158,450 +16942,339 @@ class Test_TC_FLW_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t toleranceArgument; - toleranceArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(toleranceArgument, this, OnSuccessCallback_12, OnFailureCallback_12)); - return CHIP_NO_ERROR; + toleranceArgument = 0U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + toleranceArgument, this, OnSuccessCallback_12, OnFailureCallback_12)); + return CHIP_NO_ERROR; } void OnFailureResponse_12(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_12() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_12() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadTheOptionalAttributeTolerance_13() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::FlowMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_13, OnFailureCallback_13)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_13, OnFailureCallback_13)); + return CHIP_NO_ERROR; } void OnFailureResponse_13(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_13( uint16_t tolerance) + void OnSuccessResponse_13(uint16_t tolerance) { - VerifyOrReturn(CheckValue("tolerance", tolerance,0U - )); + VerifyOrReturn(CheckValue("tolerance", tolerance, 0U)); NextTest(); - } - - - }; + } +}; -class Test_TC_FLW_2_2: public TestCommand +class Test_TC_FLW_2_2 : public TestCommand { - public: - Test_TC_FLW_2_2(): TestCommand("Test_TC_FLW_2_2"), mTestIndex(0) +public: + Test_TC_FLW_2_2() : TestCommand("Test_TC_FLW_2_2"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_FLW_2_2() - { - } + ~Test_TC_FLW_2_2() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_FLW_2_2\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_FLW_2_2\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FLW_2_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FLW_2_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the mandatory attribute: MeasuredValue\n"); - err = TestReadTheMandatoryAttributeMeasuredValue_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : read the mandatory attribute: MeasuredValue\n"); + err = TestReadTheMandatoryAttributeMeasuredValue_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : read the mandatory attribute: MeasuredValue\n"); - err = TestReadTheMandatoryAttributeMeasuredValue_2(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 2 : read the mandatory attribute: MeasuredValue\n"); + err = TestReadTheMandatoryAttributeMeasuredValue_2(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, int16_t measuredValue) + static void OnSuccessCallback_1(void * context, int16_t measuredValue) { (static_cast(context))->OnSuccessResponse_1(measuredValue); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, int16_t measuredValue) + static void OnSuccessCallback_2(void * context, int16_t measuredValue) { (static_cast(context))->OnSuccessResponse_2(measuredValue); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::FlowMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( int16_t measuredValue) + void OnSuccessResponse_1(int16_t measuredValue) { - VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::FlowMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( int16_t measuredValue) + void OnSuccessResponse_2(int16_t measuredValue) { - VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); NextTest(); - } - - - }; + } +}; -class Test_TC_ILL_1_1: public TestCommand +class Test_TC_ILL_1_1 : public TestCommand { - public: - Test_TC_ILL_1_1(): TestCommand("Test_TC_ILL_1_1"), mTestIndex(0) +public: + Test_TC_ILL_1_1() : TestCommand("Test_TC_ILL_1_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_ILL_1_1() - { - } + ~Test_TC_ILL_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_ILL_1_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_ILL_1_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ILL_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ILL_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); + err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : reads back global attribute: ClusterRevision\n"); - err = TestReadsBackGlobalAttributeClusterRevision_4(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 4 : reads back global attribute: ClusterRevision\n"); + err = TestReadsBackGlobalAttributeClusterRevision_4(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 5; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_1(clusterRevision); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_2(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_2(clusterRevision); } - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context) - { - (static_cast(context))->OnSuccessResponse_3(); - } - - - + static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_4(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_4(clusterRevision); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::IlluminanceMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint16_t clusterRevision) + void OnSuccessResponse_1(uint16_t clusterRevision) { - VerifyOrReturn(CheckValue("clusterRevision", clusterRevision,2U - )); + VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 2U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::IlluminanceMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint16_t clusterRevision) + void OnSuccessResponse_2(uint16_t clusterRevision) { - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -22609,304 +17282,228 @@ class Test_TC_ILL_1_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t clusterRevisionArgument; - clusterRevisionArgument = 1U; - - ReturnErrorOnFailure(cluster.WriteAttribute(clusterRevisionArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + clusterRevisionArgument = 1U; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + clusterRevisionArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_3() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_3() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::IlluminanceMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( uint16_t clusterRevision) + void OnSuccessResponse_4(uint16_t clusterRevision) { - VerifyOrReturn(CheckValue("clusterRevision", clusterRevision,2U - )); + VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 2U)); NextTest(); - } - - - }; + } +}; -class Test_TC_LVL_1_1: public TestCommand +class Test_TC_LVL_1_1 : public TestCommand { - public: - Test_TC_LVL_1_1(): TestCommand("Test_TC_LVL_1_1"), mTestIndex(0) +public: + Test_TC_LVL_1_1() : TestCommand("Test_TC_LVL_1_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_LVL_1_1() - { - } + ~Test_TC_LVL_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_1_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_1_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); + err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : reads back global attribute: ClusterRevision\n"); - err = TestReadsBackGlobalAttributeClusterRevision_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : reads back global attribute: ClusterRevision\n"); + err = TestReadsBackGlobalAttributeClusterRevision_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the optional global attribute : FeatureMap\n"); - err = TestReadTheOptionalGlobalAttributeFeatureMap_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the optional global attribute : FeatureMap\n"); + err = TestReadTheOptionalGlobalAttributeFeatureMap_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : write the default values to optional global attribute: FeatureMap\n"); - err = TestWriteTheDefaultValuesToOptionalGlobalAttributeFeatureMap_6(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 6 : write the default values to optional global attribute: FeatureMap\n"); + err = TestWriteTheDefaultValuesToOptionalGlobalAttributeFeatureMap_6(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 7; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_1(clusterRevision); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_2(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_2(clusterRevision); } - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context) - { - (static_cast(context))->OnSuccessResponse_3(); - } - - - + static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_4(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_4(clusterRevision); } - - - static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context, uint32_t featureMap) + static void OnSuccessCallback_5(void * context, uint32_t featureMap) { (static_cast(context))->OnSuccessResponse_5(featureMap); } - - - static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context) - { - (static_cast(context))->OnSuccessResponse_6(); - } - - - + static void OnSuccessCallback_6(void * context) { (static_cast(context))->OnSuccessResponse_6(); } // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint16_t clusterRevision) + void OnSuccessResponse_1(uint16_t clusterRevision) { - VerifyOrReturn(CheckValue("clusterRevision", clusterRevision,5U - )); + VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 5U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint16_t clusterRevision) + void OnSuccessResponse_2(uint16_t clusterRevision) { - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -22914,80 +17511,60 @@ class Test_TC_LVL_1_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t clusterRevisionArgument; - clusterRevisionArgument = 4U; - - ReturnErrorOnFailure(cluster.WriteAttribute(clusterRevisionArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + clusterRevisionArgument = 4U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + clusterRevisionArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_3() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_3() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( uint16_t clusterRevision) + void OnSuccessResponse_4(uint16_t clusterRevision) { - VerifyOrReturn(CheckValue("clusterRevision", clusterRevision,5U - )); + VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 5U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5( uint32_t featureMap) + void OnSuccessResponse_5(uint32_t featureMap) { - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToOptionalGlobalAttributeFeatureMap_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -22995,360 +17572,289 @@ class Test_TC_LVL_1_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint32_t featureMapArgument; - featureMapArgument = 0UL; - - ReturnErrorOnFailure(cluster.WriteAttribute(featureMapArgument, this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + featureMapArgument = 0UL; + + ReturnErrorOnFailure(cluster.WriteAttribute( + featureMapArgument, this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } void OnFailureResponse_6(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_6() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_6() { ThrowSuccessResponse(); } +}; - }; - -class Test_TC_LVL_2_1: public TestCommand +class Test_TC_LVL_2_1 : public TestCommand { - public: - Test_TC_LVL_2_1(): TestCommand("Test_TC_LVL_2_1"), mTestIndex(0) +public: + Test_TC_LVL_2_1() : TestCommand("Test_TC_LVL_2_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_LVL_2_1() - { - } + ~Test_TC_LVL_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_2_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_2_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reset level to 254\n"); - err = TestResetLevelTo254_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Reset level to 254\n"); + err = TestResetLevelTo254_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Wait 100ms\n"); - err = TestWait100ms_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Wait 100ms\n"); + err = TestWait100ms_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the CurrentLevel attribute\n"); - err = TestReadsTheCurrentLevelAttribute_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the CurrentLevel attribute\n"); + err = TestReadsTheCurrentLevelAttribute_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the RemainingTime attribute\n"); - err = TestReadsTheRemainingTimeAttribute_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the RemainingTime attribute\n"); + err = TestReadsTheRemainingTimeAttribute_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the MinLevel attribute\n"); - err = TestReadsTheMinLevelAttribute_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the MinLevel attribute\n"); + err = TestReadsTheMinLevelAttribute_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the MaxLevel attribute\n"); - err = TestReadsTheMaxLevelAttribute_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the MaxLevel attribute\n"); + err = TestReadsTheMaxLevelAttribute_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the CurrentFrequency attribute\n"); - err = TestReadsTheCurrentFrequencyAttribute_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the CurrentFrequency attribute\n"); + err = TestReadsTheCurrentFrequencyAttribute_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the MinFrequency attribute\n"); - err = TestReadsTheMinFrequencyAttribute_8(); - break; + ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the MinFrequency attribute\n"); + err = TestReadsTheMinFrequencyAttribute_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Reads the MaxFrequency attribute\n"); - err = TestReadsTheMaxFrequencyAttribute_9(); - break; + ChipLogProgress(chipTool, " ***** Test Step 9 : Reads the MaxFrequency attribute\n"); + err = TestReadsTheMaxFrequencyAttribute_9(); + break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Reads the OnOffTransitionTime attribute\n"); - err = TestReadsTheOnOffTransitionTimeAttribute_10(); - break; + ChipLogProgress(chipTool, " ***** Test Step 10 : Reads the OnOffTransitionTime attribute\n"); + err = TestReadsTheOnOffTransitionTimeAttribute_10(); + break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Reads the OnLevel attribute \n"); - err = TestReadsTheOnLevelAttribute_11(); - break; + ChipLogProgress(chipTool, " ***** Test Step 11 : Reads the OnLevel attribute \n"); + err = TestReadsTheOnLevelAttribute_11(); + break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Reads the OnTransitionTime attribute \n"); - err = TestReadsTheOnTransitionTimeAttribute_12(); - break; + ChipLogProgress(chipTool, " ***** Test Step 12 : Reads the OnTransitionTime attribute \n"); + err = TestReadsTheOnTransitionTimeAttribute_12(); + break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Reads the OffTransitionTime attribute \n"); - err = TestReadsTheOffTransitionTimeAttribute_13(); - break; + ChipLogProgress(chipTool, " ***** Test Step 13 : Reads the OffTransitionTime attribute \n"); + err = TestReadsTheOffTransitionTimeAttribute_13(); + break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Reads the DefaultMoveRate attribute \n"); - err = TestReadsTheDefaultMoveRateAttribute_14(); - break; + ChipLogProgress(chipTool, " ***** Test Step 14 : Reads the DefaultMoveRate attribute \n"); + err = TestReadsTheDefaultMoveRateAttribute_14(); + break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Reads the Options attribute \n"); - err = TestReadsTheOptionsAttribute_15(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 15 : Reads the Options attribute \n"); + err = TestReadsTheOptionsAttribute_15(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 16; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, uint8_t currentLevel) + static void OnSuccessCallback_3(void * context, uint8_t currentLevel) { (static_cast(context))->OnSuccessResponse_3(currentLevel); } - - - static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, uint16_t remainingTime) + static void OnSuccessCallback_4(void * context, uint16_t remainingTime) { (static_cast(context))->OnSuccessResponse_4(remainingTime); } - - - static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context, uint8_t minLevel) + static void OnSuccessCallback_5(void * context, uint8_t minLevel) { (static_cast(context))->OnSuccessResponse_5(minLevel); } - - - static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, uint8_t maxLevel) + static void OnSuccessCallback_6(void * context, uint8_t maxLevel) { (static_cast(context))->OnSuccessResponse_6(maxLevel); } - - - static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context, uint16_t currentFrequency) + static void OnSuccessCallback_7(void * context, uint16_t currentFrequency) { (static_cast(context))->OnSuccessResponse_7(currentFrequency); } - - - static void OnFailureCallback_8(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context, uint16_t minFrequency) + static void OnSuccessCallback_8(void * context, uint16_t minFrequency) { (static_cast(context))->OnSuccessResponse_8(minFrequency); } - - - static void OnFailureCallback_9(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_9(status); } - static void OnSuccessCallback_9(void * context, uint16_t maxFrequency) + static void OnSuccessCallback_9(void * context, uint16_t maxFrequency) { (static_cast(context))->OnSuccessResponse_9(maxFrequency); } - - - static void OnFailureCallback_10(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_10(status); } - static void OnSuccessCallback_10(void * context, uint16_t onOffTransitionTime) + static void OnSuccessCallback_10(void * context, uint16_t onOffTransitionTime) { (static_cast(context))->OnSuccessResponse_10(onOffTransitionTime); } - - - static void OnFailureCallback_11(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_11(status); } - static void OnSuccessCallback_11(void * context, const chip::app::DataModel::Nullable & onLevel) + static void OnSuccessCallback_11(void * context, const chip::app::DataModel::Nullable & onLevel) { (static_cast(context))->OnSuccessResponse_11(onLevel); } - - - static void OnFailureCallback_12(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_12(status); } - static void OnSuccessCallback_12(void * context, const chip::app::DataModel::Nullable & onTransitionTime) + static void OnSuccessCallback_12(void * context, const chip::app::DataModel::Nullable & onTransitionTime) { (static_cast(context))->OnSuccessResponse_12(onTransitionTime); } - - - static void OnFailureCallback_13(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_13(status); } - static void OnSuccessCallback_13(void * context, const chip::app::DataModel::Nullable & offTransitionTime) + static void OnSuccessCallback_13(void * context, const chip::app::DataModel::Nullable & offTransitionTime) { (static_cast(context))->OnSuccessResponse_13(offTransitionTime); } - - - static void OnFailureCallback_14(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_14(status); } - static void OnSuccessCallback_14(void * context, const chip::app::DataModel::Nullable & defaultMoveRate) + static void OnSuccessCallback_14(void * context, const chip::app::DataModel::Nullable & defaultMoveRate) { (static_cast(context))->OnSuccessResponse_14(defaultMoveRate); } - - - static void OnFailureCallback_15(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_15(status); } - static void OnSuccessCallback_15(void * context, uint8_t options) + static void OnSuccessCallback_15(void * context, uint8_t options) { (static_cast(context))->OnSuccessResponse_15(options); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestResetLevelTo254_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; + using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; RequestType request; - request.level = 254; - request.transitionTime = 0U; - request.optionMask = 1; - request.optionOverride = 1; - + request.level = 254; + request.transitionTime = 0U; + request.optionMask = 1; + request.optionOverride = 1; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_1(); }; @@ -23357,763 +17863,551 @@ class Test_TC_LVL_2_1: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_1() - { NextTest(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestWait100ms_2() { SetIdentity(kIdentityAlpha); return WaitForMs(100); } - - CHIP_ERROR TestReadsTheCurrentLevelAttribute_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( uint8_t currentLevel) + void OnSuccessResponse_3(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel,254 - )); + VerifyOrReturn(CheckValue("currentLevel", currentLevel, 254)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsTheRemainingTimeAttribute_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( uint16_t remainingTime) + void OnSuccessResponse_4(uint16_t remainingTime) { - VerifyOrReturn(CheckValue("remainingTime", remainingTime,0U - )); + VerifyOrReturn(CheckValue("remainingTime", remainingTime, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsTheMinLevelAttribute_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5( uint8_t minLevel) + void OnSuccessResponse_5(uint8_t minLevel) { - VerifyOrReturn(CheckValue("minLevel", minLevel,0 - )); + VerifyOrReturn(CheckValue("minLevel", minLevel, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsTheMaxLevelAttribute_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( uint8_t maxLevel) + void OnSuccessResponse_6(uint8_t maxLevel) { - VerifyOrReturn(CheckConstraintType("maxLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("maxLevel", "", "uint8")); NextTest(); - } - - - + } - CHIP_ERROR TestReadsTheCurrentFrequencyAttribute_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_7, OnFailureCallback_7)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7( uint16_t currentFrequency) + void OnSuccessResponse_7(uint16_t currentFrequency) { - VerifyOrReturn(CheckValue("currentFrequency", currentFrequency,0U - )); + VerifyOrReturn(CheckValue("currentFrequency", currentFrequency, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsTheMinFrequencyAttribute_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_8, OnFailureCallback_8)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_8, OnFailureCallback_8)); + return CHIP_NO_ERROR; } - void OnFailureResponse_8(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_8( uint16_t minFrequency) + void OnSuccessResponse_8(uint16_t minFrequency) { - VerifyOrReturn(CheckValue("minFrequency", minFrequency,0U - )); + VerifyOrReturn(CheckValue("minFrequency", minFrequency, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsTheMaxFrequencyAttribute_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_9, OnFailureCallback_9)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_9, OnFailureCallback_9)); + return CHIP_NO_ERROR; } - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_9( uint16_t maxFrequency) + void OnSuccessResponse_9(uint16_t maxFrequency) { - VerifyOrReturn(CheckValue("maxFrequency", maxFrequency,0U - )); + VerifyOrReturn(CheckValue("maxFrequency", maxFrequency, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsTheOnOffTransitionTimeAttribute_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_10, OnFailureCallback_10)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_10, OnFailureCallback_10)); + return CHIP_NO_ERROR; } - void OnFailureResponse_10(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_10( uint16_t onOffTransitionTime) + void OnSuccessResponse_10(uint16_t onOffTransitionTime) { - VerifyOrReturn(CheckValue("onOffTransitionTime", onOffTransitionTime,0U - )); + VerifyOrReturn(CheckValue("onOffTransitionTime", onOffTransitionTime, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsTheOnLevelAttribute_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_11, OnFailureCallback_11)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_11, OnFailureCallback_11)); + return CHIP_NO_ERROR; } - void OnFailureResponse_11(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_11( const chip::app::DataModel::Nullable & onLevel) + void OnSuccessResponse_11(const chip::app::DataModel::Nullable & onLevel) { - VerifyOrReturn(CheckConstraintType("onLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("onLevel", "", "uint8")); NextTest(); - } - - - + } - CHIP_ERROR TestReadsTheOnTransitionTimeAttribute_12() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_12, OnFailureCallback_12)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_12, OnFailureCallback_12)); + return CHIP_NO_ERROR; } - void OnFailureResponse_12(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_12( const chip::app::DataModel::Nullable & onTransitionTime) + void OnSuccessResponse_12(const chip::app::DataModel::Nullable & onTransitionTime) { - VerifyOrReturn(CheckConstraintType("onTransitionTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("onTransitionTime", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadsTheOffTransitionTimeAttribute_13() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_13, OnFailureCallback_13)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_13, OnFailureCallback_13)); + return CHIP_NO_ERROR; } - void OnFailureResponse_13(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_13(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_13( const chip::app::DataModel::Nullable & offTransitionTime) + void OnSuccessResponse_13(const chip::app::DataModel::Nullable & offTransitionTime) { - VerifyOrReturn(CheckConstraintType("offTransitionTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("offTransitionTime", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadsTheDefaultMoveRateAttribute_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_14, OnFailureCallback_14)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_14, OnFailureCallback_14)); + return CHIP_NO_ERROR; } - void OnFailureResponse_14(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_14( const chip::app::DataModel::Nullable & defaultMoveRate) + void OnSuccessResponse_14(const chip::app::DataModel::Nullable & defaultMoveRate) { - VerifyOrReturn(CheckConstraintType("defaultMoveRate", "", "uint8")); + VerifyOrReturn(CheckConstraintType("defaultMoveRate", "", "uint8")); NextTest(); - } - - - + } - CHIP_ERROR TestReadsTheOptionsAttribute_15() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_15, OnFailureCallback_15)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_15, OnFailureCallback_15)); + return CHIP_NO_ERROR; } - void OnFailureResponse_15(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_15(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_15( uint8_t options) + void OnSuccessResponse_15(uint8_t options) { - VerifyOrReturn(CheckValue("options", options,0 - )); + VerifyOrReturn(CheckValue("options", options, 0)); NextTest(); - } - - - }; + } +}; -class Test_TC_LVL_2_2: public TestCommand +class Test_TC_LVL_2_2 : public TestCommand { - public: - Test_TC_LVL_2_2(): TestCommand("Test_TC_LVL_2_2"), mTestIndex(0) +public: + Test_TC_LVL_2_2() : TestCommand("Test_TC_LVL_2_2"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_LVL_2_2() - { - } + ~Test_TC_LVL_2_2() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_2_2\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_2_2\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_2_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_2_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the OnOffTransitionTime attribute from the DUT\n"); - err = TestReadsTheOnOffTransitionTimeAttributeFromTheDut_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the OnOffTransitionTime attribute from the DUT\n"); + err = TestReadsTheOnOffTransitionTimeAttributeFromTheDut_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : writes the OnOffTransitionTime attribute on the DUT\n"); - err = TestWritesTheOnOffTransitionTimeAttributeOnTheDut_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : writes the OnOffTransitionTime attribute on the DUT\n"); + err = TestWritesTheOnOffTransitionTimeAttributeOnTheDut_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the OnOffTransitionTime attribute from the DUT\n"); - err = TestReadsTheOnOffTransitionTimeAttributeFromTheDut_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the OnOffTransitionTime attribute from the DUT\n"); + err = TestReadsTheOnOffTransitionTimeAttributeFromTheDut_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : writes default value of OnOffTransitionTime attribute\n"); - err = TestWritesDefaultValueOfOnOffTransitionTimeAttribute_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : writes default value of OnOffTransitionTime attribute\n"); + err = TestWritesDefaultValueOfOnOffTransitionTimeAttribute_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : writes the OnLevel attribute on the DUT\n"); - err = TestWritesTheOnLevelAttributeOnTheDut_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : writes the OnLevel attribute on the DUT\n"); + err = TestWritesTheOnLevelAttributeOnTheDut_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the OnLevel attribute from the DUT\n"); - err = TestReadsTheOnLevelAttributeFromTheDut_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the OnLevel attribute from the DUT\n"); + err = TestReadsTheOnLevelAttributeFromTheDut_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Writes the OnTransitionTime attribute on the DUT\n"); - err = TestWritesTheOnTransitionTimeAttributeOnTheDut_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : Writes the OnTransitionTime attribute on the DUT\n"); + err = TestWritesTheOnTransitionTimeAttributeOnTheDut_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the OnTransitionTime attribute from the DUT\n"); - err = TestReadsTheOnTransitionTimeAttributeFromTheDut_8(); - break; + ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the OnTransitionTime attribute from the DUT\n"); + err = TestReadsTheOnTransitionTimeAttributeFromTheDut_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Writes the OffTransitionTime attribute on the DUT\n"); - err = TestWritesTheOffTransitionTimeAttributeOnTheDut_9(); - break; + ChipLogProgress(chipTool, " ***** Test Step 9 : Writes the OffTransitionTime attribute on the DUT\n"); + err = TestWritesTheOffTransitionTimeAttributeOnTheDut_9(); + break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Reads the OffTransitionTime attribute from the DUT\n"); - err = TestReadsTheOffTransitionTimeAttributeFromTheDut_10(); - break; + ChipLogProgress(chipTool, " ***** Test Step 10 : Reads the OffTransitionTime attribute from the DUT\n"); + err = TestReadsTheOffTransitionTimeAttributeFromTheDut_10(); + break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Reads the DefaultMoveRate attribute from the DUT\n"); - err = TestReadsTheDefaultMoveRateAttributeFromTheDut_11(); - break; + ChipLogProgress(chipTool, " ***** Test Step 11 : Reads the DefaultMoveRate attribute from the DUT\n"); + err = TestReadsTheDefaultMoveRateAttributeFromTheDut_11(); + break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Writes the DefaultMoveRate attribute on the DUT\n"); - err = TestWritesTheDefaultMoveRateAttributeOnTheDut_12(); - break; + ChipLogProgress(chipTool, " ***** Test Step 12 : Writes the DefaultMoveRate attribute on the DUT\n"); + err = TestWritesTheDefaultMoveRateAttributeOnTheDut_12(); + break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Reads the DefaultMoveRate attribute from the DUT\n"); - err = TestReadsTheDefaultMoveRateAttributeFromTheDut_13(); - break; + ChipLogProgress(chipTool, " ***** Test Step 13 : Reads the DefaultMoveRate attribute from the DUT\n"); + err = TestReadsTheDefaultMoveRateAttributeFromTheDut_13(); + break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : writes the StartUpCurrentLevel attribute on the DUT\n"); - err = TestWritesTheStartUpCurrentLevelAttributeOnTheDut_14(); - break; + ChipLogProgress(chipTool, " ***** Test Step 14 : writes the StartUpCurrentLevel attribute on the DUT\n"); + err = TestWritesTheStartUpCurrentLevelAttributeOnTheDut_14(); + break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : reads the StartUpCurrentLevel attribute from the DUT\n"); - err = TestReadsTheStartUpCurrentLevelAttributeFromTheDut_15(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 15 : reads the StartUpCurrentLevel attribute from the DUT\n"); + err = TestReadsTheStartUpCurrentLevelAttributeFromTheDut_15(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 16; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint16_t onOffTransitionTime) + static void OnSuccessCallback_1(void * context, uint16_t onOffTransitionTime) { (static_cast(context))->OnSuccessResponse_1(onOffTransitionTime); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context) - { - (static_cast(context))->OnSuccessResponse_2(); - } - - - + static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, uint16_t onOffTransitionTime) + static void OnSuccessCallback_3(void * context, uint16_t onOffTransitionTime) { (static_cast(context))->OnSuccessResponse_3(onOffTransitionTime); } - - - static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context) - { - (static_cast(context))->OnSuccessResponse_4(); - } - - - + static void OnSuccessCallback_4(void * context) { (static_cast(context))->OnSuccessResponse_4(); } static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context) - { - (static_cast(context))->OnSuccessResponse_5(); - } - - - + static void OnSuccessCallback_5(void * context) { (static_cast(context))->OnSuccessResponse_5(); } static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, const chip::app::DataModel::Nullable & onLevel) + static void OnSuccessCallback_6(void * context, const chip::app::DataModel::Nullable & onLevel) { (static_cast(context))->OnSuccessResponse_6(onLevel); } - - - static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context) - { - (static_cast(context))->OnSuccessResponse_7(); - } - - - + static void OnSuccessCallback_7(void * context) { (static_cast(context))->OnSuccessResponse_7(); } static void OnFailureCallback_8(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context, const chip::app::DataModel::Nullable & onTransitionTime) + static void OnSuccessCallback_8(void * context, const chip::app::DataModel::Nullable & onTransitionTime) { (static_cast(context))->OnSuccessResponse_8(onTransitionTime); } - - - static void OnFailureCallback_9(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_9(status); } - static void OnSuccessCallback_9(void * context) - { - (static_cast(context))->OnSuccessResponse_9(); - } - - - + static void OnSuccessCallback_9(void * context) { (static_cast(context))->OnSuccessResponse_9(); } static void OnFailureCallback_10(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_10(status); } - static void OnSuccessCallback_10(void * context, const chip::app::DataModel::Nullable & offTransitionTime) + static void OnSuccessCallback_10(void * context, const chip::app::DataModel::Nullable & offTransitionTime) { (static_cast(context))->OnSuccessResponse_10(offTransitionTime); } - - - static void OnFailureCallback_11(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_11(status); } - static void OnSuccessCallback_11(void * context, const chip::app::DataModel::Nullable & defaultMoveRate) + static void OnSuccessCallback_11(void * context, const chip::app::DataModel::Nullable & defaultMoveRate) { (static_cast(context))->OnSuccessResponse_11(defaultMoveRate); } - - - static void OnFailureCallback_12(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_12(status); } - static void OnSuccessCallback_12(void * context) - { - (static_cast(context))->OnSuccessResponse_12(); - } - - - + static void OnSuccessCallback_12(void * context) { (static_cast(context))->OnSuccessResponse_12(); } static void OnFailureCallback_13(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_13(status); } - static void OnSuccessCallback_13(void * context, const chip::app::DataModel::Nullable & defaultMoveRate) + static void OnSuccessCallback_13(void * context, const chip::app::DataModel::Nullable & defaultMoveRate) { (static_cast(context))->OnSuccessResponse_13(defaultMoveRate); } - - - static void OnFailureCallback_14(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_14(status); } - static void OnSuccessCallback_14(void * context) - { - (static_cast(context))->OnSuccessResponse_14(); - } - - - + static void OnSuccessCallback_14(void * context) { (static_cast(context))->OnSuccessResponse_14(); } static void OnFailureCallback_15(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_15(status); } - static void OnSuccessCallback_15(void * context, const chip::app::DataModel::Nullable & startUpCurrentLevel) + static void OnSuccessCallback_15(void * context, const chip::app::DataModel::Nullable & startUpCurrentLevel) { (static_cast(context))->OnSuccessResponse_15(startUpCurrentLevel); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadsTheOnOffTransitionTimeAttributeFromTheDut_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint16_t onOffTransitionTime) + void OnSuccessResponse_1(uint16_t onOffTransitionTime) { - VerifyOrReturn(CheckValue("onOffTransitionTime", onOffTransitionTime,0U - )); + VerifyOrReturn(CheckValue("onOffTransitionTime", onOffTransitionTime, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesTheOnOffTransitionTimeAttributeOnTheDut_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -24121,53 +18415,37 @@ class Test_TC_LVL_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t onOffTransitionTimeArgument; - onOffTransitionTimeArgument = 10U; - - ReturnErrorOnFailure(cluster.WriteAttribute(onOffTransitionTimeArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + onOffTransitionTimeArgument = 10U; - void OnSuccessResponse_2() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + onOffTransitionTimeArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_2() { NextTest(); } - CHIP_ERROR TestReadsTheOnOffTransitionTimeAttributeFromTheDut_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( uint16_t onOffTransitionTime) + void OnSuccessResponse_3(uint16_t onOffTransitionTime) { - VerifyOrReturn(CheckValue("onOffTransitionTime", onOffTransitionTime,10U - )); + VerifyOrReturn(CheckValue("onOffTransitionTime", onOffTransitionTime, 10U)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesDefaultValueOfOnOffTransitionTimeAttribute_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -24175,25 +18453,17 @@ class Test_TC_LVL_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t onOffTransitionTimeArgument; - onOffTransitionTimeArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(onOffTransitionTimeArgument, this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + onOffTransitionTimeArgument = 0U; - void OnSuccessResponse_4() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + onOffTransitionTimeArgument, this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_4() { NextTest(); } - CHIP_ERROR TestWritesTheOnLevelAttributeOnTheDut_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -24201,55 +18471,39 @@ class Test_TC_LVL_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable onLevelArgument; - onLevelArgument.SetNonNull(); - onLevelArgument.Value() = 254; - - ReturnErrorOnFailure(cluster.WriteAttribute(onLevelArgument, this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + onLevelArgument.SetNonNull(); + onLevelArgument.Value() = 254; - void OnSuccessResponse_5() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + onLevelArgument, this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_5() { NextTest(); } - CHIP_ERROR TestReadsTheOnLevelAttributeFromTheDut_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( const chip::app::DataModel::Nullable & onLevel) + void OnSuccessResponse_6(const chip::app::DataModel::Nullable & onLevel) { - VerifyOrReturn(CheckValueNonNull("onLevel", onLevel)); - VerifyOrReturn(CheckValue("onLevel.Value()", onLevel.Value(),254 - )); + VerifyOrReturn(CheckValueNonNull("onLevel", onLevel)); + VerifyOrReturn(CheckValue("onLevel.Value()", onLevel.Value(), 254)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesTheOnTransitionTimeAttributeOnTheDut_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -24257,55 +18511,39 @@ class Test_TC_LVL_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable onTransitionTimeArgument; - onTransitionTimeArgument.SetNonNull(); - onTransitionTimeArgument.Value() = 100U; - - ReturnErrorOnFailure(cluster.WriteAttribute(onTransitionTimeArgument, this, OnSuccessCallback_7, OnFailureCallback_7)); - return CHIP_NO_ERROR; - } + onTransitionTimeArgument.SetNonNull(); + onTransitionTimeArgument.Value() = 100U; - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_7() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + onTransitionTimeArgument, this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_7() { NextTest(); } - CHIP_ERROR TestReadsTheOnTransitionTimeAttributeFromTheDut_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_8, OnFailureCallback_8)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_8, OnFailureCallback_8)); + return CHIP_NO_ERROR; } - void OnFailureResponse_8(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_8( const chip::app::DataModel::Nullable & onTransitionTime) + void OnSuccessResponse_8(const chip::app::DataModel::Nullable & onTransitionTime) { - VerifyOrReturn(CheckValueNonNull("onTransitionTime", onTransitionTime)); - VerifyOrReturn(CheckValue("onTransitionTime.Value()", onTransitionTime.Value(),100U - )); + VerifyOrReturn(CheckValueNonNull("onTransitionTime", onTransitionTime)); + VerifyOrReturn(CheckValue("onTransitionTime.Value()", onTransitionTime.Value(), 100U)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesTheOffTransitionTimeAttributeOnTheDut_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -24313,84 +18551,60 @@ class Test_TC_LVL_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable offTransitionTimeArgument; - offTransitionTimeArgument.SetNonNull(); - offTransitionTimeArgument.Value() = 100U; - - ReturnErrorOnFailure(cluster.WriteAttribute(offTransitionTimeArgument, this, OnSuccessCallback_9, OnFailureCallback_9)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } + offTransitionTimeArgument.SetNonNull(); + offTransitionTimeArgument.Value() = 100U; - void OnSuccessResponse_9() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + offTransitionTimeArgument, this, OnSuccessCallback_9, OnFailureCallback_9)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_9() { NextTest(); } - CHIP_ERROR TestReadsTheOffTransitionTimeAttributeFromTheDut_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_10, OnFailureCallback_10)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_10, OnFailureCallback_10)); + return CHIP_NO_ERROR; } - void OnFailureResponse_10(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_10( const chip::app::DataModel::Nullable & offTransitionTime) + void OnSuccessResponse_10(const chip::app::DataModel::Nullable & offTransitionTime) { - VerifyOrReturn(CheckValueNonNull("offTransitionTime", offTransitionTime)); - VerifyOrReturn(CheckValue("offTransitionTime.Value()", offTransitionTime.Value(),100U - )); + VerifyOrReturn(CheckValueNonNull("offTransitionTime", offTransitionTime)); + VerifyOrReturn(CheckValue("offTransitionTime.Value()", offTransitionTime.Value(), 100U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsTheDefaultMoveRateAttributeFromTheDut_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_11, OnFailureCallback_11)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_11, OnFailureCallback_11)); + return CHIP_NO_ERROR; } - void OnFailureResponse_11(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_11( const chip::app::DataModel::Nullable & defaultMoveRate) + void OnSuccessResponse_11(const chip::app::DataModel::Nullable & defaultMoveRate) { - VerifyOrReturn(CheckValueNonNull("defaultMoveRate", defaultMoveRate)); - VerifyOrReturn(CheckValue("defaultMoveRate.Value()", defaultMoveRate.Value(),0 - )); + VerifyOrReturn(CheckValueNonNull("defaultMoveRate", defaultMoveRate)); + VerifyOrReturn(CheckValue("defaultMoveRate.Value()", defaultMoveRate.Value(), 0)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesTheDefaultMoveRateAttributeOnTheDut_12() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -24398,55 +18612,39 @@ class Test_TC_LVL_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable defaultMoveRateArgument; - defaultMoveRateArgument.SetNonNull(); - defaultMoveRateArgument.Value() = 100; - - ReturnErrorOnFailure(cluster.WriteAttribute(defaultMoveRateArgument, this, OnSuccessCallback_12, OnFailureCallback_12)); - return CHIP_NO_ERROR; - } + defaultMoveRateArgument.SetNonNull(); + defaultMoveRateArgument.Value() = 100; - void OnFailureResponse_12(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_12() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + defaultMoveRateArgument, this, OnSuccessCallback_12, OnFailureCallback_12)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_12() { NextTest(); } - CHIP_ERROR TestReadsTheDefaultMoveRateAttributeFromTheDut_13() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_13, OnFailureCallback_13)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_13, OnFailureCallback_13)); + return CHIP_NO_ERROR; } - void OnFailureResponse_13(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_13(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_13( const chip::app::DataModel::Nullable & defaultMoveRate) + void OnSuccessResponse_13(const chip::app::DataModel::Nullable & defaultMoveRate) { - VerifyOrReturn(CheckValueNonNull("defaultMoveRate", defaultMoveRate)); - VerifyOrReturn(CheckValue("defaultMoveRate.Value()", defaultMoveRate.Value(),100 - )); + VerifyOrReturn(CheckValueNonNull("defaultMoveRate", defaultMoveRate)); + VerifyOrReturn(CheckValue("defaultMoveRate.Value()", defaultMoveRate.Value(), 100)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesTheStartUpCurrentLevelAttributeOnTheDut_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -24454,395 +18652,307 @@ class Test_TC_LVL_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable startUpCurrentLevelArgument; - startUpCurrentLevelArgument.SetNonNull(); - startUpCurrentLevelArgument.Value() = 254; - - ReturnErrorOnFailure(cluster.WriteAttribute(startUpCurrentLevelArgument, this, OnSuccessCallback_14, OnFailureCallback_14)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_14(EmberAfStatus status) - { - ThrowFailureResponse(); - } + startUpCurrentLevelArgument.SetNonNull(); + startUpCurrentLevelArgument.Value() = 254; - void OnSuccessResponse_14() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + startUpCurrentLevelArgument, this, OnSuccessCallback_14, OnFailureCallback_14)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_14() { NextTest(); } - CHIP_ERROR TestReadsTheStartUpCurrentLevelAttributeFromTheDut_15() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_15, OnFailureCallback_15)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_15, OnFailureCallback_15)); + return CHIP_NO_ERROR; } - void OnFailureResponse_15(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_15(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_15( const chip::app::DataModel::Nullable & startUpCurrentLevel) + void OnSuccessResponse_15(const chip::app::DataModel::Nullable & startUpCurrentLevel) { - VerifyOrReturn(CheckValueNonNull("startUpCurrentLevel", startUpCurrentLevel)); - VerifyOrReturn(CheckValue("startUpCurrentLevel.Value()", startUpCurrentLevel.Value(),254 - )); + VerifyOrReturn(CheckValueNonNull("startUpCurrentLevel", startUpCurrentLevel)); + VerifyOrReturn(CheckValue("startUpCurrentLevel.Value()", startUpCurrentLevel.Value(), 254)); NextTest(); - } - - - }; + } +}; -class Test_TC_LVL_3_1: public TestCommand +class Test_TC_LVL_3_1 : public TestCommand { - public: - Test_TC_LVL_3_1(): TestCommand("Test_TC_LVL_3_1"), mTestIndex(0) +public: + Test_TC_LVL_3_1() : TestCommand("Test_TC_LVL_3_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_LVL_3_1() - { - } + ~Test_TC_LVL_3_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_3_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_3_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_3_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_3_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : reads CurrentLevel attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : reads CurrentLevel attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the MinLevel attribute\n"); - err = TestReadsTheMinLevelAttribute_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the MinLevel attribute\n"); + err = TestReadsTheMinLevelAttribute_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the MaxLevel attribute\n"); - err = TestReadsTheMaxLevelAttribute_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the MaxLevel attribute\n"); + err = TestReadsTheMaxLevelAttribute_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : sends a Move to level command\n"); - err = TestSendsAMoveToLevelCommand_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : sends a Move to level command\n"); + err = TestSendsAMoveToLevelCommand_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 100ms\n"); - err = TestWait100ms_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 100ms\n"); + err = TestWait100ms_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : reads CurrentLevel attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : reads CurrentLevel attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : sends a Move to level command\n"); - err = TestSendsAMoveToLevelCommand_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : sends a Move to level command\n"); + err = TestSendsAMoveToLevelCommand_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 200ms\n"); - err = TestWait200ms_8(); - break; + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 200ms\n"); + err = TestWait200ms_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : reads CurrentLevel attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_9(); - break; + ChipLogProgress(chipTool, " ***** Test Step 9 : reads CurrentLevel attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_9(); + break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : reads On Off Transition Time attribute from DUT\n"); - err = TestReadsOnOffTransitionTimeAttributeFromDut_10(); - break; + ChipLogProgress(chipTool, " ***** Test Step 10 : reads On Off Transition Time attribute from DUT\n"); + err = TestReadsOnOffTransitionTimeAttributeFromDut_10(); + break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : sends a Move to level command\n"); - err = TestSendsAMoveToLevelCommand_11(); - break; + ChipLogProgress(chipTool, " ***** Test Step 11 : sends a Move to level command\n"); + err = TestSendsAMoveToLevelCommand_11(); + break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 10ms\n"); - err = TestWait10ms_12(); - break; + ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 10ms\n"); + err = TestWait10ms_12(); + break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : reads CurrentLevel attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_13(); - break; + ChipLogProgress(chipTool, " ***** Test Step 13 : reads CurrentLevel attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_13(); + break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Reset level to 254\n"); - err = TestResetLevelTo254_14(); - break; + ChipLogProgress(chipTool, " ***** Test Step 14 : Reset level to 254\n"); + err = TestResetLevelTo254_14(); + break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 100ms\n"); - err = TestWait100ms_15(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 100ms\n"); + err = TestWait100ms_15(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 16; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint8_t currentLevel) + static void OnSuccessCallback_1(void * context, uint8_t currentLevel) { (static_cast(context))->OnSuccessResponse_1(currentLevel); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint8_t minLevel) + static void OnSuccessCallback_2(void * context, uint8_t minLevel) { (static_cast(context))->OnSuccessResponse_2(minLevel); } - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, uint8_t maxLevel) + static void OnSuccessCallback_3(void * context, uint8_t maxLevel) { (static_cast(context))->OnSuccessResponse_3(maxLevel); } - - - static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, uint8_t currentLevel) + static void OnSuccessCallback_6(void * context, uint8_t currentLevel) { (static_cast(context))->OnSuccessResponse_6(currentLevel); } - - - static void OnFailureCallback_9(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_9(status); } - static void OnSuccessCallback_9(void * context, uint8_t currentLevel) + static void OnSuccessCallback_9(void * context, uint8_t currentLevel) { (static_cast(context))->OnSuccessResponse_9(currentLevel); } - - - static void OnFailureCallback_10(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_10(status); } - static void OnSuccessCallback_10(void * context, uint16_t onOffTransitionTime) + static void OnSuccessCallback_10(void * context, uint16_t onOffTransitionTime) { (static_cast(context))->OnSuccessResponse_10(onOffTransitionTime); } - - - static void OnFailureCallback_13(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_13(status); } - static void OnSuccessCallback_13(void * context, uint8_t currentLevel) + static void OnSuccessCallback_13(void * context, uint8_t currentLevel) { (static_cast(context))->OnSuccessResponse_13(currentLevel); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint8_t currentLevel) + void OnSuccessResponse_1(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel,254 - )); + VerifyOrReturn(CheckValue("currentLevel", currentLevel, 254)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsTheMinLevelAttribute_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint8_t minLevel) + void OnSuccessResponse_2(uint8_t minLevel) { - VerifyOrReturn(CheckValue("minLevel", minLevel,0 - )); + VerifyOrReturn(CheckValue("minLevel", minLevel, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsTheMaxLevelAttribute_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( uint8_t maxLevel) + void OnSuccessResponse_3(uint8_t maxLevel) { - VerifyOrReturn(CheckValue("maxLevel", maxLevel,254 - )); + VerifyOrReturn(CheckValue("maxLevel", maxLevel, 254)); NextTest(); - } - - - + } - CHIP_ERROR TestSendsAMoveToLevelCommand_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; + using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; RequestType request; - request.level = 64; - request.transitionTime = 0U; - request.optionMask = 1; - request.optionOverride = 1; - + request.level = 64; + request.transitionTime = 0U; + request.optionMask = 1; + request.optionOverride = 1; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_4(); }; @@ -24851,71 +18961,51 @@ class Test_TC_LVL_3_1: public TestCommand (static_cast(context))->OnFailureResponse_4(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_4() - { NextTest(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_4() { NextTest(); } - CHIP_ERROR TestWait100ms_5() { SetIdentity(kIdentityAlpha); return WaitForMs(100); } - - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( uint8_t currentLevel) + void OnSuccessResponse_6(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel,64 - )); + VerifyOrReturn(CheckValue("currentLevel", currentLevel, 64)); NextTest(); - } - - - + } - CHIP_ERROR TestSendsAMoveToLevelCommand_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; + using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; RequestType request; - request.level = 128; - request.transitionTime = 1U; - request.optionMask = 1; - request.optionOverride = 1; - + request.level = 128; + request.transitionTime = 1U; + request.optionMask = 1; + request.optionOverride = 1; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_7(); }; @@ -24924,99 +19014,71 @@ class Test_TC_LVL_3_1: public TestCommand (static_cast(context))->OnFailureResponse_7(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7() - { NextTest(); - } + void OnSuccessResponse_7() { NextTest(); } - - CHIP_ERROR TestWait200ms_8() { SetIdentity(kIdentityAlpha); return WaitForMs(200); } - - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_9, OnFailureCallback_9)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_9, OnFailureCallback_9)); + return CHIP_NO_ERROR; } - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_9( uint8_t currentLevel) + void OnSuccessResponse_9(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel,128 - )); + VerifyOrReturn(CheckValue("currentLevel", currentLevel, 128)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsOnOffTransitionTimeAttributeFromDut_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_10, OnFailureCallback_10)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_10, OnFailureCallback_10)); + return CHIP_NO_ERROR; } - void OnFailureResponse_10(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_10( uint16_t onOffTransitionTime) + void OnSuccessResponse_10(uint16_t onOffTransitionTime) { - VerifyOrReturn(CheckValue("onOffTransitionTime", onOffTransitionTime,0U - )); + VerifyOrReturn(CheckValue("onOffTransitionTime", onOffTransitionTime, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestSendsAMoveToLevelCommand_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; + using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; RequestType request; - request.level = 254; - request.transitionTime = 65535U; - request.optionMask = 1; - request.optionOverride = 1; - + request.level = 254; + request.transitionTime = 65535U; + request.optionMask = 1; + request.optionOverride = 1; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_11(); }; @@ -25025,71 +19087,51 @@ class Test_TC_LVL_3_1: public TestCommand (static_cast(context))->OnFailureResponse_11(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_11(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_11() - { NextTest(); - } + void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_11() { NextTest(); } - CHIP_ERROR TestWait10ms_12() { SetIdentity(kIdentityAlpha); return WaitForMs(100); } - - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_13() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_13, OnFailureCallback_13)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_13, OnFailureCallback_13)); + return CHIP_NO_ERROR; } - void OnFailureResponse_13(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_13(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_13( uint8_t currentLevel) + void OnSuccessResponse_13(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel,254 - )); + VerifyOrReturn(CheckValue("currentLevel", currentLevel, 254)); NextTest(); - } - - - + } - CHIP_ERROR TestResetLevelTo254_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; + using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; RequestType request; - request.level = 254; - request.transitionTime = 0U; - request.optionMask = 1; - request.optionOverride = 1; - + request.level = 254; + request.transitionTime = 0U; + request.optionMask = 1; + request.optionOverride = 1; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_14(); }; @@ -25098,24 +19140,14 @@ class Test_TC_LVL_3_1: public TestCommand (static_cast(context))->OnFailureResponse_14(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_14(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_14() - { NextTest(); - } + void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_14() { NextTest(); } - CHIP_ERROR TestWait100ms_15() { SetIdentity(kIdentityAlpha); @@ -25123,336 +19155,264 @@ class Test_TC_LVL_3_1: public TestCommand } }; -class Test_TC_LVL_4_1: public TestCommand +class Test_TC_LVL_4_1 : public TestCommand { - public: - Test_TC_LVL_4_1(): TestCommand("Test_TC_LVL_4_1"), mTestIndex(0) +public: + Test_TC_LVL_4_1() : TestCommand("Test_TC_LVL_4_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_LVL_4_1() - { - } + ~Test_TC_LVL_4_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_4_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_4_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_4_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_4_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : reads CurrentLevel attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : reads CurrentLevel attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : reads max level attribute from DUT\n"); - err = TestReadsMaxLevelAttributeFromDut_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : reads max level attribute from DUT\n"); + err = TestReadsMaxLevelAttributeFromDut_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : sends a Move up command\n"); - err = TestSendsAMoveUpCommand_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : sends a Move up command\n"); + err = TestSendsAMoveUpCommand_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Wait 3000ms\n"); - err = TestWait3000ms_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Wait 3000ms\n"); + err = TestWait3000ms_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : reads CurrentLevel attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : reads CurrentLevel attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : reads min level attribute from DUT\n"); - err = TestReadsMinLevelAttributeFromDut_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : reads min level attribute from DUT\n"); + err = TestReadsMinLevelAttributeFromDut_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : sends a Move down command\n"); - err = TestSendsAMoveDownCommand_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : sends a Move down command\n"); + err = TestSendsAMoveDownCommand_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 3000ms\n"); - err = TestWait3000ms_8(); - break; + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 3000ms\n"); + err = TestWait3000ms_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : reads CurrentLevel attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_9(); - break; + ChipLogProgress(chipTool, " ***** Test Step 9 : reads CurrentLevel attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_9(); + break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Write default move rate attribute from DUT\n"); - err = TestWriteDefaultMoveRateAttributeFromDut_10(); - break; + ChipLogProgress(chipTool, " ***** Test Step 10 : Write default move rate attribute from DUT\n"); + err = TestWriteDefaultMoveRateAttributeFromDut_10(); + break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : reads default move rate attribute from DUT\n"); - err = TestReadsDefaultMoveRateAttributeFromDut_11(); - break; + ChipLogProgress(chipTool, " ***** Test Step 11 : reads default move rate attribute from DUT\n"); + err = TestReadsDefaultMoveRateAttributeFromDut_11(); + break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : sends a Move up command at default move rate\n"); - err = TestSendsAMoveUpCommandAtDefaultMoveRate_12(); - break; + ChipLogProgress(chipTool, " ***** Test Step 12 : sends a Move up command at default move rate\n"); + err = TestSendsAMoveUpCommandAtDefaultMoveRate_12(); + break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 100ms\n"); - err = TestWait100ms_13(); - break; + ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 100ms\n"); + err = TestWait100ms_13(); + break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : reads CurrentLevel attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_14(); - break; + ChipLogProgress(chipTool, " ***** Test Step 14 : reads CurrentLevel attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_14(); + break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Reset level to 254\n"); - err = TestResetLevelTo254_15(); - break; + ChipLogProgress(chipTool, " ***** Test Step 15 : Reset level to 254\n"); + err = TestResetLevelTo254_15(); + break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 100ms\n"); - err = TestWait100ms_16(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 100ms\n"); + err = TestWait100ms_16(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 17; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint8_t currentLevel) + static void OnSuccessCallback_1(void * context, uint8_t currentLevel) { (static_cast(context))->OnSuccessResponse_1(currentLevel); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint8_t maxLevel) + static void OnSuccessCallback_2(void * context, uint8_t maxLevel) { (static_cast(context))->OnSuccessResponse_2(maxLevel); } - - - static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context, uint8_t currentLevel) + static void OnSuccessCallback_5(void * context, uint8_t currentLevel) { (static_cast(context))->OnSuccessResponse_5(currentLevel); } - - - static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, uint8_t minLevel) + static void OnSuccessCallback_6(void * context, uint8_t minLevel) { (static_cast(context))->OnSuccessResponse_6(minLevel); } - - - static void OnFailureCallback_9(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_9(status); } - static void OnSuccessCallback_9(void * context, uint8_t currentLevel) + static void OnSuccessCallback_9(void * context, uint8_t currentLevel) { (static_cast(context))->OnSuccessResponse_9(currentLevel); } - - - static void OnFailureCallback_10(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_10(status); } - static void OnSuccessCallback_10(void * context) - { - (static_cast(context))->OnSuccessResponse_10(); - } - - - + static void OnSuccessCallback_10(void * context) { (static_cast(context))->OnSuccessResponse_10(); } static void OnFailureCallback_11(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_11(status); } - static void OnSuccessCallback_11(void * context, const chip::app::DataModel::Nullable & defaultMoveRate) + static void OnSuccessCallback_11(void * context, const chip::app::DataModel::Nullable & defaultMoveRate) { (static_cast(context))->OnSuccessResponse_11(defaultMoveRate); } - - - static void OnFailureCallback_14(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_14(status); } - static void OnSuccessCallback_14(void * context, uint8_t currentLevel) + static void OnSuccessCallback_14(void * context, uint8_t currentLevel) { (static_cast(context))->OnSuccessResponse_14(currentLevel); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint8_t currentLevel) + void OnSuccessResponse_1(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel,254 - )); + VerifyOrReturn(CheckValue("currentLevel", currentLevel, 254)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsMaxLevelAttributeFromDut_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint8_t maxLevel) + void OnSuccessResponse_2(uint8_t maxLevel) { - VerifyOrReturn(CheckValue("maxLevel", maxLevel,254 - )); + VerifyOrReturn(CheckValue("maxLevel", maxLevel, 254)); NextTest(); - } - - - + } - CHIP_ERROR TestSendsAMoveUpCommand_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::LevelControl::Commands::Move::Type; + using RequestType = chip::app::Clusters::LevelControl::Commands::Move::Type; RequestType request; - request.moveMode =static_cast(0); - request.rate = 200; - request.optionMask = 1; - request.optionOverride = 1; - + request.moveMode = static_cast(0); + request.rate = 200; + request.optionMask = 1; + request.optionOverride = 1; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(); }; @@ -25461,99 +19421,71 @@ class Test_TC_LVL_4_1: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_3() - { NextTest(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_3() { NextTest(); } - CHIP_ERROR TestWait3000ms_4() { SetIdentity(kIdentityAlpha); return WaitForMs(3000); } - - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5( uint8_t currentLevel) + void OnSuccessResponse_5(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel,254 - )); + VerifyOrReturn(CheckValue("currentLevel", currentLevel, 254)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsMinLevelAttributeFromDut_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( uint8_t minLevel) + void OnSuccessResponse_6(uint8_t minLevel) { - VerifyOrReturn(CheckValue("minLevel", minLevel,0 - )); + VerifyOrReturn(CheckValue("minLevel", minLevel, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestSendsAMoveDownCommand_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::LevelControl::Commands::Move::Type; + using RequestType = chip::app::Clusters::LevelControl::Commands::Move::Type; RequestType request; - request.moveMode =static_cast(1); - request.rate = 250; - request.optionMask = 1; - request.optionOverride = 1; - + request.moveMode = static_cast(1); + request.rate = 250; + request.optionMask = 1; + request.optionOverride = 1; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_7(); }; @@ -25562,58 +19494,40 @@ class Test_TC_LVL_4_1: public TestCommand (static_cast(context))->OnFailureResponse_7(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_7() - { NextTest(); - } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_7() { NextTest(); } - CHIP_ERROR TestWait3000ms_8() { SetIdentity(kIdentityAlpha); return WaitForMs(3000); } - - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_9, OnFailureCallback_9)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_9, OnFailureCallback_9)); + return CHIP_NO_ERROR; } - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_9( uint8_t currentLevel) + void OnSuccessResponse_9(uint8_t currentLevel) { - VerifyOrReturn(CheckConstraintMinValue("currentLevel", currentLevel, 0));VerifyOrReturn(CheckConstraintMaxValue("currentLevel", currentLevel, 1)); + VerifyOrReturn(CheckConstraintMinValue("currentLevel", currentLevel, 0)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", currentLevel, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteDefaultMoveRateAttributeFromDut_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -25621,66 +19535,50 @@ class Test_TC_LVL_4_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable defaultMoveRateArgument; - defaultMoveRateArgument.SetNonNull(); - defaultMoveRateArgument.Value() = 20; - - ReturnErrorOnFailure(cluster.WriteAttribute(defaultMoveRateArgument, this, OnSuccessCallback_10, OnFailureCallback_10)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_10(EmberAfStatus status) - { - ThrowFailureResponse(); - } + defaultMoveRateArgument.SetNonNull(); + defaultMoveRateArgument.Value() = 20; - void OnSuccessResponse_10() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + defaultMoveRateArgument, this, OnSuccessCallback_10, OnFailureCallback_10)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_10() { NextTest(); } - CHIP_ERROR TestReadsDefaultMoveRateAttributeFromDut_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_11, OnFailureCallback_11)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_11, OnFailureCallback_11)); + return CHIP_NO_ERROR; } - void OnFailureResponse_11(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_11( const chip::app::DataModel::Nullable & defaultMoveRate) + void OnSuccessResponse_11(const chip::app::DataModel::Nullable & defaultMoveRate) { - VerifyOrReturn(CheckValueNonNull("defaultMoveRate", defaultMoveRate)); - VerifyOrReturn(CheckValue("defaultMoveRate.Value()", defaultMoveRate.Value(),20 - )); + VerifyOrReturn(CheckValueNonNull("defaultMoveRate", defaultMoveRate)); + VerifyOrReturn(CheckValue("defaultMoveRate.Value()", defaultMoveRate.Value(), 20)); NextTest(); - } - - - + } - CHIP_ERROR TestSendsAMoveUpCommandAtDefaultMoveRate_12() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::LevelControl::Commands::Move::Type; + using RequestType = chip::app::Clusters::LevelControl::Commands::Move::Type; RequestType request; - request.moveMode =static_cast(0); - request.rate = 255; - request.optionMask = 1; - request.optionOverride = 1; - + request.moveMode = static_cast(0); + request.rate = 255; + request.optionMask = 1; + request.optionOverride = 1; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_12(); }; @@ -25689,70 +19587,51 @@ class Test_TC_LVL_4_1: public TestCommand (static_cast(context))->OnFailureResponse_12(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_12(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_12() - { NextTest(); - } + void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_12() { NextTest(); } - CHIP_ERROR TestWait100ms_13() { SetIdentity(kIdentityAlpha); return WaitForMs(100); } - - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_14, OnFailureCallback_14)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_14, OnFailureCallback_14)); + return CHIP_NO_ERROR; } - void OnFailureResponse_14(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_14( uint8_t currentLevel) + void OnSuccessResponse_14(uint8_t currentLevel) { - VerifyOrReturn(CheckConstraintNotValue("currentLevel", currentLevel, 255)); + VerifyOrReturn(CheckConstraintNotValue("currentLevel", currentLevel, 255)); NextTest(); - } - - - + } - CHIP_ERROR TestResetLevelTo254_15() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; + using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; RequestType request; - request.level = 254; - request.transitionTime = 0U; - request.optionMask = 1; - request.optionOverride = 1; - + request.level = 254; + request.transitionTime = 0U; + request.optionMask = 1; + request.optionOverride = 1; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_15(); }; @@ -25761,24 +19640,14 @@ class Test_TC_LVL_4_1: public TestCommand (static_cast(context))->OnFailureResponse_15(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_15(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_15() - { NextTest(); - } + void OnFailureResponse_15(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_15() { NextTest(); } - CHIP_ERROR TestWait100ms_16() { SetIdentity(kIdentityAlpha); @@ -25786,196 +19655,158 @@ class Test_TC_LVL_4_1: public TestCommand } }; -class Test_TC_LVL_5_1: public TestCommand +class Test_TC_LVL_5_1 : public TestCommand { - public: - Test_TC_LVL_5_1(): TestCommand("Test_TC_LVL_5_1"), mTestIndex(0) +public: + Test_TC_LVL_5_1() : TestCommand("Test_TC_LVL_5_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_LVL_5_1() - { - } + ~Test_TC_LVL_5_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_5_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_5_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_5_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_5_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Sending on command\n"); - err = TestSendingOnCommand_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Sending on command\n"); + err = TestSendingOnCommand_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Precondition: DUT level is set to 0x80\n"); - err = TestPreconditionDutLevelIsSetTo0x80_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Precondition: DUT level is set to 0x80\n"); + err = TestPreconditionDutLevelIsSetTo0x80_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Wait 3000ms\n"); - err = TestWait3000ms_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Wait 3000ms\n"); + err = TestWait3000ms_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads current level attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads current level attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Sends step down command to DUT\n"); - err = TestSendsStepDownCommandToDut_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Sends step down command to DUT\n"); + err = TestSendsStepDownCommandToDut_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 3000ms\n"); - err = TestWait3000ms_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 3000ms\n"); + err = TestWait3000ms_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads current level attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : Reads current level attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Sends a Step up command\n"); - err = TestSendsAStepUpCommand_8(); - break; + ChipLogProgress(chipTool, " ***** Test Step 8 : Sends a Step up command\n"); + err = TestSendsAStepUpCommand_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 3000ms\n"); - err = TestWait3000ms_9(); - break; + ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 3000ms\n"); + err = TestWait3000ms_9(); + break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Reads current level attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_10(); - break; + ChipLogProgress(chipTool, " ***** Test Step 10 : Reads current level attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_10(); + break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Reset level to 254\n"); - err = TestResetLevelTo254_11(); - break; + ChipLogProgress(chipTool, " ***** Test Step 11 : Reset level to 254\n"); + err = TestResetLevelTo254_11(); + break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 100ms\n"); - err = TestWait100ms_12(); - break; + ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 100ms\n"); + err = TestWait100ms_12(); + break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Sending off command\n"); - err = TestSendingOffCommand_13(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 13 : Sending off command\n"); + err = TestSendingOffCommand_13(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 14; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, uint8_t currentLevel) + static void OnSuccessCallback_4(void * context, uint8_t currentLevel) { (static_cast(context))->OnSuccessResponse_4(currentLevel); } - - - static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context, uint8_t currentLevel) + static void OnSuccessCallback_7(void * context, uint8_t currentLevel) { (static_cast(context))->OnSuccessResponse_7(currentLevel); } - - - static void OnFailureCallback_10(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_10(status); } - static void OnSuccessCallback_10(void * context, uint8_t currentLevel) + static void OnSuccessCallback_10(void * context, uint8_t currentLevel) { (static_cast(context))->OnSuccessResponse_10(currentLevel); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestSendingOnCommand_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -25987,38 +19818,26 @@ class Test_TC_LVL_5_1: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_1() - { NextTest(); - } - + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestPreconditionDutLevelIsSetTo0x80_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::LevelControl::Commands::Step::Type; + using RequestType = chip::app::Clusters::LevelControl::Commands::Step::Type; RequestType request; - request.stepMode =static_cast(1); - request.stepSize = 126; - request.transitionTime = 20U; - request.optionMask = 0; - request.optionOverride = 0; - + request.stepMode = static_cast(1); + request.stepSize = 126; + request.transitionTime = 20U; + request.optionMask = 0; + request.optionOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_2(); }; @@ -26027,72 +19846,52 @@ class Test_TC_LVL_5_1: public TestCommand (static_cast(context))->OnFailureResponse_2(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_2() - { NextTest(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_2() { NextTest(); } - CHIP_ERROR TestWait3000ms_3() { SetIdentity(kIdentityAlpha); return WaitForMs(3000); } - - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( uint8_t currentLevel) + void OnSuccessResponse_4(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel,128 - )); + VerifyOrReturn(CheckValue("currentLevel", currentLevel, 128)); NextTest(); - } - - - + } - CHIP_ERROR TestSendsStepDownCommandToDut_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::LevelControl::Commands::Step::Type; + using RequestType = chip::app::Clusters::LevelControl::Commands::Step::Type; RequestType request; - request.stepMode =static_cast(1); - request.stepSize = 64; - request.transitionTime = 20U; - request.optionMask = 0; - request.optionOverride = 0; - + request.stepMode = static_cast(1); + request.stepSize = 64; + request.transitionTime = 20U; + request.optionMask = 0; + request.optionOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_5(); }; @@ -26101,72 +19900,52 @@ class Test_TC_LVL_5_1: public TestCommand (static_cast(context))->OnFailureResponse_5(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_5() - { NextTest(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_5() { NextTest(); } - CHIP_ERROR TestWait3000ms_6() { SetIdentity(kIdentityAlpha); return WaitForMs(3000); } - - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_7, OnFailureCallback_7)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7( uint8_t currentLevel) + void OnSuccessResponse_7(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel,64 - )); + VerifyOrReturn(CheckValue("currentLevel", currentLevel, 64)); NextTest(); - } - - - + } - CHIP_ERROR TestSendsAStepUpCommand_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::LevelControl::Commands::Step::Type; + using RequestType = chip::app::Clusters::LevelControl::Commands::Step::Type; RequestType request; - request.stepMode =static_cast(0); - request.stepSize = 64; - request.transitionTime = 20U; - request.optionMask = 0; - request.optionOverride = 0; - + request.stepMode = static_cast(0); + request.stepSize = 64; + request.transitionTime = 20U; + request.optionMask = 0; + request.optionOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_8(); }; @@ -26175,71 +19954,51 @@ class Test_TC_LVL_5_1: public TestCommand (static_cast(context))->OnFailureResponse_8(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_8(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_8() - { NextTest(); - } + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_8() { NextTest(); } - CHIP_ERROR TestWait3000ms_9() { SetIdentity(kIdentityAlpha); return WaitForMs(3000); } - - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_10, OnFailureCallback_10)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_10, OnFailureCallback_10)); + return CHIP_NO_ERROR; } - void OnFailureResponse_10(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_10( uint8_t currentLevel) + void OnSuccessResponse_10(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel,128 - )); + VerifyOrReturn(CheckValue("currentLevel", currentLevel, 128)); NextTest(); - } - - - + } - CHIP_ERROR TestResetLevelTo254_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; + using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; RequestType request; - request.level = 254; - request.transitionTime = 0U; - request.optionMask = 1; - request.optionOverride = 1; - + request.level = 254; + request.transitionTime = 0U; + request.optionMask = 1; + request.optionOverride = 1; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_11(); }; @@ -26248,36 +20007,24 @@ class Test_TC_LVL_5_1: public TestCommand (static_cast(context))->OnFailureResponse_11(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_11(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_11() - { NextTest(); - } + void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_11() { NextTest(); } - CHIP_ERROR TestWait100ms_12() { SetIdentity(kIdentityAlpha); return WaitForMs(100); } - - CHIP_ERROR TestSendingOffCommand_13() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -26289,194 +20036,149 @@ class Test_TC_LVL_5_1: public TestCommand (static_cast(context))->OnFailureResponse_13(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_13(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_13() - { NextTest(); - } - + void OnFailureResponse_13(EmberAfStatus status) { ThrowFailureResponse(); } - }; + void OnSuccessResponse_13() { NextTest(); } +}; -class Test_TC_LVL_6_1: public TestCommand +class Test_TC_LVL_6_1 : public TestCommand { - public: - Test_TC_LVL_6_1(): TestCommand("Test_TC_LVL_6_1"), mTestIndex(0) +public: + Test_TC_LVL_6_1() : TestCommand("Test_TC_LVL_6_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_LVL_6_1() - { - } + ~Test_TC_LVL_6_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_6_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_6_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_6_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_6_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Sending on command\n"); - err = TestSendingOnCommand_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Sending on command\n"); + err = TestSendingOnCommand_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Precondition: set DUT to lowest point\n"); - err = TestPreconditionSetDutToLowestPoint_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Precondition: set DUT to lowest point\n"); + err = TestPreconditionSetDutToLowestPoint_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Wait 100ms\n"); - err = TestWait100ms_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Wait 100ms\n"); + err = TestWait100ms_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads CurrentLevel attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads CurrentLevel attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Sends a move up command to DUT\n"); - err = TestSendsAMoveUpCommandToDut_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Sends a move up command to DUT\n"); + err = TestSendsAMoveUpCommandToDut_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 2000ms\n"); - err = TestWait2000ms_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 2000ms\n"); + err = TestWait2000ms_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Sends stop command to DUT\n"); - err = TestSendsStopCommandToDut_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : Sends stop command to DUT\n"); + err = TestSendsStopCommandToDut_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Reads CurrentLevel attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_8(); - break; + ChipLogProgress(chipTool, " ***** Test Step 8 : Reads CurrentLevel attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Reset level to 254\n"); - err = TestResetLevelTo254_9(); - break; + ChipLogProgress(chipTool, " ***** Test Step 9 : Reset level to 254\n"); + err = TestResetLevelTo254_9(); + break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 100ms\n"); - err = TestWait100ms_10(); - break; + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 100ms\n"); + err = TestWait100ms_10(); + break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Sending off command\n"); - err = TestSendingOffCommand_11(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 11 : Sending off command\n"); + err = TestSendingOffCommand_11(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 12; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, uint8_t currentLevel) + static void OnSuccessCallback_4(void * context, uint8_t currentLevel) { (static_cast(context))->OnSuccessResponse_4(currentLevel); } - - - static void OnFailureCallback_8(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context, uint8_t currentLevel) + static void OnSuccessCallback_8(void * context, uint8_t currentLevel) { (static_cast(context))->OnSuccessResponse_8(currentLevel); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestSendingOnCommand_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -26488,37 +20190,25 @@ class Test_TC_LVL_6_1: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_1() - { NextTest(); - } - + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestPreconditionSetDutToLowestPoint_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; + using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; RequestType request; - request.level = 0; - request.transitionTime = 0U; - request.optionMask = 1; - request.optionOverride = 1; - + request.level = 0; + request.transitionTime = 0U; + request.optionMask = 1; + request.optionOverride = 1; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_2(); }; @@ -26527,69 +20217,51 @@ class Test_TC_LVL_6_1: public TestCommand (static_cast(context))->OnFailureResponse_2(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_2() - { NextTest(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_2() { NextTest(); } - CHIP_ERROR TestWait100ms_3() { SetIdentity(kIdentityAlpha); return WaitForMs(100); } - - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( uint8_t currentLevel) + void OnSuccessResponse_4(uint8_t currentLevel) { - VerifyOrReturn(CheckConstraintMinValue("currentLevel", currentLevel, 0));VerifyOrReturn(CheckConstraintMaxValue("currentLevel", currentLevel, 1)); + VerifyOrReturn(CheckConstraintMinValue("currentLevel", currentLevel, 0)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", currentLevel, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestSendsAMoveUpCommandToDut_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::LevelControl::Commands::Move::Type; + using RequestType = chip::app::Clusters::LevelControl::Commands::Move::Type; RequestType request; - request.moveMode =static_cast(0); - request.rate = 1; - request.optionMask = 1; - request.optionOverride = 1; - + request.moveMode = static_cast(0); + request.rate = 1; + request.optionMask = 1; + request.optionOverride = 1; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_5(); }; @@ -26598,41 +20270,29 @@ class Test_TC_LVL_6_1: public TestCommand (static_cast(context))->OnFailureResponse_5(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_5() - { NextTest(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_5() { NextTest(); } - CHIP_ERROR TestWait2000ms_6() { SetIdentity(kIdentityAlpha); return WaitForMs(2000); } - - CHIP_ERROR TestSendsStopCommandToDut_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::LevelControl::Commands::Stop::Type; + using RequestType = chip::app::Clusters::LevelControl::Commands::Stop::Type; RequestType request; - request.optionMask = 0; - request.optionOverride = 0; - + request.optionMask = 0; + request.optionOverride = 0; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_7(); }; @@ -26641,63 +20301,45 @@ class Test_TC_LVL_6_1: public TestCommand (static_cast(context))->OnFailureResponse_7(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_7() - { NextTest(); - } - + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_7() { NextTest(); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_8, OnFailureCallback_8)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_8, OnFailureCallback_8)); + return CHIP_NO_ERROR; } - void OnFailureResponse_8(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_8( uint8_t currentLevel) + void OnSuccessResponse_8(uint8_t currentLevel) { - VerifyOrReturn(CheckConstraintMinValue("currentLevel", currentLevel, 2));VerifyOrReturn(CheckConstraintMaxValue("currentLevel", currentLevel, 3)); + VerifyOrReturn(CheckConstraintMinValue("currentLevel", currentLevel, 2)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", currentLevel, 3)); NextTest(); - } - - - + } - CHIP_ERROR TestResetLevelTo254_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; + using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; RequestType request; - request.level = 254; - request.transitionTime = 0U; - request.optionMask = 1; - request.optionOverride = 1; - + request.level = 254; + request.transitionTime = 0U; + request.optionMask = 1; + request.optionOverride = 1; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_9(); }; @@ -26706,36 +20348,24 @@ class Test_TC_LVL_6_1: public TestCommand (static_cast(context))->OnFailureResponse_9(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_9() - { NextTest(); - } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_9() { NextTest(); } - CHIP_ERROR TestWait100ms_10() { SetIdentity(kIdentityAlpha); return WaitForMs(100); } - - CHIP_ERROR TestSendingOffCommand_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -26747,180 +20377,126 @@ class Test_TC_LVL_6_1: public TestCommand (static_cast(context))->OnFailureResponse_11(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_11(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_11() - { NextTest(); - } - + void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } - }; + void OnSuccessResponse_11() { NextTest(); } +}; -class Test_TC_MC_1_1: public TestCommand +class Test_TC_MC_1_1 : public TestCommand { - public: - Test_TC_MC_1_1(): TestCommand("Test_TC_MC_1_1"), mTestIndex(0) +public: + Test_TC_MC_1_1() : TestCommand("Test_TC_MC_1_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_MC_1_1() - { - } + ~Test_TC_MC_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_1_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_1_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2(); - break; - } + ChipLogProgress(chipTool, + " ***** Test Step 2 : write the default values to mandatory global attribute: ClusterRevision\n"); + err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_1(clusterRevision); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context) - { - (static_cast(context))->OnSuccessResponse_2(); - } - - - + static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::MediaInputClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint16_t clusterRevision) + void OnSuccessResponse_1(uint16_t clusterRevision) { - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -26928,128 +20504,96 @@ class Test_TC_MC_1_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t clusterRevisionArgument; - clusterRevisionArgument = 1U; - - ReturnErrorOnFailure(cluster.WriteAttribute(clusterRevisionArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + clusterRevisionArgument = 1U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + clusterRevisionArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_2() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_2() { ThrowSuccessResponse(); } +}; - }; - -class Test_TC_MC_2_1: public TestCommand +class Test_TC_MC_2_1 : public TestCommand { - public: - Test_TC_MC_2_1(): TestCommand("Test_TC_MC_2_1"), mTestIndex(0) +public: + Test_TC_MC_2_1() : TestCommand("Test_TC_MC_2_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_MC_2_1() - { - } + ~Test_TC_MC_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_2_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_2_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Put the device into low power mode\n"); - err = TestPutTheDeviceIntoLowPowerMode_1(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 1 : Put the device into low power mode\n"); + err = TestPutTheDeviceIntoLowPowerMode_1(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 2; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestPutTheDeviceIntoLowPowerMode_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::LowPower::Commands::Sleep::Type; + using RequestType = chip::app::Clusters::LowPower::Commands::Sleep::Type; RequestType request; @@ -27061,112 +20605,75 @@ class Test_TC_MC_2_1: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_1() - { NextTest(); - } - + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - }; + void OnSuccessResponse_1() { NextTest(); } +}; -class Test_TC_MC_3_1: public TestCommand +class Test_TC_MC_3_1 : public TestCommand { - public: - Test_TC_MC_3_1(): TestCommand("Test_TC_MC_3_1"), mTestIndex(0) +public: + Test_TC_MC_3_1() : TestCommand("Test_TC_MC_3_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_MC_3_1() - { - } + ~Test_TC_MC_3_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 1; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); @@ -27174,93 +20681,66 @@ class Test_TC_MC_3_1: public TestCommand } }; -class Test_TC_MC_3_2: public TestCommand +class Test_TC_MC_3_2 : public TestCommand { - public: - Test_TC_MC_3_2(): TestCommand("Test_TC_MC_3_2"), mTestIndex(0) +public: + Test_TC_MC_3_2() : TestCommand("Test_TC_MC_3_2"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_MC_3_2() - { - } + ~Test_TC_MC_3_2() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_2\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_2\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 1; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); @@ -27268,93 +20748,66 @@ class Test_TC_MC_3_2: public TestCommand } }; -class Test_TC_MC_3_3: public TestCommand +class Test_TC_MC_3_3 : public TestCommand { - public: - Test_TC_MC_3_3(): TestCommand("Test_TC_MC_3_3"), mTestIndex(0) +public: + Test_TC_MC_3_3() : TestCommand("Test_TC_MC_3_3"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_MC_3_3() - { - } + ~Test_TC_MC_3_3() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_3\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_3\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_3\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_3\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 1; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); @@ -27362,93 +20815,66 @@ class Test_TC_MC_3_3: public TestCommand } }; -class Test_TC_MC_3_4: public TestCommand +class Test_TC_MC_3_4 : public TestCommand { - public: - Test_TC_MC_3_4(): TestCommand("Test_TC_MC_3_4"), mTestIndex(0) +public: + Test_TC_MC_3_4() : TestCommand("Test_TC_MC_3_4"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_MC_3_4() - { - } + ~Test_TC_MC_3_4() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_4\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_4\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_4\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_4\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 1; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); @@ -27456,93 +20882,66 @@ class Test_TC_MC_3_4: public TestCommand } }; -class Test_TC_MC_3_5: public TestCommand +class Test_TC_MC_3_5 : public TestCommand { - public: - Test_TC_MC_3_5(): TestCommand("Test_TC_MC_3_5"), mTestIndex(0) +public: + Test_TC_MC_3_5() : TestCommand("Test_TC_MC_3_5"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_MC_3_5() - { - } + ~Test_TC_MC_3_5() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_5\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_5\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_5\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_5\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 1; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); @@ -27550,93 +20949,66 @@ class Test_TC_MC_3_5: public TestCommand } }; -class Test_TC_MC_3_6: public TestCommand +class Test_TC_MC_3_6 : public TestCommand { - public: - Test_TC_MC_3_6(): TestCommand("Test_TC_MC_3_6"), mTestIndex(0) +public: + Test_TC_MC_3_6() : TestCommand("Test_TC_MC_3_6"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_MC_3_6() - { - } + ~Test_TC_MC_3_6() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_6\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_6\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_6\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_6\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 1; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); @@ -27644,93 +21016,66 @@ class Test_TC_MC_3_6: public TestCommand } }; -class Test_TC_MC_3_7: public TestCommand +class Test_TC_MC_3_7 : public TestCommand { - public: - Test_TC_MC_3_7(): TestCommand("Test_TC_MC_3_7"), mTestIndex(0) +public: + Test_TC_MC_3_7() : TestCommand("Test_TC_MC_3_7"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_MC_3_7() - { - } + ~Test_TC_MC_3_7() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_7\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_7\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_7\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_7\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 1; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); @@ -27738,93 +21083,66 @@ class Test_TC_MC_3_7: public TestCommand } }; -class Test_TC_MC_3_8: public TestCommand +class Test_TC_MC_3_8 : public TestCommand { - public: - Test_TC_MC_3_8(): TestCommand("Test_TC_MC_3_8"), mTestIndex(0) +public: + Test_TC_MC_3_8() : TestCommand("Test_TC_MC_3_8"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_MC_3_8() - { - } + ~Test_TC_MC_3_8() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_8\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_8\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_8\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_8\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 1; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); @@ -27832,93 +21150,66 @@ class Test_TC_MC_3_8: public TestCommand } }; -class Test_TC_MC_3_9: public TestCommand +class Test_TC_MC_3_9 : public TestCommand { - public: - Test_TC_MC_3_9(): TestCommand("Test_TC_MC_3_9"), mTestIndex(0) +public: + Test_TC_MC_3_9() : TestCommand("Test_TC_MC_3_9"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_MC_3_9() - { - } + ~Test_TC_MC_3_9() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_9\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_9\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_9\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_9\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 1; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); @@ -27926,93 +21217,66 @@ class Test_TC_MC_3_9: public TestCommand } }; -class Test_TC_MC_3_10: public TestCommand +class Test_TC_MC_3_10 : public TestCommand { - public: - Test_TC_MC_3_10(): TestCommand("Test_TC_MC_3_10"), mTestIndex(0) +public: + Test_TC_MC_3_10() : TestCommand("Test_TC_MC_3_10"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_MC_3_10() - { - } + ~Test_TC_MC_3_10() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_10\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_10\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_10\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_10\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 1; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); @@ -28020,93 +21284,66 @@ class Test_TC_MC_3_10: public TestCommand } }; -class Test_TC_MC_3_11: public TestCommand +class Test_TC_MC_3_11 : public TestCommand { - public: - Test_TC_MC_3_11(): TestCommand("Test_TC_MC_3_11"), mTestIndex(0) +public: + Test_TC_MC_3_11() : TestCommand("Test_TC_MC_3_11"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_MC_3_11() - { - } + ~Test_TC_MC_3_11() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_11\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_11\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_11\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_11\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 1; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); @@ -28114,240 +21351,179 @@ class Test_TC_MC_3_11: public TestCommand } }; -class Test_TC_MC_5_1: public TestCommand +class Test_TC_MC_5_1 : public TestCommand { - public: - Test_TC_MC_5_1(): TestCommand("Test_TC_MC_5_1"), mTestIndex(0) +public: + Test_TC_MC_5_1() : TestCommand("Test_TC_MC_5_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_MC_5_1() - { - } + ~Test_TC_MC_5_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_5_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_5_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_5_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_5_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the ChannelList attribute from the DUT\n"); - err = TestReadsTheChannelListAttributeFromTheDut_1(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the ChannelList attribute from the DUT\n"); + err = TestReadsTheChannelListAttributeFromTheDut_1(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 2; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, const chip::app::DataModel::DecodableList & channelList) + static void OnSuccessCallback_1( + void * context, + const chip::app::DataModel::DecodableList & channelList) { (static_cast(context))->OnSuccessResponse_1(channelList); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadsTheChannelListAttributeFromTheDut_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ChannelClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( const chip::app::DataModel::DecodableList & channelList) + void OnSuccessResponse_1( + const chip::app::DataModel::DecodableList & channelList) { - VerifyOrReturn(CheckConstraintType("channelList", "", "list")); + VerifyOrReturn(CheckConstraintType("channelList", "", "list")); NextTest(); - } - - - }; + } +}; -class Test_TC_MC_5_2: public TestCommand +class Test_TC_MC_5_2 : public TestCommand { - public: - Test_TC_MC_5_2(): TestCommand("Test_TC_MC_5_2"), mTestIndex(0) +public: + Test_TC_MC_5_2() : TestCommand("Test_TC_MC_5_2"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_MC_5_2() - { - } + ~Test_TC_MC_5_2() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_5_2\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_5_2\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_5_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_5_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : log a command\n"); - err = TestLogACommand_1(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 1 : log a command\n"); + err = TestLogACommand_1(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 2; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - + CHIP_ERROR TestLogACommand_1() { SetIdentity(kIdentityAlpha); @@ -28355,103 +21531,76 @@ class Test_TC_MC_5_2: public TestCommand } }; -class Test_TC_MC_5_3: public TestCommand +class Test_TC_MC_5_3 : public TestCommand { - public: - Test_TC_MC_5_3(): TestCommand("Test_TC_MC_5_3"), mTestIndex(0) +public: + Test_TC_MC_5_3() : TestCommand("Test_TC_MC_5_3"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_MC_5_3() - { - } + ~Test_TC_MC_5_3() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_5_3\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_5_3\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_5_3\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_5_3\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : log a command\n"); - err = TestLogACommand_1(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 1 : log a command\n"); + err = TestLogACommand_1(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 2; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - + CHIP_ERROR TestLogACommand_1() { SetIdentity(kIdentityAlpha); @@ -28459,178 +21608,140 @@ class Test_TC_MC_5_3: public TestCommand } }; -class Test_TC_MC_6_1: public TestCommand +class Test_TC_MC_6_1 : public TestCommand { - public: - Test_TC_MC_6_1(): TestCommand("Test_TC_MC_6_1"), mTestIndex(0) +public: + Test_TC_MC_6_1() : TestCommand("Test_TC_MC_6_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_MC_6_1() - { - } + ~Test_TC_MC_6_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_6_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_6_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_6_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_6_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : log a command\n"); - err = TestLogACommand_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : log a command\n"); + err = TestLogACommand_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : log a command\n"); - err = TestLogACommand_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : log a command\n"); + err = TestLogACommand_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the playback state attribute\n"); - err = TestReadsThePlaybackStateAttribute_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the playback state attribute\n"); + err = TestReadsThePlaybackStateAttribute_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : log a command\n"); - err = TestLogACommand_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : log a command\n"); + err = TestLogACommand_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : log a command\n"); - err = TestLogACommand_5(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 5 : log a command\n"); + err = TestLogACommand_5(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 6; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, chip::app::Clusters::MediaPlayback::PlaybackStateEnum playbackState) + static void OnSuccessCallback_3(void * context, chip::app::Clusters::MediaPlayback::PlaybackStateEnum playbackState) { (static_cast(context))->OnSuccessResponse_3(playbackState); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - + CHIP_ERROR TestLogACommand_1() { SetIdentity(kIdentityAlpha); return UserPrompt("Verify that media is paused"); } - + CHIP_ERROR TestLogACommand_2() { SetIdentity(kIdentityAlpha); return UserPrompt("Physically verify that the media is playing"); } - - CHIP_ERROR TestReadsThePlaybackStateAttribute_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::MediaPlaybackClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( chip::app::Clusters::MediaPlayback::PlaybackStateEnum playbackState) + void OnSuccessResponse_3(chip::app::Clusters::MediaPlayback::PlaybackStateEnum playbackState) { - VerifyOrReturn(CheckValue("playbackState", playbackState,0 - )); + VerifyOrReturn(CheckValue("playbackState", playbackState, 0)); NextTest(); - } - + } - CHIP_ERROR TestLogACommand_4() { SetIdentity(kIdentityAlpha); return UserPrompt("Physically verify that the media is paused"); } - + CHIP_ERROR TestLogACommand_5() { SetIdentity(kIdentityAlpha); @@ -28638,208 +21749,170 @@ class Test_TC_MC_6_1: public TestCommand } }; -class Test_TC_MC_6_2: public TestCommand +class Test_TC_MC_6_2 : public TestCommand { - public: - Test_TC_MC_6_2(): TestCommand("Test_TC_MC_6_2"), mTestIndex(0) +public: + Test_TC_MC_6_2() : TestCommand("Test_TC_MC_6_2"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_MC_6_2() - { - } + ~Test_TC_MC_6_2() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_6_2\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_6_2\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_6_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_6_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : log a command\n"); - err = TestLogACommand_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : log a command\n"); + err = TestLogACommand_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : log a command\n"); - err = TestLogACommand_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : log a command\n"); + err = TestLogACommand_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the CurrentState attribute\n"); - err = TestReadsTheCurrentStateAttribute_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the CurrentState attribute\n"); + err = TestReadsTheCurrentStateAttribute_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : log a command\n"); - err = TestLogACommand_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : log a command\n"); + err = TestLogACommand_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : log a command\n"); - err = TestLogACommand_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : log a command\n"); + err = TestLogACommand_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : log a command\n"); - err = TestLogACommand_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : log a command\n"); + err = TestLogACommand_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : log a command\n"); - err = TestLogACommand_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : log a command\n"); + err = TestLogACommand_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : log a command\n"); - err = TestLogACommand_8(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 8 : log a command\n"); + err = TestLogACommand_8(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 9; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, chip::app::Clusters::MediaPlayback::PlaybackStateEnum playbackState) + static void OnSuccessCallback_3(void * context, chip::app::Clusters::MediaPlayback::PlaybackStateEnum playbackState) { (static_cast(context))->OnSuccessResponse_3(playbackState); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - + CHIP_ERROR TestLogACommand_1() { SetIdentity(kIdentityAlpha); return UserPrompt("Verify that media is paused"); } - + CHIP_ERROR TestLogACommand_2() { SetIdentity(kIdentityAlpha); return UserPrompt("Physically verify that the media is playing"); } - - CHIP_ERROR TestReadsTheCurrentStateAttribute_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::MediaPlaybackClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( chip::app::Clusters::MediaPlayback::PlaybackStateEnum playbackState) + void OnSuccessResponse_3(chip::app::Clusters::MediaPlayback::PlaybackStateEnum playbackState) { - VerifyOrReturn(CheckValue("playbackState", playbackState,0 - )); + VerifyOrReturn(CheckValue("playbackState", playbackState, 0)); NextTest(); - } - + } - CHIP_ERROR TestLogACommand_4() { SetIdentity(kIdentityAlpha); 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"); } - + CHIP_ERROR TestLogACommand_6() { SetIdentity(kIdentityAlpha); 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"); } - + CHIP_ERROR TestLogACommand_8() { SetIdentity(kIdentityAlpha); @@ -28847,123 +21920,96 @@ class Test_TC_MC_6_2: public TestCommand } }; -class Test_TC_MC_6_3: public TestCommand +class Test_TC_MC_6_3 : public TestCommand { - public: - Test_TC_MC_6_3(): TestCommand("Test_TC_MC_6_3"), mTestIndex(0) +public: + Test_TC_MC_6_3() : TestCommand("Test_TC_MC_6_3"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_MC_6_3() - { - } + ~Test_TC_MC_6_3() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_6_3\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_6_3\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_6_3\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_6_3\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : log a command\n"); - err = TestLogACommand_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : log a command\n"); + err = TestLogACommand_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : log a command\n"); - err = TestLogACommand_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : log a command\n"); + err = TestLogACommand_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : log a command\n"); - err = TestLogACommand_3(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 3 : log a command\n"); + err = TestLogACommand_3(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 4; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - + CHIP_ERROR TestLogACommand_1() { SetIdentity(kIdentityAlpha); 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."); } - + CHIP_ERROR TestLogACommand_3() { SetIdentity(kIdentityAlpha); @@ -28971,288 +22017,228 @@ class Test_TC_MC_6_3: public TestCommand } }; -class Test_TC_MC_6_4: public TestCommand +class Test_TC_MC_6_4 : public TestCommand { - public: - Test_TC_MC_6_4(): TestCommand("Test_TC_MC_6_4"), mTestIndex(0) +public: + Test_TC_MC_6_4() : TestCommand("Test_TC_MC_6_4"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_MC_6_4() - { - } + ~Test_TC_MC_6_4() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_6_4\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_6_4\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_6_4\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_6_4\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : log a command\n"); - err = TestLogACommand_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : log a command\n"); + err = TestLogACommand_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the PlaybackSpeed attribute from the DUT\n"); - err = TestReadsThePlaybackSpeedAttributeFromTheDut_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the PlaybackSpeed attribute from the DUT\n"); + err = TestReadsThePlaybackSpeedAttributeFromTheDut_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : log a command\n"); - err = TestLogACommand_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : log a command\n"); + err = TestLogACommand_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the CurrentState attribute\n"); - err = TestReadsTheCurrentStateAttribute_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the CurrentState attribute\n"); + err = TestReadsTheCurrentStateAttribute_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : log a command\n"); - err = TestLogACommand_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : log a command\n"); + err = TestLogACommand_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : log a command\n"); - err = TestLogACommand_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : log a command\n"); + err = TestLogACommand_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the CurrentState attribute\n"); - err = TestReadsTheCurrentStateAttribute_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the CurrentState attribute\n"); + err = TestReadsTheCurrentStateAttribute_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : log a command\n"); - err = TestLogACommand_8(); - break; + ChipLogProgress(chipTool, " ***** Test Step 8 : log a command\n"); + err = TestLogACommand_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : log a command\n"); - err = TestLogACommand_9(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 9 : log a command\n"); + err = TestLogACommand_9(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 10; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, float playbackSpeed) + static void OnSuccessCallback_2(void * context, float playbackSpeed) { (static_cast(context))->OnSuccessResponse_2(playbackSpeed); } - - - static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, chip::app::Clusters::MediaPlayback::PlaybackStateEnum playbackState) + static void OnSuccessCallback_4(void * context, chip::app::Clusters::MediaPlayback::PlaybackStateEnum playbackState) { (static_cast(context))->OnSuccessResponse_4(playbackState); } - - - static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context, chip::app::Clusters::MediaPlayback::PlaybackStateEnum playbackState) + static void OnSuccessCallback_7(void * context, chip::app::Clusters::MediaPlayback::PlaybackStateEnum playbackState) { (static_cast(context))->OnSuccessResponse_7(playbackState); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - + CHIP_ERROR TestLogACommand_1() { SetIdentity(kIdentityAlpha); return UserPrompt("Verify that media is paused"); } - - CHIP_ERROR TestReadsThePlaybackSpeedAttributeFromTheDut_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::MediaPlaybackClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( float playbackSpeed) + void OnSuccessResponse_2(float playbackSpeed) { - VerifyOrReturn(CheckValue("playbackSpeed", playbackSpeed,0.0f - )); + VerifyOrReturn(CheckValue("playbackSpeed", playbackSpeed, 0.0f)); NextTest(); - } - + } - CHIP_ERROR TestLogACommand_3() { SetIdentity(kIdentityAlpha); return UserPrompt("Verify that the media is playing"); } - - CHIP_ERROR TestReadsTheCurrentStateAttribute_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::MediaPlaybackClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( chip::app::Clusters::MediaPlayback::PlaybackStateEnum playbackState) + void OnSuccessResponse_4(chip::app::Clusters::MediaPlayback::PlaybackStateEnum playbackState) { - VerifyOrReturn(CheckValue("playbackState", playbackState,0 - )); + VerifyOrReturn(CheckValue("playbackState", playbackState, 0)); NextTest(); - } - + } - CHIP_ERROR TestLogACommand_5() { SetIdentity(kIdentityAlpha); 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"); } - - CHIP_ERROR TestReadsTheCurrentStateAttribute_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::MediaPlaybackClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_7, OnFailureCallback_7)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7( chip::app::Clusters::MediaPlayback::PlaybackStateEnum playbackState) + void OnSuccessResponse_7(chip::app::Clusters::MediaPlayback::PlaybackStateEnum playbackState) { - VerifyOrReturn(CheckValue("playbackState", playbackState,0 - )); + VerifyOrReturn(CheckValue("playbackState", playbackState, 0)); NextTest(); - } - + } - CHIP_ERROR TestLogACommand_8() { SetIdentity(kIdentityAlpha); return UserPrompt("Verify that the media play has reversed direction"); } - + CHIP_ERROR TestLogACommand_9() { SetIdentity(kIdentityAlpha); @@ -29260,93 +22246,66 @@ class Test_TC_MC_6_4: public TestCommand } }; -class Test_TC_MC_7_1: public TestCommand +class Test_TC_MC_7_1 : public TestCommand { - public: - Test_TC_MC_7_1(): TestCommand("Test_TC_MC_7_1"), mTestIndex(0) +public: + Test_TC_MC_7_1() : TestCommand("Test_TC_MC_7_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_MC_7_1() - { - } + ~Test_TC_MC_7_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_7_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_7_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_7_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_7_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 1; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); @@ -29354,93 +22313,66 @@ class Test_TC_MC_7_1: public TestCommand } }; -class Test_TC_MC_7_2: public TestCommand +class Test_TC_MC_7_2 : public TestCommand { - public: - Test_TC_MC_7_2(): TestCommand("Test_TC_MC_7_2"), mTestIndex(0) +public: + Test_TC_MC_7_2() : TestCommand("Test_TC_MC_7_2"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_MC_7_2() - { - } + ~Test_TC_MC_7_2() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_7_2\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_7_2\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_7_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_7_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 1; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); @@ -29448,754 +22380,572 @@ class Test_TC_MC_7_2: public TestCommand } }; -class Test_TC_MC_8_1: public TestCommand +class Test_TC_MC_8_1 : public TestCommand { - public: - Test_TC_MC_8_1(): TestCommand("Test_TC_MC_8_1"), mTestIndex(0) +public: + Test_TC_MC_8_1() : TestCommand("Test_TC_MC_8_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_MC_8_1() - { - } + ~Test_TC_MC_8_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_8_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_8_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_8_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_8_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the CurrentTarget attribute\n"); - err = TestReadsTheCurrentTargetAttribute_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the CurrentTarget attribute\n"); + err = TestReadsTheCurrentTargetAttribute_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the TargetList attribute\n"); - err = TestReadsTheTargetListAttribute_2(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the TargetList attribute\n"); + err = TestReadsTheTargetListAttribute_2(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; chip::Optional mCluster; chip::Optional mEndpoint; -uint8_t currentTarget; - - - - - - - - - - - - - - - - - - - - - - + uint8_t currentTarget; static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint8_t currentNavigatorTarget) + static void OnSuccessCallback_1(void * context, uint8_t currentNavigatorTarget) { (static_cast(context))->OnSuccessResponse_1(currentNavigatorTarget); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, const chip::app::DataModel::DecodableList & targetNavigatorList) + static void OnSuccessCallback_2( + void * context, + const chip::app::DataModel::DecodableList & + targetNavigatorList) { (static_cast(context))->OnSuccessResponse_2(targetNavigatorList); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadsTheCurrentTargetAttribute_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TargetNavigatorClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint8_t currentNavigatorTarget) + void OnSuccessResponse_1(uint8_t currentNavigatorTarget) { - VerifyOrReturn(CheckConstraintType("currentNavigatorTarget", "", "uint8")); - currentTarget = currentNavigatorTarget; + VerifyOrReturn(CheckConstraintType("currentNavigatorTarget", "", "uint8")); + currentTarget = currentNavigatorTarget; NextTest(); - } - - - + } - CHIP_ERROR TestReadsTheTargetListAttribute_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TargetNavigatorClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( const chip::app::DataModel::DecodableList & targetNavigatorList) + void OnSuccessResponse_2( + const chip::app::DataModel::DecodableList & + targetNavigatorList) { - VerifyOrReturn(CheckConstraintType("targetNavigatorList", "", "list")); + VerifyOrReturn(CheckConstraintType("targetNavigatorList", "", "list")); NextTest(); - } - - - }; + } +}; -class Test_TC_MC_9_1: public TestCommand +class Test_TC_MC_9_1 : public TestCommand { - public: - Test_TC_MC_9_1(): TestCommand("Test_TC_MC_9_1"), mTestIndex(0) +public: + Test_TC_MC_9_1() : TestCommand("Test_TC_MC_9_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_MC_9_1() - { - } + ~Test_TC_MC_9_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_9_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_9_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_9_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_9_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition\n"); - err = TestPrecondition_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition\n"); + err = TestPrecondition_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the VendorName attribute\n"); - err = TestReadsTheVendorNameAttribute_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the VendorName attribute\n"); + err = TestReadsTheVendorNameAttribute_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the VendorID attribute\n"); - err = TestReadsTheVendorIDAttribute_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the VendorID attribute\n"); + err = TestReadsTheVendorIDAttribute_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the ApplicationName attribute\n"); - err = TestReadsTheApplicationNameAttribute_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the ApplicationName attribute\n"); + err = TestReadsTheApplicationNameAttribute_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the ProductID attribute\n"); - err = TestReadsTheProductIDAttribute_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the ProductID attribute\n"); + err = TestReadsTheProductIDAttribute_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the Status attribute\n"); - err = TestReadsTheStatusAttribute_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the Status attribute\n"); + err = TestReadsTheStatusAttribute_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the ApplicationVersion attribute\n"); - err = TestReadsTheApplicationVersionAttribute_7(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the ApplicationVersion attribute\n"); + err = TestReadsTheApplicationVersionAttribute_7(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 8; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, chip::CharSpan vendorName) + static void OnSuccessCallback_2(void * context, chip::CharSpan vendorName) { (static_cast(context))->OnSuccessResponse_2(vendorName); } - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, uint16_t vendorId) + static void OnSuccessCallback_3(void * context, uint16_t vendorId) { (static_cast(context))->OnSuccessResponse_3(vendorId); } - - - static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, chip::CharSpan applicationName) + static void OnSuccessCallback_4(void * context, chip::CharSpan applicationName) { (static_cast(context))->OnSuccessResponse_4(applicationName); } - - - static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context, uint16_t productId) + static void OnSuccessCallback_5(void * context, uint16_t productId) { (static_cast(context))->OnSuccessResponse_5(productId); } - - - static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum applicationStatus) + static void OnSuccessCallback_6(void * context, chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum applicationStatus) { (static_cast(context))->OnSuccessResponse_6(applicationStatus); } - - - static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context, chip::CharSpan applicationVersion) + static void OnSuccessCallback_7(void * context, chip::CharSpan applicationVersion) { (static_cast(context))->OnSuccessResponse_7(applicationVersion); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - + CHIP_ERROR TestPrecondition_1() { SetIdentity(kIdentityAlpha); return Log("DUT has one or more Content Apps available"); } - - CHIP_ERROR TestReadsTheVendorNameAttribute_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ApplicationBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( chip::CharSpan vendorName) + void OnSuccessResponse_2(chip::CharSpan vendorName) { - VerifyOrReturn(CheckConstraintType("vendorName", "", "string")); + VerifyOrReturn(CheckConstraintType("vendorName", "", "string")); NextTest(); - } - - - + } - CHIP_ERROR TestReadsTheVendorIDAttribute_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ApplicationBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( uint16_t vendorId) + void OnSuccessResponse_3(uint16_t vendorId) { - VerifyOrReturn(CheckValue("vendorId", vendorId,0U - )); + VerifyOrReturn(CheckValue("vendorId", vendorId, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsTheApplicationNameAttribute_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ApplicationBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( chip::CharSpan applicationName) + void OnSuccessResponse_4(chip::CharSpan applicationName) { - VerifyOrReturn(CheckConstraintType("applicationName", "", "string"));VerifyOrReturn(CheckConstraintMaxLength("applicationName", applicationName.size(), 256)); + VerifyOrReturn(CheckConstraintType("applicationName", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("applicationName", applicationName.size(), 256)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsTheProductIDAttribute_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ApplicationBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5( uint16_t productId) + void OnSuccessResponse_5(uint16_t productId) { - VerifyOrReturn(CheckConstraintType("productId", "", "uint16")); + VerifyOrReturn(CheckConstraintType("productId", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadsTheStatusAttribute_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ApplicationBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum applicationStatus) + void OnSuccessResponse_6(chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum applicationStatus) { - VerifyOrReturn(CheckValue("applicationStatus", applicationStatus,0 - )); + VerifyOrReturn(CheckValue("applicationStatus", applicationStatus, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsTheApplicationVersionAttribute_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ApplicationBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_7, OnFailureCallback_7)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7( chip::CharSpan applicationVersion) + void OnSuccessResponse_7(chip::CharSpan applicationVersion) { - VerifyOrReturn(CheckConstraintType("applicationVersion", "", "string"));VerifyOrReturn(CheckConstraintMaxLength("applicationVersion", applicationVersion.size(), 32)); + VerifyOrReturn(CheckConstraintType("applicationVersion", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("applicationVersion", applicationVersion.size(), 32)); NextTest(); - } - - - }; + } +}; -class Test_TC_OCC_1_1: public TestCommand +class Test_TC_OCC_1_1 : public TestCommand { - public: - Test_TC_OCC_1_1(): TestCommand("Test_TC_OCC_1_1"), mTestIndex(0) +public: + Test_TC_OCC_1_1() : TestCommand("Test_TC_OCC_1_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_OCC_1_1() - { - } + ~Test_TC_OCC_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_OCC_1_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_OCC_1_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OCC_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OCC_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); - break; - } + ChipLogProgress(chipTool, + " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); + err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 4; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_1(clusterRevision); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_2(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_2(clusterRevision); } - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context) - { - (static_cast(context))->OnSuccessResponse_3(); - } - - - + static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OccupancySensingClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint16_t clusterRevision) + void OnSuccessResponse_1(uint16_t clusterRevision) { - VerifyOrReturn(CheckValue("clusterRevision", clusterRevision,2U - )); + VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 2U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OccupancySensingClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint16_t clusterRevision) + void OnSuccessResponse_2(uint16_t clusterRevision) { - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -30203,299 +22953,230 @@ class Test_TC_OCC_1_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t clusterRevisionArgument; - clusterRevisionArgument = 2U; - - ReturnErrorOnFailure(cluster.WriteAttribute(clusterRevisionArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + clusterRevisionArgument = 2U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + clusterRevisionArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_3() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_3() { ThrowSuccessResponse(); } +}; - }; - -class Test_TC_OCC_2_1: public TestCommand +class Test_TC_OCC_2_1 : public TestCommand { - public: - Test_TC_OCC_2_1(): TestCommand("Test_TC_OCC_2_1"), mTestIndex(0) +public: + Test_TC_OCC_2_1() : TestCommand("Test_TC_OCC_2_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_OCC_2_1() - { - } + ~Test_TC_OCC_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_OCC_2_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_OCC_2_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OCC_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OCC_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads mandatory attribute constrains: Occupancy\n"); - err = TestReadsMandatoryAttributeConstrainsOccupancy_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads mandatory attribute constrains: Occupancy\n"); + err = TestReadsMandatoryAttributeConstrainsOccupancy_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Writes the respective default value to mandatory attribute: Occupancy\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancy_2(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 2 : Writes the respective default value to mandatory attribute: Occupancy\n"); + err = TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancy_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads back mandatory attribute: Occupancy\n"); - err = TestReadsBackMandatoryAttributeOccupancy_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads back mandatory attribute: Occupancy\n"); + err = TestReadsBackMandatoryAttributeOccupancy_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads mandatory attribute constrains: OccupancySensorType\n"); - err = TestReadsMandatoryAttributeConstrainsOccupancySensorType_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads mandatory attribute constrains: OccupancySensorType\n"); + err = TestReadsMandatoryAttributeConstrainsOccupancySensorType_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Writes the respective default value to mandatory attribute: OccupancySensorType\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancySensorType_5(); - break; + ChipLogProgress( + chipTool, " ***** Test Step 5 : Writes the respective default value to mandatory attribute: OccupancySensorType\n"); + err = TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancySensorType_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads back mandatory attribute: OccupancySensorType\n"); - err = TestReadsBackMandatoryAttributeOccupancySensorType_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : Reads back mandatory attribute: OccupancySensorType\n"); + err = TestReadsBackMandatoryAttributeOccupancySensorType_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads mandatory attribute constrains: OccupancySensorTypeBitmap\n"); - err = TestReadsMandatoryAttributeConstrainsOccupancySensorTypeBitmap_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : Reads mandatory attribute constrains: OccupancySensorTypeBitmap\n"); + err = TestReadsMandatoryAttributeConstrainsOccupancySensorTypeBitmap_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Writes the respective default value to mandatory attribute: OccupancySensorTypeBitmap\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancySensorTypeBitmap_8(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 8 : Writes the respective default value to mandatory attribute: OccupancySensorTypeBitmap\n"); + err = TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancySensorTypeBitmap_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Reads back mandatory attribute: OccupancySensorTypeBitmap\n"); - err = TestReadsBackMandatoryAttributeOccupancySensorTypeBitmap_9(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 9 : Reads back mandatory attribute: OccupancySensorTypeBitmap\n"); + err = TestReadsBackMandatoryAttributeOccupancySensorTypeBitmap_9(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 10; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint8_t occupancy) + static void OnSuccessCallback_1(void * context, uint8_t occupancy) { (static_cast(context))->OnSuccessResponse_1(occupancy); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context) - { - (static_cast(context))->OnSuccessResponse_2(); - } - - - + static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, uint8_t occupancy) + static void OnSuccessCallback_3(void * context, uint8_t occupancy) { (static_cast(context))->OnSuccessResponse_3(occupancy); } - - - static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, uint8_t occupancySensorType) + static void OnSuccessCallback_4(void * context, uint8_t occupancySensorType) { (static_cast(context))->OnSuccessResponse_4(occupancySensorType); } - - - static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context) - { - (static_cast(context))->OnSuccessResponse_5(); - } - - - + static void OnSuccessCallback_5(void * context) { (static_cast(context))->OnSuccessResponse_5(); } static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, uint8_t occupancySensorType) + static void OnSuccessCallback_6(void * context, uint8_t occupancySensorType) { (static_cast(context))->OnSuccessResponse_6(occupancySensorType); } - - - static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context, uint8_t occupancySensorTypeBitmap) + static void OnSuccessCallback_7(void * context, uint8_t occupancySensorTypeBitmap) { (static_cast(context))->OnSuccessResponse_7(occupancySensorTypeBitmap); } - - - static void OnFailureCallback_8(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context) - { - (static_cast(context))->OnSuccessResponse_8(); - } - - - + static void OnSuccessCallback_8(void * context) { (static_cast(context))->OnSuccessResponse_8(); } static void OnFailureCallback_9(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_9(status); } - static void OnSuccessCallback_9(void * context, uint8_t occupancySensorTypeBitmap) + static void OnSuccessCallback_9(void * context, uint8_t occupancySensorTypeBitmap) { (static_cast(context))->OnSuccessResponse_9(occupancySensorTypeBitmap); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancy_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OccupancySensingClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint8_t occupancy) + void OnSuccessResponse_1(uint8_t occupancy) { - VerifyOrReturn(CheckConstraintType("occupancy", "", "map8"));VerifyOrReturn(CheckConstraintMinValue("occupancy", occupancy, 0));VerifyOrReturn(CheckConstraintMaxValue("occupancy", occupancy, 1)); + VerifyOrReturn(CheckConstraintType("occupancy", "", "map8")); + VerifyOrReturn(CheckConstraintMinValue("occupancy", occupancy, 0)); + VerifyOrReturn(CheckConstraintMaxValue("occupancy", occupancy, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancy_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -30503,80 +23184,63 @@ class Test_TC_OCC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t occupancyArgument; - occupancyArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(occupancyArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + occupancyArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + occupancyArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_2() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_2() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackMandatoryAttributeOccupancy_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OccupancySensingClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( uint8_t occupancy) + void OnSuccessResponse_3(uint8_t occupancy) { - VerifyOrReturn(CheckValue("occupancy", occupancy,0 - )); + VerifyOrReturn(CheckValue("occupancy", occupancy, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancySensorType_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OccupancySensingClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( uint8_t occupancySensorType) + void OnSuccessResponse_4(uint8_t occupancySensorType) { - VerifyOrReturn(CheckConstraintType("occupancySensorType", "", "enum8"));VerifyOrReturn(CheckConstraintMinValue("occupancySensorType", occupancySensorType, 0));VerifyOrReturn(CheckConstraintMaxValue("occupancySensorType", occupancySensorType, 3)); + VerifyOrReturn(CheckConstraintType("occupancySensorType", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("occupancySensorType", occupancySensorType, 0)); + VerifyOrReturn(CheckConstraintMaxValue("occupancySensorType", occupancySensorType, 3)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancySensorType_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -30584,80 +23248,65 @@ class Test_TC_OCC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t occupancySensorTypeArgument; - occupancySensorTypeArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(occupancySensorTypeArgument, this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; + occupancySensorTypeArgument = 0; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + occupancySensorTypeArgument, this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; } void OnFailureResponse_5(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_5() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_5() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackMandatoryAttributeOccupancySensorType_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OccupancySensingClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( uint8_t occupancySensorType) + void OnSuccessResponse_6(uint8_t occupancySensorType) { - VerifyOrReturn(CheckValue("occupancySensorType", occupancySensorType,0 - )); + VerifyOrReturn(CheckValue("occupancySensorType", occupancySensorType, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancySensorTypeBitmap_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OccupancySensingClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_7, OnFailureCallback_7)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7( uint8_t occupancySensorTypeBitmap) + void OnSuccessResponse_7(uint8_t occupancySensorTypeBitmap) { - VerifyOrReturn(CheckConstraintType("occupancySensorTypeBitmap", "", "map8"));VerifyOrReturn(CheckConstraintMinValue("occupancySensorTypeBitmap", occupancySensorTypeBitmap, 1));VerifyOrReturn(CheckConstraintMaxValue("occupancySensorTypeBitmap", occupancySensorTypeBitmap, 7)); + VerifyOrReturn(CheckConstraintType("occupancySensorTypeBitmap", "", "map8")); + VerifyOrReturn(CheckConstraintMinValue("occupancySensorTypeBitmap", occupancySensorTypeBitmap, 1)); + VerifyOrReturn(CheckConstraintMaxValue("occupancySensorTypeBitmap", occupancySensorTypeBitmap, 7)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancySensorTypeBitmap_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -30665,538 +23314,409 @@ class Test_TC_OCC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t occupancySensorTypeBitmapArgument; - occupancySensorTypeBitmapArgument = 1; - - ReturnErrorOnFailure(cluster.WriteAttribute(occupancySensorTypeBitmapArgument, this, OnSuccessCallback_8, OnFailureCallback_8)); - return CHIP_NO_ERROR; + occupancySensorTypeBitmapArgument = 1; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + occupancySensorTypeBitmapArgument, this, OnSuccessCallback_8, OnFailureCallback_8)); + return CHIP_NO_ERROR; } void OnFailureResponse_8(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_8() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_8() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackMandatoryAttributeOccupancySensorTypeBitmap_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OccupancySensingClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_9, OnFailureCallback_9)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_9, OnFailureCallback_9)); + return CHIP_NO_ERROR; } - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_9( uint8_t occupancySensorTypeBitmap) + void OnSuccessResponse_9(uint8_t occupancySensorTypeBitmap) { - VerifyOrReturn(CheckValue("occupancySensorTypeBitmap", occupancySensorTypeBitmap,1 - )); + VerifyOrReturn(CheckValue("occupancySensorTypeBitmap", occupancySensorTypeBitmap, 1)); NextTest(); - } - - - }; + } +}; -class Test_TC_OCC_2_2: public TestCommand +class Test_TC_OCC_2_2 : public TestCommand { - public: - Test_TC_OCC_2_2(): TestCommand("Test_TC_OCC_2_2"), mTestIndex(0) +public: + Test_TC_OCC_2_2() : TestCommand("Test_TC_OCC_2_2"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_OCC_2_2() - { - } + ~Test_TC_OCC_2_2() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_OCC_2_2\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_OCC_2_2\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OCC_2_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OCC_2_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads Occupancy attribute from DUT\n"); - if (ShouldSkip("A_OCCUPANCY")) - { - NextTest(); - return; - } - err = TestReadsOccupancyAttributeFromDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads Occupancy attribute from DUT\n"); - if (ShouldSkip("A_OCCUPANCY")) - { - NextTest(); - return; - } - err = TestReadsOccupancyAttributeFromDut_2(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads Occupancy attribute from DUT\n"); + if (ShouldSkip("A_OCCUPANCY")) + { + NextTest(); + return; + } + err = TestReadsOccupancyAttributeFromDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads Occupancy attribute from DUT\n"); + if (ShouldSkip("A_OCCUPANCY")) + { + NextTest(); + return; + } + err = TestReadsOccupancyAttributeFromDut_2(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint8_t occupancy) + static void OnSuccessCallback_1(void * context, uint8_t occupancy) { (static_cast(context))->OnSuccessResponse_1(occupancy); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint8_t occupancy) + static void OnSuccessCallback_2(void * context, uint8_t occupancy) { (static_cast(context))->OnSuccessResponse_2(occupancy); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadsOccupancyAttributeFromDut_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OccupancySensingClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint8_t occupancy) + void OnSuccessResponse_1(uint8_t occupancy) { - VerifyOrReturn(CheckConstraintType("occupancy", "", "map8")); + VerifyOrReturn(CheckConstraintType("occupancy", "", "map8")); NextTest(); - } - - - + } - CHIP_ERROR TestReadsOccupancyAttributeFromDut_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OccupancySensingClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint8_t occupancy) + void OnSuccessResponse_2(uint8_t occupancy) { - VerifyOrReturn(CheckConstraintType("occupancy", "", "map8")); + VerifyOrReturn(CheckConstraintType("occupancy", "", "map8")); NextTest(); - } - - - }; + } +}; -class Test_TC_OO_1_1: public TestCommand +class Test_TC_OO_1_1 : public TestCommand { - public: - Test_TC_OO_1_1(): TestCommand("Test_TC_OO_1_1"), mTestIndex(0) +public: + Test_TC_OO_1_1() : TestCommand("Test_TC_OO_1_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_OO_1_1() - { - } + ~Test_TC_OO_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_OO_1_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_OO_1_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OO_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OO_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_1(); - break; + 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 : read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_4(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 4 : write the default values to mandatory global attribute: ClusterRevision\n"); + err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : reads back global attribute: ClusterRevision\n"); - err = TestReadsBackGlobalAttributeClusterRevision_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : reads back global attribute: ClusterRevision\n"); + err = TestReadsBackGlobalAttributeClusterRevision_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : read the optional global attribute: FeatureMap\n"); - err = TestReadTheOptionalGlobalAttributeFeatureMap_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : read the optional global attribute: FeatureMap\n"); + err = TestReadTheOptionalGlobalAttributeFeatureMap_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the optional global attribute : FeatureMap\n"); - err = TestReadTheOptionalGlobalAttributeFeatureMap_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : Read the optional global attribute : FeatureMap\n"); + err = TestReadTheOptionalGlobalAttributeFeatureMap_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : write the default values to optional global attribute: FeatureMap\n"); - err = TestWriteTheDefaultValuesToOptionalGlobalAttributeFeatureMap_8(); - break; + ChipLogProgress(chipTool, " ***** Test Step 8 : write the default values to optional global attribute: FeatureMap\n"); + err = TestWriteTheDefaultValuesToOptionalGlobalAttributeFeatureMap_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : reads back optional global attribute: FeatureMap\n"); - err = TestReadsBackOptionalGlobalAttributeFeatureMap_9(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 9 : reads back optional global attribute: FeatureMap\n"); + err = TestReadsBackOptionalGlobalAttributeFeatureMap_9(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 10; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_2(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_2(clusterRevision); } - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_3(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_3(clusterRevision); } - - - static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context) - { - (static_cast(context))->OnSuccessResponse_4(); - } - - - + static void OnSuccessCallback_4(void * context) { (static_cast(context))->OnSuccessResponse_4(); } static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_5(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_5(clusterRevision); } - - - static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, uint32_t featureMap) + static void OnSuccessCallback_6(void * context, uint32_t featureMap) { (static_cast(context))->OnSuccessResponse_6(featureMap); } - - - static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context, uint32_t featureMap) + static void OnSuccessCallback_7(void * context, uint32_t featureMap) { (static_cast(context))->OnSuccessResponse_7(featureMap); } - - - static void OnFailureCallback_8(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context) - { - (static_cast(context))->OnSuccessResponse_8(); - } - - - + static void OnSuccessCallback_8(void * context) { (static_cast(context))->OnSuccessResponse_8(); } static void OnFailureCallback_9(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_9(status); } - static void OnSuccessCallback_9(void * context, uint32_t featureMap) + static void OnSuccessCallback_9(void * context, uint32_t featureMap) { (static_cast(context))->OnSuccessResponse_9(featureMap); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_1() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint16_t clusterRevision) + void OnSuccessResponse_2(uint16_t clusterRevision) { - VerifyOrReturn(CheckValue("clusterRevision", clusterRevision,4U - )); + VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 4U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( uint16_t clusterRevision) + void OnSuccessResponse_3(uint16_t clusterRevision) { - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -31204,108 +23724,80 @@ class Test_TC_OO_1_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t clusterRevisionArgument; - clusterRevisionArgument = 3U; - - ReturnErrorOnFailure(cluster.WriteAttribute(clusterRevisionArgument, this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + clusterRevisionArgument = 3U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + clusterRevisionArgument, this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } void OnFailureResponse_4(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_4() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_4() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5( uint16_t clusterRevision) + void OnSuccessResponse_5(uint16_t clusterRevision) { - VerifyOrReturn(CheckValue("clusterRevision", clusterRevision,4U - )); + VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 4U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( uint32_t featureMap) + void OnSuccessResponse_6(uint32_t featureMap) { - VerifyOrReturn(CheckValue("featureMap", featureMap,0UL - )); + VerifyOrReturn(CheckValue("featureMap", featureMap, 0UL)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_7, OnFailureCallback_7)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7( uint32_t featureMap) + void OnSuccessResponse_7(uint32_t featureMap) { - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToOptionalGlobalAttributeFeatureMap_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -31313,431 +23805,323 @@ class Test_TC_OO_1_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint32_t featureMapArgument; - featureMapArgument = 0UL; - - ReturnErrorOnFailure(cluster.WriteAttribute(featureMapArgument, this, OnSuccessCallback_8, OnFailureCallback_8)); - return CHIP_NO_ERROR; + featureMapArgument = 0UL; + + ReturnErrorOnFailure(cluster.WriteAttribute( + featureMapArgument, this, OnSuccessCallback_8, OnFailureCallback_8)); + return CHIP_NO_ERROR; } void OnFailureResponse_8(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_8() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_8() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackOptionalGlobalAttributeFeatureMap_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_9, OnFailureCallback_9)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_9, OnFailureCallback_9)); + return CHIP_NO_ERROR; } - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_9( uint32_t featureMap) + void OnSuccessResponse_9(uint32_t featureMap) { - VerifyOrReturn(CheckValue("featureMap", featureMap,0UL - )); + VerifyOrReturn(CheckValue("featureMap", featureMap, 0UL)); NextTest(); - } - - - }; + } +}; -class Test_TC_OO_2_1: public TestCommand +class Test_TC_OO_2_1 : public TestCommand { - public: - Test_TC_OO_2_1(): TestCommand("Test_TC_OO_2_1"), mTestIndex(0) +public: + Test_TC_OO_2_1() : TestCommand("Test_TC_OO_2_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_OO_2_1() - { - } + ~Test_TC_OO_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_OO_2_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_OO_2_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OO_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OO_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the mandatory attribute: OnOff\n"); - err = TestReadTheMandatoryAttributeOnOff_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : read the mandatory attribute: OnOff\n"); + err = TestReadTheMandatoryAttributeOnOff_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : write the default value of mandatory attribute: OnOff\n"); - err = TestWriteTheDefaultValueOfMandatoryAttributeOnOff_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : write the default value of mandatory attribute: OnOff\n"); + err = TestWriteTheDefaultValueOfMandatoryAttributeOnOff_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : reads back mandatory attribute: OnOff\n"); - err = TestReadsBackMandatoryAttributeOnOff_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : reads back mandatory attribute: OnOff\n"); + err = TestReadsBackMandatoryAttributeOnOff_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : read LT attribute: GlobalSceneControl\n"); - err = TestReadLtAttributeGlobalSceneControl_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : read LT attribute: GlobalSceneControl\n"); + err = TestReadLtAttributeGlobalSceneControl_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : read LT attribute: OnTime\n"); - err = TestReadLtAttributeOnTime_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : read LT attribute: OnTime\n"); + err = TestReadLtAttributeOnTime_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : read LT attribute: OffWaitTime\n"); - err = TestReadLtAttributeOffWaitTime_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : read LT attribute: OffWaitTime\n"); + err = TestReadLtAttributeOffWaitTime_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : read LT attribute: StartUpOnOff\n"); - err = TestReadLtAttributeStartUpOnOff_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : read LT attribute: StartUpOnOff\n"); + err = TestReadLtAttributeStartUpOnOff_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : write the default value to LT attribute: GlobalSceneControl\n"); - err = TestWriteTheDefaultValueToLtAttributeGlobalSceneControl_8(); - break; + ChipLogProgress(chipTool, " ***** Test Step 8 : write the default value to LT attribute: GlobalSceneControl\n"); + err = TestWriteTheDefaultValueToLtAttributeGlobalSceneControl_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : write the default value to LT attribute: OnTime\n"); - err = TestWriteTheDefaultValueToLtAttributeOnTime_9(); - break; + ChipLogProgress(chipTool, " ***** Test Step 9 : write the default value to LT attribute: OnTime\n"); + err = TestWriteTheDefaultValueToLtAttributeOnTime_9(); + break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : write the default value to LT attribute: OffWaitTime\n"); - err = TestWriteTheDefaultValueToLtAttributeOffWaitTime_10(); - break; + ChipLogProgress(chipTool, " ***** Test Step 10 : write the default value to LT attribute: OffWaitTime\n"); + err = TestWriteTheDefaultValueToLtAttributeOffWaitTime_10(); + break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : write the default value to LT attribute: StartUpOnOff\n"); - err = TestWriteTheDefaultValueToLtAttributeStartUpOnOff_11(); - break; + ChipLogProgress(chipTool, " ***** Test Step 11 : write the default value to LT attribute: StartUpOnOff\n"); + err = TestWriteTheDefaultValueToLtAttributeStartUpOnOff_11(); + break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : reads back LT attribute: GlobalSceneControl\n"); - err = TestReadsBackLtAttributeGlobalSceneControl_12(); - break; + ChipLogProgress(chipTool, " ***** Test Step 12 : reads back LT attribute: GlobalSceneControl\n"); + err = TestReadsBackLtAttributeGlobalSceneControl_12(); + break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : reads back LT attribute: OnTime\n"); - err = TestReadsBackLtAttributeOnTime_13(); - break; + ChipLogProgress(chipTool, " ***** Test Step 13 : reads back LT attribute: OnTime\n"); + err = TestReadsBackLtAttributeOnTime_13(); + break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : reads back LT attribute: OffWaitTime\n"); - err = TestReadsBackLtAttributeOffWaitTime_14(); - break; + ChipLogProgress(chipTool, " ***** Test Step 14 : reads back LT attribute: OffWaitTime\n"); + err = TestReadsBackLtAttributeOffWaitTime_14(); + break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : reads back LT attribute: StartUpOnOff\n"); - err = TestReadsBackLtAttributeStartUpOnOff_15(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 15 : reads back LT attribute: StartUpOnOff\n"); + err = TestReadsBackLtAttributeStartUpOnOff_15(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 16; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, bool onOff) + static void OnSuccessCallback_1(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_1(onOff); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context) - { - (static_cast(context))->OnSuccessResponse_2(); - } - - - + static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, bool onOff) + static void OnSuccessCallback_3(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_3(onOff); } - - - static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, bool globalSceneControl) + static void OnSuccessCallback_4(void * context, bool globalSceneControl) { (static_cast(context))->OnSuccessResponse_4(globalSceneControl); } - - - static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context, uint16_t onTime) + static void OnSuccessCallback_5(void * context, uint16_t onTime) { (static_cast(context))->OnSuccessResponse_5(onTime); } - - - static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, uint16_t offWaitTime) + static void OnSuccessCallback_6(void * context, uint16_t offWaitTime) { (static_cast(context))->OnSuccessResponse_6(offWaitTime); } - - - static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context, uint8_t startUpOnOff) + static void OnSuccessCallback_7(void * context, uint8_t startUpOnOff) { (static_cast(context))->OnSuccessResponse_7(startUpOnOff); } - - - static void OnFailureCallback_8(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context) - { - (static_cast(context))->OnSuccessResponse_8(); - } - - - + static void OnSuccessCallback_8(void * context) { (static_cast(context))->OnSuccessResponse_8(); } static void OnFailureCallback_9(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_9(status); } - static void OnSuccessCallback_9(void * context) - { - (static_cast(context))->OnSuccessResponse_9(); - } - - - + static void OnSuccessCallback_9(void * context) { (static_cast(context))->OnSuccessResponse_9(); } static void OnFailureCallback_10(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_10(status); } - static void OnSuccessCallback_10(void * context) - { - (static_cast(context))->OnSuccessResponse_10(); - } - - - + static void OnSuccessCallback_10(void * context) { (static_cast(context))->OnSuccessResponse_10(); } static void OnFailureCallback_11(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_11(status); } - static void OnSuccessCallback_11(void * context) - { - (static_cast(context))->OnSuccessResponse_11(); - } - - - + static void OnSuccessCallback_11(void * context) { (static_cast(context))->OnSuccessResponse_11(); } static void OnFailureCallback_12(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_12(status); } - static void OnSuccessCallback_12(void * context, bool globalSceneControl) + static void OnSuccessCallback_12(void * context, bool globalSceneControl) { (static_cast(context))->OnSuccessResponse_12(globalSceneControl); } - - - static void OnFailureCallback_13(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_13(status); } - static void OnSuccessCallback_13(void * context, uint16_t onTime) + static void OnSuccessCallback_13(void * context, uint16_t onTime) { (static_cast(context))->OnSuccessResponse_13(onTime); } - - - static void OnFailureCallback_14(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_14(status); } - static void OnSuccessCallback_14(void * context, uint16_t offWaitTime) + static void OnSuccessCallback_14(void * context, uint16_t offWaitTime) { (static_cast(context))->OnSuccessResponse_14(offWaitTime); } - - - static void OnFailureCallback_15(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_15(status); } - static void OnSuccessCallback_15(void * context, uint8_t startUpOnOff) + static void OnSuccessCallback_15(void * context, uint8_t startUpOnOff) { (static_cast(context))->OnSuccessResponse_15(startUpOnOff); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadTheMandatoryAttributeOnOff_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( bool onOff) + void OnSuccessResponse_1(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,0 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValueOfMandatoryAttributeOnOff_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -31745,166 +24129,121 @@ class Test_TC_OO_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); bool onOffArgument; - onOffArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(onOffArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + onOffArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + onOffArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_2() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_2() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackMandatoryAttributeOnOff_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( bool onOff) + void OnSuccessResponse_3(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,0 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadLtAttributeGlobalSceneControl_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( bool globalSceneControl) + void OnSuccessResponse_4(bool globalSceneControl) { - VerifyOrReturn(CheckValue("globalSceneControl", globalSceneControl,1 - )); + VerifyOrReturn(CheckValue("globalSceneControl", globalSceneControl, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestReadLtAttributeOnTime_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5( uint16_t onTime) + void OnSuccessResponse_5(uint16_t onTime) { - VerifyOrReturn(CheckValue("onTime", onTime,0U - )); + VerifyOrReturn(CheckValue("onTime", onTime, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadLtAttributeOffWaitTime_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( uint16_t offWaitTime) + void OnSuccessResponse_6(uint16_t offWaitTime) { - VerifyOrReturn(CheckValue("offWaitTime", offWaitTime,0U - )); + VerifyOrReturn(CheckValue("offWaitTime", offWaitTime, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadLtAttributeStartUpOnOff_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_7, OnFailureCallback_7)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7( uint8_t startUpOnOff) + void OnSuccessResponse_7(uint8_t startUpOnOff) { - VerifyOrReturn(CheckValue("startUpOnOff", startUpOnOff,0 - )); + VerifyOrReturn(CheckValue("startUpOnOff", startUpOnOff, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValueToLtAttributeGlobalSceneControl_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -31912,26 +24251,21 @@ class Test_TC_OO_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); bool globalSceneControlArgument; - globalSceneControlArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(globalSceneControlArgument, this, OnSuccessCallback_8, OnFailureCallback_8)); - return CHIP_NO_ERROR; + globalSceneControlArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + globalSceneControlArgument, this, OnSuccessCallback_8, OnFailureCallback_8)); + return CHIP_NO_ERROR; } void OnFailureResponse_8(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_8() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_8() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestWriteTheDefaultValueToLtAttributeOnTime_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -31939,25 +24273,17 @@ class Test_TC_OO_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t onTimeArgument; - onTimeArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(onTimeArgument, this, OnSuccessCallback_9, OnFailureCallback_9)); - return CHIP_NO_ERROR; - } + onTimeArgument = 0U; - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_9() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + onTimeArgument, this, OnSuccessCallback_9, OnFailureCallback_9)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_9() { NextTest(); } - CHIP_ERROR TestWriteTheDefaultValueToLtAttributeOffWaitTime_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -31965,25 +24291,17 @@ class Test_TC_OO_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t offWaitTimeArgument; - offWaitTimeArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(offWaitTimeArgument, this, OnSuccessCallback_10, OnFailureCallback_10)); - return CHIP_NO_ERROR; - } + offWaitTimeArgument = 0U; - void OnFailureResponse_10(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_10() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + offWaitTimeArgument, this, OnSuccessCallback_10, OnFailureCallback_10)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_10() { NextTest(); } - CHIP_ERROR TestWriteTheDefaultValueToLtAttributeStartUpOnOff_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -31991,382 +24309,294 @@ class Test_TC_OO_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t startUpOnOffArgument; - startUpOnOffArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(startUpOnOffArgument, this, OnSuccessCallback_11, OnFailureCallback_11)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_11(EmberAfStatus status) - { - ThrowFailureResponse(); - } + startUpOnOffArgument = 0; - void OnSuccessResponse_11() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + startUpOnOffArgument, this, OnSuccessCallback_11, OnFailureCallback_11)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_11() { NextTest(); } - CHIP_ERROR TestReadsBackLtAttributeGlobalSceneControl_12() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_12, OnFailureCallback_12)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_12, OnFailureCallback_12)); + return CHIP_NO_ERROR; } - void OnFailureResponse_12(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_12( bool globalSceneControl) + void OnSuccessResponse_12(bool globalSceneControl) { - VerifyOrReturn(CheckValue("globalSceneControl", globalSceneControl,1 - )); + VerifyOrReturn(CheckValue("globalSceneControl", globalSceneControl, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsBackLtAttributeOnTime_13() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_13, OnFailureCallback_13)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_13, OnFailureCallback_13)); + return CHIP_NO_ERROR; } - void OnFailureResponse_13(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_13(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_13( uint16_t onTime) + void OnSuccessResponse_13(uint16_t onTime) { - VerifyOrReturn(CheckValue("onTime", onTime,0U - )); + VerifyOrReturn(CheckValue("onTime", onTime, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsBackLtAttributeOffWaitTime_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_14, OnFailureCallback_14)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_14, OnFailureCallback_14)); + return CHIP_NO_ERROR; } - void OnFailureResponse_14(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_14( uint16_t offWaitTime) + void OnSuccessResponse_14(uint16_t offWaitTime) { - VerifyOrReturn(CheckValue("offWaitTime", offWaitTime,0U - )); + VerifyOrReturn(CheckValue("offWaitTime", offWaitTime, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsBackLtAttributeStartUpOnOff_15() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_15, OnFailureCallback_15)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_15, OnFailureCallback_15)); + return CHIP_NO_ERROR; } - void OnFailureResponse_15(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_15(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_15( uint8_t startUpOnOff) + void OnSuccessResponse_15(uint8_t startUpOnOff) { - VerifyOrReturn(CheckValue("startUpOnOff", startUpOnOff,0 - )); + VerifyOrReturn(CheckValue("startUpOnOff", startUpOnOff, 0)); NextTest(); - } - - - }; + } +}; -class Test_TC_OO_2_2: public TestCommand +class Test_TC_OO_2_2 : public TestCommand { - public: - Test_TC_OO_2_2(): TestCommand("Test_TC_OO_2_2"), mTestIndex(0) +public: + Test_TC_OO_2_2() : TestCommand("Test_TC_OO_2_2"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_OO_2_2() - { - } + ~Test_TC_OO_2_2() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_OO_2_2\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_OO_2_2\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OO_2_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OO_2_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Send Off Command\n"); - err = TestSendOffCommand_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Send Off Command\n"); + err = TestSendOffCommand_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Send On Command\n"); - err = TestSendOnCommand_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Send On Command\n"); + err = TestSendOnCommand_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Check on/off attribute value is true after on command\n"); - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Check on/off attribute value is true after on command\n"); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Send Off Command\n"); - err = TestSendOffCommand_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Send Off Command\n"); + err = TestSendOffCommand_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Send Toggle Command\n"); - err = TestSendToggleCommand_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : Send Toggle Command\n"); + err = TestSendToggleCommand_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Check on/off attribute value is true after toggle command\n"); - err = TestCheckOnOffAttributeValueIsTrueAfterToggleCommand_8(); - break; + ChipLogProgress(chipTool, " ***** Test Step 8 : Check on/off attribute value is true after toggle command\n"); + err = TestCheckOnOffAttributeValueIsTrueAfterToggleCommand_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Send Toggle Command\n"); - err = TestSendToggleCommand_9(); - break; + ChipLogProgress(chipTool, " ***** Test Step 9 : Send Toggle Command\n"); + err = TestSendToggleCommand_9(); + break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Check on/off attribute value is false after toggle command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterToggleCommand_10(); - break; + ChipLogProgress(chipTool, " ***** Test Step 10 : Check on/off attribute value is false after toggle command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterToggleCommand_10(); + break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Send On Command\n"); - err = TestSendOnCommand_11(); - break; + ChipLogProgress(chipTool, " ***** Test Step 11 : Send On Command\n"); + err = TestSendOnCommand_11(); + break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Check on/off attribute value is true after on command\n"); - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_12(); - break; + ChipLogProgress(chipTool, " ***** Test Step 12 : Check on/off attribute value is true after on command\n"); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_12(); + break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Send Off Command\n"); - err = TestSendOffCommand_13(); - break; + ChipLogProgress(chipTool, " ***** Test Step 13 : Send Off Command\n"); + err = TestSendOffCommand_13(); + break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_14(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 14 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_14(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 15; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, bool onOff) + static void OnSuccessCallback_2(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_2(onOff); } - - - static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, bool onOff) + static void OnSuccessCallback_4(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_4(onOff); } - - - static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, bool onOff) + static void OnSuccessCallback_6(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_6(onOff); } - - - static void OnFailureCallback_8(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context, bool onOff) + static void OnSuccessCallback_8(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_8(onOff); } - - - static void OnFailureCallback_10(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_10(status); } - static void OnSuccessCallback_10(void * context, bool onOff) + static void OnSuccessCallback_10(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_10(onOff); } - - - static void OnFailureCallback_12(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_12(status); } - static void OnSuccessCallback_12(void * context, bool onOff) + static void OnSuccessCallback_12(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_12(onOff); } - - - static void OnFailureCallback_14(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_14(status); } - static void OnSuccessCallback_14(void * context, bool onOff) + static void OnSuccessCallback_14(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_14(onOff); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestSendOffCommand_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -32378,58 +24608,38 @@ class Test_TC_OO_2_2: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_1() - { NextTest(); - } - + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( bool onOff) + void OnSuccessResponse_2(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,0 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestSendOnCommand_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -32441,58 +24651,38 @@ class Test_TC_OO_2_2: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_3() - { NextTest(); - } - + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_3() { NextTest(); } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( bool onOff) + void OnSuccessResponse_4(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,1 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestSendOffCommand_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -32504,58 +24694,38 @@ class Test_TC_OO_2_2: public TestCommand (static_cast(context))->OnFailureResponse_5(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_5() - { NextTest(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_5() { NextTest(); } - - - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( bool onOff) + void OnSuccessResponse_6(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,0 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestSendToggleCommand_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Toggle::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Toggle::Type; RequestType request; @@ -32567,58 +24737,38 @@ class Test_TC_OO_2_2: public TestCommand (static_cast(context))->OnFailureResponse_7(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_7() - { NextTest(); - } - + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_7() { NextTest(); } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterToggleCommand_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_8, OnFailureCallback_8)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_8, OnFailureCallback_8)); + return CHIP_NO_ERROR; } - void OnFailureResponse_8(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_8( bool onOff) + void OnSuccessResponse_8(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,1 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestSendToggleCommand_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Toggle::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Toggle::Type; RequestType request; @@ -32630,58 +24780,38 @@ class Test_TC_OO_2_2: public TestCommand (static_cast(context))->OnFailureResponse_9(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_9() - { NextTest(); - } - + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_9() { NextTest(); } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterToggleCommand_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_10, OnFailureCallback_10)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_10, OnFailureCallback_10)); + return CHIP_NO_ERROR; } - void OnFailureResponse_10(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_10( bool onOff) + void OnSuccessResponse_10(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,0 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestSendOnCommand_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -32693,58 +24823,38 @@ class Test_TC_OO_2_2: public TestCommand (static_cast(context))->OnFailureResponse_11(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_11(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_11() - { NextTest(); - } + void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_11() { NextTest(); } - - - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_12() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_12, OnFailureCallback_12)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_12, OnFailureCallback_12)); + return CHIP_NO_ERROR; } - void OnFailureResponse_12(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_12( bool onOff) + void OnSuccessResponse_12(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,1 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestSendOffCommand_13() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -32756,980 +24866,834 @@ class Test_TC_OO_2_2: public TestCommand (static_cast(context))->OnFailureResponse_13(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_13(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_13() - { NextTest(); - } - + void OnFailureResponse_13(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_13() { NextTest(); } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_14, OnFailureCallback_14)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_14, OnFailureCallback_14)); + return CHIP_NO_ERROR; } - void OnFailureResponse_14(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_14( bool onOff) + void OnSuccessResponse_14(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,0 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 0)); NextTest(); - } - - - }; + } +}; -class Test_TC_OO_2_3: public TestCommand +class Test_TC_OO_2_3 : public TestCommand { - public: - Test_TC_OO_2_3(): TestCommand("Test_TC_OO_2_3"), mTestIndex(0) +public: + Test_TC_OO_2_3() : TestCommand("Test_TC_OO_2_3"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_OO_2_3() - { - } + ~Test_TC_OO_2_3() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_OO_2_3\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_OO_2_3\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OO_2_3\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OO_2_3\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Send On Command\n"); - if (ShouldSkip("CR_ON")) - { - NextTest(); - return; - } - err = TestSendOnCommand_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Send On Command\n"); + if (ShouldSkip("CR_ON")) + { + NextTest(); + return; + } + err = TestSendOnCommand_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Wait 1000ms\n"); - err = TestWait1000ms_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Wait 1000ms\n"); + err = TestWait1000ms_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads OnOff attribute from DUT\n"); - if (ShouldSkip("A_ONOFF")) - { - NextTest(); - return; - } - err = TestReadsOnOffAttributeFromDut_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads OnOff attribute from DUT\n"); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads GlobalSceneControl attribute from DUT\n"); - if (ShouldSkip("A_GLOBALSCENECONTROL")) - { - NextTest(); - return; - } - err = TestReadsGlobalSceneControlAttributeFromDut_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads GlobalSceneControl attribute from DUT\n"); + if (ShouldSkip("A_GLOBALSCENECONTROL")) + { + NextTest(); + return; + } + err = TestReadsGlobalSceneControlAttributeFromDut_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Send On Command\n"); - if (ShouldSkip("CR_ON")) - { - NextTest(); - return; - } - err = TestSendOnCommand_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Send On Command\n"); + if (ShouldSkip("CR_ON")) + { + NextTest(); + return; + } + err = TestSendOnCommand_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1000ms\n"); - err = TestWait1000ms_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1000ms\n"); + err = TestWait1000ms_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads OnOff attribute from DUT\n"); - if (ShouldSkip("A_ONOFF")) - { - NextTest(); - return; - } - err = TestReadsOnOffAttributeFromDut_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : Reads OnOff attribute from DUT\n"); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Reads GlobalSceneControl attribute from DUT\n"); - if (ShouldSkip("A_GLOBALSCENECONTROL")) - { - NextTest(); - return; - } - err = TestReadsGlobalSceneControlAttributeFromDut_8(); - break; + ChipLogProgress(chipTool, " ***** Test Step 8 : Reads GlobalSceneControl attribute from DUT\n"); + if (ShouldSkip("A_GLOBALSCENECONTROL")) + { + NextTest(); + return; + } + err = TestReadsGlobalSceneControlAttributeFromDut_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Send On Command\n"); - if (ShouldSkip("CR_ON")) - { - NextTest(); - return; - } - err = TestSendOnCommand_9(); - break; + ChipLogProgress(chipTool, " ***** Test Step 9 : Send On Command\n"); + if (ShouldSkip("CR_ON")) + { + NextTest(); + return; + } + err = TestSendOnCommand_9(); + break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 1000ms\n"); - err = TestWait1000ms_10(); - break; + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 1000ms\n"); + err = TestWait1000ms_10(); + break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Reads OnOff attribute from DUT\n"); - if (ShouldSkip("A_ONOFF")) - { - NextTest(); - return; - } - err = TestReadsOnOffAttributeFromDut_11(); - break; + ChipLogProgress(chipTool, " ***** Test Step 11 : Reads OnOff attribute from DUT\n"); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_11(); + break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Reads GlobalSceneControl attribute from DUT\n"); - if (ShouldSkip("A_GLOBALSCENECONTROL")) - { - NextTest(); - return; - } - err = TestReadsGlobalSceneControlAttributeFromDut_12(); - break; + ChipLogProgress(chipTool, " ***** Test Step 12 : Reads GlobalSceneControl attribute from DUT\n"); + if (ShouldSkip("A_GLOBALSCENECONTROL")) + { + NextTest(); + return; + } + err = TestReadsGlobalSceneControlAttributeFromDut_12(); + break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Reads OnTime attribute from DUT\n"); - if (ShouldSkip("A_ONTIME")) - { - NextTest(); - return; - } - err = TestReadsOnTimeAttributeFromDut_13(); - break; + ChipLogProgress(chipTool, " ***** Test Step 13 : Reads OnTime attribute from DUT\n"); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_13(); + break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Reads OffWaitTime attribute from DUT\n"); - if (ShouldSkip("A_OFFWAITTIME")) - { - NextTest(); - return; - } - err = TestReadsOffWaitTimeAttributeFromDut_14(); - break; + ChipLogProgress(chipTool, " ***** Test Step 14 : Reads OffWaitTime attribute from DUT\n"); + if (ShouldSkip("A_OFFWAITTIME")) + { + NextTest(); + return; + } + err = TestReadsOffWaitTimeAttributeFromDut_14(); + break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Send On Command\n"); - if (ShouldSkip("CR_ON")) - { - NextTest(); - return; - } - err = TestSendOnCommand_15(); - break; + ChipLogProgress(chipTool, " ***** Test Step 15 : Send On Command\n"); + if (ShouldSkip("CR_ON")) + { + NextTest(); + return; + } + err = TestSendOnCommand_15(); + break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Reads OnOff attribute from DUT\n"); - if (ShouldSkip("A_ONOFF")) - { - NextTest(); - return; - } - err = TestReadsOnOffAttributeFromDut_16(); - break; + ChipLogProgress(chipTool, " ***** Test Step 16 : Reads OnOff attribute from DUT\n"); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_16(); + break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Reads OnTime attribute from DUT\n"); - if (ShouldSkip("A_ONTIME")) - { - NextTest(); - return; - } - err = TestReadsOnTimeAttributeFromDut_17(); - break; + ChipLogProgress(chipTool, " ***** Test Step 17 : Reads OnTime attribute from DUT\n"); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_17(); + break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Reads OffWaitTime attribute from DUT\n"); - if (ShouldSkip("A_OFFWAITTIME")) - { - NextTest(); - return; - } - err = TestReadsOffWaitTimeAttributeFromDut_18(); - break; + ChipLogProgress(chipTool, " ***** Test Step 18 : Reads OffWaitTime attribute from DUT\n"); + if (ShouldSkip("A_OFFWAITTIME")) + { + NextTest(); + return; + } + err = TestReadsOffWaitTimeAttributeFromDut_18(); + break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Send Off Command\n"); - if (ShouldSkip("CR_OFF")) - { - NextTest(); - return; - } - err = TestSendOffCommand_19(); - break; + ChipLogProgress(chipTool, " ***** Test Step 19 : Send Off Command\n"); + if (ShouldSkip("CR_OFF")) + { + NextTest(); + return; + } + err = TestSendOffCommand_19(); + break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Reads OnOff attribute from DUT\n"); - if (ShouldSkip("A_ONOFF")) - { - NextTest(); - return; - } - err = TestReadsOnOffAttributeFromDut_20(); - break; + ChipLogProgress(chipTool, " ***** Test Step 20 : Reads OnOff attribute from DUT\n"); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_20(); + break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Reads OnTime attribute from DUT\n"); - if (ShouldSkip("A_ONTIME")) - { - NextTest(); - return; - } - err = TestReadsOnTimeAttributeFromDut_21(); - break; + ChipLogProgress(chipTool, " ***** Test Step 21 : Reads OnTime attribute from DUT\n"); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_21(); + break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Reads OnOff attribute from DUT\n"); - if (ShouldSkip("A_ONOFF")) - { - NextTest(); - return; - } - err = TestReadsOnOffAttributeFromDut_22(); - break; + ChipLogProgress(chipTool, " ***** Test Step 22 : Reads OnOff attribute from DUT\n"); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_22(); + break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Reads OnTime attribute from DUT\n"); - if (ShouldSkip("A_ONTIME")) - { - NextTest(); - return; - } - err = TestReadsOnTimeAttributeFromDut_23(); - break; + ChipLogProgress(chipTool, " ***** Test Step 23 : Reads OnTime attribute from DUT\n"); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_23(); + break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Reads OffWaitTime attribute from DUT\n"); - if (ShouldSkip("A_OFFWAITTIME")) - { - NextTest(); - return; - } - err = TestReadsOffWaitTimeAttributeFromDut_24(); - break; + ChipLogProgress(chipTool, " ***** Test Step 24 : Reads OffWaitTime attribute from DUT\n"); + if (ShouldSkip("A_OFFWAITTIME")) + { + NextTest(); + return; + } + err = TestReadsOffWaitTimeAttributeFromDut_24(); + break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Send On Command\n"); - if (ShouldSkip("CR_ON")) - { - NextTest(); - return; - } - err = TestSendOnCommand_25(); - break; + ChipLogProgress(chipTool, " ***** Test Step 25 : Send On Command\n"); + if (ShouldSkip("CR_ON")) + { + NextTest(); + return; + } + err = TestSendOnCommand_25(); + break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Reads OnTime attribute from DUT\n"); - if (ShouldSkip("A_ONTIME")) - { - NextTest(); - return; - } - err = TestReadsOnTimeAttributeFromDut_26(); - break; + ChipLogProgress(chipTool, " ***** Test Step 26 : Reads OnTime attribute from DUT\n"); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_26(); + break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Reads OffWaitTime attribute from DUT\n"); - if (ShouldSkip("A_OFFWAITTIME")) - { - NextTest(); - return; - } - err = TestReadsOffWaitTimeAttributeFromDut_27(); - break; + ChipLogProgress(chipTool, " ***** Test Step 27 : Reads OffWaitTime attribute from DUT\n"); + if (ShouldSkip("A_OFFWAITTIME")) + { + NextTest(); + return; + } + err = TestReadsOffWaitTimeAttributeFromDut_27(); + break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Send Off Command\n"); - if (ShouldSkip("CR_OFF")) - { - NextTest(); - return; - } - err = TestSendOffCommand_28(); - break; + ChipLogProgress(chipTool, " ***** Test Step 28 : Send Off Command\n"); + if (ShouldSkip("CR_OFF")) + { + NextTest(); + return; + } + err = TestSendOffCommand_28(); + break; case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Reads OnOff attribute from DUT\n"); - if (ShouldSkip("A_ONOFF")) - { - NextTest(); - return; - } - err = TestReadsOnOffAttributeFromDut_29(); - break; + ChipLogProgress(chipTool, " ***** Test Step 29 : Reads OnOff attribute from DUT\n"); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_29(); + break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Reads OnTime attribute from DUT\n"); - if (ShouldSkip("A_ONTIME")) - { - NextTest(); - return; - } - err = TestReadsOnTimeAttributeFromDut_30(); - break; + ChipLogProgress(chipTool, " ***** Test Step 30 : Reads OnTime attribute from DUT\n"); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_30(); + break; case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Reads OnOff attribute from DUT\n"); - if (ShouldSkip("A_ONOFF")) - { - NextTest(); - return; - } - err = TestReadsOnOffAttributeFromDut_31(); - break; + ChipLogProgress(chipTool, " ***** Test Step 31 : Reads OnOff attribute from DUT\n"); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_31(); + break; case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Reads OnTime attribute from DUT\n"); - if (ShouldSkip("A_ONTIME")) - { - NextTest(); - return; - } - err = TestReadsOnTimeAttributeFromDut_32(); - break; + ChipLogProgress(chipTool, " ***** Test Step 32 : Reads OnTime attribute from DUT\n"); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_32(); + break; case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Send On Command\n"); - if (ShouldSkip("CR_ON")) - { - NextTest(); - return; - } - err = TestSendOnCommand_33(); - break; + ChipLogProgress(chipTool, " ***** Test Step 33 : Send On Command\n"); + if (ShouldSkip("CR_ON")) + { + NextTest(); + return; + } + err = TestSendOnCommand_33(); + break; case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Reads OnOff attribute from DUT\n"); - if (ShouldSkip("A_ONOFF")) - { - NextTest(); - return; - } - err = TestReadsOnOffAttributeFromDut_34(); - break; + ChipLogProgress(chipTool, " ***** Test Step 34 : Reads OnOff attribute from DUT\n"); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_34(); + break; case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Reads OnTime attribute from DUT\n"); - if (ShouldSkip("A_ONTIME")) - { - NextTest(); - return; - } - err = TestReadsOnTimeAttributeFromDut_35(); - break; + ChipLogProgress(chipTool, " ***** Test Step 35 : Reads OnTime attribute from DUT\n"); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_35(); + break; case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Reads OffWaitTime attribute from DUT\n"); - if (ShouldSkip("A_OFFWAITTIME")) - { - NextTest(); - return; - } - err = TestReadsOffWaitTimeAttributeFromDut_36(); - break; + ChipLogProgress(chipTool, " ***** Test Step 36 : Reads OffWaitTime attribute from DUT\n"); + if (ShouldSkip("A_OFFWAITTIME")) + { + NextTest(); + return; + } + err = TestReadsOffWaitTimeAttributeFromDut_36(); + break; case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Send Off Command\n"); - if (ShouldSkip("CR_OFF")) - { - NextTest(); - return; - } - err = TestSendOffCommand_37(); - break; + ChipLogProgress(chipTool, " ***** Test Step 37 : Send Off Command\n"); + if (ShouldSkip("CR_OFF")) + { + NextTest(); + return; + } + err = TestSendOffCommand_37(); + break; case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : Reads OnOff attribute from DUT\n"); - if (ShouldSkip("A_ONOFF")) - { - NextTest(); - return; - } - err = TestReadsOnOffAttributeFromDut_38(); - break; + ChipLogProgress(chipTool, " ***** Test Step 38 : Reads OnOff attribute from DUT\n"); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_38(); + break; case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : Reads OnTime attribute from DUT\n"); - if (ShouldSkip("A_ONTIME")) - { - NextTest(); - return; - } - err = TestReadsOnTimeAttributeFromDut_39(); - break; + ChipLogProgress(chipTool, " ***** Test Step 39 : Reads OnTime attribute from DUT\n"); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_39(); + break; case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : Reads OnOff attribute from DUT\n"); - if (ShouldSkip("A_ONOFF")) - { - NextTest(); - return; - } - err = TestReadsOnOffAttributeFromDut_40(); - break; + ChipLogProgress(chipTool, " ***** Test Step 40 : Reads OnOff attribute from DUT\n"); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_40(); + break; case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : Reads OnTime attribute from DUT\n"); - if (ShouldSkip("A_ONTIME")) - { - NextTest(); - return; - } - err = TestReadsOnTimeAttributeFromDut_41(); - break; + ChipLogProgress(chipTool, " ***** Test Step 41 : Reads OnTime attribute from DUT\n"); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_41(); + break; case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : Reads OffWaitTime attribute from DUT\n"); - if (ShouldSkip("A_OFFWAITTIME")) - { - NextTest(); - return; - } - err = TestReadsOffWaitTimeAttributeFromDut_42(); - break; + ChipLogProgress(chipTool, " ***** Test Step 42 : Reads OffWaitTime attribute from DUT\n"); + if (ShouldSkip("A_OFFWAITTIME")) + { + NextTest(); + return; + } + err = TestReadsOffWaitTimeAttributeFromDut_42(); + break; case 43: - ChipLogProgress(chipTool, " ***** Test Step 43 : Reads OnOff attribute from DUT\n"); - if (ShouldSkip("A_ONOFF")) - { - NextTest(); - return; - } - err = TestReadsOnOffAttributeFromDut_43(); - break; + ChipLogProgress(chipTool, " ***** Test Step 43 : Reads OnOff attribute from DUT\n"); + if (ShouldSkip("A_ONOFF")) + { + NextTest(); + return; + } + err = TestReadsOnOffAttributeFromDut_43(); + break; case 44: - ChipLogProgress(chipTool, " ***** Test Step 44 : Reads OnTime attribute from DUT\n"); - if (ShouldSkip("A_ONTIME")) - { - NextTest(); - return; - } - err = TestReadsOnTimeAttributeFromDut_44(); - break; + ChipLogProgress(chipTool, " ***** Test Step 44 : Reads OnTime attribute from DUT\n"); + if (ShouldSkip("A_ONTIME")) + { + NextTest(); + return; + } + err = TestReadsOnTimeAttributeFromDut_44(); + break; case 45: - ChipLogProgress(chipTool, " ***** Test Step 45 : Reads OffWaitTime attribute from DUT\n"); - if (ShouldSkip("A_OFFWAITTIME")) - { - NextTest(); - return; - } - err = TestReadsOffWaitTimeAttributeFromDut_45(); - break; + ChipLogProgress(chipTool, " ***** Test Step 45 : Reads OffWaitTime attribute from DUT\n"); + if (ShouldSkip("A_OFFWAITTIME")) + { + NextTest(); + return; + } + err = TestReadsOffWaitTimeAttributeFromDut_45(); + break; case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : Send Off Command\n"); - if (ShouldSkip("CR_OFF")) - { - NextTest(); - return; - } - err = TestSendOffCommand_46(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 46 : Send Off Command\n"); + if (ShouldSkip("CR_OFF")) + { + NextTest(); + return; + } + err = TestSendOffCommand_46(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 47; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, bool onOff) + static void OnSuccessCallback_3(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_3(onOff); } - - - static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, bool globalSceneControl) + static void OnSuccessCallback_4(void * context, bool globalSceneControl) { (static_cast(context))->OnSuccessResponse_4(globalSceneControl); } - - - static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context, bool onOff) + static void OnSuccessCallback_7(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_7(onOff); } - - - static void OnFailureCallback_8(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context, bool globalSceneControl) + static void OnSuccessCallback_8(void * context, bool globalSceneControl) { (static_cast(context))->OnSuccessResponse_8(globalSceneControl); } - - - static void OnFailureCallback_11(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_11(status); } - static void OnSuccessCallback_11(void * context, bool onOff) + static void OnSuccessCallback_11(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_11(onOff); } - - - static void OnFailureCallback_12(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_12(status); } - static void OnSuccessCallback_12(void * context, bool globalSceneControl) + static void OnSuccessCallback_12(void * context, bool globalSceneControl) { (static_cast(context))->OnSuccessResponse_12(globalSceneControl); } - - - static void OnFailureCallback_13(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_13(status); } - static void OnSuccessCallback_13(void * context, uint16_t onTime) + static void OnSuccessCallback_13(void * context, uint16_t onTime) { (static_cast(context))->OnSuccessResponse_13(onTime); } - - - static void OnFailureCallback_14(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_14(status); } - static void OnSuccessCallback_14(void * context, uint16_t offWaitTime) + static void OnSuccessCallback_14(void * context, uint16_t offWaitTime) { (static_cast(context))->OnSuccessResponse_14(offWaitTime); } - - - static void OnFailureCallback_16(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_16(status); } - static void OnSuccessCallback_16(void * context, bool onOff) + static void OnSuccessCallback_16(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_16(onOff); } - - - static void OnFailureCallback_17(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_17(status); } - static void OnSuccessCallback_17(void * context, uint16_t onTime) + static void OnSuccessCallback_17(void * context, uint16_t onTime) { (static_cast(context))->OnSuccessResponse_17(onTime); } - - - static void OnFailureCallback_18(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_18(status); } - static void OnSuccessCallback_18(void * context, uint16_t offWaitTime) + static void OnSuccessCallback_18(void * context, uint16_t offWaitTime) { (static_cast(context))->OnSuccessResponse_18(offWaitTime); } - - - static void OnFailureCallback_20(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_20(status); } - static void OnSuccessCallback_20(void * context, bool onOff) + static void OnSuccessCallback_20(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_20(onOff); } - - - static void OnFailureCallback_21(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_21(status); } - static void OnSuccessCallback_21(void * context, uint16_t onTime) + static void OnSuccessCallback_21(void * context, uint16_t onTime) { (static_cast(context))->OnSuccessResponse_21(onTime); } - - - static void OnFailureCallback_22(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_22(status); } - static void OnSuccessCallback_22(void * context, bool onOff) + static void OnSuccessCallback_22(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_22(onOff); } - - - static void OnFailureCallback_23(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_23(status); } - static void OnSuccessCallback_23(void * context, uint16_t onTime) + static void OnSuccessCallback_23(void * context, uint16_t onTime) { (static_cast(context))->OnSuccessResponse_23(onTime); } - - - static void OnFailureCallback_24(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_24(status); } - static void OnSuccessCallback_24(void * context, uint16_t offWaitTime) + static void OnSuccessCallback_24(void * context, uint16_t offWaitTime) { (static_cast(context))->OnSuccessResponse_24(offWaitTime); } - - - static void OnFailureCallback_26(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_26(status); } - static void OnSuccessCallback_26(void * context, uint16_t onTime) + static void OnSuccessCallback_26(void * context, uint16_t onTime) { (static_cast(context))->OnSuccessResponse_26(onTime); } - - - static void OnFailureCallback_27(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_27(status); } - static void OnSuccessCallback_27(void * context, uint16_t offWaitTime) + static void OnSuccessCallback_27(void * context, uint16_t offWaitTime) { (static_cast(context))->OnSuccessResponse_27(offWaitTime); } - - - static void OnFailureCallback_29(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_29(status); } - static void OnSuccessCallback_29(void * context, bool onOff) + static void OnSuccessCallback_29(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_29(onOff); } - - - static void OnFailureCallback_30(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_30(status); } - static void OnSuccessCallback_30(void * context, uint16_t onTime) + static void OnSuccessCallback_30(void * context, uint16_t onTime) { (static_cast(context))->OnSuccessResponse_30(onTime); } - - - static void OnFailureCallback_31(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_31(status); } - static void OnSuccessCallback_31(void * context, bool onOff) + static void OnSuccessCallback_31(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_31(onOff); } - - - static void OnFailureCallback_32(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_32(status); } - static void OnSuccessCallback_32(void * context, uint16_t onTime) + static void OnSuccessCallback_32(void * context, uint16_t onTime) { (static_cast(context))->OnSuccessResponse_32(onTime); } - - - static void OnFailureCallback_34(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_34(status); } - static void OnSuccessCallback_34(void * context, bool onOff) + static void OnSuccessCallback_34(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_34(onOff); } - - - static void OnFailureCallback_35(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_35(status); } - static void OnSuccessCallback_35(void * context, uint16_t onTime) + static void OnSuccessCallback_35(void * context, uint16_t onTime) { (static_cast(context))->OnSuccessResponse_35(onTime); } - - - static void OnFailureCallback_36(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_36(status); } - static void OnSuccessCallback_36(void * context, uint16_t offWaitTime) + static void OnSuccessCallback_36(void * context, uint16_t offWaitTime) { (static_cast(context))->OnSuccessResponse_36(offWaitTime); } - - - static void OnFailureCallback_38(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_38(status); } - static void OnSuccessCallback_38(void * context, bool onOff) + static void OnSuccessCallback_38(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_38(onOff); } - - - static void OnFailureCallback_39(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_39(status); } - static void OnSuccessCallback_39(void * context, uint16_t onTime) + static void OnSuccessCallback_39(void * context, uint16_t onTime) { (static_cast(context))->OnSuccessResponse_39(onTime); } - - - static void OnFailureCallback_40(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_40(status); } - static void OnSuccessCallback_40(void * context, bool onOff) + static void OnSuccessCallback_40(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_40(onOff); } - - - static void OnFailureCallback_41(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_41(status); } - static void OnSuccessCallback_41(void * context, uint16_t onTime) + static void OnSuccessCallback_41(void * context, uint16_t onTime) { (static_cast(context))->OnSuccessResponse_41(onTime); } - - - static void OnFailureCallback_42(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_42(status); } - static void OnSuccessCallback_42(void * context, uint16_t offWaitTime) + static void OnSuccessCallback_42(void * context, uint16_t offWaitTime) { (static_cast(context))->OnSuccessResponse_42(offWaitTime); } - - - static void OnFailureCallback_43(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_43(status); } - static void OnSuccessCallback_43(void * context, bool onOff) + static void OnSuccessCallback_43(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_43(onOff); } - - - static void OnFailureCallback_44(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_44(status); } - static void OnSuccessCallback_44(void * context, uint16_t onTime) + static void OnSuccessCallback_44(void * context, uint16_t onTime) { (static_cast(context))->OnSuccessResponse_44(onTime); } - - - static void OnFailureCallback_45(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_45(status); } - static void OnSuccessCallback_45(void * context, uint16_t offWaitTime) + static void OnSuccessCallback_45(void * context, uint16_t offWaitTime) { (static_cast(context))->OnSuccessResponse_45(offWaitTime); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestSendOnCommand_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -33741,92 +25705,64 @@ class Test_TC_OO_2_3: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_1() - { NextTest(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestWait1000ms_2() { SetIdentity(kIdentityAlpha); return WaitForMs(1000); } - - CHIP_ERROR TestReadsOnOffAttributeFromDut_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( bool onOff) + void OnSuccessResponse_3(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,1 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsGlobalSceneControlAttributeFromDut_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( bool globalSceneControl) + void OnSuccessResponse_4(bool globalSceneControl) { - VerifyOrReturn(CheckValue("globalSceneControl", globalSceneControl,1 - )); + VerifyOrReturn(CheckValue("globalSceneControl", globalSceneControl, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestSendOnCommand_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -33838,92 +25774,64 @@ class Test_TC_OO_2_3: public TestCommand (static_cast(context))->OnFailureResponse_5(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_5() - { NextTest(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_5() { NextTest(); } - CHIP_ERROR TestWait1000ms_6() { SetIdentity(kIdentityAlpha); return WaitForMs(1000); } - - CHIP_ERROR TestReadsOnOffAttributeFromDut_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_7, OnFailureCallback_7)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7( bool onOff) + void OnSuccessResponse_7(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,1 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsGlobalSceneControlAttributeFromDut_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_8, OnFailureCallback_8)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_8, OnFailureCallback_8)); + return CHIP_NO_ERROR; } - void OnFailureResponse_8(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_8( bool globalSceneControl) + void OnSuccessResponse_8(bool globalSceneControl) { - VerifyOrReturn(CheckValue("globalSceneControl", globalSceneControl,1 - )); + VerifyOrReturn(CheckValue("globalSceneControl", globalSceneControl, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestSendOnCommand_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -33935,148 +25843,104 @@ class Test_TC_OO_2_3: public TestCommand (static_cast(context))->OnFailureResponse_9(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_9() - { NextTest(); - } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_9() { NextTest(); } - CHIP_ERROR TestWait1000ms_10() { SetIdentity(kIdentityAlpha); return WaitForMs(1000); } - - CHIP_ERROR TestReadsOnOffAttributeFromDut_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_11, OnFailureCallback_11)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_11, OnFailureCallback_11)); + return CHIP_NO_ERROR; } - void OnFailureResponse_11(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_11( bool onOff) + void OnSuccessResponse_11(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,1 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsGlobalSceneControlAttributeFromDut_12() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_12, OnFailureCallback_12)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_12, OnFailureCallback_12)); + return CHIP_NO_ERROR; } - void OnFailureResponse_12(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_12( bool globalSceneControl) + void OnSuccessResponse_12(bool globalSceneControl) { - VerifyOrReturn(CheckValue("globalSceneControl", globalSceneControl,1 - )); + VerifyOrReturn(CheckValue("globalSceneControl", globalSceneControl, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsOnTimeAttributeFromDut_13() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_13, OnFailureCallback_13)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_13, OnFailureCallback_13)); + return CHIP_NO_ERROR; } - void OnFailureResponse_13(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_13(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_13( uint16_t onTime) + void OnSuccessResponse_13(uint16_t onTime) { - VerifyOrReturn(CheckValue("onTime", onTime,0U - )); + VerifyOrReturn(CheckValue("onTime", onTime, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsOffWaitTimeAttributeFromDut_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_14, OnFailureCallback_14)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_14, OnFailureCallback_14)); + return CHIP_NO_ERROR; } - void OnFailureResponse_14(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_14( uint16_t offWaitTime) + void OnSuccessResponse_14(uint16_t offWaitTime) { - VerifyOrReturn(CheckValue("offWaitTime", offWaitTime,0U - )); + VerifyOrReturn(CheckValue("offWaitTime", offWaitTime, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestSendOnCommand_15() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -34088,114 +25952,78 @@ class Test_TC_OO_2_3: public TestCommand (static_cast(context))->OnFailureResponse_15(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_15(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_15() - { NextTest(); - } - + void OnFailureResponse_15(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_15() { NextTest(); } - CHIP_ERROR TestReadsOnOffAttributeFromDut_16() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_16, OnFailureCallback_16)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_16, OnFailureCallback_16)); + return CHIP_NO_ERROR; } - void OnFailureResponse_16(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_16(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_16( bool onOff) + void OnSuccessResponse_16(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,1 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsOnTimeAttributeFromDut_17() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_17, OnFailureCallback_17)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_17, OnFailureCallback_17)); + return CHIP_NO_ERROR; } - void OnFailureResponse_17(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_17(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_17( uint16_t onTime) + void OnSuccessResponse_17(uint16_t onTime) { - VerifyOrReturn(CheckValue("onTime", onTime,0U - )); + VerifyOrReturn(CheckValue("onTime", onTime, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsOffWaitTimeAttributeFromDut_18() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_18, OnFailureCallback_18)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_18, OnFailureCallback_18)); + return CHIP_NO_ERROR; } - void OnFailureResponse_18(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_18(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_18( uint16_t offWaitTime) + void OnSuccessResponse_18(uint16_t offWaitTime) { - VerifyOrReturn(CheckValue("offWaitTime", offWaitTime,0U - )); + VerifyOrReturn(CheckValue("offWaitTime", offWaitTime, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestSendOffCommand_19() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -34207,170 +26035,118 @@ class Test_TC_OO_2_3: public TestCommand (static_cast(context))->OnFailureResponse_19(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_19(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_19() - { NextTest(); - } - + void OnFailureResponse_19(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_19() { NextTest(); } - CHIP_ERROR TestReadsOnOffAttributeFromDut_20() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_20, OnFailureCallback_20)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_20, OnFailureCallback_20)); + return CHIP_NO_ERROR; } - void OnFailureResponse_20(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_20(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_20( bool onOff) + void OnSuccessResponse_20(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,0 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsOnTimeAttributeFromDut_21() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_21, OnFailureCallback_21)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_21, OnFailureCallback_21)); + return CHIP_NO_ERROR; } - void OnFailureResponse_21(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_21(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_21( uint16_t onTime) + void OnSuccessResponse_21(uint16_t onTime) { - VerifyOrReturn(CheckValue("onTime", onTime,0U - )); + VerifyOrReturn(CheckValue("onTime", onTime, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsOnOffAttributeFromDut_22() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_22, OnFailureCallback_22)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_22, OnFailureCallback_22)); + return CHIP_NO_ERROR; } - void OnFailureResponse_22(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_22(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_22( bool onOff) + void OnSuccessResponse_22(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,0 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsOnTimeAttributeFromDut_23() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_23, OnFailureCallback_23)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_23, OnFailureCallback_23)); + return CHIP_NO_ERROR; } - void OnFailureResponse_23(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_23(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_23( uint16_t onTime) + void OnSuccessResponse_23(uint16_t onTime) { - VerifyOrReturn(CheckValue("onTime", onTime,0U - )); + VerifyOrReturn(CheckValue("onTime", onTime, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsOffWaitTimeAttributeFromDut_24() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_24, OnFailureCallback_24)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_24, OnFailureCallback_24)); + return CHIP_NO_ERROR; } - void OnFailureResponse_24(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_24(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_24( uint16_t offWaitTime) + void OnSuccessResponse_24(uint16_t offWaitTime) { - VerifyOrReturn(CheckValue("offWaitTime", offWaitTime,0U - )); + VerifyOrReturn(CheckValue("offWaitTime", offWaitTime, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestSendOnCommand_25() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -34382,86 +26158,58 @@ class Test_TC_OO_2_3: public TestCommand (static_cast(context))->OnFailureResponse_25(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_25(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_25() - { NextTest(); - } - + void OnFailureResponse_25(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_25() { NextTest(); } - CHIP_ERROR TestReadsOnTimeAttributeFromDut_26() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_26, OnFailureCallback_26)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_26, OnFailureCallback_26)); + return CHIP_NO_ERROR; } - void OnFailureResponse_26(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_26(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_26( uint16_t onTime) + void OnSuccessResponse_26(uint16_t onTime) { - VerifyOrReturn(CheckValue("onTime", onTime,0U - )); + VerifyOrReturn(CheckValue("onTime", onTime, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsOffWaitTimeAttributeFromDut_27() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_27, OnFailureCallback_27)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_27, OnFailureCallback_27)); + return CHIP_NO_ERROR; } - void OnFailureResponse_27(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_27(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_27( uint16_t offWaitTime) + void OnSuccessResponse_27(uint16_t offWaitTime) { - VerifyOrReturn(CheckValue("offWaitTime", offWaitTime,0U - )); + VerifyOrReturn(CheckValue("offWaitTime", offWaitTime, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestSendOffCommand_28() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -34473,142 +26221,98 @@ class Test_TC_OO_2_3: public TestCommand (static_cast(context))->OnFailureResponse_28(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_28(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_28() - { NextTest(); - } - + void OnFailureResponse_28(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_28() { NextTest(); } - CHIP_ERROR TestReadsOnOffAttributeFromDut_29() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_29, OnFailureCallback_29)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_29, OnFailureCallback_29)); + return CHIP_NO_ERROR; } - void OnFailureResponse_29(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_29(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_29( bool onOff) + void OnSuccessResponse_29(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,0 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsOnTimeAttributeFromDut_30() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_30, OnFailureCallback_30)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_30, OnFailureCallback_30)); + return CHIP_NO_ERROR; } - void OnFailureResponse_30(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_30(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_30( uint16_t onTime) + void OnSuccessResponse_30(uint16_t onTime) { - VerifyOrReturn(CheckValue("onTime", onTime,0U - )); + VerifyOrReturn(CheckValue("onTime", onTime, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsOnOffAttributeFromDut_31() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_31, OnFailureCallback_31)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_31, OnFailureCallback_31)); + return CHIP_NO_ERROR; } - void OnFailureResponse_31(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_31(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_31( bool onOff) + void OnSuccessResponse_31(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,0 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsOnTimeAttributeFromDut_32() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_32, OnFailureCallback_32)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_32, OnFailureCallback_32)); + return CHIP_NO_ERROR; } - void OnFailureResponse_32(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_32(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_32( uint16_t onTime) + void OnSuccessResponse_32(uint16_t onTime) { - VerifyOrReturn(CheckValue("onTime", onTime,0U - )); + VerifyOrReturn(CheckValue("onTime", onTime, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestSendOnCommand_33() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -34620,114 +26324,78 @@ class Test_TC_OO_2_3: public TestCommand (static_cast(context))->OnFailureResponse_33(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_33(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_33() - { NextTest(); - } - + void OnFailureResponse_33(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_33() { NextTest(); } - CHIP_ERROR TestReadsOnOffAttributeFromDut_34() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_34, OnFailureCallback_34)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_34, OnFailureCallback_34)); + return CHIP_NO_ERROR; } - void OnFailureResponse_34(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_34(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_34( bool onOff) + void OnSuccessResponse_34(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,1 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsOnTimeAttributeFromDut_35() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_35, OnFailureCallback_35)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_35, OnFailureCallback_35)); + return CHIP_NO_ERROR; } - void OnFailureResponse_35(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_35(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_35( uint16_t onTime) + void OnSuccessResponse_35(uint16_t onTime) { - VerifyOrReturn(CheckValue("onTime", onTime,0U - )); + VerifyOrReturn(CheckValue("onTime", onTime, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsOffWaitTimeAttributeFromDut_36() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_36, OnFailureCallback_36)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_36, OnFailureCallback_36)); + return CHIP_NO_ERROR; } - void OnFailureResponse_36(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_36(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_36( uint16_t offWaitTime) + void OnSuccessResponse_36(uint16_t offWaitTime) { - VerifyOrReturn(CheckValue("offWaitTime", offWaitTime,0U - )); + VerifyOrReturn(CheckValue("offWaitTime", offWaitTime, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestSendOffCommand_37() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -34739,254 +26407,178 @@ class Test_TC_OO_2_3: public TestCommand (static_cast(context))->OnFailureResponse_37(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_37(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_37() - { NextTest(); - } - + void OnFailureResponse_37(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_37() { NextTest(); } - CHIP_ERROR TestReadsOnOffAttributeFromDut_38() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_38, OnFailureCallback_38)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_38, OnFailureCallback_38)); + return CHIP_NO_ERROR; } - void OnFailureResponse_38(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_38(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_38( bool onOff) + void OnSuccessResponse_38(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,0 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsOnTimeAttributeFromDut_39() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_39, OnFailureCallback_39)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_39, OnFailureCallback_39)); + return CHIP_NO_ERROR; } - void OnFailureResponse_39(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_39(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_39( uint16_t onTime) + void OnSuccessResponse_39(uint16_t onTime) { - VerifyOrReturn(CheckValue("onTime", onTime,0U - )); + VerifyOrReturn(CheckValue("onTime", onTime, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsOnOffAttributeFromDut_40() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_40, OnFailureCallback_40)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_40, OnFailureCallback_40)); + return CHIP_NO_ERROR; } - void OnFailureResponse_40(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_40(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_40( bool onOff) + void OnSuccessResponse_40(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,0 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsOnTimeAttributeFromDut_41() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_41, OnFailureCallback_41)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_41, OnFailureCallback_41)); + return CHIP_NO_ERROR; } - void OnFailureResponse_41(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_41(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_41( uint16_t onTime) + void OnSuccessResponse_41(uint16_t onTime) { - VerifyOrReturn(CheckValue("onTime", onTime,0U - )); + VerifyOrReturn(CheckValue("onTime", onTime, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsOffWaitTimeAttributeFromDut_42() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_42, OnFailureCallback_42)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_42, OnFailureCallback_42)); + return CHIP_NO_ERROR; } - void OnFailureResponse_42(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_42(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_42( uint16_t offWaitTime) + void OnSuccessResponse_42(uint16_t offWaitTime) { - VerifyOrReturn(CheckValue("offWaitTime", offWaitTime,0U - )); + VerifyOrReturn(CheckValue("offWaitTime", offWaitTime, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsOnOffAttributeFromDut_43() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_43, OnFailureCallback_43)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_43, OnFailureCallback_43)); + return CHIP_NO_ERROR; } - void OnFailureResponse_43(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_43(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_43( bool onOff) + void OnSuccessResponse_43(bool onOff) { - VerifyOrReturn(CheckValue("onOff", onOff,0 - )); + VerifyOrReturn(CheckValue("onOff", onOff, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsOnTimeAttributeFromDut_44() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_44, OnFailureCallback_44)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_44, OnFailureCallback_44)); + return CHIP_NO_ERROR; } - void OnFailureResponse_44(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_44(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_44( uint16_t onTime) + void OnSuccessResponse_44(uint16_t onTime) { - VerifyOrReturn(CheckValue("onTime", onTime,0U - )); + VerifyOrReturn(CheckValue("onTime", onTime, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsOffWaitTimeAttributeFromDut_45() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_45, OnFailureCallback_45)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_45, OnFailureCallback_45)); + return CHIP_NO_ERROR; } - void OnFailureResponse_45(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_45(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_45( uint16_t offWaitTime) + void OnSuccessResponse_45(uint16_t offWaitTime) { - VerifyOrReturn(CheckValue("offWaitTime", offWaitTime,0U - )); + VerifyOrReturn(CheckValue("offWaitTime", offWaitTime, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestSendOffCommand_46() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -34998,180 +26590,126 @@ class Test_TC_OO_2_3: public TestCommand (static_cast(context))->OnFailureResponse_46(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_46(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_46() - { NextTest(); - } - + void OnFailureResponse_46(EmberAfStatus status) { ThrowFailureResponse(); } - }; + void OnSuccessResponse_46() { NextTest(); } +}; -class Test_TC_PRS_1_1: public TestCommand +class Test_TC_PRS_1_1 : public TestCommand { - public: - Test_TC_PRS_1_1(): TestCommand("Test_TC_PRS_1_1"), mTestIndex(0) +public: + Test_TC_PRS_1_1() : TestCommand("Test_TC_PRS_1_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_PRS_1_1() - { - } + ~Test_TC_PRS_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_PRS_1_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_PRS_1_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PRS_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PRS_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2(); - break; - } + ChipLogProgress(chipTool, + " ***** Test Step 2 : Write the default values to mandatory global attribute: ClusterRevision\n"); + err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_1(clusterRevision); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context) - { - (static_cast(context))->OnSuccessResponse_2(); - } - - - + static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PressureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint16_t clusterRevision) + void OnSuccessResponse_1(uint16_t clusterRevision) { - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -35179,299 +26717,225 @@ class Test_TC_PRS_1_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t clusterRevisionArgument; - clusterRevisionArgument = 3U; - - ReturnErrorOnFailure(cluster.WriteAttribute(clusterRevisionArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + clusterRevisionArgument = 3U; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + clusterRevisionArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_2() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_2() { ThrowSuccessResponse(); } +}; - }; - -class Test_TC_PRS_2_1: public TestCommand +class Test_TC_PRS_2_1 : public TestCommand { - public: - Test_TC_PRS_2_1(): TestCommand("Test_TC_PRS_2_1"), mTestIndex(0) +public: + Test_TC_PRS_2_1() : TestCommand("Test_TC_PRS_2_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_PRS_2_1() - { - } + ~Test_TC_PRS_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_PRS_2_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_PRS_2_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PRS_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PRS_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the mandatory attribute constraints: MeasuredValue\n"); - err = TestReadTheMandatoryAttributeConstraintsMeasuredValue_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the mandatory attribute constraints: MeasuredValue\n"); + err = TestReadTheMandatoryAttributeConstraintsMeasuredValue_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Write the default values to mandatory attribute: MeasuredValue\n"); - err = TestWriteTheDefaultValuesToMandatoryAttributeMeasuredValue_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Write the default values to mandatory attribute: MeasuredValue\n"); + err = TestWriteTheDefaultValuesToMandatoryAttributeMeasuredValue_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads back mandatory attribute: MeasuredValue\n"); - err = TestReadsBackMandatoryAttributeMeasuredValue_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads back mandatory attribute: MeasuredValue\n"); + err = TestReadsBackMandatoryAttributeMeasuredValue_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the mandatory attribute constraints: MinMeasuredValue\n"); - err = TestReadTheMandatoryAttributeConstraintsMinMeasuredValue_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the mandatory attribute constraints: MinMeasuredValue\n"); + err = TestReadTheMandatoryAttributeConstraintsMinMeasuredValue_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Write the default values to mandatory attribute: MinMeasuredValue\n"); - err = TestWriteTheDefaultValuesToMandatoryAttributeMinMeasuredValue_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Write the default values to mandatory attribute: MinMeasuredValue\n"); + err = TestWriteTheDefaultValuesToMandatoryAttributeMinMeasuredValue_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads back mandatory attribute: MinMeasuredValue\n"); - err = TestReadsBackMandatoryAttributeMinMeasuredValue_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : Reads back mandatory attribute: MinMeasuredValue\n"); + err = TestReadsBackMandatoryAttributeMinMeasuredValue_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the mandatory attribute constraints: MaxMeasuredValue\n"); - err = TestReadTheMandatoryAttributeConstraintsMaxMeasuredValue_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : Read the mandatory attribute constraints: MaxMeasuredValue\n"); + err = TestReadTheMandatoryAttributeConstraintsMaxMeasuredValue_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Write the default values to mandatory attribute: MaxMeasuredValue\n"); - err = TestWriteTheDefaultValuesToMandatoryAttributeMaxMeasuredValue_8(); - break; + ChipLogProgress(chipTool, " ***** Test Step 8 : Write the default values to mandatory attribute: MaxMeasuredValue\n"); + err = TestWriteTheDefaultValuesToMandatoryAttributeMaxMeasuredValue_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Reads back mandatory attribute: MaxMeasuredValue\n"); - err = TestReadsBackMandatoryAttributeMaxMeasuredValue_9(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 9 : Reads back mandatory attribute: MaxMeasuredValue\n"); + err = TestReadsBackMandatoryAttributeMaxMeasuredValue_9(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 10; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, int16_t measuredValue) + static void OnSuccessCallback_1(void * context, int16_t measuredValue) { (static_cast(context))->OnSuccessResponse_1(measuredValue); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context) - { - (static_cast(context))->OnSuccessResponse_2(); - } - - - + static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, int16_t measuredValue) + static void OnSuccessCallback_3(void * context, int16_t measuredValue) { (static_cast(context))->OnSuccessResponse_3(measuredValue); } - - - static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, int16_t minMeasuredValue) + static void OnSuccessCallback_4(void * context, int16_t minMeasuredValue) { (static_cast(context))->OnSuccessResponse_4(minMeasuredValue); } - - - static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context) - { - (static_cast(context))->OnSuccessResponse_5(); - } - - - + static void OnSuccessCallback_5(void * context) { (static_cast(context))->OnSuccessResponse_5(); } static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, int16_t minMeasuredValue) + static void OnSuccessCallback_6(void * context, int16_t minMeasuredValue) { (static_cast(context))->OnSuccessResponse_6(minMeasuredValue); } - - - static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context, int16_t maxMeasuredValue) + static void OnSuccessCallback_7(void * context, int16_t maxMeasuredValue) { (static_cast(context))->OnSuccessResponse_7(maxMeasuredValue); } - - - static void OnFailureCallback_8(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context) - { - (static_cast(context))->OnSuccessResponse_8(); - } - - - + static void OnSuccessCallback_8(void * context) { (static_cast(context))->OnSuccessResponse_8(); } static void OnFailureCallback_9(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_9(status); } - static void OnSuccessCallback_9(void * context, int16_t maxMeasuredValue) + static void OnSuccessCallback_9(void * context, int16_t maxMeasuredValue) { (static_cast(context))->OnSuccessResponse_9(maxMeasuredValue); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadTheMandatoryAttributeConstraintsMeasuredValue_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PressureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( int16_t measuredValue) + void OnSuccessResponse_1(int16_t measuredValue) { - VerifyOrReturn(CheckConstraintType("measuredValue", "", "int16")); + VerifyOrReturn(CheckConstraintType("measuredValue", "", "int16")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeMeasuredValue_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -35479,80 +26943,61 @@ class Test_TC_PRS_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t measuredValueArgument; - measuredValueArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(measuredValueArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + measuredValueArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + measuredValueArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_2() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_2() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackMandatoryAttributeMeasuredValue_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PressureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( int16_t measuredValue) + void OnSuccessResponse_3(int16_t measuredValue) { - VerifyOrReturn(CheckValue("measuredValue", measuredValue,0 - )); + VerifyOrReturn(CheckValue("measuredValue", measuredValue, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeConstraintsMinMeasuredValue_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PressureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( int16_t minMeasuredValue) + void OnSuccessResponse_4(int16_t minMeasuredValue) { - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "int16")); + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "int16")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeMinMeasuredValue_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -35560,80 +27005,63 @@ class Test_TC_PRS_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t minMeasuredValueArgument; - minMeasuredValueArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(minMeasuredValueArgument, this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; + minMeasuredValueArgument = 0; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + minMeasuredValueArgument, this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; } void OnFailureResponse_5(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_5() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_5() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackMandatoryAttributeMinMeasuredValue_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PressureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( int16_t minMeasuredValue) + void OnSuccessResponse_6(int16_t minMeasuredValue) { - VerifyOrReturn(CheckValue("minMeasuredValue", minMeasuredValue,0 - )); + VerifyOrReturn(CheckValue("minMeasuredValue", minMeasuredValue, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeConstraintsMaxMeasuredValue_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PressureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_7, OnFailureCallback_7)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_7(int16_t maxMeasuredValue) { - ThrowFailureResponse(); - } - - void OnSuccessResponse_7( int16_t maxMeasuredValue) - { - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "", "int16")); + VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "", "int16")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeMaxMeasuredValue_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -35641,225 +27069,170 @@ class Test_TC_PRS_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t maxMeasuredValueArgument; - maxMeasuredValueArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(maxMeasuredValueArgument, this, OnSuccessCallback_8, OnFailureCallback_8)); - return CHIP_NO_ERROR; + maxMeasuredValueArgument = 0; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + maxMeasuredValueArgument, this, OnSuccessCallback_8, OnFailureCallback_8)); + return CHIP_NO_ERROR; } void OnFailureResponse_8(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_8() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_8() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackMandatoryAttributeMaxMeasuredValue_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PressureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_9, OnFailureCallback_9)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_9, OnFailureCallback_9)); + return CHIP_NO_ERROR; } - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_9( int16_t maxMeasuredValue) + void OnSuccessResponse_9(int16_t maxMeasuredValue) { - VerifyOrReturn(CheckValue("maxMeasuredValue", maxMeasuredValue,0 - )); + VerifyOrReturn(CheckValue("maxMeasuredValue", maxMeasuredValue, 0)); NextTest(); - } - - - }; + } +}; -class Test_TC_PCC_1_1: public TestCommand +class Test_TC_PCC_1_1 : public TestCommand { - public: - Test_TC_PCC_1_1(): TestCommand("Test_TC_PCC_1_1"), mTestIndex(0) +public: + Test_TC_PCC_1_1() : TestCommand("Test_TC_PCC_1_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_PCC_1_1() - { - } + ~Test_TC_PCC_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_PCC_1_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_PCC_1_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PCC_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PCC_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 2 : write the default values to mandatory global attribute: ClusterRevision\n"); + err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : read the optional global attribute: FeatureMap\n"); - err = TestReadTheOptionalGlobalAttributeFeatureMap_3(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 3 : read the optional global attribute: FeatureMap\n"); + err = TestReadTheOptionalGlobalAttributeFeatureMap_3(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 4; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_1(clusterRevision); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context) - { - (static_cast(context))->OnSuccessResponse_2(); - } - - - + static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, uint32_t featureMap) + static void OnSuccessCallback_3(void * context, uint32_t featureMap) { (static_cast(context))->OnSuccessResponse_3(featureMap); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint16_t clusterRevision) + void OnSuccessResponse_1(uint16_t clusterRevision) { - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -35867,1767 +27240,1449 @@ class Test_TC_PCC_1_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t clusterRevisionArgument; - clusterRevisionArgument = 3U; - - ReturnErrorOnFailure(cluster.WriteAttribute(clusterRevisionArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + clusterRevisionArgument = 3U; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + clusterRevisionArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_2() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_2() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( uint32_t featureMap) + void OnSuccessResponse_3(uint32_t featureMap) { - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); NextTest(); - } - - - }; + } +}; -class Test_TC_PCC_2_1: public TestCommand +class Test_TC_PCC_2_1 : public TestCommand { - public: - Test_TC_PCC_2_1(): TestCommand("Test_TC_PCC_2_1"), mTestIndex(0) +public: + Test_TC_PCC_2_1() : TestCommand("Test_TC_PCC_2_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_PCC_2_1() - { - } + ~Test_TC_PCC_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_PCC_2_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_PCC_2_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PCC_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PCC_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the mandatory attribute: MaxPressure\n"); - err = TestReadTheMandatoryAttributeMaxPressure_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : read the mandatory attribute: MaxPressure\n"); + err = TestReadTheMandatoryAttributeMaxPressure_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : read the mandatory attribute: MaxSpeed\n"); - err = TestReadTheMandatoryAttributeMaxSpeed_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : read the mandatory attribute: MaxSpeed\n"); + err = TestReadTheMandatoryAttributeMaxSpeed_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : read the mandatory attribute: MaxFlow\n"); - err = TestReadTheMandatoryAttributeMaxFlow_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : read the mandatory attribute: MaxFlow\n"); + err = TestReadTheMandatoryAttributeMaxFlow_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : read the mandatory attribute: EffectiveOperationMode\n"); - err = TestReadTheMandatoryAttributeEffectiveOperationMode_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : read the mandatory attribute: EffectiveOperationMode\n"); + err = TestReadTheMandatoryAttributeEffectiveOperationMode_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : read the mandatory attribute: EffectiveControlMode\n"); - err = TestReadTheMandatoryAttributeEffectiveControlMode_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : read the mandatory attribute: EffectiveControlMode\n"); + err = TestReadTheMandatoryAttributeEffectiveControlMode_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : read the mandatory attribute: Capacity\n"); - err = TestReadTheMandatoryAttributeCapacity_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : read the mandatory attribute: Capacity\n"); + err = TestReadTheMandatoryAttributeCapacity_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : read the mandatory attribute: MaxPressure\n"); - err = TestReadTheMandatoryAttributeMaxPressure_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : read the mandatory attribute: MaxPressure\n"); + err = TestReadTheMandatoryAttributeMaxPressure_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : read the mandatory attribute: MaxSpeed\n"); - err = TestReadTheMandatoryAttributeMaxSpeed_8(); - break; + ChipLogProgress(chipTool, " ***** Test Step 8 : read the mandatory attribute: MaxSpeed\n"); + err = TestReadTheMandatoryAttributeMaxSpeed_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : read the mandatory attribute: MaxFlow\n"); - err = TestReadTheMandatoryAttributeMaxFlow_9(); - break; + ChipLogProgress(chipTool, " ***** Test Step 9 : read the mandatory attribute: MaxFlow\n"); + err = TestReadTheMandatoryAttributeMaxFlow_9(); + break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : read the mandatory attribute: EffectiveOperationMode\n"); - err = TestReadTheMandatoryAttributeEffectiveOperationMode_10(); - break; + ChipLogProgress(chipTool, " ***** Test Step 10 : read the mandatory attribute: EffectiveOperationMode\n"); + err = TestReadTheMandatoryAttributeEffectiveOperationMode_10(); + break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : read the mandatory attribute: EffectiveControlMode\n"); - err = TestReadTheMandatoryAttributeEffectiveControlMode_11(); - break; + ChipLogProgress(chipTool, " ***** Test Step 11 : read the mandatory attribute: EffectiveControlMode\n"); + err = TestReadTheMandatoryAttributeEffectiveControlMode_11(); + break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : read the mandatory attribute: Capacity\n"); - err = TestReadTheMandatoryAttributeCapacity_12(); - break; + ChipLogProgress(chipTool, " ***** Test Step 12 : read the mandatory attribute: Capacity\n"); + err = TestReadTheMandatoryAttributeCapacity_12(); + break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : read the optional attribute: MinConstPressure\n"); - err = TestReadTheOptionalAttributeMinConstPressure_13(); - break; + ChipLogProgress(chipTool, " ***** Test Step 13 : read the optional attribute: MinConstPressure\n"); + err = TestReadTheOptionalAttributeMinConstPressure_13(); + break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : read the optional attribute: MaxConstPressure\n"); - err = TestReadTheOptionalAttributeMaxConstPressure_14(); - break; + ChipLogProgress(chipTool, " ***** Test Step 14 : read the optional attribute: MaxConstPressure\n"); + err = TestReadTheOptionalAttributeMaxConstPressure_14(); + break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : read the optional attribute: MinCompPressure\n"); - err = TestReadTheOptionalAttributeMinCompPressure_15(); - break; + ChipLogProgress(chipTool, " ***** Test Step 15 : read the optional attribute: MinCompPressure\n"); + err = TestReadTheOptionalAttributeMinCompPressure_15(); + break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : read the optional attribute: MaxCompPressure\n"); - err = TestReadTheOptionalAttributeMaxCompPressure_16(); - break; + ChipLogProgress(chipTool, " ***** Test Step 16 : read the optional attribute: MaxCompPressure\n"); + err = TestReadTheOptionalAttributeMaxCompPressure_16(); + break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : read the optional attribute: MinConstSpeed\n"); - err = TestReadTheOptionalAttributeMinConstSpeed_17(); - break; + ChipLogProgress(chipTool, " ***** Test Step 17 : read the optional attribute: MinConstSpeed\n"); + err = TestReadTheOptionalAttributeMinConstSpeed_17(); + break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : read the optional attribute: MaxConstSpeed\n"); - err = TestReadTheOptionalAttributeMaxConstSpeed_18(); - break; + ChipLogProgress(chipTool, " ***** Test Step 18 : read the optional attribute: MaxConstSpeed\n"); + err = TestReadTheOptionalAttributeMaxConstSpeed_18(); + break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : read the optional attribute: MinConstFlow\n"); - err = TestReadTheOptionalAttributeMinConstFlow_19(); - break; + ChipLogProgress(chipTool, " ***** Test Step 19 : read the optional attribute: MinConstFlow\n"); + err = TestReadTheOptionalAttributeMinConstFlow_19(); + break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : read the optional attribute: MaxConstFlow\n"); - err = TestReadTheOptionalAttributeMaxConstFlow_20(); - break; + ChipLogProgress(chipTool, " ***** Test Step 20 : read the optional attribute: MaxConstFlow\n"); + err = TestReadTheOptionalAttributeMaxConstFlow_20(); + break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : read the optional attribute: MinConstTemp\n"); - err = TestReadTheOptionalAttributeMinConstTemp_21(); - break; + ChipLogProgress(chipTool, " ***** Test Step 21 : read the optional attribute: MinConstTemp\n"); + err = TestReadTheOptionalAttributeMinConstTemp_21(); + break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : read the optional attribute: MaxConstTemp\n"); - err = TestReadTheOptionalAttributeMaxConstTemp_22(); - break; + ChipLogProgress(chipTool, " ***** Test Step 22 : read the optional attribute: MaxConstTemp\n"); + err = TestReadTheOptionalAttributeMaxConstTemp_22(); + break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : read the optional attribute: PumpStatus\n"); - err = TestReadTheOptionalAttributePumpStatus_23(); - break; + ChipLogProgress(chipTool, " ***** Test Step 23 : read the optional attribute: PumpStatus\n"); + err = TestReadTheOptionalAttributePumpStatus_23(); + break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : read the optional attribute: PumpStatus\n"); - err = TestReadTheOptionalAttributePumpStatus_24(); - break; + ChipLogProgress(chipTool, " ***** Test Step 24 : read the optional attribute: PumpStatus\n"); + err = TestReadTheOptionalAttributePumpStatus_24(); + break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : read the optional attribute: Speed\n"); - err = TestReadTheOptionalAttributeSpeed_25(); - break; + ChipLogProgress(chipTool, " ***** Test Step 25 : read the optional attribute: Speed\n"); + err = TestReadTheOptionalAttributeSpeed_25(); + break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : read the optional attribute: LifetimeRunningHours\n"); - err = TestReadTheOptionalAttributeLifetimeRunningHours_26(); - break; + ChipLogProgress(chipTool, " ***** Test Step 26 : read the optional attribute: LifetimeRunningHours\n"); + err = TestReadTheOptionalAttributeLifetimeRunningHours_26(); + break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : read the optional attribute: LifetimeRunningHours\n"); - err = TestReadTheOptionalAttributeLifetimeRunningHours_27(); - break; + ChipLogProgress(chipTool, " ***** Test Step 27 : read the optional attribute: LifetimeRunningHours\n"); + err = TestReadTheOptionalAttributeLifetimeRunningHours_27(); + break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : read the optional attribute: Power\n"); - err = TestReadTheOptionalAttributePower_28(); - break; + ChipLogProgress(chipTool, " ***** Test Step 28 : read the optional attribute: Power\n"); + err = TestReadTheOptionalAttributePower_28(); + break; case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : read the optional attribute: LifetimeEnergyConsumed\n"); - err = TestReadTheOptionalAttributeLifetimeEnergyConsumed_29(); - break; + ChipLogProgress(chipTool, " ***** Test Step 29 : read the optional attribute: LifetimeEnergyConsumed\n"); + err = TestReadTheOptionalAttributeLifetimeEnergyConsumed_29(); + break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : read the optional attribute: LifetimeEnergyConsumed\n"); - err = TestReadTheOptionalAttributeLifetimeEnergyConsumed_30(); - break; + ChipLogProgress(chipTool, " ***** Test Step 30 : read the optional attribute: LifetimeEnergyConsumed\n"); + err = TestReadTheOptionalAttributeLifetimeEnergyConsumed_30(); + break; case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : write to the optional attribute: LifetimeEnergyConsumed\n"); - err = TestWriteToTheOptionalAttributeLifetimeEnergyConsumed_31(); - break; + ChipLogProgress(chipTool, " ***** Test Step 31 : write to the optional attribute: LifetimeEnergyConsumed\n"); + err = TestWriteToTheOptionalAttributeLifetimeEnergyConsumed_31(); + break; case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : read the optional attribute: MinConstPressure\n"); - err = TestReadTheOptionalAttributeMinConstPressure_32(); - break; + ChipLogProgress(chipTool, " ***** Test Step 32 : read the optional attribute: MinConstPressure\n"); + err = TestReadTheOptionalAttributeMinConstPressure_32(); + break; case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : read the optional attribute: MaxConstPressure\n"); - err = TestReadTheOptionalAttributeMaxConstPressure_33(); - break; + ChipLogProgress(chipTool, " ***** Test Step 33 : read the optional attribute: MaxConstPressure\n"); + err = TestReadTheOptionalAttributeMaxConstPressure_33(); + break; case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : read the optional attribute: MinCompPressure\n"); - err = TestReadTheOptionalAttributeMinCompPressure_34(); - break; + ChipLogProgress(chipTool, " ***** Test Step 34 : read the optional attribute: MinCompPressure\n"); + err = TestReadTheOptionalAttributeMinCompPressure_34(); + break; case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : read the optional attribute: MaxCompPressure\n"); - err = TestReadTheOptionalAttributeMaxCompPressure_35(); - break; + ChipLogProgress(chipTool, " ***** Test Step 35 : read the optional attribute: MaxCompPressure\n"); + err = TestReadTheOptionalAttributeMaxCompPressure_35(); + break; case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : read the optional attribute: MinConstSpeed\n"); - err = TestReadTheOptionalAttributeMinConstSpeed_36(); - break; + ChipLogProgress(chipTool, " ***** Test Step 36 : read the optional attribute: MinConstSpeed\n"); + err = TestReadTheOptionalAttributeMinConstSpeed_36(); + break; case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : read the optional attribute: MaxConstSpeed\n"); - err = TestReadTheOptionalAttributeMaxConstSpeed_37(); - break; + ChipLogProgress(chipTool, " ***** Test Step 37 : read the optional attribute: MaxConstSpeed\n"); + err = TestReadTheOptionalAttributeMaxConstSpeed_37(); + break; case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : read the optional attribute: MinConstFlow\n"); - err = TestReadTheOptionalAttributeMinConstFlow_38(); - break; + ChipLogProgress(chipTool, " ***** Test Step 38 : read the optional attribute: MinConstFlow\n"); + err = TestReadTheOptionalAttributeMinConstFlow_38(); + break; case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : read the optional attribute: MaxConstFlow\n"); - err = TestReadTheOptionalAttributeMaxConstFlow_39(); - break; + ChipLogProgress(chipTool, " ***** Test Step 39 : read the optional attribute: MaxConstFlow\n"); + err = TestReadTheOptionalAttributeMaxConstFlow_39(); + break; case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : read the optional attribute: MinConstTemp\n"); - err = TestReadTheOptionalAttributeMinConstTemp_40(); - break; + ChipLogProgress(chipTool, " ***** Test Step 40 : read the optional attribute: MinConstTemp\n"); + err = TestReadTheOptionalAttributeMinConstTemp_40(); + break; case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : read the optional attribute: MaxConstTemp\n"); - err = TestReadTheOptionalAttributeMaxConstTemp_41(); - break; + ChipLogProgress(chipTool, " ***** Test Step 41 : read the optional attribute: MaxConstTemp\n"); + err = TestReadTheOptionalAttributeMaxConstTemp_41(); + break; case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : read the optional attribute: PumpStatus\n"); - err = TestReadTheOptionalAttributePumpStatus_42(); - break; + ChipLogProgress(chipTool, " ***** Test Step 42 : read the optional attribute: PumpStatus\n"); + err = TestReadTheOptionalAttributePumpStatus_42(); + break; case 43: - ChipLogProgress(chipTool, " ***** Test Step 43 : read the optional attribute: PumpStatus\n"); - err = TestReadTheOptionalAttributePumpStatus_43(); - break; + ChipLogProgress(chipTool, " ***** Test Step 43 : read the optional attribute: PumpStatus\n"); + err = TestReadTheOptionalAttributePumpStatus_43(); + break; case 44: - ChipLogProgress(chipTool, " ***** Test Step 44 : read the optional attribute: Speed\n"); - err = TestReadTheOptionalAttributeSpeed_44(); - break; + ChipLogProgress(chipTool, " ***** Test Step 44 : read the optional attribute: Speed\n"); + err = TestReadTheOptionalAttributeSpeed_44(); + break; case 45: - ChipLogProgress(chipTool, " ***** Test Step 45 : read the optional attribute: LifetimeRunningHours\n"); - err = TestReadTheOptionalAttributeLifetimeRunningHours_45(); - break; + ChipLogProgress(chipTool, " ***** Test Step 45 : read the optional attribute: LifetimeRunningHours\n"); + err = TestReadTheOptionalAttributeLifetimeRunningHours_45(); + break; case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : read the optional attribute: LifetimeRunningHours\n"); - err = TestReadTheOptionalAttributeLifetimeRunningHours_46(); - break; + ChipLogProgress(chipTool, " ***** Test Step 46 : read the optional attribute: LifetimeRunningHours\n"); + err = TestReadTheOptionalAttributeLifetimeRunningHours_46(); + break; case 47: - ChipLogProgress(chipTool, " ***** Test Step 47 : read the optional attribute: Power\n"); - err = TestReadTheOptionalAttributePower_47(); - break; + ChipLogProgress(chipTool, " ***** Test Step 47 : read the optional attribute: Power\n"); + err = TestReadTheOptionalAttributePower_47(); + break; case 48: - ChipLogProgress(chipTool, " ***** Test Step 48 : read the optional attribute: LifetimeEnergyConsumed\n"); - err = TestReadTheOptionalAttributeLifetimeEnergyConsumed_48(); - break; + ChipLogProgress(chipTool, " ***** Test Step 48 : read the optional attribute: LifetimeEnergyConsumed\n"); + err = TestReadTheOptionalAttributeLifetimeEnergyConsumed_48(); + break; case 49: - ChipLogProgress(chipTool, " ***** Test Step 49 : read the optional attribute: LifetimeEnergyConsumed\n"); - err = TestReadTheOptionalAttributeLifetimeEnergyConsumed_49(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 49 : read the optional attribute: LifetimeEnergyConsumed\n"); + err = TestReadTheOptionalAttributeLifetimeEnergyConsumed_49(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 50; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, int16_t maxPressure) + static void OnSuccessCallback_1(void * context, int16_t maxPressure) { (static_cast(context))->OnSuccessResponse_1(maxPressure); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint16_t maxSpeed) + static void OnSuccessCallback_2(void * context, uint16_t maxSpeed) { (static_cast(context))->OnSuccessResponse_2(maxSpeed); } - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, uint16_t maxFlow) + static void OnSuccessCallback_3(void * context, uint16_t maxFlow) { (static_cast(context))->OnSuccessResponse_3(maxFlow); } - - - static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, uint8_t effectiveOperationMode) + static void OnSuccessCallback_4(void * context, uint8_t effectiveOperationMode) { (static_cast(context))->OnSuccessResponse_4(effectiveOperationMode); } - - - static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context, uint8_t effectiveControlMode) + static void OnSuccessCallback_5(void * context, uint8_t effectiveControlMode) { (static_cast(context))->OnSuccessResponse_5(effectiveControlMode); } - - - static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, int16_t capacity) + static void OnSuccessCallback_6(void * context, int16_t capacity) { (static_cast(context))->OnSuccessResponse_6(capacity); } - - - static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context, int16_t maxPressure) + static void OnSuccessCallback_7(void * context, int16_t maxPressure) { (static_cast(context))->OnSuccessResponse_7(maxPressure); } - - - static void OnFailureCallback_8(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context, uint16_t maxSpeed) + static void OnSuccessCallback_8(void * context, uint16_t maxSpeed) { (static_cast(context))->OnSuccessResponse_8(maxSpeed); } - - - static void OnFailureCallback_9(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_9(status); } - static void OnSuccessCallback_9(void * context, uint16_t maxFlow) + static void OnSuccessCallback_9(void * context, uint16_t maxFlow) { (static_cast(context))->OnSuccessResponse_9(maxFlow); } - - - static void OnFailureCallback_10(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_10(status); } - static void OnSuccessCallback_10(void * context, uint8_t effectiveOperationMode) + static void OnSuccessCallback_10(void * context, uint8_t effectiveOperationMode) { (static_cast(context))->OnSuccessResponse_10(effectiveOperationMode); } - - - static void OnFailureCallback_11(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_11(status); } - static void OnSuccessCallback_11(void * context, uint8_t effectiveControlMode) + static void OnSuccessCallback_11(void * context, uint8_t effectiveControlMode) { (static_cast(context))->OnSuccessResponse_11(effectiveControlMode); } - - - static void OnFailureCallback_12(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_12(status); } - static void OnSuccessCallback_12(void * context, int16_t capacity) + static void OnSuccessCallback_12(void * context, int16_t capacity) { (static_cast(context))->OnSuccessResponse_12(capacity); } - - - static void OnFailureCallback_13(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_13(status); } - static void OnSuccessCallback_13(void * context, int16_t minConstPressure) + static void OnSuccessCallback_13(void * context, int16_t minConstPressure) { (static_cast(context))->OnSuccessResponse_13(minConstPressure); } - - - static void OnFailureCallback_14(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_14(status); } - static void OnSuccessCallback_14(void * context, int16_t maxConstPressure) + static void OnSuccessCallback_14(void * context, int16_t maxConstPressure) { (static_cast(context))->OnSuccessResponse_14(maxConstPressure); } - - - static void OnFailureCallback_15(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_15(status); } - static void OnSuccessCallback_15(void * context, int16_t minCompPressure) + static void OnSuccessCallback_15(void * context, int16_t minCompPressure) { (static_cast(context))->OnSuccessResponse_15(minCompPressure); } - - - static void OnFailureCallback_16(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_16(status); } - static void OnSuccessCallback_16(void * context, int16_t maxCompPressure) + static void OnSuccessCallback_16(void * context, int16_t maxCompPressure) { (static_cast(context))->OnSuccessResponse_16(maxCompPressure); } - - - static void OnFailureCallback_17(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_17(status); } - static void OnSuccessCallback_17(void * context, uint16_t minConstSpeed) + static void OnSuccessCallback_17(void * context, uint16_t minConstSpeed) { (static_cast(context))->OnSuccessResponse_17(minConstSpeed); } - - - static void OnFailureCallback_18(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_18(status); } - static void OnSuccessCallback_18(void * context, uint16_t maxConstSpeed) + static void OnSuccessCallback_18(void * context, uint16_t maxConstSpeed) { (static_cast(context))->OnSuccessResponse_18(maxConstSpeed); } - - - static void OnFailureCallback_19(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_19(status); } - static void OnSuccessCallback_19(void * context, uint16_t minConstFlow) + static void OnSuccessCallback_19(void * context, uint16_t minConstFlow) { (static_cast(context))->OnSuccessResponse_19(minConstFlow); } - - - static void OnFailureCallback_20(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_20(status); } - static void OnSuccessCallback_20(void * context, uint16_t maxConstFlow) + static void OnSuccessCallback_20(void * context, uint16_t maxConstFlow) { (static_cast(context))->OnSuccessResponse_20(maxConstFlow); } - - - static void OnFailureCallback_21(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_21(status); } - static void OnSuccessCallback_21(void * context, int16_t minConstTemp) + static void OnSuccessCallback_21(void * context, int16_t minConstTemp) { (static_cast(context))->OnSuccessResponse_21(minConstTemp); } - - - static void OnFailureCallback_22(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_22(status); } - static void OnSuccessCallback_22(void * context, int16_t maxConstTemp) + static void OnSuccessCallback_22(void * context, int16_t maxConstTemp) { (static_cast(context))->OnSuccessResponse_22(maxConstTemp); } - - - static void OnFailureCallback_23(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_23(status); } - static void OnSuccessCallback_23(void * context, uint16_t pumpStatus) + static void OnSuccessCallback_23(void * context, uint16_t pumpStatus) { (static_cast(context))->OnSuccessResponse_23(pumpStatus); } - - - static void OnFailureCallback_24(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_24(status); } - static void OnSuccessCallback_24(void * context, uint16_t pumpStatus) + static void OnSuccessCallback_24(void * context, uint16_t pumpStatus) { (static_cast(context))->OnSuccessResponse_24(pumpStatus); } - - - static void OnFailureCallback_25(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_25(status); } - static void OnSuccessCallback_25(void * context, uint16_t speed) + static void OnSuccessCallback_25(void * context, uint16_t speed) { (static_cast(context))->OnSuccessResponse_25(speed); } - - - static void OnFailureCallback_26(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_26(status); } - static void OnSuccessCallback_26(void * context, const chip::app::DataModel::Nullable & lifetimeRunningHours) + static void OnSuccessCallback_26(void * context, const chip::app::DataModel::Nullable & lifetimeRunningHours) { (static_cast(context))->OnSuccessResponse_26(lifetimeRunningHours); } - - - static void OnFailureCallback_27(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_27(status); } - static void OnSuccessCallback_27(void * context, const chip::app::DataModel::Nullable & lifetimeRunningHours) + static void OnSuccessCallback_27(void * context, const chip::app::DataModel::Nullable & lifetimeRunningHours) { (static_cast(context))->OnSuccessResponse_27(lifetimeRunningHours); } - - - static void OnFailureCallback_28(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_28(status); } - static void OnSuccessCallback_28(void * context, uint32_t power) + static void OnSuccessCallback_28(void * context, uint32_t power) { (static_cast(context))->OnSuccessResponse_28(power); } - - - static void OnFailureCallback_29(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_29(status); } - static void OnSuccessCallback_29(void * context, const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) + static void OnSuccessCallback_29(void * context, const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) { (static_cast(context))->OnSuccessResponse_29(lifetimeEnergyConsumed); } - - - static void OnFailureCallback_30(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_30(status); } - static void OnSuccessCallback_30(void * context, const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) + static void OnSuccessCallback_30(void * context, const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) { (static_cast(context))->OnSuccessResponse_30(lifetimeEnergyConsumed); } - - - static void OnFailureCallback_31(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_31(status); } - static void OnSuccessCallback_31(void * context) - { - (static_cast(context))->OnSuccessResponse_31(); - } - - - + static void OnSuccessCallback_31(void * context) { (static_cast(context))->OnSuccessResponse_31(); } static void OnFailureCallback_32(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_32(status); } - static void OnSuccessCallback_32(void * context, int16_t minConstPressure) + static void OnSuccessCallback_32(void * context, int16_t minConstPressure) { (static_cast(context))->OnSuccessResponse_32(minConstPressure); } - - - static void OnFailureCallback_33(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_33(status); } - static void OnSuccessCallback_33(void * context, int16_t maxConstPressure) + static void OnSuccessCallback_33(void * context, int16_t maxConstPressure) { (static_cast(context))->OnSuccessResponse_33(maxConstPressure); } - - - static void OnFailureCallback_34(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_34(status); } - static void OnSuccessCallback_34(void * context, int16_t minCompPressure) + static void OnSuccessCallback_34(void * context, int16_t minCompPressure) { (static_cast(context))->OnSuccessResponse_34(minCompPressure); } - - - static void OnFailureCallback_35(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_35(status); } - static void OnSuccessCallback_35(void * context, int16_t maxCompPressure) + static void OnSuccessCallback_35(void * context, int16_t maxCompPressure) { (static_cast(context))->OnSuccessResponse_35(maxCompPressure); } - - - static void OnFailureCallback_36(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_36(status); } - static void OnSuccessCallback_36(void * context, uint16_t minConstSpeed) + static void OnSuccessCallback_36(void * context, uint16_t minConstSpeed) { (static_cast(context))->OnSuccessResponse_36(minConstSpeed); } - - - static void OnFailureCallback_37(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_37(status); } - static void OnSuccessCallback_37(void * context, uint16_t maxConstSpeed) + static void OnSuccessCallback_37(void * context, uint16_t maxConstSpeed) { (static_cast(context))->OnSuccessResponse_37(maxConstSpeed); } - - - static void OnFailureCallback_38(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_38(status); } - static void OnSuccessCallback_38(void * context, uint16_t minConstFlow) + static void OnSuccessCallback_38(void * context, uint16_t minConstFlow) { (static_cast(context))->OnSuccessResponse_38(minConstFlow); } - - - static void OnFailureCallback_39(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_39(status); } - static void OnSuccessCallback_39(void * context, uint16_t maxConstFlow) + static void OnSuccessCallback_39(void * context, uint16_t maxConstFlow) { (static_cast(context))->OnSuccessResponse_39(maxConstFlow); } - - - static void OnFailureCallback_40(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_40(status); } - static void OnSuccessCallback_40(void * context, int16_t minConstTemp) + static void OnSuccessCallback_40(void * context, int16_t minConstTemp) { (static_cast(context))->OnSuccessResponse_40(minConstTemp); } - - - static void OnFailureCallback_41(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_41(status); } - static void OnSuccessCallback_41(void * context, int16_t maxConstTemp) + static void OnSuccessCallback_41(void * context, int16_t maxConstTemp) { (static_cast(context))->OnSuccessResponse_41(maxConstTemp); } - - - static void OnFailureCallback_42(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_42(status); } - static void OnSuccessCallback_42(void * context, uint16_t pumpStatus) + static void OnSuccessCallback_42(void * context, uint16_t pumpStatus) { (static_cast(context))->OnSuccessResponse_42(pumpStatus); } - - - static void OnFailureCallback_43(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_43(status); } - static void OnSuccessCallback_43(void * context, uint16_t pumpStatus) + static void OnSuccessCallback_43(void * context, uint16_t pumpStatus) { (static_cast(context))->OnSuccessResponse_43(pumpStatus); } - - - static void OnFailureCallback_44(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_44(status); } - static void OnSuccessCallback_44(void * context, uint16_t speed) + static void OnSuccessCallback_44(void * context, uint16_t speed) { (static_cast(context))->OnSuccessResponse_44(speed); } - - - static void OnFailureCallback_45(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_45(status); } - static void OnSuccessCallback_45(void * context, const chip::app::DataModel::Nullable & lifetimeRunningHours) + static void OnSuccessCallback_45(void * context, const chip::app::DataModel::Nullable & lifetimeRunningHours) { (static_cast(context))->OnSuccessResponse_45(lifetimeRunningHours); } - - - static void OnFailureCallback_46(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_46(status); } - static void OnSuccessCallback_46(void * context, const chip::app::DataModel::Nullable & lifetimeRunningHours) + static void OnSuccessCallback_46(void * context, const chip::app::DataModel::Nullable & lifetimeRunningHours) { (static_cast(context))->OnSuccessResponse_46(lifetimeRunningHours); } - - - static void OnFailureCallback_47(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_47(status); } - static void OnSuccessCallback_47(void * context, uint32_t power) + static void OnSuccessCallback_47(void * context, uint32_t power) { (static_cast(context))->OnSuccessResponse_47(power); } - - - static void OnFailureCallback_48(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_48(status); } - static void OnSuccessCallback_48(void * context, const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) + static void OnSuccessCallback_48(void * context, const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) { (static_cast(context))->OnSuccessResponse_48(lifetimeEnergyConsumed); } - - - static void OnFailureCallback_49(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_49(status); } - static void OnSuccessCallback_49(void * context, const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) + static void OnSuccessCallback_49(void * context, const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) { (static_cast(context))->OnSuccessResponse_49(lifetimeEnergyConsumed); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadTheMandatoryAttributeMaxPressure_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( int16_t maxPressure) + void OnSuccessResponse_1(int16_t maxPressure) { - VerifyOrReturn(CheckConstraintType("maxPressure", "", "int16")); + VerifyOrReturn(CheckConstraintType("maxPressure", "", "int16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeMaxSpeed_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint16_t maxSpeed) + void OnSuccessResponse_2(uint16_t maxSpeed) { - VerifyOrReturn(CheckConstraintType("maxSpeed", "", "uint16")); + VerifyOrReturn(CheckConstraintType("maxSpeed", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeMaxFlow_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( uint16_t maxFlow) + void OnSuccessResponse_3(uint16_t maxFlow) { - VerifyOrReturn(CheckConstraintType("maxFlow", "", "uint16")); + VerifyOrReturn(CheckConstraintType("maxFlow", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeEffectiveOperationMode_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( uint8_t effectiveOperationMode) + void OnSuccessResponse_4(uint8_t effectiveOperationMode) { - VerifyOrReturn(CheckConstraintType("effectiveOperationMode", "", "enum8")); + VerifyOrReturn(CheckConstraintType("effectiveOperationMode", "", "enum8")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeEffectiveControlMode_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5( uint8_t effectiveControlMode) + void OnSuccessResponse_5(uint8_t effectiveControlMode) { - VerifyOrReturn(CheckConstraintType("effectiveControlMode", "", "enum8")); + VerifyOrReturn(CheckConstraintType("effectiveControlMode", "", "enum8")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeCapacity_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( int16_t capacity) + void OnSuccessResponse_6(int16_t capacity) { - VerifyOrReturn(CheckConstraintType("capacity", "", "int16")); + VerifyOrReturn(CheckConstraintType("capacity", "", "int16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeMaxPressure_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_7, OnFailureCallback_7)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7( int16_t maxPressure) + void OnSuccessResponse_7(int16_t maxPressure) { - VerifyOrReturn(CheckConstraintType("maxPressure", "", "int16")); + VerifyOrReturn(CheckConstraintType("maxPressure", "", "int16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeMaxSpeed_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_8, OnFailureCallback_8)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_8, OnFailureCallback_8)); + return CHIP_NO_ERROR; } - void OnFailureResponse_8(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_8( uint16_t maxSpeed) + void OnSuccessResponse_8(uint16_t maxSpeed) { - VerifyOrReturn(CheckConstraintType("maxSpeed", "", "uint16")); + VerifyOrReturn(CheckConstraintType("maxSpeed", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeMaxFlow_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_9, OnFailureCallback_9)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_9, OnFailureCallback_9)); + return CHIP_NO_ERROR; } - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_9( uint16_t maxFlow) + void OnSuccessResponse_9(uint16_t maxFlow) { - VerifyOrReturn(CheckConstraintType("maxFlow", "", "uint16")); + VerifyOrReturn(CheckConstraintType("maxFlow", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeEffectiveOperationMode_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_10, OnFailureCallback_10)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_10, OnFailureCallback_10)); + return CHIP_NO_ERROR; } - void OnFailureResponse_10(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_10( uint8_t effectiveOperationMode) + void OnSuccessResponse_10(uint8_t effectiveOperationMode) { - VerifyOrReturn(CheckConstraintType("effectiveOperationMode", "", "enum8")); + VerifyOrReturn(CheckConstraintType("effectiveOperationMode", "", "enum8")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeEffectiveControlMode_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_11, OnFailureCallback_11)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_11, OnFailureCallback_11)); + return CHIP_NO_ERROR; } - void OnFailureResponse_11(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_11( uint8_t effectiveControlMode) + void OnSuccessResponse_11(uint8_t effectiveControlMode) { - VerifyOrReturn(CheckConstraintType("effectiveControlMode", "", "enum8")); + VerifyOrReturn(CheckConstraintType("effectiveControlMode", "", "enum8")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeCapacity_12() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_12, OnFailureCallback_12)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_12, OnFailureCallback_12)); + return CHIP_NO_ERROR; } - void OnFailureResponse_12(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_12( int16_t capacity) + void OnSuccessResponse_12(int16_t capacity) { - VerifyOrReturn(CheckConstraintType("capacity", "", "int16")); + VerifyOrReturn(CheckConstraintType("capacity", "", "int16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeMinConstPressure_13() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_13, OnFailureCallback_13)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_13, OnFailureCallback_13)); + return CHIP_NO_ERROR; } void OnFailureResponse_13(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_13( int16_t minConstPressure) + void OnSuccessResponse_13(int16_t minConstPressure) { - VerifyOrReturn(CheckConstraintType("minConstPressure", "", "int16")); + VerifyOrReturn(CheckConstraintType("minConstPressure", "", "int16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeMaxConstPressure_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_14, OnFailureCallback_14)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_14, OnFailureCallback_14)); + return CHIP_NO_ERROR; } void OnFailureResponse_14(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_14( int16_t maxConstPressure) + void OnSuccessResponse_14(int16_t maxConstPressure) { - VerifyOrReturn(CheckConstraintType("maxConstPressure", "", "int16")); + VerifyOrReturn(CheckConstraintType("maxConstPressure", "", "int16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeMinCompPressure_15() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_15, OnFailureCallback_15)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_15, OnFailureCallback_15)); + return CHIP_NO_ERROR; } void OnFailureResponse_15(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_15( int16_t minCompPressure) + void OnSuccessResponse_15(int16_t minCompPressure) { - VerifyOrReturn(CheckConstraintType("minCompPressure", "", "int16")); + VerifyOrReturn(CheckConstraintType("minCompPressure", "", "int16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeMaxCompPressure_16() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_16, OnFailureCallback_16)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_16, OnFailureCallback_16)); + return CHIP_NO_ERROR; } void OnFailureResponse_16(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_16( int16_t maxCompPressure) + void OnSuccessResponse_16(int16_t maxCompPressure) { - VerifyOrReturn(CheckConstraintType("maxCompPressure", "", "int16")); + VerifyOrReturn(CheckConstraintType("maxCompPressure", "", "int16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeMinConstSpeed_17() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_17, OnFailureCallback_17)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_17, OnFailureCallback_17)); + return CHIP_NO_ERROR; } void OnFailureResponse_17(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_17( uint16_t minConstSpeed) + void OnSuccessResponse_17(uint16_t minConstSpeed) { - VerifyOrReturn(CheckConstraintType("minConstSpeed", "", "uint16")); + VerifyOrReturn(CheckConstraintType("minConstSpeed", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeMaxConstSpeed_18() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_18, OnFailureCallback_18)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_18, OnFailureCallback_18)); + return CHIP_NO_ERROR; } void OnFailureResponse_18(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_18( uint16_t maxConstSpeed) + void OnSuccessResponse_18(uint16_t maxConstSpeed) { - VerifyOrReturn(CheckConstraintType("maxConstSpeed", "", "uint16")); + VerifyOrReturn(CheckConstraintType("maxConstSpeed", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeMinConstFlow_19() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_19, OnFailureCallback_19)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_19, OnFailureCallback_19)); + return CHIP_NO_ERROR; } void OnFailureResponse_19(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_19( uint16_t minConstFlow) + void OnSuccessResponse_19(uint16_t minConstFlow) { - VerifyOrReturn(CheckConstraintType("minConstFlow", "", "uint16")); + VerifyOrReturn(CheckConstraintType("minConstFlow", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeMaxConstFlow_20() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_20, OnFailureCallback_20)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_20, OnFailureCallback_20)); + return CHIP_NO_ERROR; } void OnFailureResponse_20(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_20( uint16_t maxConstFlow) + void OnSuccessResponse_20(uint16_t maxConstFlow) { - VerifyOrReturn(CheckConstraintType("maxConstFlow", "", "uint16")); + VerifyOrReturn(CheckConstraintType("maxConstFlow", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeMinConstTemp_21() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_21, OnFailureCallback_21)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_21, OnFailureCallback_21)); + return CHIP_NO_ERROR; } void OnFailureResponse_21(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_21( int16_t minConstTemp) + void OnSuccessResponse_21(int16_t minConstTemp) { - VerifyOrReturn(CheckConstraintType("minConstTemp", "", "int16"));VerifyOrReturn(CheckConstraintMinValue("minConstTemp", minConstTemp, -27315)); + VerifyOrReturn(CheckConstraintType("minConstTemp", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("minConstTemp", minConstTemp, -27315)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeMaxConstTemp_22() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_22, OnFailureCallback_22)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_22, OnFailureCallback_22)); + return CHIP_NO_ERROR; } void OnFailureResponse_22(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_22( int16_t maxConstTemp) + void OnSuccessResponse_22(int16_t maxConstTemp) { - VerifyOrReturn(CheckConstraintType("maxConstTemp", "", "int16"));VerifyOrReturn(CheckConstraintMinValue("maxConstTemp", maxConstTemp, -27315)); + VerifyOrReturn(CheckConstraintType("maxConstTemp", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("maxConstTemp", maxConstTemp, -27315)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributePumpStatus_23() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_23, OnFailureCallback_23)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_23, OnFailureCallback_23)); + return CHIP_NO_ERROR; } void OnFailureResponse_23(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_23( uint16_t pumpStatus) + void OnSuccessResponse_23(uint16_t pumpStatus) { - VerifyOrReturn(CheckValue("pumpStatus", pumpStatus,0U - )); + VerifyOrReturn(CheckValue("pumpStatus", pumpStatus, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributePumpStatus_24() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_24, OnFailureCallback_24)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_24, OnFailureCallback_24)); + return CHIP_NO_ERROR; } void OnFailureResponse_24(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_24( uint16_t pumpStatus) + void OnSuccessResponse_24(uint16_t pumpStatus) { - VerifyOrReturn(CheckConstraintType("pumpStatus", "", "map16")); + VerifyOrReturn(CheckConstraintType("pumpStatus", "", "map16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeSpeed_25() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_25, OnFailureCallback_25)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_25, OnFailureCallback_25)); + return CHIP_NO_ERROR; } void OnFailureResponse_25(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_25( uint16_t speed) + void OnSuccessResponse_25(uint16_t speed) { - VerifyOrReturn(CheckConstraintType("speed", "", "uint16")); + VerifyOrReturn(CheckConstraintType("speed", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeLifetimeRunningHours_26() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_26, OnFailureCallback_26)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_26, OnFailureCallback_26)); + return CHIP_NO_ERROR; } void OnFailureResponse_26(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_26( const chip::app::DataModel::Nullable & lifetimeRunningHours) + void OnSuccessResponse_26(const chip::app::DataModel::Nullable & lifetimeRunningHours) { - VerifyOrReturn(CheckValueNonNull("lifetimeRunningHours", lifetimeRunningHours)); - VerifyOrReturn(CheckValue("lifetimeRunningHours.Value()", lifetimeRunningHours.Value(),0UL - )); + VerifyOrReturn(CheckValueNonNull("lifetimeRunningHours", lifetimeRunningHours)); + VerifyOrReturn(CheckValue("lifetimeRunningHours.Value()", lifetimeRunningHours.Value(), 0UL)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeLifetimeRunningHours_27() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_27, OnFailureCallback_27)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_27, OnFailureCallback_27)); + return CHIP_NO_ERROR; } void OnFailureResponse_27(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_27( const chip::app::DataModel::Nullable & lifetimeRunningHours) + void OnSuccessResponse_27(const chip::app::DataModel::Nullable & lifetimeRunningHours) { - VerifyOrReturn(CheckConstraintType("lifetimeRunningHours", "", "uint24")); + VerifyOrReturn(CheckConstraintType("lifetimeRunningHours", "", "uint24")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributePower_28() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_28, OnFailureCallback_28)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_28, OnFailureCallback_28)); + return CHIP_NO_ERROR; } void OnFailureResponse_28(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_28( uint32_t power) + void OnSuccessResponse_28(uint32_t power) { - VerifyOrReturn(CheckConstraintType("power", "", "uint24")); + VerifyOrReturn(CheckConstraintType("power", "", "uint24")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeLifetimeEnergyConsumed_29() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_29, OnFailureCallback_29)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_29, OnFailureCallback_29)); + return CHIP_NO_ERROR; } void OnFailureResponse_29(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_29( const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) + void OnSuccessResponse_29(const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) { - VerifyOrReturn(CheckValueNonNull("lifetimeEnergyConsumed", lifetimeEnergyConsumed)); - VerifyOrReturn(CheckValue("lifetimeEnergyConsumed.Value()", lifetimeEnergyConsumed.Value(),0UL - )); + VerifyOrReturn(CheckValueNonNull("lifetimeEnergyConsumed", lifetimeEnergyConsumed)); + VerifyOrReturn(CheckValue("lifetimeEnergyConsumed.Value()", lifetimeEnergyConsumed.Value(), 0UL)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeLifetimeEnergyConsumed_30() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_30, OnFailureCallback_30)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_30, OnFailureCallback_30)); + return CHIP_NO_ERROR; } void OnFailureResponse_30(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_30( const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) + void OnSuccessResponse_30(const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) { - VerifyOrReturn(CheckConstraintType("lifetimeEnergyConsumed", "", "uint32")); + VerifyOrReturn(CheckConstraintType("lifetimeEnergyConsumed", "", "uint32")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteToTheOptionalAttributeLifetimeEnergyConsumed_31() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -37635,662 +28690,553 @@ class Test_TC_PCC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable lifetimeEnergyConsumedArgument; - lifetimeEnergyConsumedArgument.SetNonNull(); - lifetimeEnergyConsumedArgument.Value() = 0UL; - - ReturnErrorOnFailure(cluster.WriteAttribute(lifetimeEnergyConsumedArgument, this, OnSuccessCallback_31, OnFailureCallback_31)); - return CHIP_NO_ERROR; + lifetimeEnergyConsumedArgument.SetNonNull(); + lifetimeEnergyConsumedArgument.Value() = 0UL; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + lifetimeEnergyConsumedArgument, this, OnSuccessCallback_31, OnFailureCallback_31)); + return CHIP_NO_ERROR; } void OnFailureResponse_31(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } - - void OnSuccessResponse_31() - { NextTest(); - } - + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - + void OnSuccessResponse_31() { NextTest(); } - CHIP_ERROR TestReadTheOptionalAttributeMinConstPressure_32() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_32, OnFailureCallback_32)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_32, OnFailureCallback_32)); + return CHIP_NO_ERROR; } void OnFailureResponse_32(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_32( int16_t minConstPressure) + void OnSuccessResponse_32(int16_t minConstPressure) { - VerifyOrReturn(CheckConstraintType("minConstPressure", "", "int16")); + VerifyOrReturn(CheckConstraintType("minConstPressure", "", "int16")); NextTest(); - } - + } - - - CHIP_ERROR TestReadTheOptionalAttributeMaxConstPressure_33() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_33, OnFailureCallback_33)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_33, OnFailureCallback_33)); + return CHIP_NO_ERROR; } void OnFailureResponse_33(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_33( int16_t maxConstPressure) + void OnSuccessResponse_33(int16_t maxConstPressure) { - VerifyOrReturn(CheckConstraintType("maxConstPressure", "", "int16")); + VerifyOrReturn(CheckConstraintType("maxConstPressure", "", "int16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeMinCompPressure_34() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_34, OnFailureCallback_34)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_34, OnFailureCallback_34)); + return CHIP_NO_ERROR; } void OnFailureResponse_34(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_34( int16_t minCompPressure) + void OnSuccessResponse_34(int16_t minCompPressure) { - VerifyOrReturn(CheckConstraintType("minCompPressure", "", "int16")); + VerifyOrReturn(CheckConstraintType("minCompPressure", "", "int16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeMaxCompPressure_35() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_35, OnFailureCallback_35)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_35, OnFailureCallback_35)); + return CHIP_NO_ERROR; } void OnFailureResponse_35(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_35( int16_t maxCompPressure) + void OnSuccessResponse_35(int16_t maxCompPressure) { - VerifyOrReturn(CheckConstraintType("maxCompPressure", "", "int16")); + VerifyOrReturn(CheckConstraintType("maxCompPressure", "", "int16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeMinConstSpeed_36() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_36, OnFailureCallback_36)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_36, OnFailureCallback_36)); + return CHIP_NO_ERROR; } void OnFailureResponse_36(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_36( uint16_t minConstSpeed) + void OnSuccessResponse_36(uint16_t minConstSpeed) { - VerifyOrReturn(CheckConstraintType("minConstSpeed", "", "uint16")); + VerifyOrReturn(CheckConstraintType("minConstSpeed", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeMaxConstSpeed_37() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_37, OnFailureCallback_37)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_37, OnFailureCallback_37)); + return CHIP_NO_ERROR; } void OnFailureResponse_37(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_37( uint16_t maxConstSpeed) + void OnSuccessResponse_37(uint16_t maxConstSpeed) { - VerifyOrReturn(CheckConstraintType("maxConstSpeed", "", "uint16")); + VerifyOrReturn(CheckConstraintType("maxConstSpeed", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeMinConstFlow_38() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_38, OnFailureCallback_38)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_38, OnFailureCallback_38)); + return CHIP_NO_ERROR; } void OnFailureResponse_38(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_38( uint16_t minConstFlow) + void OnSuccessResponse_38(uint16_t minConstFlow) { - VerifyOrReturn(CheckConstraintType("minConstFlow", "", "uint16")); + VerifyOrReturn(CheckConstraintType("minConstFlow", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeMaxConstFlow_39() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_39, OnFailureCallback_39)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_39, OnFailureCallback_39)); + return CHIP_NO_ERROR; } void OnFailureResponse_39(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_39( uint16_t maxConstFlow) + void OnSuccessResponse_39(uint16_t maxConstFlow) { - VerifyOrReturn(CheckConstraintType("maxConstFlow", "", "uint16")); + VerifyOrReturn(CheckConstraintType("maxConstFlow", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeMinConstTemp_40() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_40, OnFailureCallback_40)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_40, OnFailureCallback_40)); + return CHIP_NO_ERROR; } void OnFailureResponse_40(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_40( int16_t minConstTemp) + void OnSuccessResponse_40(int16_t minConstTemp) { - VerifyOrReturn(CheckConstraintType("minConstTemp", "", "int16"));VerifyOrReturn(CheckConstraintMinValue("minConstTemp", minConstTemp, -27315)); + VerifyOrReturn(CheckConstraintType("minConstTemp", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("minConstTemp", minConstTemp, -27315)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeMaxConstTemp_41() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_41, OnFailureCallback_41)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_41, OnFailureCallback_41)); + return CHIP_NO_ERROR; } void OnFailureResponse_41(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_41( int16_t maxConstTemp) + void OnSuccessResponse_41(int16_t maxConstTemp) { - VerifyOrReturn(CheckConstraintType("maxConstTemp", "", "int16"));VerifyOrReturn(CheckConstraintMinValue("maxConstTemp", maxConstTemp, -27315)); + VerifyOrReturn(CheckConstraintType("maxConstTemp", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("maxConstTemp", maxConstTemp, -27315)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributePumpStatus_42() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_42, OnFailureCallback_42)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_42, OnFailureCallback_42)); + return CHIP_NO_ERROR; } void OnFailureResponse_42(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_42( uint16_t pumpStatus) + void OnSuccessResponse_42(uint16_t pumpStatus) { - VerifyOrReturn(CheckValue("pumpStatus", pumpStatus,0U - )); + VerifyOrReturn(CheckValue("pumpStatus", pumpStatus, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributePumpStatus_43() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_43, OnFailureCallback_43)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_43, OnFailureCallback_43)); + return CHIP_NO_ERROR; } void OnFailureResponse_43(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_43( uint16_t pumpStatus) + void OnSuccessResponse_43(uint16_t pumpStatus) { - VerifyOrReturn(CheckConstraintType("pumpStatus", "", "map16")); + VerifyOrReturn(CheckConstraintType("pumpStatus", "", "map16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeSpeed_44() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_44, OnFailureCallback_44)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_44, OnFailureCallback_44)); + return CHIP_NO_ERROR; } void OnFailureResponse_44(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_44( uint16_t speed) + void OnSuccessResponse_44(uint16_t speed) { - VerifyOrReturn(CheckConstraintType("speed", "", "uint16")); + VerifyOrReturn(CheckConstraintType("speed", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeLifetimeRunningHours_45() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_45, OnFailureCallback_45)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_45, OnFailureCallback_45)); + return CHIP_NO_ERROR; } - void OnFailureResponse_45(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_45(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_45( const chip::app::DataModel::Nullable & lifetimeRunningHours) + void OnSuccessResponse_45(const chip::app::DataModel::Nullable & lifetimeRunningHours) { - VerifyOrReturn(CheckValueNonNull("lifetimeRunningHours", lifetimeRunningHours)); - VerifyOrReturn(CheckValue("lifetimeRunningHours.Value()", lifetimeRunningHours.Value(),0UL - )); + VerifyOrReturn(CheckValueNonNull("lifetimeRunningHours", lifetimeRunningHours)); + VerifyOrReturn(CheckValue("lifetimeRunningHours.Value()", lifetimeRunningHours.Value(), 0UL)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeLifetimeRunningHours_46() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_46, OnFailureCallback_46)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_46, OnFailureCallback_46)); + return CHIP_NO_ERROR; } void OnFailureResponse_46(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_46( const chip::app::DataModel::Nullable & lifetimeRunningHours) + void OnSuccessResponse_46(const chip::app::DataModel::Nullable & lifetimeRunningHours) { - VerifyOrReturn(CheckConstraintType("lifetimeRunningHours", "", "uint24")); + VerifyOrReturn(CheckConstraintType("lifetimeRunningHours", "", "uint24")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributePower_47() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_47, OnFailureCallback_47)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_47, OnFailureCallback_47)); + return CHIP_NO_ERROR; } void OnFailureResponse_47(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_47( uint32_t power) + void OnSuccessResponse_47(uint32_t power) { - VerifyOrReturn(CheckConstraintType("power", "", "uint24")); + VerifyOrReturn(CheckConstraintType("power", "", "uint24")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeLifetimeEnergyConsumed_48() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_48, OnFailureCallback_48)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_48, OnFailureCallback_48)); + return CHIP_NO_ERROR; } void OnFailureResponse_48(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_48( const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) + void OnSuccessResponse_48(const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) { - VerifyOrReturn(CheckValueNonNull("lifetimeEnergyConsumed", lifetimeEnergyConsumed)); - VerifyOrReturn(CheckValue("lifetimeEnergyConsumed.Value()", lifetimeEnergyConsumed.Value(),0UL - )); + VerifyOrReturn(CheckValueNonNull("lifetimeEnergyConsumed", lifetimeEnergyConsumed)); + VerifyOrReturn(CheckValue("lifetimeEnergyConsumed.Value()", lifetimeEnergyConsumed.Value(), 0UL)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeLifetimeEnergyConsumed_49() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_49, OnFailureCallback_49)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_49, OnFailureCallback_49)); + return CHIP_NO_ERROR; } void OnFailureResponse_49(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_49( const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) + void OnSuccessResponse_49(const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) { - VerifyOrReturn(CheckConstraintType("lifetimeEnergyConsumed", "", "uint32")); + VerifyOrReturn(CheckConstraintType("lifetimeEnergyConsumed", "", "uint32")); NextTest(); - } - - - }; + } +}; -class Test_TC_PCC_2_2: public TestCommand +class Test_TC_PCC_2_2 : public TestCommand { - public: - Test_TC_PCC_2_2(): TestCommand("Test_TC_PCC_2_2"), mTestIndex(0) +public: + Test_TC_PCC_2_2() : TestCommand("Test_TC_PCC_2_2"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_PCC_2_2() - { - } + ~Test_TC_PCC_2_2() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_PCC_2_2\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_PCC_2_2\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PCC_2_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PCC_2_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Write 1 to the OperationMode attribute to DUT: OperationMode\n"); - if (ShouldSkip("A_OPERATIONMODE")) - { - NextTest(); - return; - } - err = TestWrite1ToTheOperationModeAttributeToDutOperationMode_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Write 1 to the OperationMode attribute to DUT: OperationMode\n"); + if (ShouldSkip("A_OPERATIONMODE")) + { + NextTest(); + return; + } + err = TestWrite1ToTheOperationModeAttributeToDutOperationMode_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Write 2 to the OperationMode attribute to DUT: OperationMode\n"); - if (ShouldSkip("A_OPERATIONMODE")) - { - NextTest(); - return; - } - err = TestWrite2ToTheOperationModeAttributeToDutOperationMode_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Write 2 to the OperationMode attribute to DUT: OperationMode\n"); + if (ShouldSkip("A_OPERATIONMODE")) + { + NextTest(); + return; + } + err = TestWrite2ToTheOperationModeAttributeToDutOperationMode_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Write 3 to the OperationMode attribute to DUT: OperationMode\n"); - if (ShouldSkip("A_OPERATIONMODE")) - { - NextTest(); - return; - } - err = TestWrite3ToTheOperationModeAttributeToDutOperationMode_3(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 3 : Write 3 to the OperationMode attribute to DUT: OperationMode\n"); + if (ShouldSkip("A_OPERATIONMODE")) + { + NextTest(); + return; + } + err = TestWrite3ToTheOperationModeAttributeToDutOperationMode_3(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 4; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context) - { - (static_cast(context))->OnSuccessResponse_1(); - } - - - + static void OnSuccessCallback_1(void * context) { (static_cast(context))->OnSuccessResponse_1(); } static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context) - { - (static_cast(context))->OnSuccessResponse_2(); - } - - - + static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context) - { - (static_cast(context))->OnSuccessResponse_3(); - } - - - + static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestWrite1ToTheOperationModeAttributeToDutOperationMode_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -38298,25 +29244,18 @@ class Test_TC_PCC_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t operationModeArgument; - operationModeArgument = 1; - - ReturnErrorOnFailure(cluster.WriteAttribute(operationModeArgument, this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + operationModeArgument = 1; - void OnSuccessResponse_1() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute( + operationModeArgument, this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestWrite2ToTheOperationModeAttributeToDutOperationMode_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -38324,25 +29263,18 @@ class Test_TC_PCC_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t operationModeArgument; - operationModeArgument = 2; - - ReturnErrorOnFailure(cluster.WriteAttribute(operationModeArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + operationModeArgument = 2; - void OnSuccessResponse_2() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute( + operationModeArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_2() { NextTest(); } - CHIP_ERROR TestWrite3ToTheOperationModeAttributeToDutOperationMode_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -38350,317 +29282,235 @@ class Test_TC_PCC_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t operationModeArgument; - operationModeArgument = 3; - - ReturnErrorOnFailure(cluster.WriteAttribute(operationModeArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + operationModeArgument = 3; - void OnSuccessResponse_3() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute( + operationModeArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - }; + void OnSuccessResponse_3() { NextTest(); } +}; -class Test_TC_PCC_2_3: public TestCommand +class Test_TC_PCC_2_3 : public TestCommand { - public: - Test_TC_PCC_2_3(): TestCommand("Test_TC_PCC_2_3"), mTestIndex(0) +public: + Test_TC_PCC_2_3() : TestCommand("Test_TC_PCC_2_3"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_PCC_2_3() - { - } + ~Test_TC_PCC_2_3() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_PCC_2_3\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_PCC_2_3\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PCC_2_3\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PCC_2_3\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Write 0 to the OperationMode attribute to DUT\n"); - if (ShouldSkip("A_OPERATIONMODE")) - { - NextTest(); - return; - } - err = TestWrite0ToTheOperationModeAttributeToDut_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Write 0 to the OperationMode attribute to DUT\n"); + if (ShouldSkip("A_OPERATIONMODE")) + { + NextTest(); + return; + } + err = TestWrite0ToTheOperationModeAttributeToDut_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the attribute: EffectiveOperationMode\n"); - if (ShouldSkip("A_EFFECTIVEOPERATIONMODE")) - { - NextTest(); - return; - } - err = TestReadsTheAttributeEffectiveOperationMode_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the attribute: EffectiveOperationMode\n"); + if (ShouldSkip("A_EFFECTIVEOPERATIONMODE")) + { + NextTest(); + return; + } + err = TestReadsTheAttributeEffectiveOperationMode_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Write 0 to the ControlMode attribute to DUT\n"); - if (ShouldSkip("A_CONTROLMODE")) - { - NextTest(); - return; - } - err = TestWrite0ToTheControlModeAttributeToDut_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Write 0 to the ControlMode attribute to DUT\n"); + if (ShouldSkip("A_CONTROLMODE")) + { + NextTest(); + return; + } + err = TestWrite0ToTheControlModeAttributeToDut_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the attribute: EffectiveControlMode\n"); - if (ShouldSkip("A_EFFECTIVECONTROLMODE")) - { - NextTest(); - return; - } - err = TestReadsTheAttributeEffectiveControlMode_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the attribute: EffectiveControlMode\n"); + if (ShouldSkip("A_EFFECTIVECONTROLMODE")) + { + NextTest(); + return; + } + err = TestReadsTheAttributeEffectiveControlMode_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Write 1 to the ControlMode attribute to DUT\n"); - if (ShouldSkip("A_CONTROLMODE")) - { - NextTest(); - return; - } - err = TestWrite1ToTheControlModeAttributeToDut_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Write 1 to the ControlMode attribute to DUT\n"); + if (ShouldSkip("A_CONTROLMODE")) + { + NextTest(); + return; + } + err = TestWrite1ToTheControlModeAttributeToDut_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Write 2 to the ControlMode attribute to DUT\n"); - if (ShouldSkip("A_CONTROLMODE")) - { - NextTest(); - return; - } - err = TestWrite2ToTheControlModeAttributeToDut_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : Write 2 to the ControlMode attribute to DUT\n"); + if (ShouldSkip("A_CONTROLMODE")) + { + NextTest(); + return; + } + err = TestWrite2ToTheControlModeAttributeToDut_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Write 3 to the ControlMode attribute to DUT\n"); - if (ShouldSkip("A_CONTROLMODE")) - { - NextTest(); - return; - } - err = TestWrite3ToTheControlModeAttributeToDut_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : Write 3 to the ControlMode attribute to DUT\n"); + if (ShouldSkip("A_CONTROLMODE")) + { + NextTest(); + return; + } + err = TestWrite3ToTheControlModeAttributeToDut_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Write 5 to the ControlMode attribute to DUT\n"); - if (ShouldSkip("A_CONTROLMODE")) - { - NextTest(); - return; - } - err = TestWrite5ToTheControlModeAttributeToDut_8(); - break; + ChipLogProgress(chipTool, " ***** Test Step 8 : Write 5 to the ControlMode attribute to DUT\n"); + if (ShouldSkip("A_CONTROLMODE")) + { + NextTest(); + return; + } + err = TestWrite5ToTheControlModeAttributeToDut_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Write 7 to the ControlMode attribute to DUT\n"); - if (ShouldSkip("A_CONTROLMODE")) - { - NextTest(); - return; - } - err = TestWrite7ToTheControlModeAttributeToDut_9(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 9 : Write 7 to the ControlMode attribute to DUT\n"); + if (ShouldSkip("A_CONTROLMODE")) + { + NextTest(); + return; + } + err = TestWrite7ToTheControlModeAttributeToDut_9(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 10; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context) - { - (static_cast(context))->OnSuccessResponse_1(); - } - - - + static void OnSuccessCallback_1(void * context) { (static_cast(context))->OnSuccessResponse_1(); } static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint8_t effectiveOperationMode) + static void OnSuccessCallback_2(void * context, uint8_t effectiveOperationMode) { (static_cast(context))->OnSuccessResponse_2(effectiveOperationMode); } - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context) - { - (static_cast(context))->OnSuccessResponse_3(); - } - - - + static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, uint8_t effectiveControlMode) + static void OnSuccessCallback_4(void * context, uint8_t effectiveControlMode) { (static_cast(context))->OnSuccessResponse_4(effectiveControlMode); } - - - static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context) - { - (static_cast(context))->OnSuccessResponse_5(); - } - - - + static void OnSuccessCallback_5(void * context) { (static_cast(context))->OnSuccessResponse_5(); } static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context) - { - (static_cast(context))->OnSuccessResponse_6(); - } - - - + static void OnSuccessCallback_6(void * context) { (static_cast(context))->OnSuccessResponse_6(); } static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context) - { - (static_cast(context))->OnSuccessResponse_7(); - } - - - + static void OnSuccessCallback_7(void * context) { (static_cast(context))->OnSuccessResponse_7(); } static void OnFailureCallback_8(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context) - { - (static_cast(context))->OnSuccessResponse_8(); - } - - - + static void OnSuccessCallback_8(void * context) { (static_cast(context))->OnSuccessResponse_8(); } static void OnFailureCallback_9(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_9(status); } - static void OnSuccessCallback_9(void * context) - { - (static_cast(context))->OnSuccessResponse_9(); - } - - - + static void OnSuccessCallback_9(void * context) { (static_cast(context))->OnSuccessResponse_9(); } // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestWrite0ToTheOperationModeAttributeToDut_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -38668,53 +29518,39 @@ class Test_TC_PCC_2_3: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t operationModeArgument; - operationModeArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(operationModeArgument, this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + operationModeArgument = 0; - void OnSuccessResponse_1() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute( + operationModeArgument, this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestReadsTheAttributeEffectiveOperationMode_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint8_t effectiveOperationMode) + void OnSuccessResponse_2(uint8_t effectiveOperationMode) { - VerifyOrReturn(CheckValue("effectiveOperationMode", effectiveOperationMode,0 - )); + VerifyOrReturn(CheckValue("effectiveOperationMode", effectiveOperationMode, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestWrite0ToTheControlModeAttributeToDut_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -38722,53 +29558,39 @@ class Test_TC_PCC_2_3: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t controlModeArgument; - controlModeArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(controlModeArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + controlModeArgument = 0; - void OnSuccessResponse_3() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute( + controlModeArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_3() { NextTest(); } - CHIP_ERROR TestReadsTheAttributeEffectiveControlMode_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( uint8_t effectiveControlMode) + void OnSuccessResponse_4(uint8_t effectiveControlMode) { - VerifyOrReturn(CheckValue("effectiveControlMode", effectiveControlMode,0 - )); + VerifyOrReturn(CheckValue("effectiveControlMode", effectiveControlMode, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestWrite1ToTheControlModeAttributeToDut_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -38776,25 +29598,18 @@ class Test_TC_PCC_2_3: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t controlModeArgument; - controlModeArgument = 1; - - ReturnErrorOnFailure(cluster.WriteAttribute(controlModeArgument, this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + controlModeArgument = 1; - void OnSuccessResponse_5() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute( + controlModeArgument, this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_5() { NextTest(); } - CHIP_ERROR TestWrite2ToTheControlModeAttributeToDut_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -38802,25 +29617,18 @@ class Test_TC_PCC_2_3: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t controlModeArgument; - controlModeArgument = 2; - - ReturnErrorOnFailure(cluster.WriteAttribute(controlModeArgument, this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + controlModeArgument = 2; - void OnSuccessResponse_6() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute( + controlModeArgument, this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_6() { NextTest(); } - CHIP_ERROR TestWrite3ToTheControlModeAttributeToDut_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -38828,25 +29636,18 @@ class Test_TC_PCC_2_3: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t controlModeArgument; - controlModeArgument = 3; - - ReturnErrorOnFailure(cluster.WriteAttribute(controlModeArgument, this, OnSuccessCallback_7, OnFailureCallback_7)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } + controlModeArgument = 3; - void OnSuccessResponse_7() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute( + controlModeArgument, this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_7() { NextTest(); } - CHIP_ERROR TestWrite5ToTheControlModeAttributeToDut_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -38854,25 +29655,18 @@ class Test_TC_PCC_2_3: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t controlModeArgument; - controlModeArgument = 5; - - ReturnErrorOnFailure(cluster.WriteAttribute(controlModeArgument, this, OnSuccessCallback_8, OnFailureCallback_8)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_8(EmberAfStatus status) - { - ThrowFailureResponse(); - } + controlModeArgument = 5; - void OnSuccessResponse_8() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute( + controlModeArgument, this, OnSuccessCallback_8, OnFailureCallback_8)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_8() { NextTest(); } - CHIP_ERROR TestWrite7ToTheControlModeAttributeToDut_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -38880,179 +29674,131 @@ class Test_TC_PCC_2_3: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t controlModeArgument; - controlModeArgument = 7; - - ReturnErrorOnFailure(cluster.WriteAttribute(controlModeArgument, this, OnSuccessCallback_9, OnFailureCallback_9)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } + controlModeArgument = 7; - void OnSuccessResponse_9() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute( + controlModeArgument, this, OnSuccessCallback_9, OnFailureCallback_9)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - }; + void OnSuccessResponse_9() { NextTest(); } +}; -class Test_TC_RH_1_1: public TestCommand +class Test_TC_RH_1_1 : public TestCommand { - public: - Test_TC_RH_1_1(): TestCommand("Test_TC_RH_1_1"), mTestIndex(0) +public: + Test_TC_RH_1_1() : TestCommand("Test_TC_RH_1_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_RH_1_1() - { - } + ~Test_TC_RH_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_RH_1_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_RH_1_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_RH_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_RH_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2(); - break; - } + ChipLogProgress(chipTool, + " ***** Test Step 2 : write the default values to mandatory global attribute: ClusterRevision\n"); + err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_1(clusterRevision); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context) - { - (static_cast(context))->OnSuccessResponse_2(); - } - - - + static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::RelativeHumidityMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint16_t clusterRevision) + void OnSuccessResponse_1(uint16_t clusterRevision) { - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -39060,700 +29806,543 @@ class Test_TC_RH_1_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t clusterRevisionArgument; - clusterRevisionArgument = 1U; - - ReturnErrorOnFailure(cluster.WriteAttribute(clusterRevisionArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + clusterRevisionArgument = 1U; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + clusterRevisionArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_2() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_2() { ThrowSuccessResponse(); } +}; - }; - -class Test_TC_RH_2_1: public TestCommand +class Test_TC_RH_2_1 : public TestCommand { - public: - Test_TC_RH_2_1(): TestCommand("Test_TC_RH_2_1"), mTestIndex(0) +public: + Test_TC_RH_2_1() : TestCommand("Test_TC_RH_2_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_RH_2_1() - { - } + ~Test_TC_RH_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_RH_2_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_RH_2_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_RH_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_RH_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads constraints of attribute: MeasuredValue\n"); - err = TestReadsConstraintsOfAttributeMeasuredValue_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads constraints of attribute: MeasuredValue\n"); + err = TestReadsConstraintsOfAttributeMeasuredValue_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads constraints of attribute: MinMeasuredValue\n"); - err = TestReadsConstraintsOfAttributeMinMeasuredValue_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads constraints of attribute: MinMeasuredValue\n"); + err = TestReadsConstraintsOfAttributeMinMeasuredValue_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the optional attribute: Tolerance\n"); - err = TestReadsTheOptionalAttributeTolerance_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the optional attribute: Tolerance\n"); + err = TestReadsTheOptionalAttributeTolerance_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads constraints of attribute: Tolerance\n"); - err = TestReadsConstraintsOfAttributeTolerance_4(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads constraints of attribute: Tolerance\n"); + err = TestReadsConstraintsOfAttributeTolerance_4(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 5; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint16_t measuredValue) + static void OnSuccessCallback_1(void * context, uint16_t measuredValue) { (static_cast(context))->OnSuccessResponse_1(measuredValue); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint16_t minMeasuredValue) + static void OnSuccessCallback_2(void * context, uint16_t minMeasuredValue) { (static_cast(context))->OnSuccessResponse_2(minMeasuredValue); } - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, uint16_t tolerance) + static void OnSuccessCallback_3(void * context, uint16_t tolerance) { (static_cast(context))->OnSuccessResponse_3(tolerance); } - - - static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, uint16_t tolerance) + static void OnSuccessCallback_4(void * context, uint16_t tolerance) { (static_cast(context))->OnSuccessResponse_4(tolerance); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadsConstraintsOfAttributeMeasuredValue_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::RelativeHumidityMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint16_t measuredValue) + void OnSuccessResponse_1(uint16_t measuredValue) { - VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadsConstraintsOfAttributeMinMeasuredValue_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::RelativeHumidityMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint16_t minMeasuredValue) + void OnSuccessResponse_2(uint16_t minMeasuredValue) { - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", minMeasuredValue, 0U));VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", minMeasuredValue, 9999U)); + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", minMeasuredValue, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", minMeasuredValue, 9999U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsTheOptionalAttributeTolerance_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::RelativeHumidityMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_3( uint16_t tolerance) + void OnSuccessResponse_3(uint16_t tolerance) { - VerifyOrReturn(CheckValue("tolerance", tolerance,0U - )); + VerifyOrReturn(CheckValue("tolerance", tolerance, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsConstraintsOfAttributeTolerance_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::RelativeHumidityMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } void OnFailureResponse_4(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_4( uint16_t tolerance) + void OnSuccessResponse_4(uint16_t tolerance) { - VerifyOrReturn(CheckConstraintType("tolerance", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("tolerance", tolerance, 0U));VerifyOrReturn(CheckConstraintMaxValue("tolerance", tolerance, 2048U)); + VerifyOrReturn(CheckConstraintType("tolerance", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("tolerance", tolerance, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("tolerance", tolerance, 2048U)); NextTest(); - } - - - }; + } +}; -class Test_TC_RH_2_2: public TestCommand +class Test_TC_RH_2_2 : public TestCommand { - public: - Test_TC_RH_2_2(): TestCommand("Test_TC_RH_2_2"), mTestIndex(0) +public: + Test_TC_RH_2_2() : TestCommand("Test_TC_RH_2_2"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_RH_2_2() - { - } + ~Test_TC_RH_2_2() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_RH_2_2\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_RH_2_2\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_RH_2_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_RH_2_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads MeasuredValue attribute from DUT\n"); - if (ShouldSkip("A_RELATIVEHUMIDITY")) - { - NextTest(); - return; - } - err = TestReadsMeasuredValueAttributeFromDut_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads MeasuredValue attribute from DUT\n"); + if (ShouldSkip("A_RELATIVEHUMIDITY")) + { + NextTest(); + return; + } + err = TestReadsMeasuredValueAttributeFromDut_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the mandatory attribute: MeasuredValue\n"); - if (ShouldSkip("A_RELATIVEHUMIDITY")) - { - NextTest(); - return; - } - err = TestReadTheMandatoryAttributeMeasuredValue_2(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the mandatory attribute: MeasuredValue\n"); + if (ShouldSkip("A_RELATIVEHUMIDITY")) + { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributeMeasuredValue_2(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint16_t measuredValue) + static void OnSuccessCallback_1(void * context, uint16_t measuredValue) { (static_cast(context))->OnSuccessResponse_1(measuredValue); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint16_t measuredValue) + static void OnSuccessCallback_2(void * context, uint16_t measuredValue) { (static_cast(context))->OnSuccessResponse_2(measuredValue); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadsMeasuredValueAttributeFromDut_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::RelativeHumidityMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint16_t measuredValue) + void OnSuccessResponse_1(uint16_t measuredValue) { - VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::RelativeHumidityMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint16_t measuredValue) + void OnSuccessResponse_2(uint16_t measuredValue) { - VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); NextTest(); - } - - - }; + } +}; -class Test_TC_TM_1_1: public TestCommand +class Test_TC_TM_1_1 : public TestCommand { - public: - Test_TC_TM_1_1(): TestCommand("Test_TC_TM_1_1"), mTestIndex(0) +public: + Test_TC_TM_1_1() : TestCommand("Test_TC_TM_1_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_TM_1_1() - { - } + ~Test_TC_TM_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_TM_1_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_TM_1_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TM_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TM_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); + err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : reads back global attribute: ClusterRevision\n"); - err = TestReadsBackGlobalAttributeClusterRevision_4(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 4 : reads back global attribute: ClusterRevision\n"); + err = TestReadsBackGlobalAttributeClusterRevision_4(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 5; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_1(clusterRevision); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_2(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_2(clusterRevision); } - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context) - { - (static_cast(context))->OnSuccessResponse_3(); - } - - - + static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_4(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_4(clusterRevision); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TemperatureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint16_t clusterRevision) + void OnSuccessResponse_1(uint16_t clusterRevision) { - VerifyOrReturn(CheckValue("clusterRevision", clusterRevision,3U - )); + VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 3U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TemperatureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint16_t clusterRevision) + void OnSuccessResponse_2(uint16_t clusterRevision) { - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -39761,595 +30350,453 @@ class Test_TC_TM_1_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t clusterRevisionArgument; - clusterRevisionArgument = 3U; - - ReturnErrorOnFailure(cluster.WriteAttribute(clusterRevisionArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + clusterRevisionArgument = 3U; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + clusterRevisionArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_3() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_3() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TemperatureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( uint16_t clusterRevision) + void OnSuccessResponse_4(uint16_t clusterRevision) { - VerifyOrReturn(CheckValue("clusterRevision", clusterRevision,3U - )); + VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 3U)); NextTest(); - } - - - }; + } +}; -class Test_TC_TM_2_1: public TestCommand +class Test_TC_TM_2_1 : public TestCommand { - public: - Test_TC_TM_2_1(): TestCommand("Test_TC_TM_2_1"), mTestIndex(0) +public: + Test_TC_TM_2_1() : TestCommand("Test_TC_TM_2_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_TM_2_1() - { - } + ~Test_TC_TM_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_TM_2_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_TM_2_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TM_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TM_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the mandatory attribute: MeasuredValue\n"); - err = TestReadTheMandatoryAttributeMeasuredValue_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : read the mandatory attribute: MeasuredValue\n"); + err = TestReadTheMandatoryAttributeMeasuredValue_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : read the optional attribute: Tolerance\n"); - err = TestReadTheOptionalAttributeTolerance_2(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 2 : read the optional attribute: Tolerance\n"); + err = TestReadTheOptionalAttributeTolerance_2(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, int16_t measuredValue) + static void OnSuccessCallback_1(void * context, int16_t measuredValue) { (static_cast(context))->OnSuccessResponse_1(measuredValue); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint16_t tolerance) + static void OnSuccessCallback_2(void * context, uint16_t tolerance) { (static_cast(context))->OnSuccessResponse_2(tolerance); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TemperatureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( int16_t measuredValue) + void OnSuccessResponse_1(int16_t measuredValue) { - VerifyOrReturn(CheckConstraintType("measuredValue", "", "int16")); + VerifyOrReturn(CheckConstraintType("measuredValue", "", "int16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeTolerance_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TemperatureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_2( uint16_t tolerance) + void OnSuccessResponse_2(uint16_t tolerance) { - VerifyOrReturn(CheckConstraintType("tolerance", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("tolerance", tolerance, 0U));VerifyOrReturn(CheckConstraintMaxValue("tolerance", tolerance, 2048U)); + VerifyOrReturn(CheckConstraintType("tolerance", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("tolerance", tolerance, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("tolerance", tolerance, 2048U)); NextTest(); - } - - - }; + } +}; -class Test_TC_TM_2_2: public TestCommand +class Test_TC_TM_2_2 : public TestCommand { - public: - Test_TC_TM_2_2(): TestCommand("Test_TC_TM_2_2"), mTestIndex(0) +public: + Test_TC_TM_2_2() : TestCommand("Test_TC_TM_2_2"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_TM_2_2() - { - } + ~Test_TC_TM_2_2() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_TM_2_2\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_TM_2_2\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TM_2_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TM_2_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads MeasuredValue attribute from DUT\n"); - if (ShouldSkip("A_TEMPERATURE")) - { - NextTest(); - return; - } - err = TestReadsMeasuredValueAttributeFromDut_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads MeasuredValue attribute from DUT\n"); + if (ShouldSkip("A_TEMPERATURE")) + { + NextTest(); + return; + } + err = TestReadsMeasuredValueAttributeFromDut_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the mandatory attribute: MeasuredValue\n"); - if (ShouldSkip("A_TEMPERATURE")) - { - NextTest(); - return; - } - err = TestReadTheMandatoryAttributeMeasuredValue_2(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the mandatory attribute: MeasuredValue\n"); + if (ShouldSkip("A_TEMPERATURE")) + { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributeMeasuredValue_2(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, int16_t measuredValue) + static void OnSuccessCallback_1(void * context, int16_t measuredValue) { (static_cast(context))->OnSuccessResponse_1(measuredValue); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, int16_t measuredValue) + static void OnSuccessCallback_2(void * context, int16_t measuredValue) { (static_cast(context))->OnSuccessResponse_2(measuredValue); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadsMeasuredValueAttributeFromDut_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TemperatureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( int16_t measuredValue) + void OnSuccessResponse_1(int16_t measuredValue) { - VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TemperatureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( int16_t measuredValue) + void OnSuccessResponse_2(int16_t measuredValue) { - VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); NextTest(); - } - - - }; + } +}; -class Test_TC_TSTAT_1_1: public TestCommand +class Test_TC_TSTAT_1_1 : public TestCommand { - public: - Test_TC_TSTAT_1_1(): TestCommand("Test_TC_TSTAT_1_1"), mTestIndex(0) +public: + Test_TC_TSTAT_1_1() : TestCommand("Test_TC_TSTAT_1_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_TSTAT_1_1() - { - } + ~Test_TC_TSTAT_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_TSTAT_1_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_TSTAT_1_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TSTAT_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TSTAT_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 2 : write the default values to mandatory global attribute: ClusterRevision\n"); + err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the optional global attribute constraints: FeatureMap\n"); - err = TestReadTheOptionalGlobalAttributeConstraintsFeatureMap_3(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the optional global attribute constraints: FeatureMap\n"); + err = TestReadTheOptionalGlobalAttributeConstraintsFeatureMap_3(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 4; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_1(clusterRevision); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context) - { - (static_cast(context))->OnSuccessResponse_2(); - } - - - + static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, uint32_t featureMap) + static void OnSuccessCallback_3(void * context, uint32_t featureMap) { (static_cast(context))->OnSuccessResponse_3(featureMap); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint16_t clusterRevision) + void OnSuccessResponse_1(uint16_t clusterRevision) { - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -40357,1246 +30804,1005 @@ class Test_TC_TSTAT_1_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t clusterRevisionArgument; - clusterRevisionArgument = 5U; - - ReturnErrorOnFailure(cluster.WriteAttribute(clusterRevisionArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + clusterRevisionArgument = 5U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + clusterRevisionArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_2() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_2() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadTheOptionalGlobalAttributeConstraintsFeatureMap_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( uint32_t featureMap) + void OnSuccessResponse_3(uint32_t featureMap) { - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); NextTest(); - } - - - }; + } +}; -class Test_TC_TSTAT_2_1: public TestCommand +class Test_TC_TSTAT_2_1 : public TestCommand { - public: - Test_TC_TSTAT_2_1(): TestCommand("Test_TC_TSTAT_2_1"), mTestIndex(0) +public: + Test_TC_TSTAT_2_1() : TestCommand("Test_TC_TSTAT_2_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_TSTAT_2_1() - { - } + ~Test_TC_TSTAT_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_TSTAT_2_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_TSTAT_2_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TSTAT_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TSTAT_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads constraints of mandatory attributes from DUT: LocalTemperature\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutLocalTemperature_1(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 1 : Reads constraints of mandatory attributes from DUT: LocalTemperature\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutLocalTemperature_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads mandatory attributes from DUT: AbsMinHeatSetpointLimit\n"); - err = TestReadsMandatoryAttributesFromDutAbsMinHeatSetpointLimit_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads mandatory attributes from DUT: AbsMinHeatSetpointLimit\n"); + err = TestReadsMandatoryAttributesFromDutAbsMinHeatSetpointLimit_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads constraints of mandatory attributes from DUT: AbsMinHeatSetpointLimit\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutAbsMinHeatSetpointLimit_3(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 3 : Reads constraints of mandatory attributes from DUT: AbsMinHeatSetpointLimit\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutAbsMinHeatSetpointLimit_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Writes the respective default value to mandatory attributes to DUT: AbsMinHeatSetpointLimit\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMinHeatSetpointLimit_4(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 4 : Writes the respective default value to mandatory attributes to DUT: " + "AbsMinHeatSetpointLimit\n"); + err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMinHeatSetpointLimit_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read back mandatory attributes from DUT: AbsMinHeatSetpointLimit\n"); - err = TestReadBackMandatoryAttributesFromDutAbsMinHeatSetpointLimit_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Read back mandatory attributes from DUT: AbsMinHeatSetpointLimit\n"); + err = TestReadBackMandatoryAttributesFromDutAbsMinHeatSetpointLimit_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads mandatory attributes from DUT: AbsMaxHeatSetpointLimit\n"); - err = TestReadsMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : Reads mandatory attributes from DUT: AbsMaxHeatSetpointLimit\n"); + err = TestReadsMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads constraints of mandatory attributes from DUT: AbsMaxHeatSetpointLimit\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_7(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 7 : Reads constraints of mandatory attributes from DUT: AbsMaxHeatSetpointLimit\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Writes the respective default value to mandatory attributes to DUT: AbsMaxHeatSetpointLimit\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMaxHeatSetpointLimit_8(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 8 : Writes the respective default value to mandatory attributes to DUT: " + "AbsMaxHeatSetpointLimit\n"); + err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMaxHeatSetpointLimit_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read back mandatory attributes from DUT: AbsMaxHeatSetpointLimit\n"); - err = TestReadBackMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_9(); - break; + ChipLogProgress(chipTool, " ***** Test Step 9 : Read back mandatory attributes from DUT: AbsMaxHeatSetpointLimit\n"); + err = TestReadBackMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_9(); + break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Reads mandatory attributes from DUT: AbsMinCoolSetpointLimit\n"); - err = TestReadsMandatoryAttributesFromDutAbsMinCoolSetpointLimit_10(); - break; + ChipLogProgress(chipTool, " ***** Test Step 10 : Reads mandatory attributes from DUT: AbsMinCoolSetpointLimit\n"); + err = TestReadsMandatoryAttributesFromDutAbsMinCoolSetpointLimit_10(); + break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Reads constraints of mandatory attributes from DUT: AbsMinCoolSetpointLimit\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutAbsMinCoolSetpointLimit_11(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 11 : Reads constraints of mandatory attributes from DUT: AbsMinCoolSetpointLimit\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutAbsMinCoolSetpointLimit_11(); + break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Writes the respective default value to mandatory attributes to DUT: AbsMinCoolSetpointLimit\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMinCoolSetpointLimit_12(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 12 : Writes the respective default value to mandatory attributes to DUT: " + "AbsMinCoolSetpointLimit\n"); + err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMinCoolSetpointLimit_12(); + break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read back mandatory attributes from DUT: AbsMinCoolSetpointLimit\n"); - err = TestReadBackMandatoryAttributesFromDutAbsMinCoolSetpointLimit_13(); - break; + ChipLogProgress(chipTool, " ***** Test Step 13 : Read back mandatory attributes from DUT: AbsMinCoolSetpointLimit\n"); + err = TestReadBackMandatoryAttributesFromDutAbsMinCoolSetpointLimit_13(); + break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Reads mandatory attributes from DUT: AbsMaxCoolSetpointLimit\n"); - err = TestReadsMandatoryAttributesFromDutAbsMaxCoolSetpointLimit_14(); - break; + ChipLogProgress(chipTool, " ***** Test Step 14 : Reads mandatory attributes from DUT: AbsMaxCoolSetpointLimit\n"); + err = TestReadsMandatoryAttributesFromDutAbsMaxCoolSetpointLimit_14(); + break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Reads constraints of mandatory attributes from DUT: AbsMaxCoolSetpointLimit\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutAbsMaxCoolSetpointLimit_15(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 15 : Reads constraints of mandatory attributes from DUT: AbsMaxCoolSetpointLimit\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutAbsMaxCoolSetpointLimit_15(); + break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Writes the respective default value to mandatory attributes to DUT: AbsMaxCoolSetpointLimit\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMaxCoolSetpointLimit_16(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 16 : Writes the respective default value to mandatory attributes to DUT: " + "AbsMaxCoolSetpointLimit\n"); + err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMaxCoolSetpointLimit_16(); + break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Read back mandatory attributes from DUT: AbsMaxCoolSetpointLimit\n"); - err = TestReadBackMandatoryAttributesFromDutAbsMaxCoolSetpointLimit_17(); - break; + ChipLogProgress(chipTool, " ***** Test Step 17 : Read back mandatory attributes from DUT: AbsMaxCoolSetpointLimit\n"); + err = TestReadBackMandatoryAttributesFromDutAbsMaxCoolSetpointLimit_17(); + break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Reads mandatory attributes from DUT: OccupiedCoolingSetpoint\n"); - err = TestReadsMandatoryAttributesFromDutOccupiedCoolingSetpoint_18(); - break; + ChipLogProgress(chipTool, " ***** Test Step 18 : Reads mandatory attributes from DUT: OccupiedCoolingSetpoint\n"); + err = TestReadsMandatoryAttributesFromDutOccupiedCoolingSetpoint_18(); + break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Reads constraints of mandatory attributes from DUT: OccupiedCoolingSetpoint\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutOccupiedCoolingSetpoint_19(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 19 : Reads constraints of mandatory attributes from DUT: OccupiedCoolingSetpoint\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutOccupiedCoolingSetpoint_19(); + break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Writes the respective default value to mandatory attributes to DUT: OccupiedCoolingSetpoint\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutOccupiedCoolingSetpoint_20(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 20 : Writes the respective default value to mandatory attributes to DUT: " + "OccupiedCoolingSetpoint\n"); + err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutOccupiedCoolingSetpoint_20(); + break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Read back mandatory attributes from DUT: OccupiedCoolingSetpoint\n"); - err = TestReadBackMandatoryAttributesFromDutOccupiedCoolingSetpoint_21(); - break; + ChipLogProgress(chipTool, " ***** Test Step 21 : Read back mandatory attributes from DUT: OccupiedCoolingSetpoint\n"); + err = TestReadBackMandatoryAttributesFromDutOccupiedCoolingSetpoint_21(); + break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Reads mandatory attributes from DUT: OccupiedHeatingSetpoint\n"); - err = TestReadsMandatoryAttributesFromDutOccupiedHeatingSetpoint_22(); - break; + ChipLogProgress(chipTool, " ***** Test Step 22 : Reads mandatory attributes from DUT: OccupiedHeatingSetpoint\n"); + err = TestReadsMandatoryAttributesFromDutOccupiedHeatingSetpoint_22(); + break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Reads constraints of mandatory attributes from DUT: OccupiedHeatingSetpoint\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutOccupiedHeatingSetpoint_23(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 23 : Reads constraints of mandatory attributes from DUT: OccupiedHeatingSetpoint\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutOccupiedHeatingSetpoint_23(); + break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Writes the respective default value to mandatory attributes to DUT: OccupiedHeatingSetpoint\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutOccupiedHeatingSetpoint_24(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 24 : Writes the respective default value to mandatory attributes to DUT: " + "OccupiedHeatingSetpoint\n"); + err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutOccupiedHeatingSetpoint_24(); + break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Read back mandatory attributes from DUT: OccupiedHeatingSetpoint\n"); - err = TestReadBackMandatoryAttributesFromDutOccupiedHeatingSetpoint_25(); - break; + ChipLogProgress(chipTool, " ***** Test Step 25 : Read back mandatory attributes from DUT: OccupiedHeatingSetpoint\n"); + err = TestReadBackMandatoryAttributesFromDutOccupiedHeatingSetpoint_25(); + break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Reads mandatory attributes from DUT: MinHeatSetpointLimit\n"); - err = TestReadsMandatoryAttributesFromDutMinHeatSetpointLimit_26(); - break; + ChipLogProgress(chipTool, " ***** Test Step 26 : Reads mandatory attributes from DUT: MinHeatSetpointLimit\n"); + err = TestReadsMandatoryAttributesFromDutMinHeatSetpointLimit_26(); + break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Reads constraints of mandatory attributes from DUT: MinHeatSetpointLimit\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutMinHeatSetpointLimit_27(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 27 : Reads constraints of mandatory attributes from DUT: MinHeatSetpointLimit\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutMinHeatSetpointLimit_27(); + break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Writes the respective default value to mandatory attributes to DUT: MinHeatSetpointLimit\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMinHeatSetpointLimit_28(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 28 : Writes the respective default value to mandatory attributes to DUT: MinHeatSetpointLimit\n"); + err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMinHeatSetpointLimit_28(); + break; case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Read back mandatory attributes from DUT: MinHeatSetpointLimit\n"); - err = TestReadBackMandatoryAttributesFromDutMinHeatSetpointLimit_29(); - break; + ChipLogProgress(chipTool, " ***** Test Step 29 : Read back mandatory attributes from DUT: MinHeatSetpointLimit\n"); + err = TestReadBackMandatoryAttributesFromDutMinHeatSetpointLimit_29(); + break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Reads mandatory attributes from DUT: MaxHeatSetpointLimit\n"); - err = TestReadsMandatoryAttributesFromDutMaxHeatSetpointLimit_30(); - break; + ChipLogProgress(chipTool, " ***** Test Step 30 : Reads mandatory attributes from DUT: MaxHeatSetpointLimit\n"); + err = TestReadsMandatoryAttributesFromDutMaxHeatSetpointLimit_30(); + break; case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Reads constraints of mandatory attributes from DUT: MaxHeatSetpointLimit\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutMaxHeatSetpointLimit_31(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 31 : Reads constraints of mandatory attributes from DUT: MaxHeatSetpointLimit\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutMaxHeatSetpointLimit_31(); + break; case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Writes the respective default value to mandatory attributes to DUT: MaxHeatSetpointLimit\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMaxHeatSetpointLimit_32(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 32 : Writes the respective default value to mandatory attributes to DUT: MaxHeatSetpointLimit\n"); + err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMaxHeatSetpointLimit_32(); + break; case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Read back mandatory attributes from DUT: MaxHeatSetpointLimit\n"); - err = TestReadBackMandatoryAttributesFromDutMaxHeatSetpointLimit_33(); - break; + ChipLogProgress(chipTool, " ***** Test Step 33 : Read back mandatory attributes from DUT: MaxHeatSetpointLimit\n"); + err = TestReadBackMandatoryAttributesFromDutMaxHeatSetpointLimit_33(); + break; case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Reads mandatory attributes from DUT: MinCoolSetpointLimit\n"); - err = TestReadsMandatoryAttributesFromDutMinCoolSetpointLimit_34(); - break; + ChipLogProgress(chipTool, " ***** Test Step 34 : Reads mandatory attributes from DUT: MinCoolSetpointLimit\n"); + err = TestReadsMandatoryAttributesFromDutMinCoolSetpointLimit_34(); + break; case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Reads constraints of mandatory attributes from DUT: MinCoolSetpointLimit\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutMinCoolSetpointLimit_35(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 35 : Reads constraints of mandatory attributes from DUT: MinCoolSetpointLimit\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutMinCoolSetpointLimit_35(); + break; case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Writes the respective default value to mandatory attributes to DUT: MinCoolSetpointLimit\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMinCoolSetpointLimit_36(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 36 : Writes the respective default value to mandatory attributes to DUT: MinCoolSetpointLimit\n"); + err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMinCoolSetpointLimit_36(); + break; case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Read back mandatory attributes from DUT: MinCoolSetpointLimit\n"); - err = TestReadBackMandatoryAttributesFromDutMinCoolSetpointLimit_37(); - break; + ChipLogProgress(chipTool, " ***** Test Step 37 : Read back mandatory attributes from DUT: MinCoolSetpointLimit\n"); + err = TestReadBackMandatoryAttributesFromDutMinCoolSetpointLimit_37(); + break; case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : Reads mandatory attributes from DUT: MaxCoolSetpointLimit\n"); - err = TestReadsMandatoryAttributesFromDutMaxCoolSetpointLimit_38(); - break; + ChipLogProgress(chipTool, " ***** Test Step 38 : Reads mandatory attributes from DUT: MaxCoolSetpointLimit\n"); + err = TestReadsMandatoryAttributesFromDutMaxCoolSetpointLimit_38(); + break; case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : Reads constraints of mandatory attributes from DUT: MaxCoolSetpointLimit\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutMaxCoolSetpointLimit_39(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 39 : Reads constraints of mandatory attributes from DUT: MaxCoolSetpointLimit\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutMaxCoolSetpointLimit_39(); + break; case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : Writes the respective default value to mandatory attributes to DUT: MaxCoolSetpointLimit\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMaxCoolSetpointLimit_40(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 40 : Writes the respective default value to mandatory attributes to DUT: MaxCoolSetpointLimit\n"); + err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMaxCoolSetpointLimit_40(); + break; case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : Read back mandatory attributes from DUT: MaxCoolSetpointLimit\n"); - err = TestReadBackMandatoryAttributesFromDutMaxCoolSetpointLimit_41(); - break; + ChipLogProgress(chipTool, " ***** Test Step 41 : Read back mandatory attributes from DUT: MaxCoolSetpointLimit\n"); + err = TestReadBackMandatoryAttributesFromDutMaxCoolSetpointLimit_41(); + break; case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : Reads mandatory attributes from DUT: ControlSequenceOfOperation\n"); - err = TestReadsMandatoryAttributesFromDutControlSequenceOfOperation_42(); - break; + ChipLogProgress(chipTool, " ***** Test Step 42 : Reads mandatory attributes from DUT: ControlSequenceOfOperation\n"); + err = TestReadsMandatoryAttributesFromDutControlSequenceOfOperation_42(); + break; case 43: - ChipLogProgress(chipTool, " ***** Test Step 43 : Reads constraints of mandatory attributes from DUT: ControlSequenceOfOperation\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutControlSequenceOfOperation_43(); - break; + ChipLogProgress( + chipTool, " ***** Test Step 43 : Reads constraints of mandatory attributes from DUT: ControlSequenceOfOperation\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutControlSequenceOfOperation_43(); + break; case 44: - ChipLogProgress(chipTool, " ***** Test Step 44 : Writes the respective default value to mandatory attributes to DUT: ControlSequenceOfOperation\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutControlSequenceOfOperation_44(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 44 : Writes the respective default value to mandatory attributes to DUT: " + "ControlSequenceOfOperation\n"); + err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutControlSequenceOfOperation_44(); + break; case 45: - ChipLogProgress(chipTool, " ***** Test Step 45 : Read back mandatory attributes from DUT: ControlSequenceOfOperation\n"); - err = TestReadBackMandatoryAttributesFromDutControlSequenceOfOperation_45(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 45 : Read back mandatory attributes from DUT: ControlSequenceOfOperation\n"); + err = TestReadBackMandatoryAttributesFromDutControlSequenceOfOperation_45(); + break; case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : Reads mandatory attributes from DUT: SystemMode\n"); - err = TestReadsMandatoryAttributesFromDutSystemMode_46(); - break; + ChipLogProgress(chipTool, " ***** Test Step 46 : Reads mandatory attributes from DUT: SystemMode\n"); + err = TestReadsMandatoryAttributesFromDutSystemMode_46(); + break; case 47: - ChipLogProgress(chipTool, " ***** Test Step 47 : Reads constraints of mandatory attributes from DUT: SystemMode\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutSystemMode_47(); - break; + ChipLogProgress(chipTool, " ***** Test Step 47 : Reads constraints of mandatory attributes from DUT: SystemMode\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutSystemMode_47(); + break; case 48: - ChipLogProgress(chipTool, " ***** Test Step 48 : Writes the respective default value to mandatory attributes to DUT: SystemMode\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutSystemMode_48(); - break; + ChipLogProgress( + chipTool, " ***** Test Step 48 : Writes the respective default value to mandatory attributes to DUT: SystemMode\n"); + err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutSystemMode_48(); + break; case 49: - ChipLogProgress(chipTool, " ***** Test Step 49 : Read back mandatory attributes from DUT: SystemMode\n"); - err = TestReadBackMandatoryAttributesFromDutSystemMode_49(); - break; + ChipLogProgress(chipTool, " ***** Test Step 49 : Read back mandatory attributes from DUT: SystemMode\n"); + err = TestReadBackMandatoryAttributesFromDutSystemMode_49(); + break; case 50: - ChipLogProgress(chipTool, " ***** Test Step 50 : Reads optional attributes from DUT: MinSetpointDeadBand\n"); - err = TestReadsOptionalAttributesFromDutMinSetpointDeadBand_50(); - break; + ChipLogProgress(chipTool, " ***** Test Step 50 : Reads optional attributes from DUT: MinSetpointDeadBand\n"); + err = TestReadsOptionalAttributesFromDutMinSetpointDeadBand_50(); + break; case 51: - ChipLogProgress(chipTool, " ***** Test Step 51 : Reads constraints of optional attributes from DUT: MinSetpointDeadBand\n"); - err = TestReadsConstraintsOfOptionalAttributesFromDutMinSetpointDeadBand_51(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 51 : Reads constraints of optional attributes from DUT: MinSetpointDeadBand\n"); + err = TestReadsConstraintsOfOptionalAttributesFromDutMinSetpointDeadBand_51(); + break; case 52: - ChipLogProgress(chipTool, " ***** Test Step 52 : Writes the respective default value to optional attributes to DUT: MinSetpointDeadBand\n"); - err = TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutMinSetpointDeadBand_52(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 52 : Writes the respective default value to optional attributes to DUT: MinSetpointDeadBand\n"); + err = TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutMinSetpointDeadBand_52(); + break; case 53: - ChipLogProgress(chipTool, " ***** Test Step 53 : Read back optional attributes from DUT: MinSetpointDeadBand\n"); - err = TestReadBackOptionalAttributesFromDutMinSetpointDeadBand_53(); - break; + ChipLogProgress(chipTool, " ***** Test Step 53 : Read back optional attributes from DUT: MinSetpointDeadBand\n"); + err = TestReadBackOptionalAttributesFromDutMinSetpointDeadBand_53(); + break; case 54: - ChipLogProgress(chipTool, " ***** Test Step 54 : Reads constraints of optional attributes from DUT: StartOfWeek\n"); - err = TestReadsConstraintsOfOptionalAttributesFromDutStartOfWeek_54(); - break; + ChipLogProgress(chipTool, " ***** Test Step 54 : Reads constraints of optional attributes from DUT: StartOfWeek\n"); + err = TestReadsConstraintsOfOptionalAttributesFromDutStartOfWeek_54(); + break; case 55: - ChipLogProgress(chipTool, " ***** Test Step 55 : Writes the respective default value to optional attributes to DUT: StartOfWeek\n"); - err = TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutStartOfWeek_55(); - break; + ChipLogProgress( + chipTool, " ***** Test Step 55 : Writes the respective default value to optional attributes to DUT: StartOfWeek\n"); + err = TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutStartOfWeek_55(); + break; case 56: - ChipLogProgress(chipTool, " ***** Test Step 56 : Read back optional attributes from DUT: StartOfWeek\n"); - err = TestReadBackOptionalAttributesFromDutStartOfWeek_56(); - break; + ChipLogProgress(chipTool, " ***** Test Step 56 : Read back optional attributes from DUT: StartOfWeek\n"); + err = TestReadBackOptionalAttributesFromDutStartOfWeek_56(); + break; case 57: - ChipLogProgress(chipTool, " ***** Test Step 57 : Reads constraints of optional attributes from DUT: NumberOfWeeklyTransitions\n"); - err = TestReadsConstraintsOfOptionalAttributesFromDutNumberOfWeeklyTransitions_57(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 57 : Reads constraints of optional attributes from DUT: NumberOfWeeklyTransitions\n"); + err = TestReadsConstraintsOfOptionalAttributesFromDutNumberOfWeeklyTransitions_57(); + break; case 58: - ChipLogProgress(chipTool, " ***** Test Step 58 : Writes the respective default value to optional attributes to DUT: NumberOfWeeklyTransitions\n"); - err = TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutNumberOfWeeklyTransitions_58(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 58 : Writes the respective default value to optional attributes to DUT: " + "NumberOfWeeklyTransitions\n"); + err = TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutNumberOfWeeklyTransitions_58(); + break; case 59: - ChipLogProgress(chipTool, " ***** Test Step 59 : Reads constraints of optional attributes from DUT: NumberOfDailyTransitions\n"); - err = TestReadsConstraintsOfOptionalAttributesFromDutNumberOfDailyTransitions_59(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 59 : Reads constraints of optional attributes from DUT: NumberOfDailyTransitions\n"); + err = TestReadsConstraintsOfOptionalAttributesFromDutNumberOfDailyTransitions_59(); + break; case 60: - ChipLogProgress(chipTool, " ***** Test Step 60 : Writes the respective default value to optional attributes to DUT: NumberOfDailyTransitions\n"); - err = TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutNumberOfDailyTransitions_60(); - break; - } + ChipLogProgress(chipTool, + " ***** Test Step 60 : Writes the respective default value to optional attributes to DUT: " + "NumberOfDailyTransitions\n"); + err = TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutNumberOfDailyTransitions_60(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 61; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, int16_t localTemperature) + static void OnSuccessCallback_1(void * context, int16_t localTemperature) { (static_cast(context))->OnSuccessResponse_1(localTemperature); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, int16_t absMinHeatSetpointLimit) + static void OnSuccessCallback_2(void * context, int16_t absMinHeatSetpointLimit) { (static_cast(context))->OnSuccessResponse_2(absMinHeatSetpointLimit); } - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, int16_t absMinHeatSetpointLimit) + static void OnSuccessCallback_3(void * context, int16_t absMinHeatSetpointLimit) { (static_cast(context))->OnSuccessResponse_3(absMinHeatSetpointLimit); } - - - static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context) - { - (static_cast(context))->OnSuccessResponse_4(); - } - - - + static void OnSuccessCallback_4(void * context) { (static_cast(context))->OnSuccessResponse_4(); } static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context, int16_t absMinHeatSetpointLimit) + static void OnSuccessCallback_5(void * context, int16_t absMinHeatSetpointLimit) { (static_cast(context))->OnSuccessResponse_5(absMinHeatSetpointLimit); } - - - static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, int16_t absMaxHeatSetpointLimit) + static void OnSuccessCallback_6(void * context, int16_t absMaxHeatSetpointLimit) { (static_cast(context))->OnSuccessResponse_6(absMaxHeatSetpointLimit); } - - - static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context, int16_t absMaxHeatSetpointLimit) + static void OnSuccessCallback_7(void * context, int16_t absMaxHeatSetpointLimit) { (static_cast(context))->OnSuccessResponse_7(absMaxHeatSetpointLimit); } - - - static void OnFailureCallback_8(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context) - { - (static_cast(context))->OnSuccessResponse_8(); - } - - - + static void OnSuccessCallback_8(void * context) { (static_cast(context))->OnSuccessResponse_8(); } static void OnFailureCallback_9(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_9(status); } - static void OnSuccessCallback_9(void * context, int16_t absMaxHeatSetpointLimit) + static void OnSuccessCallback_9(void * context, int16_t absMaxHeatSetpointLimit) { (static_cast(context))->OnSuccessResponse_9(absMaxHeatSetpointLimit); } - - - static void OnFailureCallback_10(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_10(status); } - static void OnSuccessCallback_10(void * context, int16_t absMinCoolSetpointLimit) + static void OnSuccessCallback_10(void * context, int16_t absMinCoolSetpointLimit) { (static_cast(context))->OnSuccessResponse_10(absMinCoolSetpointLimit); } - - - static void OnFailureCallback_11(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_11(status); } - static void OnSuccessCallback_11(void * context, int16_t absMinCoolSetpointLimit) + static void OnSuccessCallback_11(void * context, int16_t absMinCoolSetpointLimit) { (static_cast(context))->OnSuccessResponse_11(absMinCoolSetpointLimit); } - - - static void OnFailureCallback_12(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_12(status); } - static void OnSuccessCallback_12(void * context) - { - (static_cast(context))->OnSuccessResponse_12(); - } - - - + static void OnSuccessCallback_12(void * context) { (static_cast(context))->OnSuccessResponse_12(); } static void OnFailureCallback_13(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_13(status); } - static void OnSuccessCallback_13(void * context, int16_t absMinCoolSetpointLimit) + static void OnSuccessCallback_13(void * context, int16_t absMinCoolSetpointLimit) { (static_cast(context))->OnSuccessResponse_13(absMinCoolSetpointLimit); } - - - static void OnFailureCallback_14(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_14(status); } - static void OnSuccessCallback_14(void * context, int16_t absMaxCoolSetpointLimit) + static void OnSuccessCallback_14(void * context, int16_t absMaxCoolSetpointLimit) { (static_cast(context))->OnSuccessResponse_14(absMaxCoolSetpointLimit); } - - - static void OnFailureCallback_15(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_15(status); } - static void OnSuccessCallback_15(void * context, int16_t absMaxCoolSetpointLimit) + static void OnSuccessCallback_15(void * context, int16_t absMaxCoolSetpointLimit) { (static_cast(context))->OnSuccessResponse_15(absMaxCoolSetpointLimit); } - - - static void OnFailureCallback_16(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_16(status); } - static void OnSuccessCallback_16(void * context) - { - (static_cast(context))->OnSuccessResponse_16(); - } - - - + static void OnSuccessCallback_16(void * context) { (static_cast(context))->OnSuccessResponse_16(); } static void OnFailureCallback_17(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_17(status); } - static void OnSuccessCallback_17(void * context, int16_t absMaxCoolSetpointLimit) + static void OnSuccessCallback_17(void * context, int16_t absMaxCoolSetpointLimit) { (static_cast(context))->OnSuccessResponse_17(absMaxCoolSetpointLimit); } - - - static void OnFailureCallback_18(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_18(status); } - static void OnSuccessCallback_18(void * context, int16_t occupiedCoolingSetpoint) + static void OnSuccessCallback_18(void * context, int16_t occupiedCoolingSetpoint) { (static_cast(context))->OnSuccessResponse_18(occupiedCoolingSetpoint); } - - - static void OnFailureCallback_19(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_19(status); } - static void OnSuccessCallback_19(void * context, int16_t occupiedCoolingSetpoint) + static void OnSuccessCallback_19(void * context, int16_t occupiedCoolingSetpoint) { (static_cast(context))->OnSuccessResponse_19(occupiedCoolingSetpoint); } - - - static void OnFailureCallback_20(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_20(status); } - static void OnSuccessCallback_20(void * context) - { - (static_cast(context))->OnSuccessResponse_20(); - } - - - + static void OnSuccessCallback_20(void * context) { (static_cast(context))->OnSuccessResponse_20(); } static void OnFailureCallback_21(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_21(status); } - static void OnSuccessCallback_21(void * context, int16_t occupiedCoolingSetpoint) + static void OnSuccessCallback_21(void * context, int16_t occupiedCoolingSetpoint) { (static_cast(context))->OnSuccessResponse_21(occupiedCoolingSetpoint); } - - - static void OnFailureCallback_22(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_22(status); } - static void OnSuccessCallback_22(void * context, int16_t occupiedHeatingSetpoint) + static void OnSuccessCallback_22(void * context, int16_t occupiedHeatingSetpoint) { (static_cast(context))->OnSuccessResponse_22(occupiedHeatingSetpoint); } - - - static void OnFailureCallback_23(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_23(status); } - static void OnSuccessCallback_23(void * context, int16_t occupiedHeatingSetpoint) + static void OnSuccessCallback_23(void * context, int16_t occupiedHeatingSetpoint) { (static_cast(context))->OnSuccessResponse_23(occupiedHeatingSetpoint); } - - - static void OnFailureCallback_24(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_24(status); } - static void OnSuccessCallback_24(void * context) - { - (static_cast(context))->OnSuccessResponse_24(); - } - - - + static void OnSuccessCallback_24(void * context) { (static_cast(context))->OnSuccessResponse_24(); } static void OnFailureCallback_25(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_25(status); } - static void OnSuccessCallback_25(void * context, int16_t occupiedHeatingSetpoint) + static void OnSuccessCallback_25(void * context, int16_t occupiedHeatingSetpoint) { (static_cast(context))->OnSuccessResponse_25(occupiedHeatingSetpoint); } - - - static void OnFailureCallback_26(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_26(status); } - static void OnSuccessCallback_26(void * context, int16_t minHeatSetpointLimit) + static void OnSuccessCallback_26(void * context, int16_t minHeatSetpointLimit) { (static_cast(context))->OnSuccessResponse_26(minHeatSetpointLimit); } - - - static void OnFailureCallback_27(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_27(status); } - static void OnSuccessCallback_27(void * context, int16_t minHeatSetpointLimit) + static void OnSuccessCallback_27(void * context, int16_t minHeatSetpointLimit) { (static_cast(context))->OnSuccessResponse_27(minHeatSetpointLimit); } - - - static void OnFailureCallback_28(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_28(status); } - static void OnSuccessCallback_28(void * context) - { - (static_cast(context))->OnSuccessResponse_28(); - } - - - + static void OnSuccessCallback_28(void * context) { (static_cast(context))->OnSuccessResponse_28(); } static void OnFailureCallback_29(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_29(status); } - static void OnSuccessCallback_29(void * context, int16_t minHeatSetpointLimit) + static void OnSuccessCallback_29(void * context, int16_t minHeatSetpointLimit) { (static_cast(context))->OnSuccessResponse_29(minHeatSetpointLimit); } - - - static void OnFailureCallback_30(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_30(status); } - static void OnSuccessCallback_30(void * context, int16_t maxHeatSetpointLimit) + static void OnSuccessCallback_30(void * context, int16_t maxHeatSetpointLimit) { (static_cast(context))->OnSuccessResponse_30(maxHeatSetpointLimit); } - - - static void OnFailureCallback_31(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_31(status); } - static void OnSuccessCallback_31(void * context, int16_t maxHeatSetpointLimit) + static void OnSuccessCallback_31(void * context, int16_t maxHeatSetpointLimit) { (static_cast(context))->OnSuccessResponse_31(maxHeatSetpointLimit); } - - - static void OnFailureCallback_32(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_32(status); } - static void OnSuccessCallback_32(void * context) - { - (static_cast(context))->OnSuccessResponse_32(); - } - - - + static void OnSuccessCallback_32(void * context) { (static_cast(context))->OnSuccessResponse_32(); } static void OnFailureCallback_33(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_33(status); } - static void OnSuccessCallback_33(void * context, int16_t maxHeatSetpointLimit) + static void OnSuccessCallback_33(void * context, int16_t maxHeatSetpointLimit) { (static_cast(context))->OnSuccessResponse_33(maxHeatSetpointLimit); } - - - static void OnFailureCallback_34(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_34(status); } - static void OnSuccessCallback_34(void * context, int16_t minCoolSetpointLimit) + static void OnSuccessCallback_34(void * context, int16_t minCoolSetpointLimit) { (static_cast(context))->OnSuccessResponse_34(minCoolSetpointLimit); } - - - static void OnFailureCallback_35(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_35(status); } - static void OnSuccessCallback_35(void * context, int16_t minCoolSetpointLimit) + static void OnSuccessCallback_35(void * context, int16_t minCoolSetpointLimit) { (static_cast(context))->OnSuccessResponse_35(minCoolSetpointLimit); } - - - static void OnFailureCallback_36(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_36(status); } - static void OnSuccessCallback_36(void * context) - { - (static_cast(context))->OnSuccessResponse_36(); - } - - - + static void OnSuccessCallback_36(void * context) { (static_cast(context))->OnSuccessResponse_36(); } static void OnFailureCallback_37(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_37(status); } - static void OnSuccessCallback_37(void * context, int16_t minCoolSetpointLimit) + static void OnSuccessCallback_37(void * context, int16_t minCoolSetpointLimit) { (static_cast(context))->OnSuccessResponse_37(minCoolSetpointLimit); } - - - static void OnFailureCallback_38(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_38(status); } - static void OnSuccessCallback_38(void * context, int16_t maxCoolSetpointLimit) + static void OnSuccessCallback_38(void * context, int16_t maxCoolSetpointLimit) { (static_cast(context))->OnSuccessResponse_38(maxCoolSetpointLimit); } - - - static void OnFailureCallback_39(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_39(status); } - static void OnSuccessCallback_39(void * context, int16_t maxCoolSetpointLimit) + static void OnSuccessCallback_39(void * context, int16_t maxCoolSetpointLimit) { (static_cast(context))->OnSuccessResponse_39(maxCoolSetpointLimit); } - - - static void OnFailureCallback_40(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_40(status); } - static void OnSuccessCallback_40(void * context) - { - (static_cast(context))->OnSuccessResponse_40(); - } - - - + static void OnSuccessCallback_40(void * context) { (static_cast(context))->OnSuccessResponse_40(); } static void OnFailureCallback_41(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_41(status); } - static void OnSuccessCallback_41(void * context, int16_t maxCoolSetpointLimit) + static void OnSuccessCallback_41(void * context, int16_t maxCoolSetpointLimit) { (static_cast(context))->OnSuccessResponse_41(maxCoolSetpointLimit); } - - - static void OnFailureCallback_42(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_42(status); } - static void OnSuccessCallback_42(void * context, uint8_t controlSequenceOfOperation) + static void OnSuccessCallback_42(void * context, uint8_t controlSequenceOfOperation) { (static_cast(context))->OnSuccessResponse_42(controlSequenceOfOperation); } - - - static void OnFailureCallback_43(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_43(status); } - static void OnSuccessCallback_43(void * context, uint8_t controlSequenceOfOperation) + static void OnSuccessCallback_43(void * context, uint8_t controlSequenceOfOperation) { (static_cast(context))->OnSuccessResponse_43(controlSequenceOfOperation); } - - - static void OnFailureCallback_44(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_44(status); } - static void OnSuccessCallback_44(void * context) - { - (static_cast(context))->OnSuccessResponse_44(); - } - - - + static void OnSuccessCallback_44(void * context) { (static_cast(context))->OnSuccessResponse_44(); } static void OnFailureCallback_45(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_45(status); } - static void OnSuccessCallback_45(void * context, uint8_t controlSequenceOfOperation) + static void OnSuccessCallback_45(void * context, uint8_t controlSequenceOfOperation) { (static_cast(context))->OnSuccessResponse_45(controlSequenceOfOperation); } - - - static void OnFailureCallback_46(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_46(status); } - static void OnSuccessCallback_46(void * context, uint8_t systemMode) + static void OnSuccessCallback_46(void * context, uint8_t systemMode) { (static_cast(context))->OnSuccessResponse_46(systemMode); } - - - static void OnFailureCallback_47(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_47(status); } - static void OnSuccessCallback_47(void * context, uint8_t systemMode) + static void OnSuccessCallback_47(void * context, uint8_t systemMode) { (static_cast(context))->OnSuccessResponse_47(systemMode); } - - - static void OnFailureCallback_48(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_48(status); } - static void OnSuccessCallback_48(void * context) - { - (static_cast(context))->OnSuccessResponse_48(); - } - - - + static void OnSuccessCallback_48(void * context) { (static_cast(context))->OnSuccessResponse_48(); } static void OnFailureCallback_49(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_49(status); } - static void OnSuccessCallback_49(void * context, uint8_t systemMode) + static void OnSuccessCallback_49(void * context, uint8_t systemMode) { (static_cast(context))->OnSuccessResponse_49(systemMode); } - - - static void OnFailureCallback_50(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_50(status); } - static void OnSuccessCallback_50(void * context, int8_t minSetpointDeadBand) + static void OnSuccessCallback_50(void * context, int8_t minSetpointDeadBand) { (static_cast(context))->OnSuccessResponse_50(minSetpointDeadBand); } - - - static void OnFailureCallback_51(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_51(status); } - static void OnSuccessCallback_51(void * context, int8_t minSetpointDeadBand) + static void OnSuccessCallback_51(void * context, int8_t minSetpointDeadBand) { (static_cast(context))->OnSuccessResponse_51(minSetpointDeadBand); } - - - static void OnFailureCallback_52(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_52(status); } - static void OnSuccessCallback_52(void * context) - { - (static_cast(context))->OnSuccessResponse_52(); - } - - - + static void OnSuccessCallback_52(void * context) { (static_cast(context))->OnSuccessResponse_52(); } static void OnFailureCallback_53(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_53(status); } - static void OnSuccessCallback_53(void * context, int8_t minSetpointDeadBand) + static void OnSuccessCallback_53(void * context, int8_t minSetpointDeadBand) { (static_cast(context))->OnSuccessResponse_53(minSetpointDeadBand); } - - - static void OnFailureCallback_54(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_54(status); } - static void OnSuccessCallback_54(void * context, uint8_t startOfWeek) + static void OnSuccessCallback_54(void * context, uint8_t startOfWeek) { (static_cast(context))->OnSuccessResponse_54(startOfWeek); } - - - static void OnFailureCallback_55(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_55(status); } - static void OnSuccessCallback_55(void * context) - { - (static_cast(context))->OnSuccessResponse_55(); - } - - - + static void OnSuccessCallback_55(void * context) { (static_cast(context))->OnSuccessResponse_55(); } static void OnFailureCallback_56(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_56(status); } - static void OnSuccessCallback_56(void * context, uint8_t startOfWeek) + static void OnSuccessCallback_56(void * context, uint8_t startOfWeek) { (static_cast(context))->OnSuccessResponse_56(startOfWeek); } - - - static void OnFailureCallback_57(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_57(status); } - static void OnSuccessCallback_57(void * context, uint8_t numberOfWeeklyTransitions) + static void OnSuccessCallback_57(void * context, uint8_t numberOfWeeklyTransitions) { (static_cast(context))->OnSuccessResponse_57(numberOfWeeklyTransitions); } - - - static void OnFailureCallback_58(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_58(status); } - static void OnSuccessCallback_58(void * context) - { - (static_cast(context))->OnSuccessResponse_58(); - } - - - + static void OnSuccessCallback_58(void * context) { (static_cast(context))->OnSuccessResponse_58(); } static void OnFailureCallback_59(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_59(status); } - static void OnSuccessCallback_59(void * context, uint8_t numberOfDailyTransitions) + static void OnSuccessCallback_59(void * context, uint8_t numberOfDailyTransitions) { (static_cast(context))->OnSuccessResponse_59(numberOfDailyTransitions); } - - - static void OnFailureCallback_60(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_60(status); } - static void OnSuccessCallback_60(void * context) - { - (static_cast(context))->OnSuccessResponse_60(); - } - - - + static void OnSuccessCallback_60(void * context) { (static_cast(context))->OnSuccessResponse_60(); } // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutLocalTemperature_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( int16_t localTemperature) + void OnSuccessResponse_1(int16_t localTemperature) { - VerifyOrReturn(CheckConstraintType("localTemperature", "", "int16")); + VerifyOrReturn(CheckConstraintType("localTemperature", "", "int16")); NextTest(); - } - - - + } - CHIP_ERROR TestReadsMandatoryAttributesFromDutAbsMinHeatSetpointLimit_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( int16_t absMinHeatSetpointLimit) + void OnSuccessResponse_2(int16_t absMinHeatSetpointLimit) { - VerifyOrReturn(CheckValue("absMinHeatSetpointLimit", absMinHeatSetpointLimit,700 - )); + VerifyOrReturn(CheckValue("absMinHeatSetpointLimit", absMinHeatSetpointLimit, 700)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutAbsMinHeatSetpointLimit_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( int16_t absMinHeatSetpointLimit) + void OnSuccessResponse_3(int16_t absMinHeatSetpointLimit) { - VerifyOrReturn(CheckConstraintType("absMinHeatSetpointLimit", "", "int16"));VerifyOrReturn(CheckConstraintMinValue("absMinHeatSetpointLimit", absMinHeatSetpointLimit, 700));VerifyOrReturn(CheckConstraintMaxValue("absMinHeatSetpointLimit", absMinHeatSetpointLimit, 3000)); + VerifyOrReturn(CheckConstraintType("absMinHeatSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("absMinHeatSetpointLimit", absMinHeatSetpointLimit, 700)); + VerifyOrReturn(CheckConstraintMaxValue("absMinHeatSetpointLimit", absMinHeatSetpointLimit, 3000)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMinHeatSetpointLimit_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -41604,108 +31810,82 @@ class Test_TC_TSTAT_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t absMinHeatSetpointLimitArgument; - absMinHeatSetpointLimitArgument = 700; - - ReturnErrorOnFailure(cluster.WriteAttribute(absMinHeatSetpointLimitArgument, this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + absMinHeatSetpointLimitArgument = 700; + + ReturnErrorOnFailure(cluster.WriteAttribute( + absMinHeatSetpointLimitArgument, this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } void OnFailureResponse_4(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_4() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_4() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadBackMandatoryAttributesFromDutAbsMinHeatSetpointLimit_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5( int16_t absMinHeatSetpointLimit) + void OnSuccessResponse_5(int16_t absMinHeatSetpointLimit) { - VerifyOrReturn(CheckValue("absMinHeatSetpointLimit", absMinHeatSetpointLimit,700 - )); + VerifyOrReturn(CheckValue("absMinHeatSetpointLimit", absMinHeatSetpointLimit, 700)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( int16_t absMaxHeatSetpointLimit) + void OnSuccessResponse_6(int16_t absMaxHeatSetpointLimit) { - VerifyOrReturn(CheckValue("absMaxHeatSetpointLimit", absMaxHeatSetpointLimit,3000 - )); + VerifyOrReturn(CheckValue("absMaxHeatSetpointLimit", absMaxHeatSetpointLimit, 3000)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_7, OnFailureCallback_7)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7( int16_t absMaxHeatSetpointLimit) + void OnSuccessResponse_7(int16_t absMaxHeatSetpointLimit) { - VerifyOrReturn(CheckConstraintType("absMaxHeatSetpointLimit", "", "int16"));VerifyOrReturn(CheckConstraintMinValue("absMaxHeatSetpointLimit", absMaxHeatSetpointLimit, 700));VerifyOrReturn(CheckConstraintMaxValue("absMaxHeatSetpointLimit", absMaxHeatSetpointLimit, 3000)); + VerifyOrReturn(CheckConstraintType("absMaxHeatSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("absMaxHeatSetpointLimit", absMaxHeatSetpointLimit, 700)); + VerifyOrReturn(CheckConstraintMaxValue("absMaxHeatSetpointLimit", absMaxHeatSetpointLimit, 3000)); NextTest(); - } + } - - - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMaxHeatSetpointLimit_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -41713,108 +31893,82 @@ class Test_TC_TSTAT_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t absMaxHeatSetpointLimitArgument; - absMaxHeatSetpointLimitArgument = 3000; - - ReturnErrorOnFailure(cluster.WriteAttribute(absMaxHeatSetpointLimitArgument, this, OnSuccessCallback_8, OnFailureCallback_8)); - return CHIP_NO_ERROR; + absMaxHeatSetpointLimitArgument = 3000; + + ReturnErrorOnFailure(cluster.WriteAttribute( + absMaxHeatSetpointLimitArgument, this, OnSuccessCallback_8, OnFailureCallback_8)); + return CHIP_NO_ERROR; } void OnFailureResponse_8(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_8() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_8() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadBackMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_9, OnFailureCallback_9)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_9, OnFailureCallback_9)); + return CHIP_NO_ERROR; } - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_9( int16_t absMaxHeatSetpointLimit) + void OnSuccessResponse_9(int16_t absMaxHeatSetpointLimit) { - VerifyOrReturn(CheckValue("absMaxHeatSetpointLimit", absMaxHeatSetpointLimit,3000 - )); + VerifyOrReturn(CheckValue("absMaxHeatSetpointLimit", absMaxHeatSetpointLimit, 3000)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsMandatoryAttributesFromDutAbsMinCoolSetpointLimit_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_10, OnFailureCallback_10)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_10, OnFailureCallback_10)); + return CHIP_NO_ERROR; } - void OnFailureResponse_10(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_10( int16_t absMinCoolSetpointLimit) + void OnSuccessResponse_10(int16_t absMinCoolSetpointLimit) { - VerifyOrReturn(CheckValue("absMinCoolSetpointLimit", absMinCoolSetpointLimit,1600 - )); + VerifyOrReturn(CheckValue("absMinCoolSetpointLimit", absMinCoolSetpointLimit, 1600)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutAbsMinCoolSetpointLimit_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_11, OnFailureCallback_11)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_11, OnFailureCallback_11)); + return CHIP_NO_ERROR; } - void OnFailureResponse_11(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_11( int16_t absMinCoolSetpointLimit) + void OnSuccessResponse_11(int16_t absMinCoolSetpointLimit) { - VerifyOrReturn(CheckConstraintType("absMinCoolSetpointLimit", "", "int16"));VerifyOrReturn(CheckConstraintMinValue("absMinCoolSetpointLimit", absMinCoolSetpointLimit, 1600));VerifyOrReturn(CheckConstraintMaxValue("absMinCoolSetpointLimit", absMinCoolSetpointLimit, 3200)); + VerifyOrReturn(CheckConstraintType("absMinCoolSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("absMinCoolSetpointLimit", absMinCoolSetpointLimit, 1600)); + VerifyOrReturn(CheckConstraintMaxValue("absMinCoolSetpointLimit", absMinCoolSetpointLimit, 3200)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMinCoolSetpointLimit_12() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -41822,108 +31976,82 @@ class Test_TC_TSTAT_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t absMinCoolSetpointLimitArgument; - absMinCoolSetpointLimitArgument = 1600; - - ReturnErrorOnFailure(cluster.WriteAttribute(absMinCoolSetpointLimitArgument, this, OnSuccessCallback_12, OnFailureCallback_12)); - return CHIP_NO_ERROR; + absMinCoolSetpointLimitArgument = 1600; + + ReturnErrorOnFailure(cluster.WriteAttribute( + absMinCoolSetpointLimitArgument, this, OnSuccessCallback_12, OnFailureCallback_12)); + return CHIP_NO_ERROR; } void OnFailureResponse_12(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_12() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_12() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadBackMandatoryAttributesFromDutAbsMinCoolSetpointLimit_13() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_13, OnFailureCallback_13)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_13, OnFailureCallback_13)); + return CHIP_NO_ERROR; } - void OnFailureResponse_13(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_13(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_13( int16_t absMinCoolSetpointLimit) + void OnSuccessResponse_13(int16_t absMinCoolSetpointLimit) { - VerifyOrReturn(CheckValue("absMinCoolSetpointLimit", absMinCoolSetpointLimit,1600 - )); + VerifyOrReturn(CheckValue("absMinCoolSetpointLimit", absMinCoolSetpointLimit, 1600)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsMandatoryAttributesFromDutAbsMaxCoolSetpointLimit_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_14, OnFailureCallback_14)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_14, OnFailureCallback_14)); + return CHIP_NO_ERROR; } - void OnFailureResponse_14(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_14( int16_t absMaxCoolSetpointLimit) + void OnSuccessResponse_14(int16_t absMaxCoolSetpointLimit) { - VerifyOrReturn(CheckValue("absMaxCoolSetpointLimit", absMaxCoolSetpointLimit,3200 - )); + VerifyOrReturn(CheckValue("absMaxCoolSetpointLimit", absMaxCoolSetpointLimit, 3200)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutAbsMaxCoolSetpointLimit_15() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_15, OnFailureCallback_15)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_15, OnFailureCallback_15)); + return CHIP_NO_ERROR; } - void OnFailureResponse_15(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_15(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_15( int16_t absMaxCoolSetpointLimit) + void OnSuccessResponse_15(int16_t absMaxCoolSetpointLimit) { - VerifyOrReturn(CheckConstraintType("absMaxCoolSetpointLimit", "", "int16"));VerifyOrReturn(CheckConstraintMinValue("absMaxCoolSetpointLimit", absMaxCoolSetpointLimit, 1600));VerifyOrReturn(CheckConstraintMaxValue("absMaxCoolSetpointLimit", absMaxCoolSetpointLimit, 3200)); + VerifyOrReturn(CheckConstraintType("absMaxCoolSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("absMaxCoolSetpointLimit", absMaxCoolSetpointLimit, 1600)); + VerifyOrReturn(CheckConstraintMaxValue("absMaxCoolSetpointLimit", absMaxCoolSetpointLimit, 3200)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMaxCoolSetpointLimit_16() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -41931,108 +32059,82 @@ class Test_TC_TSTAT_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t absMaxCoolSetpointLimitArgument; - absMaxCoolSetpointLimitArgument = 3200; - - ReturnErrorOnFailure(cluster.WriteAttribute(absMaxCoolSetpointLimitArgument, this, OnSuccessCallback_16, OnFailureCallback_16)); - return CHIP_NO_ERROR; + absMaxCoolSetpointLimitArgument = 3200; + + ReturnErrorOnFailure(cluster.WriteAttribute( + absMaxCoolSetpointLimitArgument, this, OnSuccessCallback_16, OnFailureCallback_16)); + return CHIP_NO_ERROR; } void OnFailureResponse_16(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_16() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_16() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadBackMandatoryAttributesFromDutAbsMaxCoolSetpointLimit_17() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_17, OnFailureCallback_17)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_17, OnFailureCallback_17)); + return CHIP_NO_ERROR; } - void OnFailureResponse_17(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_17(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_17( int16_t absMaxCoolSetpointLimit) + void OnSuccessResponse_17(int16_t absMaxCoolSetpointLimit) { - VerifyOrReturn(CheckValue("absMaxCoolSetpointLimit", absMaxCoolSetpointLimit,3200 - )); + VerifyOrReturn(CheckValue("absMaxCoolSetpointLimit", absMaxCoolSetpointLimit, 3200)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsMandatoryAttributesFromDutOccupiedCoolingSetpoint_18() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_18, OnFailureCallback_18)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_18, OnFailureCallback_18)); + return CHIP_NO_ERROR; } - void OnFailureResponse_18(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_18(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_18( int16_t occupiedCoolingSetpoint) + void OnSuccessResponse_18(int16_t occupiedCoolingSetpoint) { - VerifyOrReturn(CheckValue("occupiedCoolingSetpoint", occupiedCoolingSetpoint,2600 - )); + VerifyOrReturn(CheckValue("occupiedCoolingSetpoint", occupiedCoolingSetpoint, 2600)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutOccupiedCoolingSetpoint_19() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_19, OnFailureCallback_19)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_19, OnFailureCallback_19)); + return CHIP_NO_ERROR; } - void OnFailureResponse_19(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_19(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_19( int16_t occupiedCoolingSetpoint) + void OnSuccessResponse_19(int16_t occupiedCoolingSetpoint) { - VerifyOrReturn(CheckConstraintType("occupiedCoolingSetpoint", "", "int16"));VerifyOrReturn(CheckConstraintMinValue("occupiedCoolingSetpoint", occupiedCoolingSetpoint, 1600));VerifyOrReturn(CheckConstraintMaxValue("occupiedCoolingSetpoint", occupiedCoolingSetpoint, 2600)); + VerifyOrReturn(CheckConstraintType("occupiedCoolingSetpoint", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("occupiedCoolingSetpoint", occupiedCoolingSetpoint, 1600)); + VerifyOrReturn(CheckConstraintMaxValue("occupiedCoolingSetpoint", occupiedCoolingSetpoint, 2600)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutOccupiedCoolingSetpoint_20() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -42040,107 +32142,78 @@ class Test_TC_TSTAT_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t occupiedCoolingSetpointArgument; - occupiedCoolingSetpointArgument = 2600; - - ReturnErrorOnFailure(cluster.WriteAttribute(occupiedCoolingSetpointArgument, this, OnSuccessCallback_20, OnFailureCallback_20)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_20(EmberAfStatus status) - { - ThrowFailureResponse(); - } + occupiedCoolingSetpointArgument = 2600; - void OnSuccessResponse_20() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + occupiedCoolingSetpointArgument, this, OnSuccessCallback_20, OnFailureCallback_20)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_20(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_20() { NextTest(); } - CHIP_ERROR TestReadBackMandatoryAttributesFromDutOccupiedCoolingSetpoint_21() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_21, OnFailureCallback_21)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_21, OnFailureCallback_21)); + return CHIP_NO_ERROR; } - void OnFailureResponse_21(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_21(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_21( int16_t occupiedCoolingSetpoint) + void OnSuccessResponse_21(int16_t occupiedCoolingSetpoint) { - VerifyOrReturn(CheckValue("occupiedCoolingSetpoint", occupiedCoolingSetpoint,2600 - )); + VerifyOrReturn(CheckValue("occupiedCoolingSetpoint", occupiedCoolingSetpoint, 2600)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsMandatoryAttributesFromDutOccupiedHeatingSetpoint_22() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_22, OnFailureCallback_22)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_22, OnFailureCallback_22)); + return CHIP_NO_ERROR; } - void OnFailureResponse_22(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_22(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_22( int16_t occupiedHeatingSetpoint) + void OnSuccessResponse_22(int16_t occupiedHeatingSetpoint) { - VerifyOrReturn(CheckValue("occupiedHeatingSetpoint", occupiedHeatingSetpoint,2000 - )); + VerifyOrReturn(CheckValue("occupiedHeatingSetpoint", occupiedHeatingSetpoint, 2000)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutOccupiedHeatingSetpoint_23() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_23, OnFailureCallback_23)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_23, OnFailureCallback_23)); + return CHIP_NO_ERROR; } - void OnFailureResponse_23(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_23(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_23( int16_t occupiedHeatingSetpoint) + void OnSuccessResponse_23(int16_t occupiedHeatingSetpoint) { - VerifyOrReturn(CheckConstraintType("occupiedHeatingSetpoint", "", "int16"));VerifyOrReturn(CheckConstraintMinValue("occupiedHeatingSetpoint", occupiedHeatingSetpoint, 700));VerifyOrReturn(CheckConstraintMaxValue("occupiedHeatingSetpoint", occupiedHeatingSetpoint, 2600)); + VerifyOrReturn(CheckConstraintType("occupiedHeatingSetpoint", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("occupiedHeatingSetpoint", occupiedHeatingSetpoint, 700)); + VerifyOrReturn(CheckConstraintMaxValue("occupiedHeatingSetpoint", occupiedHeatingSetpoint, 2600)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutOccupiedHeatingSetpoint_24() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -42148,107 +32221,78 @@ class Test_TC_TSTAT_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t occupiedHeatingSetpointArgument; - occupiedHeatingSetpointArgument = 2000; - - ReturnErrorOnFailure(cluster.WriteAttribute(occupiedHeatingSetpointArgument, this, OnSuccessCallback_24, OnFailureCallback_24)); - return CHIP_NO_ERROR; - } + occupiedHeatingSetpointArgument = 2000; - void OnFailureResponse_24(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_24() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + occupiedHeatingSetpointArgument, this, OnSuccessCallback_24, OnFailureCallback_24)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_24(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_24() { NextTest(); } - CHIP_ERROR TestReadBackMandatoryAttributesFromDutOccupiedHeatingSetpoint_25() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_25, OnFailureCallback_25)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_25, OnFailureCallback_25)); + return CHIP_NO_ERROR; } - void OnFailureResponse_25(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_25(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_25( int16_t occupiedHeatingSetpoint) + void OnSuccessResponse_25(int16_t occupiedHeatingSetpoint) { - VerifyOrReturn(CheckValue("occupiedHeatingSetpoint", occupiedHeatingSetpoint,2000 - )); + VerifyOrReturn(CheckValue("occupiedHeatingSetpoint", occupiedHeatingSetpoint, 2000)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsMandatoryAttributesFromDutMinHeatSetpointLimit_26() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_26, OnFailureCallback_26)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_26, OnFailureCallback_26)); + return CHIP_NO_ERROR; } - void OnFailureResponse_26(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_26(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_26( int16_t minHeatSetpointLimit) + void OnSuccessResponse_26(int16_t minHeatSetpointLimit) { - VerifyOrReturn(CheckValue("minHeatSetpointLimit", minHeatSetpointLimit,700 - )); + VerifyOrReturn(CheckValue("minHeatSetpointLimit", minHeatSetpointLimit, 700)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutMinHeatSetpointLimit_27() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_27, OnFailureCallback_27)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_27, OnFailureCallback_27)); + return CHIP_NO_ERROR; } - void OnFailureResponse_27(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_27(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_27( int16_t minHeatSetpointLimit) + void OnSuccessResponse_27(int16_t minHeatSetpointLimit) { - VerifyOrReturn(CheckConstraintType("minHeatSetpointLimit", "", "int16"));VerifyOrReturn(CheckConstraintMinValue("minHeatSetpointLimit", minHeatSetpointLimit, 700));VerifyOrReturn(CheckConstraintMaxValue("minHeatSetpointLimit", minHeatSetpointLimit, 3000)); + VerifyOrReturn(CheckConstraintType("minHeatSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("minHeatSetpointLimit", minHeatSetpointLimit, 700)); + VerifyOrReturn(CheckConstraintMaxValue("minHeatSetpointLimit", minHeatSetpointLimit, 3000)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMinHeatSetpointLimit_28() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -42256,107 +32300,78 @@ class Test_TC_TSTAT_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t minHeatSetpointLimitArgument; - minHeatSetpointLimitArgument = 700; - - ReturnErrorOnFailure(cluster.WriteAttribute(minHeatSetpointLimitArgument, this, OnSuccessCallback_28, OnFailureCallback_28)); - return CHIP_NO_ERROR; - } + minHeatSetpointLimitArgument = 700; - void OnFailureResponse_28(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_28() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + minHeatSetpointLimitArgument, this, OnSuccessCallback_28, OnFailureCallback_28)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_28(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_28() { NextTest(); } - CHIP_ERROR TestReadBackMandatoryAttributesFromDutMinHeatSetpointLimit_29() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_29, OnFailureCallback_29)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_29, OnFailureCallback_29)); + return CHIP_NO_ERROR; } - void OnFailureResponse_29(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_29(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_29( int16_t minHeatSetpointLimit) + void OnSuccessResponse_29(int16_t minHeatSetpointLimit) { - VerifyOrReturn(CheckValue("minHeatSetpointLimit", minHeatSetpointLimit,700 - )); + VerifyOrReturn(CheckValue("minHeatSetpointLimit", minHeatSetpointLimit, 700)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsMandatoryAttributesFromDutMaxHeatSetpointLimit_30() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_30, OnFailureCallback_30)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_30, OnFailureCallback_30)); + return CHIP_NO_ERROR; } - void OnFailureResponse_30(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_30(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_30( int16_t maxHeatSetpointLimit) + void OnSuccessResponse_30(int16_t maxHeatSetpointLimit) { - VerifyOrReturn(CheckValue("maxHeatSetpointLimit", maxHeatSetpointLimit,3000 - )); + VerifyOrReturn(CheckValue("maxHeatSetpointLimit", maxHeatSetpointLimit, 3000)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutMaxHeatSetpointLimit_31() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_31, OnFailureCallback_31)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_31, OnFailureCallback_31)); + return CHIP_NO_ERROR; } - void OnFailureResponse_31(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_31(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_31( int16_t maxHeatSetpointLimit) + void OnSuccessResponse_31(int16_t maxHeatSetpointLimit) { - VerifyOrReturn(CheckConstraintType("maxHeatSetpointLimit", "", "int16"));VerifyOrReturn(CheckConstraintMinValue("maxHeatSetpointLimit", maxHeatSetpointLimit, 700));VerifyOrReturn(CheckConstraintMaxValue("maxHeatSetpointLimit", maxHeatSetpointLimit, 3000)); + VerifyOrReturn(CheckConstraintType("maxHeatSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("maxHeatSetpointLimit", maxHeatSetpointLimit, 700)); + VerifyOrReturn(CheckConstraintMaxValue("maxHeatSetpointLimit", maxHeatSetpointLimit, 3000)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMaxHeatSetpointLimit_32() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -42364,107 +32379,78 @@ class Test_TC_TSTAT_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t maxHeatSetpointLimitArgument; - maxHeatSetpointLimitArgument = 3000; - - ReturnErrorOnFailure(cluster.WriteAttribute(maxHeatSetpointLimitArgument, this, OnSuccessCallback_32, OnFailureCallback_32)); - return CHIP_NO_ERROR; - } + maxHeatSetpointLimitArgument = 3000; - void OnFailureResponse_32(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_32() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + maxHeatSetpointLimitArgument, this, OnSuccessCallback_32, OnFailureCallback_32)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_32(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_32() { NextTest(); } - CHIP_ERROR TestReadBackMandatoryAttributesFromDutMaxHeatSetpointLimit_33() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_33, OnFailureCallback_33)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_33, OnFailureCallback_33)); + return CHIP_NO_ERROR; } - void OnFailureResponse_33(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_33(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_33( int16_t maxHeatSetpointLimit) + void OnSuccessResponse_33(int16_t maxHeatSetpointLimit) { - VerifyOrReturn(CheckValue("maxHeatSetpointLimit", maxHeatSetpointLimit,3000 - )); + VerifyOrReturn(CheckValue("maxHeatSetpointLimit", maxHeatSetpointLimit, 3000)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsMandatoryAttributesFromDutMinCoolSetpointLimit_34() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_34, OnFailureCallback_34)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_34, OnFailureCallback_34)); + return CHIP_NO_ERROR; } - void OnFailureResponse_34(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_34(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_34( int16_t minCoolSetpointLimit) + void OnSuccessResponse_34(int16_t minCoolSetpointLimit) { - VerifyOrReturn(CheckValue("minCoolSetpointLimit", minCoolSetpointLimit,1600 - )); + VerifyOrReturn(CheckValue("minCoolSetpointLimit", minCoolSetpointLimit, 1600)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutMinCoolSetpointLimit_35() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_35, OnFailureCallback_35)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_35, OnFailureCallback_35)); + return CHIP_NO_ERROR; } - void OnFailureResponse_35(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_35(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_35( int16_t minCoolSetpointLimit) + void OnSuccessResponse_35(int16_t minCoolSetpointLimit) { - VerifyOrReturn(CheckConstraintType("minCoolSetpointLimit", "", "int16"));VerifyOrReturn(CheckConstraintMinValue("minCoolSetpointLimit", minCoolSetpointLimit, 1600));VerifyOrReturn(CheckConstraintMaxValue("minCoolSetpointLimit", minCoolSetpointLimit, 3200)); + VerifyOrReturn(CheckConstraintType("minCoolSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("minCoolSetpointLimit", minCoolSetpointLimit, 1600)); + VerifyOrReturn(CheckConstraintMaxValue("minCoolSetpointLimit", minCoolSetpointLimit, 3200)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMinCoolSetpointLimit_36() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -42472,107 +32458,78 @@ class Test_TC_TSTAT_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t minCoolSetpointLimitArgument; - minCoolSetpointLimitArgument = 1600; - - ReturnErrorOnFailure(cluster.WriteAttribute(minCoolSetpointLimitArgument, this, OnSuccessCallback_36, OnFailureCallback_36)); - return CHIP_NO_ERROR; - } + minCoolSetpointLimitArgument = 1600; - void OnFailureResponse_36(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_36() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + minCoolSetpointLimitArgument, this, OnSuccessCallback_36, OnFailureCallback_36)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_36(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_36() { NextTest(); } - CHIP_ERROR TestReadBackMandatoryAttributesFromDutMinCoolSetpointLimit_37() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_37, OnFailureCallback_37)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_37, OnFailureCallback_37)); + return CHIP_NO_ERROR; } - void OnFailureResponse_37(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_37(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_37( int16_t minCoolSetpointLimit) + void OnSuccessResponse_37(int16_t minCoolSetpointLimit) { - VerifyOrReturn(CheckValue("minCoolSetpointLimit", minCoolSetpointLimit,1600 - )); + VerifyOrReturn(CheckValue("minCoolSetpointLimit", minCoolSetpointLimit, 1600)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsMandatoryAttributesFromDutMaxCoolSetpointLimit_38() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_38, OnFailureCallback_38)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_38, OnFailureCallback_38)); + return CHIP_NO_ERROR; } - void OnFailureResponse_38(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_38(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_38( int16_t maxCoolSetpointLimit) + void OnSuccessResponse_38(int16_t maxCoolSetpointLimit) { - VerifyOrReturn(CheckValue("maxCoolSetpointLimit", maxCoolSetpointLimit,3200 - )); + VerifyOrReturn(CheckValue("maxCoolSetpointLimit", maxCoolSetpointLimit, 3200)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutMaxCoolSetpointLimit_39() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_39, OnFailureCallback_39)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_39, OnFailureCallback_39)); + return CHIP_NO_ERROR; } - void OnFailureResponse_39(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_39(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_39( int16_t maxCoolSetpointLimit) + void OnSuccessResponse_39(int16_t maxCoolSetpointLimit) { - VerifyOrReturn(CheckConstraintType("maxCoolSetpointLimit", "", "int16"));VerifyOrReturn(CheckConstraintMinValue("maxCoolSetpointLimit", maxCoolSetpointLimit, 1600));VerifyOrReturn(CheckConstraintMaxValue("maxCoolSetpointLimit", maxCoolSetpointLimit, 3200)); + VerifyOrReturn(CheckConstraintType("maxCoolSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("maxCoolSetpointLimit", maxCoolSetpointLimit, 1600)); + VerifyOrReturn(CheckConstraintMaxValue("maxCoolSetpointLimit", maxCoolSetpointLimit, 3200)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMaxCoolSetpointLimit_40() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -42580,107 +32537,80 @@ class Test_TC_TSTAT_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t maxCoolSetpointLimitArgument; - maxCoolSetpointLimitArgument = 3200; - - ReturnErrorOnFailure(cluster.WriteAttribute(maxCoolSetpointLimitArgument, this, OnSuccessCallback_40, OnFailureCallback_40)); - return CHIP_NO_ERROR; - } + maxCoolSetpointLimitArgument = 3200; - void OnFailureResponse_40(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_40() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + maxCoolSetpointLimitArgument, this, OnSuccessCallback_40, OnFailureCallback_40)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_40(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_40() { NextTest(); } - CHIP_ERROR TestReadBackMandatoryAttributesFromDutMaxCoolSetpointLimit_41() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_41, OnFailureCallback_41)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_41, OnFailureCallback_41)); + return CHIP_NO_ERROR; } - void OnFailureResponse_41(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_41(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_41( int16_t maxCoolSetpointLimit) + void OnSuccessResponse_41(int16_t maxCoolSetpointLimit) { - VerifyOrReturn(CheckValue("maxCoolSetpointLimit", maxCoolSetpointLimit,3200 - )); + VerifyOrReturn(CheckValue("maxCoolSetpointLimit", maxCoolSetpointLimit, 3200)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsMandatoryAttributesFromDutControlSequenceOfOperation_42() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_42, OnFailureCallback_42)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_42, OnFailureCallback_42)); + return CHIP_NO_ERROR; } - void OnFailureResponse_42(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_42(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_42( uint8_t controlSequenceOfOperation) + void OnSuccessResponse_42(uint8_t controlSequenceOfOperation) { - VerifyOrReturn(CheckValue("controlSequenceOfOperation", controlSequenceOfOperation,4 - )); + VerifyOrReturn(CheckValue("controlSequenceOfOperation", controlSequenceOfOperation, 4)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutControlSequenceOfOperation_43() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_43, OnFailureCallback_43)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_43, OnFailureCallback_43)); + return CHIP_NO_ERROR; } - void OnFailureResponse_43(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_43(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_43( uint8_t controlSequenceOfOperation) + void OnSuccessResponse_43(uint8_t controlSequenceOfOperation) { - VerifyOrReturn(CheckConstraintType("controlSequenceOfOperation", "", "enum8"));VerifyOrReturn(CheckConstraintMinValue("controlSequenceOfOperation", controlSequenceOfOperation, 0));VerifyOrReturn(CheckConstraintMaxValue("controlSequenceOfOperation", controlSequenceOfOperation, 5)); + VerifyOrReturn(CheckConstraintType("controlSequenceOfOperation", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("controlSequenceOfOperation", controlSequenceOfOperation, 0)); + VerifyOrReturn(CheckConstraintMaxValue("controlSequenceOfOperation", controlSequenceOfOperation, 5)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutControlSequenceOfOperation_44() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -42688,107 +32618,80 @@ class Test_TC_TSTAT_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t controlSequenceOfOperationArgument; - controlSequenceOfOperationArgument = 4; - - ReturnErrorOnFailure(cluster.WriteAttribute(controlSequenceOfOperationArgument, this, OnSuccessCallback_44, OnFailureCallback_44)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_44(EmberAfStatus status) - { - ThrowFailureResponse(); - } + controlSequenceOfOperationArgument = 4; - void OnSuccessResponse_44() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute( + controlSequenceOfOperationArgument, this, OnSuccessCallback_44, OnFailureCallback_44)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_44(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_44() { NextTest(); } - CHIP_ERROR TestReadBackMandatoryAttributesFromDutControlSequenceOfOperation_45() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_45, OnFailureCallback_45)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_45, OnFailureCallback_45)); + return CHIP_NO_ERROR; } - void OnFailureResponse_45(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_45(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_45( uint8_t controlSequenceOfOperation) + void OnSuccessResponse_45(uint8_t controlSequenceOfOperation) { - VerifyOrReturn(CheckValue("controlSequenceOfOperation", controlSequenceOfOperation,4 - )); + VerifyOrReturn(CheckValue("controlSequenceOfOperation", controlSequenceOfOperation, 4)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsMandatoryAttributesFromDutSystemMode_46() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_46, OnFailureCallback_46)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_46, OnFailureCallback_46)); + return CHIP_NO_ERROR; } - void OnFailureResponse_46(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_46(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_46( uint8_t systemMode) + void OnSuccessResponse_46(uint8_t systemMode) { - VerifyOrReturn(CheckValue("systemMode", systemMode,1 - )); + VerifyOrReturn(CheckValue("systemMode", systemMode, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutSystemMode_47() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_47, OnFailureCallback_47)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_47, OnFailureCallback_47)); + return CHIP_NO_ERROR; } - void OnFailureResponse_47(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_47(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_47( uint8_t systemMode) + void OnSuccessResponse_47(uint8_t systemMode) { - VerifyOrReturn(CheckConstraintType("systemMode", "", "enum8"));VerifyOrReturn(CheckConstraintMinValue("systemMode", systemMode, 0));VerifyOrReturn(CheckConstraintMaxValue("systemMode", systemMode, 9)); + VerifyOrReturn(CheckConstraintType("systemMode", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("systemMode", systemMode, 0)); + VerifyOrReturn(CheckConstraintMaxValue("systemMode", systemMode, 9)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutSystemMode_48() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -42796,107 +32699,84 @@ class Test_TC_TSTAT_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t systemModeArgument; - systemModeArgument = 1; - - ReturnErrorOnFailure(cluster.WriteAttribute(systemModeArgument, this, OnSuccessCallback_48, OnFailureCallback_48)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_48(EmberAfStatus status) - { - ThrowFailureResponse(); - } + systemModeArgument = 1; - void OnSuccessResponse_48() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + systemModeArgument, this, OnSuccessCallback_48, OnFailureCallback_48)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_48(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_48() { NextTest(); } - CHIP_ERROR TestReadBackMandatoryAttributesFromDutSystemMode_49() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_49, OnFailureCallback_49)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_49, OnFailureCallback_49)); + return CHIP_NO_ERROR; } - void OnFailureResponse_49(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_49(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_49( uint8_t systemMode) + void OnSuccessResponse_49(uint8_t systemMode) { - VerifyOrReturn(CheckValue("systemMode", systemMode,1 - )); + VerifyOrReturn(CheckValue("systemMode", systemMode, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsOptionalAttributesFromDutMinSetpointDeadBand_50() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_50, OnFailureCallback_50)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_50, OnFailureCallback_50)); + return CHIP_NO_ERROR; } void OnFailureResponse_50(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_50( int8_t minSetpointDeadBand) + void OnSuccessResponse_50(int8_t minSetpointDeadBand) { - VerifyOrReturn(CheckValue("minSetpointDeadBand", minSetpointDeadBand,25 - )); + VerifyOrReturn(CheckValue("minSetpointDeadBand", minSetpointDeadBand, 25)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutMinSetpointDeadBand_51() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_51, OnFailureCallback_51)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_51, OnFailureCallback_51)); + return CHIP_NO_ERROR; } void OnFailureResponse_51(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_51( int8_t minSetpointDeadBand) + void OnSuccessResponse_51(int8_t minSetpointDeadBand) { - VerifyOrReturn(CheckConstraintType("minSetpointDeadBand", "", "int8"));VerifyOrReturn(CheckConstraintMinValue("minSetpointDeadBand", minSetpointDeadBand, 0));VerifyOrReturn(CheckConstraintMaxValue("minSetpointDeadBand", minSetpointDeadBand, 25)); + VerifyOrReturn(CheckConstraintType("minSetpointDeadBand", "", "int8")); + VerifyOrReturn(CheckConstraintMinValue("minSetpointDeadBand", minSetpointDeadBand, 0)); + VerifyOrReturn(CheckConstraintMaxValue("minSetpointDeadBand", minSetpointDeadBand, 25)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutMinSetpointDeadBand_52() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -42904,79 +32784,67 @@ class Test_TC_TSTAT_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int8_t minSetpointDeadBandArgument; - minSetpointDeadBandArgument = 25; - - ReturnErrorOnFailure(cluster.WriteAttribute(minSetpointDeadBandArgument, this, OnSuccessCallback_52, OnFailureCallback_52)); - return CHIP_NO_ERROR; + minSetpointDeadBandArgument = 25; + + ReturnErrorOnFailure(cluster.WriteAttribute( + minSetpointDeadBandArgument, this, OnSuccessCallback_52, OnFailureCallback_52)); + return CHIP_NO_ERROR; } void OnFailureResponse_52(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } - - void OnSuccessResponse_52() - { NextTest(); - } - + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - + void OnSuccessResponse_52() { NextTest(); } - CHIP_ERROR TestReadBackOptionalAttributesFromDutMinSetpointDeadBand_53() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_53, OnFailureCallback_53)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_53, OnFailureCallback_53)); + return CHIP_NO_ERROR; } void OnFailureResponse_53(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_53( int8_t minSetpointDeadBand) + void OnSuccessResponse_53(int8_t minSetpointDeadBand) { - VerifyOrReturn(CheckValue("minSetpointDeadBand", minSetpointDeadBand,25 - )); + VerifyOrReturn(CheckValue("minSetpointDeadBand", minSetpointDeadBand, 25)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutStartOfWeek_54() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_54, OnFailureCallback_54)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_54, OnFailureCallback_54)); + return CHIP_NO_ERROR; } void OnFailureResponse_54(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_54( uint8_t startOfWeek) + void OnSuccessResponse_54(uint8_t startOfWeek) { - VerifyOrReturn(CheckConstraintType("startOfWeek", "", "enum8"));VerifyOrReturn(CheckConstraintMinValue("startOfWeek", startOfWeek, 0));VerifyOrReturn(CheckConstraintMaxValue("startOfWeek", startOfWeek, 6)); + VerifyOrReturn(CheckConstraintType("startOfWeek", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("startOfWeek", startOfWeek, 0)); + VerifyOrReturn(CheckConstraintMaxValue("startOfWeek", startOfWeek, 6)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutStartOfWeek_55() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -42984,80 +32852,67 @@ class Test_TC_TSTAT_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t startOfWeekArgument; - startOfWeekArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(startOfWeekArgument, this, OnSuccessCallback_55, OnFailureCallback_55)); - return CHIP_NO_ERROR; + startOfWeekArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + startOfWeekArgument, this, OnSuccessCallback_55, OnFailureCallback_55)); + return CHIP_NO_ERROR; } void OnFailureResponse_55(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_55() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_55() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadBackOptionalAttributesFromDutStartOfWeek_56() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_56, OnFailureCallback_56)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_56, OnFailureCallback_56)); + return CHIP_NO_ERROR; } void OnFailureResponse_56(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_56( uint8_t startOfWeek) + void OnSuccessResponse_56(uint8_t startOfWeek) { - VerifyOrReturn(CheckValue("startOfWeek", startOfWeek,0 - )); + VerifyOrReturn(CheckValue("startOfWeek", startOfWeek, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutNumberOfWeeklyTransitions_57() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_57, OnFailureCallback_57)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_57, OnFailureCallback_57)); + return CHIP_NO_ERROR; } void OnFailureResponse_57(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_57( uint8_t numberOfWeeklyTransitions) + void OnSuccessResponse_57(uint8_t numberOfWeeklyTransitions) { - VerifyOrReturn(CheckConstraintType("numberOfWeeklyTransitions", "", "uint8")); + VerifyOrReturn(CheckConstraintType("numberOfWeeklyTransitions", "", "uint8")); NextTest(); - } - - - + } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutNumberOfWeeklyTransitions_58() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -43065,52 +32920,44 @@ class Test_TC_TSTAT_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t numberOfWeeklyTransitionsArgument; - numberOfWeeklyTransitionsArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(numberOfWeeklyTransitionsArgument, this, OnSuccessCallback_58, OnFailureCallback_58)); - return CHIP_NO_ERROR; + numberOfWeeklyTransitionsArgument = 0; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + numberOfWeeklyTransitionsArgument, this, OnSuccessCallback_58, OnFailureCallback_58)); + return CHIP_NO_ERROR; } void OnFailureResponse_58(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_58() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_58() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutNumberOfDailyTransitions_59() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_59, OnFailureCallback_59)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_59, OnFailureCallback_59)); + return CHIP_NO_ERROR; } void OnFailureResponse_59(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_59( uint8_t numberOfDailyTransitions) + void OnSuccessResponse_59(uint8_t numberOfDailyTransitions) { - VerifyOrReturn(CheckConstraintType("numberOfDailyTransitions", "", "uint8")); + VerifyOrReturn(CheckConstraintType("numberOfDailyTransitions", "", "uint8")); NextTest(); - } - - - + } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutNumberOfDailyTransitions_60() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -43118,1226 +32965,1002 @@ class Test_TC_TSTAT_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t numberOfDailyTransitionsArgument; - numberOfDailyTransitionsArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(numberOfDailyTransitionsArgument, this, OnSuccessCallback_60, OnFailureCallback_60)); - return CHIP_NO_ERROR; + numberOfDailyTransitionsArgument = 0; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + numberOfDailyTransitionsArgument, this, OnSuccessCallback_60, OnFailureCallback_60)); + return CHIP_NO_ERROR; } void OnFailureResponse_60(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_60() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_60() { ThrowSuccessResponse(); } +}; - }; - -class Test_TC_TSTAT_2_2: public TestCommand +class Test_TC_TSTAT_2_2 : public TestCommand { - public: - Test_TC_TSTAT_2_2(): TestCommand("Test_TC_TSTAT_2_2"), mTestIndex(0) +public: + Test_TC_TSTAT_2_2() : TestCommand("Test_TC_TSTAT_2_2"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_TSTAT_2_2() - { - } + ~Test_TC_TSTAT_2_2() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_TSTAT_2_2\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_TSTAT_2_2\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TSTAT_2_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TSTAT_2_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads OccupiedCoolingSetpoint attribute from Server DUT and verifies that the value is within range\n"); - if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) - { - NextTest(); - return; - } - err = TestReadsOccupiedCoolingSetpointAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_1(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 1 : Reads OccupiedCoolingSetpoint attribute from Server DUT and verifies that the " + "value is within range\n"); + if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) + { + NextTest(); + return; + } + err = TestReadsOccupiedCoolingSetpointAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Writes a value back that is different but valid for OccupiedCoolingSetpoint attribute\n"); - if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) - { - NextTest(); - return; - } - err = TestWritesAValueBackThatIsDifferentButValidForOccupiedCoolingSetpointAttribute_2(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 2 : Writes a value back that is different but valid for OccupiedCoolingSetpoint attribute\n"); + if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) + { + NextTest(); + return; + } + err = TestWritesAValueBackThatIsDifferentButValidForOccupiedCoolingSetpointAttribute_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads it back again to confirm the successful write of OccupiedCoolingSetpoint attribute\n"); - if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) - { - NextTest(); - return; - } - err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfOccupiedCoolingSetpointAttribute_3(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 3 : Reads it back again to confirm the successful write of OccupiedCoolingSetpoint attribute\n"); + if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) + { + NextTest(); + return; + } + err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfOccupiedCoolingSetpointAttribute_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Writes the limit of MinCoolSetpointLimit to OccupiedCoolingSetpoint attribute\n"); - if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) - { - NextTest(); - return; - } - err = TestWritesTheLimitOfMinCoolSetpointLimitToOccupiedCoolingSetpointAttribute_4(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 4 : Writes the limit of MinCoolSetpointLimit to OccupiedCoolingSetpoint attribute\n"); + if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfMinCoolSetpointLimitToOccupiedCoolingSetpointAttribute_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Writes the limit of MaxCoolSetpointLimit to OccupiedCoolingSetpoint attribute\n"); - if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) - { - NextTest(); - return; - } - err = TestWritesTheLimitOfMaxCoolSetpointLimitToOccupiedCoolingSetpointAttribute_5(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 5 : Writes the limit of MaxCoolSetpointLimit to OccupiedCoolingSetpoint attribute\n"); + if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfMaxCoolSetpointLimitToOccupiedCoolingSetpointAttribute_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads OccupiedHeatingSetpoint attribute from Server DUT and verifies that the value is within range\n"); - if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) - { - NextTest(); - return; - } - err = TestReadsOccupiedHeatingSetpointAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_6(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 6 : Reads OccupiedHeatingSetpoint attribute from Server DUT and verifies that the " + "value is within range\n"); + if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) + { + NextTest(); + return; + } + err = TestReadsOccupiedHeatingSetpointAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Writes a value back that is different but valid for OccupiedHeatingSetpoint attribute\n"); - if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) - { - NextTest(); - return; - } - err = TestWritesAValueBackThatIsDifferentButValidForOccupiedHeatingSetpointAttribute_7(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 7 : Writes a value back that is different but valid for OccupiedHeatingSetpoint attribute\n"); + if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) + { + NextTest(); + return; + } + err = TestWritesAValueBackThatIsDifferentButValidForOccupiedHeatingSetpointAttribute_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Reads it back again to confirm the successful write of OccupiedHeatingSetpoint attribute\n"); - if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) - { - NextTest(); - return; - } - err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfOccupiedHeatingSetpointAttribute_8(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 8 : Reads it back again to confirm the successful write of OccupiedHeatingSetpoint attribute\n"); + if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) + { + NextTest(); + return; + } + err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfOccupiedHeatingSetpointAttribute_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Writes the limit of MinHeatSetpointLimit to OccupiedHeatingSetpoint attribute\n"); - if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) - { - NextTest(); - return; - } - err = TestWritesTheLimitOfMinHeatSetpointLimitToOccupiedHeatingSetpointAttribute_9(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 9 : Writes the limit of MinHeatSetpointLimit to OccupiedHeatingSetpoint attribute\n"); + if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfMinHeatSetpointLimitToOccupiedHeatingSetpointAttribute_9(); + break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Writes the limit of MaxHeatSetpointLimit to OccupiedHeatingSetpoint attribute\n"); - if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) - { - NextTest(); - return; - } - err = TestWritesTheLimitOfMaxHeatSetpointLimitToOccupiedHeatingSetpointAttribute_10(); - break; + ChipLogProgress( + chipTool, " ***** Test Step 10 : Writes the limit of MaxHeatSetpointLimit to OccupiedHeatingSetpoint attribute\n"); + if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfMaxHeatSetpointLimitToOccupiedHeatingSetpointAttribute_10(); + break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Reads MinHeatSetpointLimit attribute from Server DUT and verifies that the value is within range\n"); - if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) - { - NextTest(); - return; - } - err = TestReadsMinHeatSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_11(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 11 : Reads MinHeatSetpointLimit attribute from Server DUT and verifies that the " + "value is within range\n"); + if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestReadsMinHeatSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_11(); + break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Writes a value back that is different but valid for MinHeatSetpointLimit attribute\n"); - if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) - { - NextTest(); - return; - } - err = TestWritesAValueBackThatIsDifferentButValidForMinHeatSetpointLimitAttribute_12(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 12 : Writes a value back that is different but valid for MinHeatSetpointLimit attribute\n"); + if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesAValueBackThatIsDifferentButValidForMinHeatSetpointLimitAttribute_12(); + break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Reads it back again to confirm the successful write of MinHeatSetpointLimit attribute\n"); - if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) - { - NextTest(); - return; - } - err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinHeatSetpointLimitAttribute_13(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 13 : Reads it back again to confirm the successful write of MinHeatSetpointLimit attribute\n"); + if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinHeatSetpointLimitAttribute_13(); + break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Writes the limit of AbsMinHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); - if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) - { - NextTest(); - return; - } - err = TestWritesTheLimitOfAbsMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_14(); - break; + ChipLogProgress( + chipTool, " ***** Test Step 14 : Writes the limit of AbsMinHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); + if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfAbsMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_14(); + break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Writes the limit of AbsMaxHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); - if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) - { - NextTest(); - return; - } - err = TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_15(); - break; + ChipLogProgress( + chipTool, " ***** Test Step 15 : Writes the limit of AbsMaxHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); + if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_15(); + break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Reads MaxHeatSetpointLimit attribute from Server DUT and verifies that the value is within range\n"); - if (ShouldSkip("A_MAXHEATSETPOINTLIMIT")) - { - NextTest(); - return; - } - err = TestReadsMaxHeatSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_16(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 16 : Reads MaxHeatSetpointLimit attribute from Server DUT and verifies that the " + "value is within range\n"); + if (ShouldSkip("A_MAXHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestReadsMaxHeatSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_16(); + break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Writes a value back that is different but valid for MaxHeatSetpointLimit attribute\n"); - if (ShouldSkip("A_MAXHEATSETPOINTLIMIT")) - { - NextTest(); - return; - } - err = TestWritesAValueBackThatIsDifferentButValidForMaxHeatSetpointLimitAttribute_17(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 17 : Writes a value back that is different but valid for MaxHeatSetpointLimit attribute\n"); + if (ShouldSkip("A_MAXHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesAValueBackThatIsDifferentButValidForMaxHeatSetpointLimitAttribute_17(); + break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Reads it back again to confirm the successful write of MaxHeatSetpointLimit attribute\n"); - if (ShouldSkip("A_MAXHEATSETPOINTLIMIT")) - { - NextTest(); - return; - } - err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxHeatSetpointLimitAttribute_18(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 18 : Reads it back again to confirm the successful write of MaxHeatSetpointLimit attribute\n"); + if (ShouldSkip("A_MAXHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxHeatSetpointLimitAttribute_18(); + break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Writes the limit of AbsMinHeatSetpointLimit to MaxHeatSetpointLimit attribute\n"); - if (ShouldSkip("A_MAXHEATSETPOINTLIMIT")) - { - NextTest(); - return; - } - err = TestWritesTheLimitOfAbsMinHeatSetpointLimitToMaxHeatSetpointLimitAttribute_19(); - break; + ChipLogProgress( + chipTool, " ***** Test Step 19 : Writes the limit of AbsMinHeatSetpointLimit to MaxHeatSetpointLimit attribute\n"); + if (ShouldSkip("A_MAXHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfAbsMinHeatSetpointLimitToMaxHeatSetpointLimitAttribute_19(); + break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Writes the limit of AbsMaxHeatSetpointLimit to MaxHeatSetpointLimit attribute\n"); - if (ShouldSkip("A_MAXHEATSETPOINTLIMIT")) - { - NextTest(); - return; - } - err = TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMaxHeatSetpointLimitAttribute_20(); - break; + ChipLogProgress( + chipTool, " ***** Test Step 20 : Writes the limit of AbsMaxHeatSetpointLimit to MaxHeatSetpointLimit attribute\n"); + if (ShouldSkip("A_MAXHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMaxHeatSetpointLimitAttribute_20(); + break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Reads MinCoolSetpointLimit attribute from Server DUT and verifies that the value is within range\n"); - if (ShouldSkip("A_MINCOOLSETPOINTLIMIT")) - { - NextTest(); - return; - } - err = TestReadsMinCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_21(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 21 : Reads MinCoolSetpointLimit attribute from Server DUT and verifies that the " + "value is within range\n"); + if (ShouldSkip("A_MINCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestReadsMinCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_21(); + break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Writes a value back that is different but valid for MinCoolSetpointLimit attribute\n"); - if (ShouldSkip("A_MINCOOLSETPOINTLIMIT")) - { - NextTest(); - return; - } - err = TestWritesAValueBackThatIsDifferentButValidForMinCoolSetpointLimitAttribute_22(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 22 : Writes a value back that is different but valid for MinCoolSetpointLimit attribute\n"); + if (ShouldSkip("A_MINCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesAValueBackThatIsDifferentButValidForMinCoolSetpointLimitAttribute_22(); + break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Reads it back again to confirm the successful write of MinCoolSetpointLimit attribute\n"); - if (ShouldSkip("A_MINCOOLSETPOINTLIMIT")) - { - NextTest(); - return; - } - err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinCoolSetpointLimitAttribute_23(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 23 : Reads it back again to confirm the successful write of MinCoolSetpointLimit attribute\n"); + if (ShouldSkip("A_MINCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinCoolSetpointLimitAttribute_23(); + break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Writes the limit of AbsMinCoolSetpointLimit to MinCoolSetpointLimit attribute\n"); - if (ShouldSkip("A_MINCOOLSETPOINTLIMIT")) - { - NextTest(); - return; - } - err = TestWritesTheLimitOfAbsMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_24(); - break; + ChipLogProgress( + chipTool, " ***** Test Step 24 : Writes the limit of AbsMinCoolSetpointLimit to MinCoolSetpointLimit attribute\n"); + if (ShouldSkip("A_MINCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfAbsMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_24(); + break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Writes the limit of MaxCoolSetpointLimit to MinCoolSetpointLimit attribute\n"); - if (ShouldSkip("A_MINCOOLSETPOINTLIMIT")) - { - NextTest(); - return; - } - err = TestWritesTheLimitOfMaxCoolSetpointLimitToMinCoolSetpointLimitAttribute_25(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 25 : Writes the limit of MaxCoolSetpointLimit to MinCoolSetpointLimit attribute\n"); + if (ShouldSkip("A_MINCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfMaxCoolSetpointLimitToMinCoolSetpointLimitAttribute_25(); + break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Reads MaxCoolSetpointLimit attribute from Server DUT and verifies that the value is within range\n"); - if (ShouldSkip("A_MAXCOOLSETPOINTLIMIT")) - { - NextTest(); - return; - } - err = TestReadsMaxCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_26(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 26 : Reads MaxCoolSetpointLimit attribute from Server DUT and verifies that the " + "value is within range\n"); + if (ShouldSkip("A_MAXCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestReadsMaxCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_26(); + break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Writes a value back that is different but valid for MaxCoolSetpointLimit attribute\n"); - if (ShouldSkip("A_MAXCOOLSETPOINTLIMIT")) - { - NextTest(); - return; - } - err = TestWritesAValueBackThatIsDifferentButValidForMaxCoolSetpointLimitAttribute_27(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 27 : Writes a value back that is different but valid for MaxCoolSetpointLimit attribute\n"); + if (ShouldSkip("A_MAXCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesAValueBackThatIsDifferentButValidForMaxCoolSetpointLimitAttribute_27(); + break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Reads it back again to confirm the successful write of MaxCoolSetpointLimit attribute\n"); - if (ShouldSkip("A_MAXCOOLSETPOINTLIMIT")) - { - NextTest(); - return; - } - err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxCoolSetpointLimitAttribute_28(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 28 : Reads it back again to confirm the successful write of MaxCoolSetpointLimit attribute\n"); + if (ShouldSkip("A_MAXCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxCoolSetpointLimitAttribute_28(); + break; case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Writes the limit of AbsMinCoolSetpointLimit to MaxCoolSetpointLimit attribute\n"); - if (ShouldSkip("A_MAXCOOLSETPOINTLIMIT")) - { - NextTest(); - return; - } - err = TestWritesTheLimitOfAbsMinCoolSetpointLimitToMaxCoolSetpointLimitAttribute_29(); - break; + ChipLogProgress( + chipTool, " ***** Test Step 29 : Writes the limit of AbsMinCoolSetpointLimit to MaxCoolSetpointLimit attribute\n"); + if (ShouldSkip("A_MAXCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfAbsMinCoolSetpointLimitToMaxCoolSetpointLimitAttribute_29(); + break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Writes the limit of MaxCoolSetpointLimit to MaxCoolSetpointLimit attribute\n"); - if (ShouldSkip("A_MAXCOOLSETPOINTLIMIT")) - { - NextTest(); - return; - } - err = TestWritesTheLimitOfMaxCoolSetpointLimitToMaxCoolSetpointLimitAttribute_30(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 30 : Writes the limit of MaxCoolSetpointLimit to MaxCoolSetpointLimit attribute\n"); + if (ShouldSkip("A_MAXCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesTheLimitOfMaxCoolSetpointLimitToMaxCoolSetpointLimitAttribute_30(); + break; case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Writes (sets back) the limit of MinHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); - if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) - { - NextTest(); - return; - } - err = TestWritesSetsBackTheLimitOfMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_31(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 31 : Writes (sets back) the limit of MinHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); + if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesSetsBackTheLimitOfMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_31(); + break; case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Writes (sets back) the limit of MaxHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); - if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) - { - NextTest(); - return; - } - err = TestWritesSetsBackTheLimitOfMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_32(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 32 : Writes (sets back) the limit of MaxHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); + if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesSetsBackTheLimitOfMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_32(); + break; case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Writes (sets back) the limit of MinHeatSetpointLimit to MaxHeatSetpointLimit attribute\n"); - if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) - { - NextTest(); - return; - } - err = TestWritesSetsBackTheLimitOfMinHeatSetpointLimitToMaxHeatSetpointLimitAttribute_33(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 33 : Writes (sets back) the limit of MinHeatSetpointLimit to MaxHeatSetpointLimit attribute\n"); + if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesSetsBackTheLimitOfMinHeatSetpointLimitToMaxHeatSetpointLimitAttribute_33(); + break; case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Writes (sets back) the limit of MaxHeatSetpointLimit to MaxHeatSetpointLimit attribute\n"); - if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) - { - NextTest(); - return; - } - err = TestWritesSetsBackTheLimitOfMaxHeatSetpointLimitToMaxHeatSetpointLimitAttribute_34(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 34 : Writes (sets back) the limit of MaxHeatSetpointLimit to MaxHeatSetpointLimit attribute\n"); + if (ShouldSkip("A_MINHEATSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesSetsBackTheLimitOfMaxHeatSetpointLimitToMaxHeatSetpointLimitAttribute_34(); + break; case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Writes (sets back) the limit of MinCoolSetpointLimit to MinCoolSetpointLimit attribute\n"); - if (ShouldSkip("A_MINCOOLSETPOINTLIMIT")) - { - NextTest(); - return; - } - err = TestWritesSetsBackTheLimitOfMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_35(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 35 : Writes (sets back) the limit of MinCoolSetpointLimit to MinCoolSetpointLimit attribute\n"); + if (ShouldSkip("A_MINCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesSetsBackTheLimitOfMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_35(); + break; case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Writes (sets back) the limit of MaxCoolSetpointLimit to MinCoolSetpointLimit attribute\n"); - if (ShouldSkip("A_MINCOOLSETPOINTLIMIT")) - { - NextTest(); - return; - } - err = TestWritesSetsBackTheLimitOfMaxCoolSetpointLimitToMinCoolSetpointLimitAttribute_36(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 36 : Writes (sets back) the limit of MaxCoolSetpointLimit to MinCoolSetpointLimit attribute\n"); + if (ShouldSkip("A_MINCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesSetsBackTheLimitOfMaxCoolSetpointLimitToMinCoolSetpointLimitAttribute_36(); + break; case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Writes (sets back) the limit of MinCoolSetpointLimit to MaxCoolSetpointLimit attribute\n"); - if (ShouldSkip("A_MAXCOOLSETPOINTLIMIT")) - { - NextTest(); - return; - } - err = TestWritesSetsBackTheLimitOfMinCoolSetpointLimitToMaxCoolSetpointLimitAttribute_37(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 37 : Writes (sets back) the limit of MinCoolSetpointLimit to MaxCoolSetpointLimit attribute\n"); + if (ShouldSkip("A_MAXCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesSetsBackTheLimitOfMinCoolSetpointLimitToMaxCoolSetpointLimitAttribute_37(); + break; case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : Writes (sets back) the limit of MaxCoolSetpointLimit to MaxCoolSetpointLimit attribute\n"); - if (ShouldSkip("A_MAXCOOLSETPOINTLIMIT")) - { - NextTest(); - return; - } - err = TestWritesSetsBackTheLimitOfMaxCoolSetpointLimitToMaxCoolSetpointLimitAttribute_38(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 38 : Writes (sets back) the limit of MaxCoolSetpointLimit to MaxCoolSetpointLimit attribute\n"); + if (ShouldSkip("A_MAXCOOLSETPOINTLIMIT")) + { + NextTest(); + return; + } + err = TestWritesSetsBackTheLimitOfMaxCoolSetpointLimitToMaxCoolSetpointLimitAttribute_38(); + break; case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : Reads ControlSequenceOfOperation from Server DUT and verifies that the value is valid\n"); - if (ShouldSkip("A_CONTROLSEQUENCEOFOPERATION")) - { - NextTest(); - return; - } - err = TestReadsControlSequenceOfOperationFromServerDutAndVerifiesThatTheValueIsValid_39(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 39 : Reads ControlSequenceOfOperation from Server DUT and verifies that the value is valid\n"); + if (ShouldSkip("A_CONTROLSEQUENCEOFOPERATION")) + { + NextTest(); + return; + } + err = TestReadsControlSequenceOfOperationFromServerDutAndVerifiesThatTheValueIsValid_39(); + break; case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : Write Attribute command for ControlSequenceOfOperation with a new valid value\n"); - if (ShouldSkip("A_CONTROLSEQUENCEOFOPERATION")) - { - NextTest(); - return; - } - err = TestWriteAttributeCommandForControlSequenceOfOperationWithANewValidValue_40(); - break; + ChipLogProgress( + chipTool, " ***** Test Step 40 : Write Attribute command for ControlSequenceOfOperation with a new valid value\n"); + if (ShouldSkip("A_CONTROLSEQUENCEOFOPERATION")) + { + NextTest(); + return; + } + err = TestWriteAttributeCommandForControlSequenceOfOperationWithANewValidValue_40(); + break; case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : Read it back again to confirm the successful write\n"); - if (ShouldSkip("A_CONTROLSEQUENCEOFOPERATION")) - { - NextTest(); - return; - } - err = TestReadItBackAgainToConfirmTheSuccessfulWrite_41(); - break; + ChipLogProgress(chipTool, " ***** Test Step 41 : Read it back again to confirm the successful write\n"); + if (ShouldSkip("A_CONTROLSEQUENCEOFOPERATION")) + { + NextTest(); + return; + } + err = TestReadItBackAgainToConfirmTheSuccessfulWrite_41(); + break; case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : Sets OccupiedHeatingSetpoint to default value\n"); - if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) - { - NextTest(); - return; - } - err = TestSetsOccupiedHeatingSetpointToDefaultValue_42(); - break; + ChipLogProgress(chipTool, " ***** Test Step 42 : Sets OccupiedHeatingSetpoint to default value\n"); + if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) + { + NextTest(); + return; + } + err = TestSetsOccupiedHeatingSetpointToDefaultValue_42(); + break; case 43: - ChipLogProgress(chipTool, " ***** Test Step 43 : Sets OccupiedHeatingSetpoint to default value\n"); - if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) - { - NextTest(); - return; - } - err = TestSetsOccupiedHeatingSetpointToDefaultValue_43(); - break; + ChipLogProgress(chipTool, " ***** Test Step 43 : Sets OccupiedHeatingSetpoint to default value\n"); + if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) + { + NextTest(); + return; + } + err = TestSetsOccupiedHeatingSetpointToDefaultValue_43(); + break; case 44: - ChipLogProgress(chipTool, " ***** Test Step 44 : Sets OccupiedCoolingSetpoint to default value\n"); - if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) - { - NextTest(); - return; - } - err = TestSetsOccupiedCoolingSetpointToDefaultValue_44(); - break; + ChipLogProgress(chipTool, " ***** Test Step 44 : Sets OccupiedCoolingSetpoint to default value\n"); + if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) + { + NextTest(); + return; + } + err = TestSetsOccupiedCoolingSetpointToDefaultValue_44(); + break; case 45: - ChipLogProgress(chipTool, " ***** Test Step 45 : Sets OccupiedCoolingSetpoint to default value\n"); - if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) - { - NextTest(); - return; - } - err = TestSetsOccupiedCoolingSetpointToDefaultValue_45(); - break; + ChipLogProgress(chipTool, " ***** Test Step 45 : Sets OccupiedCoolingSetpoint to default value\n"); + if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) + { + NextTest(); + return; + } + err = TestSetsOccupiedCoolingSetpointToDefaultValue_45(); + break; case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : Sets OccupiedCoolingSetpoint to default value\n"); - if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) - { - NextTest(); - return; - } - err = TestSetsOccupiedCoolingSetpointToDefaultValue_46(); - break; + ChipLogProgress(chipTool, " ***** Test Step 46 : Sets OccupiedCoolingSetpoint to default value\n"); + if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) + { + NextTest(); + return; + } + err = TestSetsOccupiedCoolingSetpointToDefaultValue_46(); + break; case 47: - ChipLogProgress(chipTool, " ***** Test Step 47 : Sets OccupiedHeatingSetpoint to default value\n"); - if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) - { - NextTest(); - return; - } - err = TestSetsOccupiedHeatingSetpointToDefaultValue_47(); - break; + ChipLogProgress(chipTool, " ***** Test Step 47 : Sets OccupiedHeatingSetpoint to default value\n"); + if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) + { + NextTest(); + return; + } + err = TestSetsOccupiedHeatingSetpointToDefaultValue_47(); + break; case 48: - ChipLogProgress(chipTool, " ***** Test Step 48 : Sets OccupiedCoolingSetpoint to default value\n"); - if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) - { - NextTest(); - return; - } - err = TestSetsOccupiedCoolingSetpointToDefaultValue_48(); - break; + ChipLogProgress(chipTool, " ***** Test Step 48 : Sets OccupiedCoolingSetpoint to default value\n"); + if (ShouldSkip("A_OCCUPIEDCOOLINGSETPOINT")) + { + NextTest(); + return; + } + err = TestSetsOccupiedCoolingSetpointToDefaultValue_48(); + break; case 49: - ChipLogProgress(chipTool, " ***** Test Step 49 : Sets OccupiedHeatingSetpoint to default value\n"); - if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) - { - NextTest(); - return; - } - err = TestSetsOccupiedHeatingSetpointToDefaultValue_49(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 49 : Sets OccupiedHeatingSetpoint to default value\n"); + if (ShouldSkip("A_OCCUPIEDHEATINGSETPOINT")) + { + NextTest(); + return; + } + err = TestSetsOccupiedHeatingSetpointToDefaultValue_49(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 50; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, int16_t occupiedCoolingSetpoint) + static void OnSuccessCallback_1(void * context, int16_t occupiedCoolingSetpoint) { (static_cast(context))->OnSuccessResponse_1(occupiedCoolingSetpoint); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context) - { - (static_cast(context))->OnSuccessResponse_2(); - } - - - + static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, int16_t occupiedCoolingSetpoint) + static void OnSuccessCallback_3(void * context, int16_t occupiedCoolingSetpoint) { (static_cast(context))->OnSuccessResponse_3(occupiedCoolingSetpoint); } - - - static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context) - { - (static_cast(context))->OnSuccessResponse_4(); - } - - - + static void OnSuccessCallback_4(void * context) { (static_cast(context))->OnSuccessResponse_4(); } static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context) - { - (static_cast(context))->OnSuccessResponse_5(); - } - - - + static void OnSuccessCallback_5(void * context) { (static_cast(context))->OnSuccessResponse_5(); } static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, int16_t occupiedHeatingSetpoint) + static void OnSuccessCallback_6(void * context, int16_t occupiedHeatingSetpoint) { (static_cast(context))->OnSuccessResponse_6(occupiedHeatingSetpoint); } - - - static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context) - { - (static_cast(context))->OnSuccessResponse_7(); - } - - - + static void OnSuccessCallback_7(void * context) { (static_cast(context))->OnSuccessResponse_7(); } static void OnFailureCallback_8(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context, int16_t occupiedHeatingSetpoint) + static void OnSuccessCallback_8(void * context, int16_t occupiedHeatingSetpoint) { (static_cast(context))->OnSuccessResponse_8(occupiedHeatingSetpoint); } - - - static void OnFailureCallback_9(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_9(status); } - static void OnSuccessCallback_9(void * context) - { - (static_cast(context))->OnSuccessResponse_9(); - } - - - + static void OnSuccessCallback_9(void * context) { (static_cast(context))->OnSuccessResponse_9(); } static void OnFailureCallback_10(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_10(status); } - static void OnSuccessCallback_10(void * context) - { - (static_cast(context))->OnSuccessResponse_10(); - } - - - + static void OnSuccessCallback_10(void * context) { (static_cast(context))->OnSuccessResponse_10(); } static void OnFailureCallback_11(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_11(status); } - static void OnSuccessCallback_11(void * context, int16_t minHeatSetpointLimit) + static void OnSuccessCallback_11(void * context, int16_t minHeatSetpointLimit) { (static_cast(context))->OnSuccessResponse_11(minHeatSetpointLimit); } - - - static void OnFailureCallback_12(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_12(status); } - static void OnSuccessCallback_12(void * context) - { - (static_cast(context))->OnSuccessResponse_12(); - } - - - + static void OnSuccessCallback_12(void * context) { (static_cast(context))->OnSuccessResponse_12(); } static void OnFailureCallback_13(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_13(status); } - static void OnSuccessCallback_13(void * context, int16_t minHeatSetpointLimit) + static void OnSuccessCallback_13(void * context, int16_t minHeatSetpointLimit) { (static_cast(context))->OnSuccessResponse_13(minHeatSetpointLimit); } - - - static void OnFailureCallback_14(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_14(status); } - static void OnSuccessCallback_14(void * context) - { - (static_cast(context))->OnSuccessResponse_14(); - } - - - + static void OnSuccessCallback_14(void * context) { (static_cast(context))->OnSuccessResponse_14(); } static void OnFailureCallback_15(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_15(status); } - static void OnSuccessCallback_15(void * context) - { - (static_cast(context))->OnSuccessResponse_15(); - } - - - + static void OnSuccessCallback_15(void * context) { (static_cast(context))->OnSuccessResponse_15(); } static void OnFailureCallback_16(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_16(status); } - static void OnSuccessCallback_16(void * context, int16_t maxHeatSetpointLimit) + static void OnSuccessCallback_16(void * context, int16_t maxHeatSetpointLimit) { (static_cast(context))->OnSuccessResponse_16(maxHeatSetpointLimit); } - - - static void OnFailureCallback_17(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_17(status); } - static void OnSuccessCallback_17(void * context) - { - (static_cast(context))->OnSuccessResponse_17(); - } - - - + static void OnSuccessCallback_17(void * context) { (static_cast(context))->OnSuccessResponse_17(); } static void OnFailureCallback_18(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_18(status); } - static void OnSuccessCallback_18(void * context, int16_t maxHeatSetpointLimit) + static void OnSuccessCallback_18(void * context, int16_t maxHeatSetpointLimit) { (static_cast(context))->OnSuccessResponse_18(maxHeatSetpointLimit); } - - - static void OnFailureCallback_19(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_19(status); } - static void OnSuccessCallback_19(void * context) - { - (static_cast(context))->OnSuccessResponse_19(); - } - - - + static void OnSuccessCallback_19(void * context) { (static_cast(context))->OnSuccessResponse_19(); } static void OnFailureCallback_20(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_20(status); } - static void OnSuccessCallback_20(void * context) - { - (static_cast(context))->OnSuccessResponse_20(); - } - - - + static void OnSuccessCallback_20(void * context) { (static_cast(context))->OnSuccessResponse_20(); } static void OnFailureCallback_21(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_21(status); } - static void OnSuccessCallback_21(void * context, int16_t minCoolSetpointLimit) + static void OnSuccessCallback_21(void * context, int16_t minCoolSetpointLimit) { (static_cast(context))->OnSuccessResponse_21(minCoolSetpointLimit); } - - - static void OnFailureCallback_22(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_22(status); } - static void OnSuccessCallback_22(void * context) - { - (static_cast(context))->OnSuccessResponse_22(); - } - - - + static void OnSuccessCallback_22(void * context) { (static_cast(context))->OnSuccessResponse_22(); } static void OnFailureCallback_23(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_23(status); } - static void OnSuccessCallback_23(void * context, int16_t minCoolSetpointLimit) + static void OnSuccessCallback_23(void * context, int16_t minCoolSetpointLimit) { (static_cast(context))->OnSuccessResponse_23(minCoolSetpointLimit); } - - - static void OnFailureCallback_24(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_24(status); } - static void OnSuccessCallback_24(void * context) - { - (static_cast(context))->OnSuccessResponse_24(); - } - - - + static void OnSuccessCallback_24(void * context) { (static_cast(context))->OnSuccessResponse_24(); } static void OnFailureCallback_25(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_25(status); } - static void OnSuccessCallback_25(void * context) - { - (static_cast(context))->OnSuccessResponse_25(); - } - - - + static void OnSuccessCallback_25(void * context) { (static_cast(context))->OnSuccessResponse_25(); } static void OnFailureCallback_26(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_26(status); } - static void OnSuccessCallback_26(void * context, int16_t maxCoolSetpointLimit) + static void OnSuccessCallback_26(void * context, int16_t maxCoolSetpointLimit) { (static_cast(context))->OnSuccessResponse_26(maxCoolSetpointLimit); } - - - static void OnFailureCallback_27(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_27(status); } - static void OnSuccessCallback_27(void * context) - { - (static_cast(context))->OnSuccessResponse_27(); - } - - - + static void OnSuccessCallback_27(void * context) { (static_cast(context))->OnSuccessResponse_27(); } static void OnFailureCallback_28(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_28(status); } - static void OnSuccessCallback_28(void * context, int16_t maxCoolSetpointLimit) + static void OnSuccessCallback_28(void * context, int16_t maxCoolSetpointLimit) { (static_cast(context))->OnSuccessResponse_28(maxCoolSetpointLimit); } - - - static void OnFailureCallback_29(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_29(status); } - static void OnSuccessCallback_29(void * context) - { - (static_cast(context))->OnSuccessResponse_29(); - } - - - + static void OnSuccessCallback_29(void * context) { (static_cast(context))->OnSuccessResponse_29(); } static void OnFailureCallback_30(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_30(status); } - static void OnSuccessCallback_30(void * context) - { - (static_cast(context))->OnSuccessResponse_30(); - } - - - + static void OnSuccessCallback_30(void * context) { (static_cast(context))->OnSuccessResponse_30(); } static void OnFailureCallback_31(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_31(status); } - static void OnSuccessCallback_31(void * context) - { - (static_cast(context))->OnSuccessResponse_31(); - } - - - + static void OnSuccessCallback_31(void * context) { (static_cast(context))->OnSuccessResponse_31(); } static void OnFailureCallback_32(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_32(status); } - static void OnSuccessCallback_32(void * context) - { - (static_cast(context))->OnSuccessResponse_32(); - } - - - + static void OnSuccessCallback_32(void * context) { (static_cast(context))->OnSuccessResponse_32(); } static void OnFailureCallback_33(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_33(status); } - static void OnSuccessCallback_33(void * context) - { - (static_cast(context))->OnSuccessResponse_33(); - } - - - + static void OnSuccessCallback_33(void * context) { (static_cast(context))->OnSuccessResponse_33(); } static void OnFailureCallback_34(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_34(status); } - static void OnSuccessCallback_34(void * context) - { - (static_cast(context))->OnSuccessResponse_34(); - } - - - + static void OnSuccessCallback_34(void * context) { (static_cast(context))->OnSuccessResponse_34(); } static void OnFailureCallback_35(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_35(status); } - static void OnSuccessCallback_35(void * context) - { - (static_cast(context))->OnSuccessResponse_35(); - } - - - + static void OnSuccessCallback_35(void * context) { (static_cast(context))->OnSuccessResponse_35(); } static void OnFailureCallback_36(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_36(status); } - static void OnSuccessCallback_36(void * context) - { - (static_cast(context))->OnSuccessResponse_36(); - } - - - + static void OnSuccessCallback_36(void * context) { (static_cast(context))->OnSuccessResponse_36(); } static void OnFailureCallback_37(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_37(status); } - static void OnSuccessCallback_37(void * context) - { - (static_cast(context))->OnSuccessResponse_37(); - } - - - + static void OnSuccessCallback_37(void * context) { (static_cast(context))->OnSuccessResponse_37(); } static void OnFailureCallback_38(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_38(status); } - static void OnSuccessCallback_38(void * context) - { - (static_cast(context))->OnSuccessResponse_38(); - } - - - + static void OnSuccessCallback_38(void * context) { (static_cast(context))->OnSuccessResponse_38(); } static void OnFailureCallback_39(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_39(status); } - static void OnSuccessCallback_39(void * context, uint8_t controlSequenceOfOperation) + static void OnSuccessCallback_39(void * context, uint8_t controlSequenceOfOperation) { (static_cast(context))->OnSuccessResponse_39(controlSequenceOfOperation); } - - - static void OnFailureCallback_40(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_40(status); } - static void OnSuccessCallback_40(void * context) - { - (static_cast(context))->OnSuccessResponse_40(); - } - - - + static void OnSuccessCallback_40(void * context) { (static_cast(context))->OnSuccessResponse_40(); } static void OnFailureCallback_41(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_41(status); } - static void OnSuccessCallback_41(void * context, uint8_t controlSequenceOfOperation) + static void OnSuccessCallback_41(void * context, uint8_t controlSequenceOfOperation) { (static_cast(context))->OnSuccessResponse_41(controlSequenceOfOperation); } - - - static void OnFailureCallback_42(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_42(status); } - static void OnSuccessCallback_42(void * context) - { - (static_cast(context))->OnSuccessResponse_42(); - } - - - - - static void OnFailureCallback_43(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_43(status); - } - - static void OnSuccessCallback_43(void * context) - { - (static_cast(context))->OnSuccessResponse_43(); - } - + static void OnSuccessCallback_42(void * context) { (static_cast(context))->OnSuccessResponse_42(); } + static void OnFailureCallback_43(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_43(status); + } + static void OnSuccessCallback_43(void * context) { (static_cast(context))->OnSuccessResponse_43(); } static void OnFailureCallback_44(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_44(status); } - static void OnSuccessCallback_44(void * context) - { - (static_cast(context))->OnSuccessResponse_44(); - } - - - + static void OnSuccessCallback_44(void * context) { (static_cast(context))->OnSuccessResponse_44(); } static void OnFailureCallback_45(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_45(status); } - static void OnSuccessCallback_45(void * context) - { - (static_cast(context))->OnSuccessResponse_45(); - } - - - + static void OnSuccessCallback_45(void * context) { (static_cast(context))->OnSuccessResponse_45(); } static void OnFailureCallback_46(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_46(status); } - static void OnSuccessCallback_46(void * context) - { - (static_cast(context))->OnSuccessResponse_46(); - } - - - + static void OnSuccessCallback_46(void * context) { (static_cast(context))->OnSuccessResponse_46(); } static void OnFailureCallback_47(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_47(status); } - static void OnSuccessCallback_47(void * context) - { - (static_cast(context))->OnSuccessResponse_47(); - } - - - + static void OnSuccessCallback_47(void * context) { (static_cast(context))->OnSuccessResponse_47(); } static void OnFailureCallback_48(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_48(status); } - static void OnSuccessCallback_48(void * context) - { - (static_cast(context))->OnSuccessResponse_48(); - } - - - + static void OnSuccessCallback_48(void * context) { (static_cast(context))->OnSuccessResponse_48(); } static void OnFailureCallback_49(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_49(status); } - static void OnSuccessCallback_49(void * context) - { - (static_cast(context))->OnSuccessResponse_49(); - } - - - + static void OnSuccessCallback_49(void * context) { (static_cast(context))->OnSuccessResponse_49(); } // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadsOccupiedCoolingSetpointAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( int16_t occupiedCoolingSetpoint) + void OnSuccessResponse_1(int16_t occupiedCoolingSetpoint) { - VerifyOrReturn(CheckValue("occupiedCoolingSetpoint", occupiedCoolingSetpoint,2600 - )); + VerifyOrReturn(CheckValue("occupiedCoolingSetpoint", occupiedCoolingSetpoint, 2600)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForOccupiedCoolingSetpointAttribute_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -44345,53 +33968,37 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t occupiedCoolingSetpointArgument; - occupiedCoolingSetpointArgument = 2000; - - ReturnErrorOnFailure(cluster.WriteAttribute(occupiedCoolingSetpointArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + occupiedCoolingSetpointArgument = 2000; - void OnSuccessResponse_2() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + occupiedCoolingSetpointArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_2() { NextTest(); } - CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfOccupiedCoolingSetpointAttribute_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( int16_t occupiedCoolingSetpoint) + void OnSuccessResponse_3(int16_t occupiedCoolingSetpoint) { - VerifyOrReturn(CheckValue("occupiedCoolingSetpoint", occupiedCoolingSetpoint,2000 - )); + VerifyOrReturn(CheckValue("occupiedCoolingSetpoint", occupiedCoolingSetpoint, 2000)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesTheLimitOfMinCoolSetpointLimitToOccupiedCoolingSetpointAttribute_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -44399,25 +34006,17 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t occupiedCoolingSetpointArgument; - occupiedCoolingSetpointArgument = 1600; - - ReturnErrorOnFailure(cluster.WriteAttribute(occupiedCoolingSetpointArgument, this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + occupiedCoolingSetpointArgument = 1600; - void OnSuccessResponse_4() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + occupiedCoolingSetpointArgument, this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_4() { NextTest(); } - CHIP_ERROR TestWritesTheLimitOfMaxCoolSetpointLimitToOccupiedCoolingSetpointAttribute_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -44425,53 +34024,37 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t occupiedCoolingSetpointArgument; - occupiedCoolingSetpointArgument = 2600; - - ReturnErrorOnFailure(cluster.WriteAttribute(occupiedCoolingSetpointArgument, this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + occupiedCoolingSetpointArgument = 2600; - void OnSuccessResponse_5() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + occupiedCoolingSetpointArgument, this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_5() { NextTest(); } - CHIP_ERROR TestReadsOccupiedHeatingSetpointAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( int16_t occupiedHeatingSetpoint) + void OnSuccessResponse_6(int16_t occupiedHeatingSetpoint) { - VerifyOrReturn(CheckValue("occupiedHeatingSetpoint", occupiedHeatingSetpoint,2000 - )); + VerifyOrReturn(CheckValue("occupiedHeatingSetpoint", occupiedHeatingSetpoint, 2000)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForOccupiedHeatingSetpointAttribute_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -44479,53 +34062,37 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t occupiedHeatingSetpointArgument; - occupiedHeatingSetpointArgument = 2100; - - ReturnErrorOnFailure(cluster.WriteAttribute(occupiedHeatingSetpointArgument, this, OnSuccessCallback_7, OnFailureCallback_7)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } + occupiedHeatingSetpointArgument = 2100; - void OnSuccessResponse_7() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + occupiedHeatingSetpointArgument, this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_7() { NextTest(); } - CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfOccupiedHeatingSetpointAttribute_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_8, OnFailureCallback_8)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_8, OnFailureCallback_8)); + return CHIP_NO_ERROR; } - void OnFailureResponse_8(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_8( int16_t occupiedHeatingSetpoint) + void OnSuccessResponse_8(int16_t occupiedHeatingSetpoint) { - VerifyOrReturn(CheckValue("occupiedHeatingSetpoint", occupiedHeatingSetpoint,2100 - )); + VerifyOrReturn(CheckValue("occupiedHeatingSetpoint", occupiedHeatingSetpoint, 2100)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesTheLimitOfMinHeatSetpointLimitToOccupiedHeatingSetpointAttribute_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -44533,25 +34100,17 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t occupiedHeatingSetpointArgument; - occupiedHeatingSetpointArgument = 700; - - ReturnErrorOnFailure(cluster.WriteAttribute(occupiedHeatingSetpointArgument, this, OnSuccessCallback_9, OnFailureCallback_9)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } + occupiedHeatingSetpointArgument = 700; - void OnSuccessResponse_9() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + occupiedHeatingSetpointArgument, this, OnSuccessCallback_9, OnFailureCallback_9)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_9() { NextTest(); } - CHIP_ERROR TestWritesTheLimitOfMaxHeatSetpointLimitToOccupiedHeatingSetpointAttribute_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -44559,53 +34118,37 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t occupiedHeatingSetpointArgument; - occupiedHeatingSetpointArgument = 3000; - - ReturnErrorOnFailure(cluster.WriteAttribute(occupiedHeatingSetpointArgument, this, OnSuccessCallback_10, OnFailureCallback_10)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_10(EmberAfStatus status) - { - ThrowFailureResponse(); - } + occupiedHeatingSetpointArgument = 3000; - void OnSuccessResponse_10() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + occupiedHeatingSetpointArgument, this, OnSuccessCallback_10, OnFailureCallback_10)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_10() { NextTest(); } - CHIP_ERROR TestReadsMinHeatSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_11, OnFailureCallback_11)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_11, OnFailureCallback_11)); + return CHIP_NO_ERROR; } - void OnFailureResponse_11(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_11( int16_t minHeatSetpointLimit) + void OnSuccessResponse_11(int16_t minHeatSetpointLimit) { - VerifyOrReturn(CheckValue("minHeatSetpointLimit", minHeatSetpointLimit,700 - )); + VerifyOrReturn(CheckValue("minHeatSetpointLimit", minHeatSetpointLimit, 700)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMinHeatSetpointLimitAttribute_12() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -44613,53 +34156,37 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t minHeatSetpointLimitArgument; - minHeatSetpointLimitArgument = 2000; - - ReturnErrorOnFailure(cluster.WriteAttribute(minHeatSetpointLimitArgument, this, OnSuccessCallback_12, OnFailureCallback_12)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_12(EmberAfStatus status) - { - ThrowFailureResponse(); - } + minHeatSetpointLimitArgument = 2000; - void OnSuccessResponse_12() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + minHeatSetpointLimitArgument, this, OnSuccessCallback_12, OnFailureCallback_12)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_12() { NextTest(); } - CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinHeatSetpointLimitAttribute_13() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_13, OnFailureCallback_13)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_13, OnFailureCallback_13)); + return CHIP_NO_ERROR; } - void OnFailureResponse_13(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_13(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_13( int16_t minHeatSetpointLimit) + void OnSuccessResponse_13(int16_t minHeatSetpointLimit) { - VerifyOrReturn(CheckValue("minHeatSetpointLimit", minHeatSetpointLimit,2000 - )); + VerifyOrReturn(CheckValue("minHeatSetpointLimit", minHeatSetpointLimit, 2000)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesTheLimitOfAbsMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -44667,25 +34194,17 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t minHeatSetpointLimitArgument; - minHeatSetpointLimitArgument = 700; - - ReturnErrorOnFailure(cluster.WriteAttribute(minHeatSetpointLimitArgument, this, OnSuccessCallback_14, OnFailureCallback_14)); - return CHIP_NO_ERROR; - } + minHeatSetpointLimitArgument = 700; - void OnFailureResponse_14(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_14() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + minHeatSetpointLimitArgument, this, OnSuccessCallback_14, OnFailureCallback_14)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_14() { NextTest(); } - CHIP_ERROR TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_15() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -44693,53 +34212,37 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t minHeatSetpointLimitArgument; - minHeatSetpointLimitArgument = 3000; - - ReturnErrorOnFailure(cluster.WriteAttribute(minHeatSetpointLimitArgument, this, OnSuccessCallback_15, OnFailureCallback_15)); - return CHIP_NO_ERROR; - } + minHeatSetpointLimitArgument = 3000; - void OnFailureResponse_15(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_15() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + minHeatSetpointLimitArgument, this, OnSuccessCallback_15, OnFailureCallback_15)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_15(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_15() { NextTest(); } - CHIP_ERROR TestReadsMaxHeatSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_16() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_16, OnFailureCallback_16)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_16, OnFailureCallback_16)); + return CHIP_NO_ERROR; } - void OnFailureResponse_16(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_16(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_16( int16_t maxHeatSetpointLimit) + void OnSuccessResponse_16(int16_t maxHeatSetpointLimit) { - VerifyOrReturn(CheckValue("maxHeatSetpointLimit", maxHeatSetpointLimit,3000 - )); + VerifyOrReturn(CheckValue("maxHeatSetpointLimit", maxHeatSetpointLimit, 3000)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMaxHeatSetpointLimitAttribute_17() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -44747,53 +34250,37 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t maxHeatSetpointLimitArgument; - maxHeatSetpointLimitArgument = 2000; - - ReturnErrorOnFailure(cluster.WriteAttribute(maxHeatSetpointLimitArgument, this, OnSuccessCallback_17, OnFailureCallback_17)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_17(EmberAfStatus status) - { - ThrowFailureResponse(); - } + maxHeatSetpointLimitArgument = 2000; - void OnSuccessResponse_17() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + maxHeatSetpointLimitArgument, this, OnSuccessCallback_17, OnFailureCallback_17)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_17(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_17() { NextTest(); } - CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxHeatSetpointLimitAttribute_18() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_18, OnFailureCallback_18)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_18, OnFailureCallback_18)); + return CHIP_NO_ERROR; } - void OnFailureResponse_18(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_18(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_18( int16_t maxHeatSetpointLimit) + void OnSuccessResponse_18(int16_t maxHeatSetpointLimit) { - VerifyOrReturn(CheckValue("maxHeatSetpointLimit", maxHeatSetpointLimit,2000 - )); + VerifyOrReturn(CheckValue("maxHeatSetpointLimit", maxHeatSetpointLimit, 2000)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesTheLimitOfAbsMinHeatSetpointLimitToMaxHeatSetpointLimitAttribute_19() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -44801,25 +34288,17 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t maxHeatSetpointLimitArgument; - maxHeatSetpointLimitArgument = 700; - - ReturnErrorOnFailure(cluster.WriteAttribute(maxHeatSetpointLimitArgument, this, OnSuccessCallback_19, OnFailureCallback_19)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_19(EmberAfStatus status) - { - ThrowFailureResponse(); - } + maxHeatSetpointLimitArgument = 700; - void OnSuccessResponse_19() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + maxHeatSetpointLimitArgument, this, OnSuccessCallback_19, OnFailureCallback_19)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_19(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_19() { NextTest(); } - CHIP_ERROR TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMaxHeatSetpointLimitAttribute_20() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -44827,53 +34306,37 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t maxHeatSetpointLimitArgument; - maxHeatSetpointLimitArgument = 3000; - - ReturnErrorOnFailure(cluster.WriteAttribute(maxHeatSetpointLimitArgument, this, OnSuccessCallback_20, OnFailureCallback_20)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_20(EmberAfStatus status) - { - ThrowFailureResponse(); - } + maxHeatSetpointLimitArgument = 3000; - void OnSuccessResponse_20() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + maxHeatSetpointLimitArgument, this, OnSuccessCallback_20, OnFailureCallback_20)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_20(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_20() { NextTest(); } - CHIP_ERROR TestReadsMinCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_21() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_21, OnFailureCallback_21)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_21, OnFailureCallback_21)); + return CHIP_NO_ERROR; } - void OnFailureResponse_21(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_21(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_21( int16_t minCoolSetpointLimit) + void OnSuccessResponse_21(int16_t minCoolSetpointLimit) { - VerifyOrReturn(CheckValue("minCoolSetpointLimit", minCoolSetpointLimit,1600 - )); + VerifyOrReturn(CheckValue("minCoolSetpointLimit", minCoolSetpointLimit, 1600)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMinCoolSetpointLimitAttribute_22() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -44881,53 +34344,37 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t minCoolSetpointLimitArgument; - minCoolSetpointLimitArgument = 2000; - - ReturnErrorOnFailure(cluster.WriteAttribute(minCoolSetpointLimitArgument, this, OnSuccessCallback_22, OnFailureCallback_22)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_22(EmberAfStatus status) - { - ThrowFailureResponse(); - } + minCoolSetpointLimitArgument = 2000; - void OnSuccessResponse_22() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + minCoolSetpointLimitArgument, this, OnSuccessCallback_22, OnFailureCallback_22)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_22(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_22() { NextTest(); } - CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinCoolSetpointLimitAttribute_23() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_23, OnFailureCallback_23)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_23, OnFailureCallback_23)); + return CHIP_NO_ERROR; } - void OnFailureResponse_23(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_23(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_23( int16_t minCoolSetpointLimit) + void OnSuccessResponse_23(int16_t minCoolSetpointLimit) { - VerifyOrReturn(CheckValue("minCoolSetpointLimit", minCoolSetpointLimit,2000 - )); + VerifyOrReturn(CheckValue("minCoolSetpointLimit", minCoolSetpointLimit, 2000)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesTheLimitOfAbsMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_24() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -44935,25 +34382,17 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t minCoolSetpointLimitArgument; - minCoolSetpointLimitArgument = 1600; - - ReturnErrorOnFailure(cluster.WriteAttribute(minCoolSetpointLimitArgument, this, OnSuccessCallback_24, OnFailureCallback_24)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_24(EmberAfStatus status) - { - ThrowFailureResponse(); - } + minCoolSetpointLimitArgument = 1600; - void OnSuccessResponse_24() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + minCoolSetpointLimitArgument, this, OnSuccessCallback_24, OnFailureCallback_24)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_24(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_24() { NextTest(); } - CHIP_ERROR TestWritesTheLimitOfMaxCoolSetpointLimitToMinCoolSetpointLimitAttribute_25() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -44961,53 +34400,37 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t minCoolSetpointLimitArgument; - minCoolSetpointLimitArgument = 3200; - - ReturnErrorOnFailure(cluster.WriteAttribute(minCoolSetpointLimitArgument, this, OnSuccessCallback_25, OnFailureCallback_25)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_25(EmberAfStatus status) - { - ThrowFailureResponse(); - } + minCoolSetpointLimitArgument = 3200; - void OnSuccessResponse_25() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + minCoolSetpointLimitArgument, this, OnSuccessCallback_25, OnFailureCallback_25)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_25(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_25() { NextTest(); } - CHIP_ERROR TestReadsMaxCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_26() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_26, OnFailureCallback_26)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_26, OnFailureCallback_26)); + return CHIP_NO_ERROR; } - void OnFailureResponse_26(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_26(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_26( int16_t maxCoolSetpointLimit) + void OnSuccessResponse_26(int16_t maxCoolSetpointLimit) { - VerifyOrReturn(CheckValue("maxCoolSetpointLimit", maxCoolSetpointLimit,3200 - )); + VerifyOrReturn(CheckValue("maxCoolSetpointLimit", maxCoolSetpointLimit, 3200)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMaxCoolSetpointLimitAttribute_27() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -45015,53 +34438,37 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t maxCoolSetpointLimitArgument; - maxCoolSetpointLimitArgument = 2000; - - ReturnErrorOnFailure(cluster.WriteAttribute(maxCoolSetpointLimitArgument, this, OnSuccessCallback_27, OnFailureCallback_27)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_27(EmberAfStatus status) - { - ThrowFailureResponse(); - } + maxCoolSetpointLimitArgument = 2000; - void OnSuccessResponse_27() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + maxCoolSetpointLimitArgument, this, OnSuccessCallback_27, OnFailureCallback_27)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_27(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_27() { NextTest(); } - CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxCoolSetpointLimitAttribute_28() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_28, OnFailureCallback_28)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_28, OnFailureCallback_28)); + return CHIP_NO_ERROR; } - void OnFailureResponse_28(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_28(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_28( int16_t maxCoolSetpointLimit) + void OnSuccessResponse_28(int16_t maxCoolSetpointLimit) { - VerifyOrReturn(CheckValue("maxCoolSetpointLimit", maxCoolSetpointLimit,2000 - )); + VerifyOrReturn(CheckValue("maxCoolSetpointLimit", maxCoolSetpointLimit, 2000)); NextTest(); - } - - - + } - CHIP_ERROR TestWritesTheLimitOfAbsMinCoolSetpointLimitToMaxCoolSetpointLimitAttribute_29() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -45069,25 +34476,17 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t maxCoolSetpointLimitArgument; - maxCoolSetpointLimitArgument = 1600; - - ReturnErrorOnFailure(cluster.WriteAttribute(maxCoolSetpointLimitArgument, this, OnSuccessCallback_29, OnFailureCallback_29)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_29(EmberAfStatus status) - { - ThrowFailureResponse(); - } + maxCoolSetpointLimitArgument = 1600; - void OnSuccessResponse_29() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + maxCoolSetpointLimitArgument, this, OnSuccessCallback_29, OnFailureCallback_29)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_29(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_29() { NextTest(); } - CHIP_ERROR TestWritesTheLimitOfMaxCoolSetpointLimitToMaxCoolSetpointLimitAttribute_30() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -45095,25 +34494,17 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t maxCoolSetpointLimitArgument; - maxCoolSetpointLimitArgument = 3200; - - ReturnErrorOnFailure(cluster.WriteAttribute(maxCoolSetpointLimitArgument, this, OnSuccessCallback_30, OnFailureCallback_30)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_30(EmberAfStatus status) - { - ThrowFailureResponse(); - } + maxCoolSetpointLimitArgument = 3200; - void OnSuccessResponse_30() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + maxCoolSetpointLimitArgument, this, OnSuccessCallback_30, OnFailureCallback_30)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_30(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_30() { NextTest(); } - CHIP_ERROR TestWritesSetsBackTheLimitOfMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_31() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -45121,25 +34512,17 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t minHeatSetpointLimitArgument; - minHeatSetpointLimitArgument = 700; - - ReturnErrorOnFailure(cluster.WriteAttribute(minHeatSetpointLimitArgument, this, OnSuccessCallback_31, OnFailureCallback_31)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_31(EmberAfStatus status) - { - ThrowFailureResponse(); - } + minHeatSetpointLimitArgument = 700; - void OnSuccessResponse_31() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + minHeatSetpointLimitArgument, this, OnSuccessCallback_31, OnFailureCallback_31)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_31(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_31() { NextTest(); } - CHIP_ERROR TestWritesSetsBackTheLimitOfMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_32() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -45147,25 +34530,17 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t minHeatSetpointLimitArgument; - minHeatSetpointLimitArgument = 3000; - - ReturnErrorOnFailure(cluster.WriteAttribute(minHeatSetpointLimitArgument, this, OnSuccessCallback_32, OnFailureCallback_32)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_32(EmberAfStatus status) - { - ThrowFailureResponse(); - } + minHeatSetpointLimitArgument = 3000; - void OnSuccessResponse_32() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + minHeatSetpointLimitArgument, this, OnSuccessCallback_32, OnFailureCallback_32)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_32(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_32() { NextTest(); } - CHIP_ERROR TestWritesSetsBackTheLimitOfMinHeatSetpointLimitToMaxHeatSetpointLimitAttribute_33() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -45173,25 +34548,17 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t maxHeatSetpointLimitArgument; - maxHeatSetpointLimitArgument = 700; - - ReturnErrorOnFailure(cluster.WriteAttribute(maxHeatSetpointLimitArgument, this, OnSuccessCallback_33, OnFailureCallback_33)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_33(EmberAfStatus status) - { - ThrowFailureResponse(); - } + maxHeatSetpointLimitArgument = 700; - void OnSuccessResponse_33() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + maxHeatSetpointLimitArgument, this, OnSuccessCallback_33, OnFailureCallback_33)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_33(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_33() { NextTest(); } - CHIP_ERROR TestWritesSetsBackTheLimitOfMaxHeatSetpointLimitToMaxHeatSetpointLimitAttribute_34() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -45199,25 +34566,17 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t maxHeatSetpointLimitArgument; - maxHeatSetpointLimitArgument = 3000; - - ReturnErrorOnFailure(cluster.WriteAttribute(maxHeatSetpointLimitArgument, this, OnSuccessCallback_34, OnFailureCallback_34)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_34(EmberAfStatus status) - { - ThrowFailureResponse(); - } + maxHeatSetpointLimitArgument = 3000; - void OnSuccessResponse_34() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + maxHeatSetpointLimitArgument, this, OnSuccessCallback_34, OnFailureCallback_34)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_34(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_34() { NextTest(); } - CHIP_ERROR TestWritesSetsBackTheLimitOfMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_35() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -45225,25 +34584,17 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t minCoolSetpointLimitArgument; - minCoolSetpointLimitArgument = 1600; - - ReturnErrorOnFailure(cluster.WriteAttribute(minCoolSetpointLimitArgument, this, OnSuccessCallback_35, OnFailureCallback_35)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_35(EmberAfStatus status) - { - ThrowFailureResponse(); - } + minCoolSetpointLimitArgument = 1600; - void OnSuccessResponse_35() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + minCoolSetpointLimitArgument, this, OnSuccessCallback_35, OnFailureCallback_35)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_35(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_35() { NextTest(); } - CHIP_ERROR TestWritesSetsBackTheLimitOfMaxCoolSetpointLimitToMinCoolSetpointLimitAttribute_36() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -45251,25 +34602,17 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t minCoolSetpointLimitArgument; - minCoolSetpointLimitArgument = 3200; - - ReturnErrorOnFailure(cluster.WriteAttribute(minCoolSetpointLimitArgument, this, OnSuccessCallback_36, OnFailureCallback_36)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_36(EmberAfStatus status) - { - ThrowFailureResponse(); - } + minCoolSetpointLimitArgument = 3200; - void OnSuccessResponse_36() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + minCoolSetpointLimitArgument, this, OnSuccessCallback_36, OnFailureCallback_36)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_36(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_36() { NextTest(); } - CHIP_ERROR TestWritesSetsBackTheLimitOfMinCoolSetpointLimitToMaxCoolSetpointLimitAttribute_37() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -45277,25 +34620,17 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t maxCoolSetpointLimitArgument; - maxCoolSetpointLimitArgument = 1600; - - ReturnErrorOnFailure(cluster.WriteAttribute(maxCoolSetpointLimitArgument, this, OnSuccessCallback_37, OnFailureCallback_37)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_37(EmberAfStatus status) - { - ThrowFailureResponse(); - } + maxCoolSetpointLimitArgument = 1600; - void OnSuccessResponse_37() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + maxCoolSetpointLimitArgument, this, OnSuccessCallback_37, OnFailureCallback_37)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_37(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_37() { NextTest(); } - CHIP_ERROR TestWritesSetsBackTheLimitOfMaxCoolSetpointLimitToMaxCoolSetpointLimitAttribute_38() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -45303,53 +34638,38 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t maxCoolSetpointLimitArgument; - maxCoolSetpointLimitArgument = 3200; - - ReturnErrorOnFailure(cluster.WriteAttribute(maxCoolSetpointLimitArgument, this, OnSuccessCallback_38, OnFailureCallback_38)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_38(EmberAfStatus status) - { - ThrowFailureResponse(); - } + maxCoolSetpointLimitArgument = 3200; - void OnSuccessResponse_38() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + maxCoolSetpointLimitArgument, this, OnSuccessCallback_38, OnFailureCallback_38)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_38(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_38() { NextTest(); } - CHIP_ERROR TestReadsControlSequenceOfOperationFromServerDutAndVerifiesThatTheValueIsValid_39() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_39, OnFailureCallback_39)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_39, OnFailureCallback_39)); + return CHIP_NO_ERROR; } - void OnFailureResponse_39(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_39(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_39( uint8_t controlSequenceOfOperation) + void OnSuccessResponse_39(uint8_t controlSequenceOfOperation) { - VerifyOrReturn(CheckValue("controlSequenceOfOperation", controlSequenceOfOperation,4 - )); + VerifyOrReturn(CheckValue("controlSequenceOfOperation", controlSequenceOfOperation, 4)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeCommandForControlSequenceOfOperationWithANewValidValue_40() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -45357,53 +34677,39 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t controlSequenceOfOperationArgument; - controlSequenceOfOperationArgument = 2; - - ReturnErrorOnFailure(cluster.WriteAttribute(controlSequenceOfOperationArgument, this, OnSuccessCallback_40, OnFailureCallback_40)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_40(EmberAfStatus status) - { - ThrowFailureResponse(); - } + controlSequenceOfOperationArgument = 2; - void OnSuccessResponse_40() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute( + controlSequenceOfOperationArgument, this, OnSuccessCallback_40, OnFailureCallback_40)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_40(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_40() { NextTest(); } - CHIP_ERROR TestReadItBackAgainToConfirmTheSuccessfulWrite_41() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_41, OnFailureCallback_41)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_41, OnFailureCallback_41)); + return CHIP_NO_ERROR; } - void OnFailureResponse_41(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_41(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_41( uint8_t controlSequenceOfOperation) + void OnSuccessResponse_41(uint8_t controlSequenceOfOperation) { - VerifyOrReturn(CheckValue("controlSequenceOfOperation", controlSequenceOfOperation,2 - )); + VerifyOrReturn(CheckValue("controlSequenceOfOperation", controlSequenceOfOperation, 2)); NextTest(); - } - - - + } - CHIP_ERROR TestSetsOccupiedHeatingSetpointToDefaultValue_42() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -45411,25 +34717,17 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t occupiedHeatingSetpointArgument; - occupiedHeatingSetpointArgument = 2000; - - ReturnErrorOnFailure(cluster.WriteAttribute(occupiedHeatingSetpointArgument, this, OnSuccessCallback_42, OnFailureCallback_42)); - return CHIP_NO_ERROR; - } + occupiedHeatingSetpointArgument = 2000; - void OnFailureResponse_42(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_42() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + occupiedHeatingSetpointArgument, this, OnSuccessCallback_42, OnFailureCallback_42)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_42(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_42() { NextTest(); } - CHIP_ERROR TestSetsOccupiedHeatingSetpointToDefaultValue_43() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -45437,25 +34735,17 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t occupiedHeatingSetpointArgument; - occupiedHeatingSetpointArgument = 2000; - - ReturnErrorOnFailure(cluster.WriteAttribute(occupiedHeatingSetpointArgument, this, OnSuccessCallback_43, OnFailureCallback_43)); - return CHIP_NO_ERROR; - } + occupiedHeatingSetpointArgument = 2000; - void OnFailureResponse_43(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_43() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + occupiedHeatingSetpointArgument, this, OnSuccessCallback_43, OnFailureCallback_43)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_43(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_43() { NextTest(); } - CHIP_ERROR TestSetsOccupiedCoolingSetpointToDefaultValue_44() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -45463,25 +34753,17 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t occupiedCoolingSetpointArgument; - occupiedCoolingSetpointArgument = 2600; - - ReturnErrorOnFailure(cluster.WriteAttribute(occupiedCoolingSetpointArgument, this, OnSuccessCallback_44, OnFailureCallback_44)); - return CHIP_NO_ERROR; - } + occupiedCoolingSetpointArgument = 2600; - void OnFailureResponse_44(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_44() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + occupiedCoolingSetpointArgument, this, OnSuccessCallback_44, OnFailureCallback_44)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_44(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_44() { NextTest(); } - CHIP_ERROR TestSetsOccupiedCoolingSetpointToDefaultValue_45() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -45489,25 +34771,17 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t occupiedCoolingSetpointArgument; - occupiedCoolingSetpointArgument = 2600; - - ReturnErrorOnFailure(cluster.WriteAttribute(occupiedCoolingSetpointArgument, this, OnSuccessCallback_45, OnFailureCallback_45)); - return CHIP_NO_ERROR; - } + occupiedCoolingSetpointArgument = 2600; - void OnFailureResponse_45(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_45() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + occupiedCoolingSetpointArgument, this, OnSuccessCallback_45, OnFailureCallback_45)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_45(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_45() { NextTest(); } - CHIP_ERROR TestSetsOccupiedCoolingSetpointToDefaultValue_46() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -45515,25 +34789,17 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t occupiedCoolingSetpointArgument; - occupiedCoolingSetpointArgument = 2600; - - ReturnErrorOnFailure(cluster.WriteAttribute(occupiedCoolingSetpointArgument, this, OnSuccessCallback_46, OnFailureCallback_46)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_46(EmberAfStatus status) - { - ThrowFailureResponse(); - } + occupiedCoolingSetpointArgument = 2600; - void OnSuccessResponse_46() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + occupiedCoolingSetpointArgument, this, OnSuccessCallback_46, OnFailureCallback_46)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_46(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_46() { NextTest(); } - CHIP_ERROR TestSetsOccupiedHeatingSetpointToDefaultValue_47() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -45541,25 +34807,17 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t occupiedHeatingSetpointArgument; - occupiedHeatingSetpointArgument = 2000; - - ReturnErrorOnFailure(cluster.WriteAttribute(occupiedHeatingSetpointArgument, this, OnSuccessCallback_47, OnFailureCallback_47)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_47(EmberAfStatus status) - { - ThrowFailureResponse(); - } + occupiedHeatingSetpointArgument = 2000; - void OnSuccessResponse_47() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + occupiedHeatingSetpointArgument, this, OnSuccessCallback_47, OnFailureCallback_47)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_47(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_47() { NextTest(); } - CHIP_ERROR TestSetsOccupiedCoolingSetpointToDefaultValue_48() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -45567,25 +34825,17 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t occupiedCoolingSetpointArgument; - occupiedCoolingSetpointArgument = 2600; - - ReturnErrorOnFailure(cluster.WriteAttribute(occupiedCoolingSetpointArgument, this, OnSuccessCallback_48, OnFailureCallback_48)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_48(EmberAfStatus status) - { - ThrowFailureResponse(); - } + occupiedCoolingSetpointArgument = 2600; - void OnSuccessResponse_48() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + occupiedCoolingSetpointArgument, this, OnSuccessCallback_48, OnFailureCallback_48)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_48(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_48() { NextTest(); } - CHIP_ERROR TestSetsOccupiedHeatingSetpointToDefaultValue_49() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -45593,179 +34843,130 @@ class Test_TC_TSTAT_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t occupiedHeatingSetpointArgument; - occupiedHeatingSetpointArgument = 2000; - - ReturnErrorOnFailure(cluster.WriteAttribute(occupiedHeatingSetpointArgument, this, OnSuccessCallback_49, OnFailureCallback_49)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_49(EmberAfStatus status) - { - ThrowFailureResponse(); - } + occupiedHeatingSetpointArgument = 2000; - void OnSuccessResponse_49() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + occupiedHeatingSetpointArgument, this, OnSuccessCallback_49, OnFailureCallback_49)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_49(EmberAfStatus status) { ThrowFailureResponse(); } - }; + void OnSuccessResponse_49() { NextTest(); } +}; -class Test_TC_TSUIC_1_1: public TestCommand +class Test_TC_TSUIC_1_1 : public TestCommand { - public: - Test_TC_TSUIC_1_1(): TestCommand("Test_TC_TSUIC_1_1"), mTestIndex(0) +public: + Test_TC_TSUIC_1_1() : TestCommand("Test_TC_TSUIC_1_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_TSUIC_1_1() - { - } + ~Test_TC_TSUIC_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_TSUIC_1_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_TSUIC_1_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TSUIC_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TSUIC_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2(); - break; - } + ChipLogProgress(chipTool, + " ***** Test Step 2 : write the default values to mandatory global attribute: ClusterRevision\n"); + err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_1(clusterRevision); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context) - { - (static_cast(context))->OnSuccessResponse_2(); - } - - - + static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint16_t clusterRevision) + void OnSuccessResponse_1(uint16_t clusterRevision) { - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -45773,429 +34974,334 @@ class Test_TC_TSUIC_1_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t clusterRevisionArgument; - clusterRevisionArgument = 2U; - - ReturnErrorOnFailure(cluster.WriteAttribute(clusterRevisionArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + clusterRevisionArgument = 2U; + + ReturnErrorOnFailure( + cluster + .WriteAttribute( + clusterRevisionArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_2() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_2() { ThrowSuccessResponse(); } +}; - }; - -class Test_TC_TSUIC_2_1: public TestCommand +class Test_TC_TSUIC_2_1 : public TestCommand { - public: - Test_TC_TSUIC_2_1(): TestCommand("Test_TC_TSUIC_2_1"), mTestIndex(0) +public: + Test_TC_TSUIC_2_1() : TestCommand("Test_TC_TSUIC_2_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_TSUIC_2_1() - { - } + ~Test_TC_TSUIC_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_TSUIC_2_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_TSUIC_2_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TSUIC_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TSUIC_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the mandatory attribute: TemperatureDisplayMode\n"); - err = TestReadTheMandatoryAttributeTemperatureDisplayMode_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : read the mandatory attribute: TemperatureDisplayMode\n"); + err = TestReadTheMandatoryAttributeTemperatureDisplayMode_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : read the mandatory attribute: TemperatureDisplayMode\n"); - err = TestReadTheMandatoryAttributeTemperatureDisplayMode_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : read the mandatory attribute: TemperatureDisplayMode\n"); + err = TestReadTheMandatoryAttributeTemperatureDisplayMode_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : write to the mandatory attribute: TemperatureDisplayMode\n"); - err = TestWriteToTheMandatoryAttributeTemperatureDisplayMode_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : write to the mandatory attribute: TemperatureDisplayMode\n"); + err = TestWriteToTheMandatoryAttributeTemperatureDisplayMode_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : read the mandatory attribute: TemperatureDisplayMode\n"); - err = TestReadTheMandatoryAttributeTemperatureDisplayMode_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : read the mandatory attribute: TemperatureDisplayMode\n"); + err = TestReadTheMandatoryAttributeTemperatureDisplayMode_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : read the mandatory attribute: TemperatureDisplayMode\n"); - err = TestReadTheMandatoryAttributeTemperatureDisplayMode_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : read the mandatory attribute: TemperatureDisplayMode\n"); + err = TestReadTheMandatoryAttributeTemperatureDisplayMode_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : read the mandatory attribute: KeypadLockout\n"); - err = TestReadTheMandatoryAttributeKeypadLockout_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : read the mandatory attribute: KeypadLockout\n"); + err = TestReadTheMandatoryAttributeKeypadLockout_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : read the mandatory attribute: KeypadLockout\n"); - err = TestReadTheMandatoryAttributeKeypadLockout_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : read the mandatory attribute: KeypadLockout\n"); + err = TestReadTheMandatoryAttributeKeypadLockout_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : write to the mandatory attribute: KeypadLockout\n"); - err = TestWriteToTheMandatoryAttributeKeypadLockout_8(); - break; + ChipLogProgress(chipTool, " ***** Test Step 8 : write to the mandatory attribute: KeypadLockout\n"); + err = TestWriteToTheMandatoryAttributeKeypadLockout_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : read the mandatory attribute: KeypadLockout\n"); - err = TestReadTheMandatoryAttributeKeypadLockout_9(); - break; + ChipLogProgress(chipTool, " ***** Test Step 9 : read the mandatory attribute: KeypadLockout\n"); + err = TestReadTheMandatoryAttributeKeypadLockout_9(); + break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : read the mandatory attribute: KeypadLockout\n"); - err = TestReadTheMandatoryAttributeKeypadLockout_10(); - break; + ChipLogProgress(chipTool, " ***** Test Step 10 : read the mandatory attribute: KeypadLockout\n"); + err = TestReadTheMandatoryAttributeKeypadLockout_10(); + break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : read the optional attribute: ScheduleProgrammingVisibility\n"); - err = TestReadTheOptionalAttributeScheduleProgrammingVisibility_11(); - break; + ChipLogProgress(chipTool, " ***** Test Step 11 : read the optional attribute: ScheduleProgrammingVisibility\n"); + err = TestReadTheOptionalAttributeScheduleProgrammingVisibility_11(); + break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : read the optional attribute: ScheduleProgrammingVisibility\n"); - err = TestReadTheOptionalAttributeScheduleProgrammingVisibility_12(); - break; + ChipLogProgress(chipTool, " ***** Test Step 12 : read the optional attribute: ScheduleProgrammingVisibility\n"); + err = TestReadTheOptionalAttributeScheduleProgrammingVisibility_12(); + break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : write to the mandatory attribute: ScheduleProgrammingVisibility\n"); - err = TestWriteToTheMandatoryAttributeScheduleProgrammingVisibility_13(); - break; + ChipLogProgress(chipTool, " ***** Test Step 13 : write to the mandatory attribute: ScheduleProgrammingVisibility\n"); + err = TestWriteToTheMandatoryAttributeScheduleProgrammingVisibility_13(); + break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : read the optional attribute: ScheduleProgrammingVisibility\n"); - err = TestReadTheOptionalAttributeScheduleProgrammingVisibility_14(); - break; + ChipLogProgress(chipTool, " ***** Test Step 14 : read the optional attribute: ScheduleProgrammingVisibility\n"); + err = TestReadTheOptionalAttributeScheduleProgrammingVisibility_14(); + break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : read the optional attribute: ScheduleProgrammingVisibility\n"); - err = TestReadTheOptionalAttributeScheduleProgrammingVisibility_15(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 15 : read the optional attribute: ScheduleProgrammingVisibility\n"); + err = TestReadTheOptionalAttributeScheduleProgrammingVisibility_15(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 16; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint8_t temperatureDisplayMode) + static void OnSuccessCallback_1(void * context, uint8_t temperatureDisplayMode) { (static_cast(context))->OnSuccessResponse_1(temperatureDisplayMode); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint8_t temperatureDisplayMode) + static void OnSuccessCallback_2(void * context, uint8_t temperatureDisplayMode) { (static_cast(context))->OnSuccessResponse_2(temperatureDisplayMode); } - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context) - { - (static_cast(context))->OnSuccessResponse_3(); - } - - - + static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, uint8_t temperatureDisplayMode) + static void OnSuccessCallback_4(void * context, uint8_t temperatureDisplayMode) { (static_cast(context))->OnSuccessResponse_4(temperatureDisplayMode); } - - - static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context, uint8_t temperatureDisplayMode) + static void OnSuccessCallback_5(void * context, uint8_t temperatureDisplayMode) { (static_cast(context))->OnSuccessResponse_5(temperatureDisplayMode); } - - - static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, uint8_t keypadLockout) + static void OnSuccessCallback_6(void * context, uint8_t keypadLockout) { (static_cast(context))->OnSuccessResponse_6(keypadLockout); } - - - static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context, uint8_t keypadLockout) + static void OnSuccessCallback_7(void * context, uint8_t keypadLockout) { (static_cast(context))->OnSuccessResponse_7(keypadLockout); } - - - static void OnFailureCallback_8(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context) - { - (static_cast(context))->OnSuccessResponse_8(); - } - - - + static void OnSuccessCallback_8(void * context) { (static_cast(context))->OnSuccessResponse_8(); } static void OnFailureCallback_9(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_9(status); } - static void OnSuccessCallback_9(void * context, uint8_t keypadLockout) + static void OnSuccessCallback_9(void * context, uint8_t keypadLockout) { (static_cast(context))->OnSuccessResponse_9(keypadLockout); } - - - static void OnFailureCallback_10(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_10(status); } - static void OnSuccessCallback_10(void * context, uint8_t keypadLockout) + static void OnSuccessCallback_10(void * context, uint8_t keypadLockout) { (static_cast(context))->OnSuccessResponse_10(keypadLockout); } - - - static void OnFailureCallback_11(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_11(status); } - static void OnSuccessCallback_11(void * context, uint8_t scheduleProgrammingVisibility) + static void OnSuccessCallback_11(void * context, uint8_t scheduleProgrammingVisibility) { (static_cast(context))->OnSuccessResponse_11(scheduleProgrammingVisibility); } - - - static void OnFailureCallback_12(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_12(status); } - static void OnSuccessCallback_12(void * context, uint8_t scheduleProgrammingVisibility) + static void OnSuccessCallback_12(void * context, uint8_t scheduleProgrammingVisibility) { (static_cast(context))->OnSuccessResponse_12(scheduleProgrammingVisibility); } - - - static void OnFailureCallback_13(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_13(status); } - static void OnSuccessCallback_13(void * context) - { - (static_cast(context))->OnSuccessResponse_13(); - } - - - + static void OnSuccessCallback_13(void * context) { (static_cast(context))->OnSuccessResponse_13(); } static void OnFailureCallback_14(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_14(status); } - static void OnSuccessCallback_14(void * context, uint8_t scheduleProgrammingVisibility) + static void OnSuccessCallback_14(void * context, uint8_t scheduleProgrammingVisibility) { (static_cast(context))->OnSuccessResponse_14(scheduleProgrammingVisibility); } - - - static void OnFailureCallback_15(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_15(status); } - static void OnSuccessCallback_15(void * context, uint8_t scheduleProgrammingVisibility) + static void OnSuccessCallback_15(void * context, uint8_t scheduleProgrammingVisibility) { (static_cast(context))->OnSuccessResponse_15(scheduleProgrammingVisibility); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadTheMandatoryAttributeTemperatureDisplayMode_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute< + chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo>( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint8_t temperatureDisplayMode) + void OnSuccessResponse_1(uint8_t temperatureDisplayMode) { - VerifyOrReturn(CheckValue("temperatureDisplayMode", temperatureDisplayMode,0 - )); + VerifyOrReturn(CheckValue("temperatureDisplayMode", temperatureDisplayMode, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeTemperatureDisplayMode_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute< + chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo>( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint8_t temperatureDisplayMode) + void OnSuccessResponse_2(uint8_t temperatureDisplayMode) { - VerifyOrReturn(CheckConstraintType("temperatureDisplayMode", "", "enum8")); + VerifyOrReturn(CheckConstraintType("temperatureDisplayMode", "", "enum8")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteToTheMandatoryAttributeTemperatureDisplayMode_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -46203,133 +35309,103 @@ class Test_TC_TSUIC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t temperatureDisplayModeArgument; - temperatureDisplayModeArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(temperatureDisplayModeArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + temperatureDisplayModeArgument = 0; - void OnSuccessResponse_3() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute< + chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo>( + temperatureDisplayModeArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_3() { NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributeTemperatureDisplayMode_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute< + chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo>( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( uint8_t temperatureDisplayMode) + void OnSuccessResponse_4(uint8_t temperatureDisplayMode) { - VerifyOrReturn(CheckValue("temperatureDisplayMode", temperatureDisplayMode,0 - )); + VerifyOrReturn(CheckValue("temperatureDisplayMode", temperatureDisplayMode, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeTemperatureDisplayMode_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute< + chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo>( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5( uint8_t temperatureDisplayMode) + void OnSuccessResponse_5(uint8_t temperatureDisplayMode) { - VerifyOrReturn(CheckConstraintType("temperatureDisplayMode", "", "enum8")); + VerifyOrReturn(CheckConstraintType("temperatureDisplayMode", "", "enum8")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeKeypadLockout_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( uint8_t keypadLockout) + void OnSuccessResponse_6(uint8_t keypadLockout) { - VerifyOrReturn(CheckValue("keypadLockout", keypadLockout,0 - )); + VerifyOrReturn(CheckValue("keypadLockout", keypadLockout, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeKeypadLockout_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_7, OnFailureCallback_7)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7( uint8_t keypadLockout) + void OnSuccessResponse_7(uint8_t keypadLockout) { - VerifyOrReturn(CheckConstraintType("keypadLockout", "", "enum8")); + VerifyOrReturn(CheckConstraintType("keypadLockout", "", "enum8")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteToTheMandatoryAttributeKeypadLockout_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -46337,133 +35413,102 @@ class Test_TC_TSUIC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t keypadLockoutArgument; - keypadLockoutArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(keypadLockoutArgument, this, OnSuccessCallback_8, OnFailureCallback_8)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_8(EmberAfStatus status) - { - ThrowFailureResponse(); - } + keypadLockoutArgument = 0; - void OnSuccessResponse_8() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute( + keypadLockoutArgument, this, OnSuccessCallback_8, OnFailureCallback_8)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_8() { NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributeKeypadLockout_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_9, OnFailureCallback_9)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_9, OnFailureCallback_9)); + return CHIP_NO_ERROR; } - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_9( uint8_t keypadLockout) + void OnSuccessResponse_9(uint8_t keypadLockout) { - VerifyOrReturn(CheckValue("keypadLockout", keypadLockout,0 - )); + VerifyOrReturn(CheckValue("keypadLockout", keypadLockout, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheMandatoryAttributeKeypadLockout_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_10, OnFailureCallback_10)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_10, OnFailureCallback_10)); + return CHIP_NO_ERROR; } - void OnFailureResponse_10(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_10( uint8_t keypadLockout) + void OnSuccessResponse_10(uint8_t keypadLockout) { - VerifyOrReturn(CheckConstraintType("keypadLockout", "", "enum8")); + VerifyOrReturn(CheckConstraintType("keypadLockout", "", "enum8")); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeScheduleProgrammingVisibility_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_11, OnFailureCallback_11)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute< + chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo>( + this, OnSuccessCallback_11, OnFailureCallback_11)); + return CHIP_NO_ERROR; } - void OnFailureResponse_11(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_11( uint8_t scheduleProgrammingVisibility) + void OnSuccessResponse_11(uint8_t scheduleProgrammingVisibility) { - VerifyOrReturn(CheckValue("scheduleProgrammingVisibility", scheduleProgrammingVisibility,0 - )); + VerifyOrReturn(CheckValue("scheduleProgrammingVisibility", scheduleProgrammingVisibility, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeScheduleProgrammingVisibility_12() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_12, OnFailureCallback_12)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute< + chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo>( + this, OnSuccessCallback_12, OnFailureCallback_12)); + return CHIP_NO_ERROR; } - void OnFailureResponse_12(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_12( uint8_t scheduleProgrammingVisibility) + void OnSuccessResponse_12(uint8_t scheduleProgrammingVisibility) { - VerifyOrReturn(CheckConstraintType("scheduleProgrammingVisibility", "", "enum8")); + VerifyOrReturn(CheckConstraintType("scheduleProgrammingVisibility", "", "enum8")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteToTheMandatoryAttributeScheduleProgrammingVisibility_13() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -46471,393 +35516,291 @@ class Test_TC_TSUIC_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t scheduleProgrammingVisibilityArgument; - scheduleProgrammingVisibilityArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(scheduleProgrammingVisibilityArgument, this, OnSuccessCallback_13, OnFailureCallback_13)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_13(EmberAfStatus status) - { - ThrowFailureResponse(); - } + scheduleProgrammingVisibilityArgument = 0; - void OnSuccessResponse_13() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute< + chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo>( + scheduleProgrammingVisibilityArgument, this, OnSuccessCallback_13, OnFailureCallback_13)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_13(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_13() { NextTest(); } - CHIP_ERROR TestReadTheOptionalAttributeScheduleProgrammingVisibility_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_14, OnFailureCallback_14)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute< + chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo>( + this, OnSuccessCallback_14, OnFailureCallback_14)); + return CHIP_NO_ERROR; } - void OnFailureResponse_14(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_14( uint8_t scheduleProgrammingVisibility) + void OnSuccessResponse_14(uint8_t scheduleProgrammingVisibility) { - VerifyOrReturn(CheckValue("scheduleProgrammingVisibility", scheduleProgrammingVisibility,0 - )); + VerifyOrReturn(CheckValue("scheduleProgrammingVisibility", scheduleProgrammingVisibility, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheOptionalAttributeScheduleProgrammingVisibility_15() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_15, OnFailureCallback_15)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute< + chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo>( + this, OnSuccessCallback_15, OnFailureCallback_15)); + return CHIP_NO_ERROR; } - void OnFailureResponse_15(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_15(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_15( uint8_t scheduleProgrammingVisibility) + void OnSuccessResponse_15(uint8_t scheduleProgrammingVisibility) { - VerifyOrReturn(CheckConstraintType("scheduleProgrammingVisibility", "", "enum8")); + VerifyOrReturn(CheckConstraintType("scheduleProgrammingVisibility", "", "enum8")); NextTest(); - } - - - }; + } +}; -class Test_TC_TSUIC_2_2: public TestCommand +class Test_TC_TSUIC_2_2 : public TestCommand { - public: - Test_TC_TSUIC_2_2(): TestCommand("Test_TC_TSUIC_2_2"), mTestIndex(0) +public: + Test_TC_TSUIC_2_2() : TestCommand("Test_TC_TSUIC_2_2"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_TSUIC_2_2() - { - } + ~Test_TC_TSUIC_2_2() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_TSUIC_2_2\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_TSUIC_2_2\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TSUIC_2_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TSUIC_2_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Writes a value of 0 to TemperatureDisplayMode attribute of DUT\n"); - if (ShouldSkip("A_TEMPERATURE_DISPLAY_MODE")) - { - NextTest(); - return; - } - err = TestWritesAValueOf0ToTemperatureDisplayModeAttributeOfDut_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Writes a value of 0 to TemperatureDisplayMode attribute of DUT\n"); + if (ShouldSkip("A_TEMPERATURE_DISPLAY_MODE")) + { + NextTest(); + return; + } + err = TestWritesAValueOf0ToTemperatureDisplayModeAttributeOfDut_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Writes a value of 1 to TemperatureDisplayMode attribute of DUT\n"); - if (ShouldSkip("A_TEMPERATURE_DISPLAY_MODE")) - { - NextTest(); - return; - } - err = TestWritesAValueOf1ToTemperatureDisplayModeAttributeOfDut_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Writes a value of 1 to TemperatureDisplayMode attribute of DUT\n"); + if (ShouldSkip("A_TEMPERATURE_DISPLAY_MODE")) + { + NextTest(); + return; + } + err = TestWritesAValueOf1ToTemperatureDisplayModeAttributeOfDut_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Writes a value of 0 to KeypadLockout attribute of DUT\n"); - if (ShouldSkip("A_KEYPAD_LOCKOUT")) - { - NextTest(); - return; - } - err = TestWritesAValueOf0ToKeypadLockoutAttributeOfDut_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Writes a value of 0 to KeypadLockout attribute of DUT\n"); + if (ShouldSkip("A_KEYPAD_LOCKOUT")) + { + NextTest(); + return; + } + err = TestWritesAValueOf0ToKeypadLockoutAttributeOfDut_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Writes a value of 1 to KeypadLockout attribute of DUT\n"); - if (ShouldSkip("A_KEYPAD_LOCKOUT")) - { - NextTest(); - return; - } - err = TestWritesAValueOf1ToKeypadLockoutAttributeOfDut_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Writes a value of 1 to KeypadLockout attribute of DUT\n"); + if (ShouldSkip("A_KEYPAD_LOCKOUT")) + { + NextTest(); + return; + } + err = TestWritesAValueOf1ToKeypadLockoutAttributeOfDut_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Writes a value of 2 to KeypadLockout attribute of DUT\n"); - if (ShouldSkip("A_KEYPAD_LOCKOUT")) - { - NextTest(); - return; - } - err = TestWritesAValueOf2ToKeypadLockoutAttributeOfDut_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Writes a value of 2 to KeypadLockout attribute of DUT\n"); + if (ShouldSkip("A_KEYPAD_LOCKOUT")) + { + NextTest(); + return; + } + err = TestWritesAValueOf2ToKeypadLockoutAttributeOfDut_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Writes a value of 3 to KeypadLockout attribute of DUT\n"); - if (ShouldSkip("A_KEYPAD_LOCKOUT")) - { - NextTest(); - return; - } - err = TestWritesAValueOf3ToKeypadLockoutAttributeOfDut_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : Writes a value of 3 to KeypadLockout attribute of DUT\n"); + if (ShouldSkip("A_KEYPAD_LOCKOUT")) + { + NextTest(); + return; + } + err = TestWritesAValueOf3ToKeypadLockoutAttributeOfDut_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Writes a value of 4 to KeypadLockout attribute of DUT\n"); - if (ShouldSkip("A_KEYPAD_LOCKOUT")) - { - NextTest(); - return; - } - err = TestWritesAValueOf4ToKeypadLockoutAttributeOfDut_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : Writes a value of 4 to KeypadLockout attribute of DUT\n"); + if (ShouldSkip("A_KEYPAD_LOCKOUT")) + { + NextTest(); + return; + } + err = TestWritesAValueOf4ToKeypadLockoutAttributeOfDut_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Writes a value of 5 to KeypadLockout attribute of DUT\n"); - if (ShouldSkip("A_KEYPAD_LOCKOUT")) - { - NextTest(); - return; - } - err = TestWritesAValueOf5ToKeypadLockoutAttributeOfDut_8(); - break; + ChipLogProgress(chipTool, " ***** Test Step 8 : Writes a value of 5 to KeypadLockout attribute of DUT\n"); + if (ShouldSkip("A_KEYPAD_LOCKOUT")) + { + NextTest(); + return; + } + err = TestWritesAValueOf5ToKeypadLockoutAttributeOfDut_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Writes a value of 0 to ScheduleProgrammingVisibility attribute of DUT\n"); - if (ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY")) - { - NextTest(); - return; - } - err = TestWritesAValueOf0ToScheduleProgrammingVisibilityAttributeOfDut_9(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 9 : Writes a value of 0 to ScheduleProgrammingVisibility attribute of DUT\n"); + if (ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY")) + { + NextTest(); + return; + } + err = TestWritesAValueOf0ToScheduleProgrammingVisibilityAttributeOfDut_9(); + break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Writes a value of 1 to ScheduleProgrammingVisibility attribute of DUT\n"); - if (ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY")) - { - NextTest(); - return; - } - err = TestWritesAValueOf1ToScheduleProgrammingVisibilityAttributeOfDut_10(); - break; - } + ChipLogProgress(chipTool, + " ***** Test Step 10 : Writes a value of 1 to ScheduleProgrammingVisibility attribute of DUT\n"); + if (ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY")) + { + NextTest(); + return; + } + err = TestWritesAValueOf1ToScheduleProgrammingVisibilityAttributeOfDut_10(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 11; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context) - { - (static_cast(context))->OnSuccessResponse_1(); - } - - - + static void OnSuccessCallback_1(void * context) { (static_cast(context))->OnSuccessResponse_1(); } static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context) - { - (static_cast(context))->OnSuccessResponse_2(); - } - - - + static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context) - { - (static_cast(context))->OnSuccessResponse_3(); - } - - - + static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context) - { - (static_cast(context))->OnSuccessResponse_4(); - } - - - + static void OnSuccessCallback_4(void * context) { (static_cast(context))->OnSuccessResponse_4(); } static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context) - { - (static_cast(context))->OnSuccessResponse_5(); - } - - - + static void OnSuccessCallback_5(void * context) { (static_cast(context))->OnSuccessResponse_5(); } static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context) - { - (static_cast(context))->OnSuccessResponse_6(); - } - - - + static void OnSuccessCallback_6(void * context) { (static_cast(context))->OnSuccessResponse_6(); } static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context) - { - (static_cast(context))->OnSuccessResponse_7(); - } - - - + static void OnSuccessCallback_7(void * context) { (static_cast(context))->OnSuccessResponse_7(); } static void OnFailureCallback_8(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context) - { - (static_cast(context))->OnSuccessResponse_8(); - } - - - + static void OnSuccessCallback_8(void * context) { (static_cast(context))->OnSuccessResponse_8(); } static void OnFailureCallback_9(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_9(status); } - static void OnSuccessCallback_9(void * context) - { - (static_cast(context))->OnSuccessResponse_9(); - } - - - + static void OnSuccessCallback_9(void * context) { (static_cast(context))->OnSuccessResponse_9(); } static void OnFailureCallback_10(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_10(status); } - static void OnSuccessCallback_10(void * context) - { - (static_cast(context))->OnSuccessResponse_10(); - } - - - + static void OnSuccessCallback_10(void * context) { (static_cast(context))->OnSuccessResponse_10(); } // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestWritesAValueOf0ToTemperatureDisplayModeAttributeOfDut_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -46865,25 +35808,19 @@ class Test_TC_TSUIC_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t temperatureDisplayModeArgument; - temperatureDisplayModeArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(temperatureDisplayModeArgument, this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + temperatureDisplayModeArgument = 0; - void OnSuccessResponse_1() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute< + chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo>( + temperatureDisplayModeArgument, this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestWritesAValueOf1ToTemperatureDisplayModeAttributeOfDut_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -46891,25 +35828,19 @@ class Test_TC_TSUIC_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t temperatureDisplayModeArgument; - temperatureDisplayModeArgument = 1; - - ReturnErrorOnFailure(cluster.WriteAttribute(temperatureDisplayModeArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + temperatureDisplayModeArgument = 1; - void OnSuccessResponse_2() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute< + chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo>( + temperatureDisplayModeArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_2() { NextTest(); } - CHIP_ERROR TestWritesAValueOf0ToKeypadLockoutAttributeOfDut_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -46917,25 +35848,18 @@ class Test_TC_TSUIC_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t keypadLockoutArgument; - keypadLockoutArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(keypadLockoutArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + keypadLockoutArgument = 0; - void OnSuccessResponse_3() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute( + keypadLockoutArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_3() { NextTest(); } - CHIP_ERROR TestWritesAValueOf1ToKeypadLockoutAttributeOfDut_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -46943,25 +35867,18 @@ class Test_TC_TSUIC_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t keypadLockoutArgument; - keypadLockoutArgument = 1; - - ReturnErrorOnFailure(cluster.WriteAttribute(keypadLockoutArgument, this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + keypadLockoutArgument = 1; - void OnSuccessResponse_4() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute( + keypadLockoutArgument, this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_4() { NextTest(); } - CHIP_ERROR TestWritesAValueOf2ToKeypadLockoutAttributeOfDut_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -46969,25 +35886,18 @@ class Test_TC_TSUIC_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t keypadLockoutArgument; - keypadLockoutArgument = 2; - - ReturnErrorOnFailure(cluster.WriteAttribute(keypadLockoutArgument, this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + keypadLockoutArgument = 2; - void OnSuccessResponse_5() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute( + keypadLockoutArgument, this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_5() { NextTest(); } - CHIP_ERROR TestWritesAValueOf3ToKeypadLockoutAttributeOfDut_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -46995,25 +35905,18 @@ class Test_TC_TSUIC_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t keypadLockoutArgument; - keypadLockoutArgument = 3; - - ReturnErrorOnFailure(cluster.WriteAttribute(keypadLockoutArgument, this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + keypadLockoutArgument = 3; - void OnSuccessResponse_6() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute( + keypadLockoutArgument, this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_6() { NextTest(); } - CHIP_ERROR TestWritesAValueOf4ToKeypadLockoutAttributeOfDut_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -47021,25 +35924,18 @@ class Test_TC_TSUIC_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t keypadLockoutArgument; - keypadLockoutArgument = 4; - - ReturnErrorOnFailure(cluster.WriteAttribute(keypadLockoutArgument, this, OnSuccessCallback_7, OnFailureCallback_7)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } + keypadLockoutArgument = 4; - void OnSuccessResponse_7() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute( + keypadLockoutArgument, this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_7() { NextTest(); } - CHIP_ERROR TestWritesAValueOf5ToKeypadLockoutAttributeOfDut_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -47047,25 +35943,18 @@ class Test_TC_TSUIC_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t keypadLockoutArgument; - keypadLockoutArgument = 5; - - ReturnErrorOnFailure(cluster.WriteAttribute(keypadLockoutArgument, this, OnSuccessCallback_8, OnFailureCallback_8)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_8(EmberAfStatus status) - { - ThrowFailureResponse(); - } + keypadLockoutArgument = 5; - void OnSuccessResponse_8() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute( + keypadLockoutArgument, this, OnSuccessCallback_8, OnFailureCallback_8)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_8() { NextTest(); } - CHIP_ERROR TestWritesAValueOf0ToScheduleProgrammingVisibilityAttributeOfDut_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -47073,25 +35962,19 @@ class Test_TC_TSUIC_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t scheduleProgrammingVisibilityArgument; - scheduleProgrammingVisibilityArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(scheduleProgrammingVisibilityArgument, this, OnSuccessCallback_9, OnFailureCallback_9)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } + scheduleProgrammingVisibilityArgument = 0; - void OnSuccessResponse_9() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute< + chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo>( + scheduleProgrammingVisibilityArgument, this, OnSuccessCallback_9, OnFailureCallback_9)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_9() { NextTest(); } - CHIP_ERROR TestWritesAValueOf1ToScheduleProgrammingVisibilityAttributeOfDut_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -47099,241 +35982,181 @@ class Test_TC_TSUIC_2_2: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t scheduleProgrammingVisibilityArgument; - scheduleProgrammingVisibilityArgument = 1; - - ReturnErrorOnFailure(cluster.WriteAttribute(scheduleProgrammingVisibilityArgument, this, OnSuccessCallback_10, OnFailureCallback_10)); - return CHIP_NO_ERROR; - } + scheduleProgrammingVisibilityArgument = 1; - void OnFailureResponse_10(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_10() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute< + chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo>( + scheduleProgrammingVisibilityArgument, this, OnSuccessCallback_10, OnFailureCallback_10)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } - }; + void OnSuccessResponse_10() { NextTest(); } +}; -class Test_TC_DIAGTH_1_1: public TestCommand +class Test_TC_DIAGTH_1_1 : public TestCommand { - public: - Test_TC_DIAGTH_1_1(): TestCommand("Test_TC_DIAGTH_1_1"), mTestIndex(0) +public: + Test_TC_DIAGTH_1_1() : TestCommand("Test_TC_DIAGTH_1_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_DIAGTH_1_1() - { - } + ~Test_TC_DIAGTH_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DIAGTH_1_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DIAGTH_1_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DIAGTH_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DIAGTH_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); + err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : reads back global attribute: ClusterRevision\n"); - err = TestReadsBackGlobalAttributeClusterRevision_4(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 4 : reads back global attribute: ClusterRevision\n"); + err = TestReadsBackGlobalAttributeClusterRevision_4(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 5; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_1(clusterRevision); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_2(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_2(clusterRevision); } - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context) - { - (static_cast(context))->OnSuccessResponse_3(); - } - - - + static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_4(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_4(clusterRevision); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::ThreadNetworkDiagnosticsClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint16_t clusterRevision) + void OnSuccessResponse_1(uint16_t clusterRevision) { - VerifyOrReturn(CheckValue("clusterRevision", clusterRevision,1U - )); + VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 1U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::ThreadNetworkDiagnosticsClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint16_t clusterRevision) + void OnSuccessResponse_2(uint16_t clusterRevision) { - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; @@ -47341,276 +36164,211 @@ class Test_TC_DIAGTH_1_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t clusterRevisionArgument; - clusterRevisionArgument = 1U; - - ReturnErrorOnFailure(cluster.WriteAttribute(clusterRevisionArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + clusterRevisionArgument = 1U; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + clusterRevisionArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_3() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_3() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::ThreadNetworkDiagnosticsClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( uint16_t clusterRevision) + void OnSuccessResponse_4(uint16_t clusterRevision) { - VerifyOrReturn(CheckValue("clusterRevision", clusterRevision,1U - )); + VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 1U)); NextTest(); - } - - - }; + } +}; -class Test_TC_WNCV_1_1: public TestCommand +class Test_TC_WNCV_1_1 : public TestCommand { - public: - Test_TC_WNCV_1_1(): TestCommand("Test_TC_WNCV_1_1"), mTestIndex(0) +public: + Test_TC_WNCV_1_1() : TestCommand("Test_TC_WNCV_1_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_WNCV_1_1() - { - } + ~Test_TC_WNCV_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_1_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_1_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : 2: read the global attribute: ClusterRevision\n"); - err = Test2ReadTheGlobalAttributeClusterRevision_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : 2: read the global attribute: ClusterRevision\n"); + err = Test2ReadTheGlobalAttributeClusterRevision_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : 3a: write a value into the RO mandatory global attribute: ClusterRevision\n"); - err = Test3aWriteAValueIntoTheRoMandatoryGlobalAttributeClusterRevision_2(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 2 : 3a: write a value into the RO mandatory global attribute: ClusterRevision\n"); + err = Test3aWriteAValueIntoTheRoMandatoryGlobalAttributeClusterRevision_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : 3b: reads back global attribute: ClusterRevision\n"); - err = Test3bReadsBackGlobalAttributeClusterRevision_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : 3b: reads back global attribute: ClusterRevision\n"); + err = Test3bReadsBackGlobalAttributeClusterRevision_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : 2: read the global attribute: FeatureMap\n"); - err = Test2ReadTheGlobalAttributeFeatureMap_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : 2: read the global attribute: FeatureMap\n"); + err = Test2ReadTheGlobalAttributeFeatureMap_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : 3a: write the default value to optional global attribute: FeatureMap\n"); - err = Test3aWriteTheDefaultValueToOptionalGlobalAttributeFeatureMap_5(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 5 : 3a: write the default value to optional global attribute: FeatureMap\n"); + err = Test3aWriteTheDefaultValueToOptionalGlobalAttributeFeatureMap_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : 3b: reads back global attribute: FeatureMap\n"); - err = Test3bReadsBackGlobalAttributeFeatureMap_6(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 6 : 3b: reads back global attribute: FeatureMap\n"); + err = Test3bReadsBackGlobalAttributeFeatureMap_6(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 7; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_1(clusterRevision); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context) - { - (static_cast(context))->OnSuccessResponse_2(); - } - - - + static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_3(void * context, uint16_t clusterRevision) { (static_cast(context))->OnSuccessResponse_3(clusterRevision); } - - - static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, uint32_t featureMap) + static void OnSuccessCallback_4(void * context, uint32_t featureMap) { (static_cast(context))->OnSuccessResponse_4(featureMap); } - - - static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context) - { - (static_cast(context))->OnSuccessResponse_5(); - } - - - + static void OnSuccessCallback_5(void * context) { (static_cast(context))->OnSuccessResponse_5(); } static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, uint32_t featureMap) + static void OnSuccessCallback_6(void * context, uint32_t featureMap) { (static_cast(context))->OnSuccessResponse_6(featureMap); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR Test2ReadTheGlobalAttributeClusterRevision_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint16_t clusterRevision) + void OnSuccessResponse_1(uint16_t clusterRevision) { - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("clusterRevision", clusterRevision, 5U));VerifyOrReturn(CheckConstraintMaxValue("clusterRevision", clusterRevision, 200U)); + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("clusterRevision", clusterRevision, 5U)); + VerifyOrReturn(CheckConstraintMaxValue("clusterRevision", clusterRevision, 200U)); NextTest(); - } - - - + } - CHIP_ERROR Test3aWriteAValueIntoTheRoMandatoryGlobalAttributeClusterRevision_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -47618,79 +36376,63 @@ class Test_TC_WNCV_1_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t clusterRevisionArgument; - clusterRevisionArgument = 201U; - - ReturnErrorOnFailure(cluster.WriteAttribute(clusterRevisionArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + clusterRevisionArgument = 201U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + clusterRevisionArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_2() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_2() { ThrowSuccessResponse(); } - - - CHIP_ERROR Test3bReadsBackGlobalAttributeClusterRevision_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( uint16_t clusterRevision) + void OnSuccessResponse_3(uint16_t clusterRevision) { - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); VerifyOrReturn(CheckConstraintNotValue("clusterRevision", clusterRevision, 201U)); + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintNotValue("clusterRevision", clusterRevision, 201U)); NextTest(); - } - - - + } - CHIP_ERROR Test2ReadTheGlobalAttributeFeatureMap_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( uint32_t featureMap) + void OnSuccessResponse_4(uint32_t featureMap) { - VerifyOrReturn(CheckConstraintType("featureMap", "", "uint32"));VerifyOrReturn(CheckConstraintMinValue("featureMap", featureMap, 0UL));VerifyOrReturn(CheckConstraintMaxValue("featureMap", featureMap, 32768UL)); + VerifyOrReturn(CheckConstraintType("featureMap", "", "uint32")); + VerifyOrReturn(CheckConstraintMinValue("featureMap", featureMap, 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("featureMap", featureMap, 32768UL)); NextTest(); - } - - - + } - CHIP_ERROR Test3aWriteTheDefaultValueToOptionalGlobalAttributeFeatureMap_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -47698,1091 +36440,877 @@ class Test_TC_WNCV_1_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint32_t featureMapArgument; - featureMapArgument = 32769UL; - - ReturnErrorOnFailure(cluster.WriteAttribute(featureMapArgument, this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; + featureMapArgument = 32769UL; + + ReturnErrorOnFailure(cluster.WriteAttribute( + featureMapArgument, this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; } void OnFailureResponse_5(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_5() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_5() { ThrowSuccessResponse(); } - - - CHIP_ERROR Test3bReadsBackGlobalAttributeFeatureMap_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( uint32_t featureMap) + void OnSuccessResponse_6(uint32_t featureMap) { - VerifyOrReturn(CheckConstraintType("featureMap", "", "uint32")); VerifyOrReturn(CheckConstraintNotValue("featureMap", featureMap, 32769UL)); + VerifyOrReturn(CheckConstraintType("featureMap", "", "uint32")); + VerifyOrReturn(CheckConstraintNotValue("featureMap", featureMap, 32769UL)); NextTest(); - } - - - }; + } +}; -class Test_TC_WNCV_2_1: public TestCommand +class Test_TC_WNCV_2_1 : public TestCommand { - public: - Test_TC_WNCV_2_1(): TestCommand("Test_TC_WNCV_2_1"), mTestIndex(0) +public: + Test_TC_WNCV_2_1() : TestCommand("Test_TC_WNCV_2_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_WNCV_2_1() - { - } + ~Test_TC_WNCV_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_2_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_2_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : 2: read the RO mandatory attribute default: Type\n"); - err = Test2ReadTheRoMandatoryAttributeDefaultType_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : 2: read the RO mandatory attribute default: Type\n"); + err = Test2ReadTheRoMandatoryAttributeDefaultType_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : 3a: write a value into the RO mandatory attribute: Type\n"); - err = Test3aWriteAValueIntoTheRoMandatoryAttributeType_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : 3a: write a value into the RO mandatory attribute: Type\n"); + err = Test3aWriteAValueIntoTheRoMandatoryAttributeType_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : 3b: reads back the RO mandatory attribute: Type\n"); - err = Test3bReadsBackTheRoMandatoryAttributeType_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : 3b: reads back the RO mandatory attribute: Type\n"); + err = Test3bReadsBackTheRoMandatoryAttributeType_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : 2: read the RO mandatory attribute default: ConfigStatus\n"); - err = Test2ReadTheRoMandatoryAttributeDefaultConfigStatus_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : 2: read the RO mandatory attribute default: ConfigStatus\n"); + err = Test2ReadTheRoMandatoryAttributeDefaultConfigStatus_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : 3a: write a value into the RO mandatory attribute: ConfigStatus\n"); - err = Test3aWriteAValueIntoTheRoMandatoryAttributeConfigStatus_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : 3a: write a value into the RO mandatory attribute: ConfigStatus\n"); + err = Test3aWriteAValueIntoTheRoMandatoryAttributeConfigStatus_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : 3b: reads back the RO mandatory attribute: ConfigStatus\n"); - err = Test3bReadsBackTheRoMandatoryAttributeConfigStatus_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : 3b: reads back the RO mandatory attribute: ConfigStatus\n"); + err = Test3bReadsBackTheRoMandatoryAttributeConfigStatus_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : 2: read the RO mandatory attribute default: OperationalStatus\n"); - err = Test2ReadTheRoMandatoryAttributeDefaultOperationalStatus_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : 2: read the RO mandatory attribute default: OperationalStatus\n"); + err = Test2ReadTheRoMandatoryAttributeDefaultOperationalStatus_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : 3a: write a value into the RO mandatory attribute: OperationalStatus\n"); - err = Test3aWriteAValueIntoTheRoMandatoryAttributeOperationalStatus_8(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 8 : 3a: write a value into the RO mandatory attribute: OperationalStatus\n"); + err = Test3aWriteAValueIntoTheRoMandatoryAttributeOperationalStatus_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : 3b: reads back the RO mandatory attribute: OperationalStatus\n"); - err = Test3bReadsBackTheRoMandatoryAttributeOperationalStatus_9(); - break; + ChipLogProgress(chipTool, " ***** Test Step 9 : 3b: reads back the RO mandatory attribute: OperationalStatus\n"); + err = Test3bReadsBackTheRoMandatoryAttributeOperationalStatus_9(); + break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : 2: read the RO mandatory attribute default: EndProductType\n"); - err = Test2ReadTheRoMandatoryAttributeDefaultEndProductType_10(); - break; + ChipLogProgress(chipTool, " ***** Test Step 10 : 2: read the RO mandatory attribute default: EndProductType\n"); + err = Test2ReadTheRoMandatoryAttributeDefaultEndProductType_10(); + break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : 3a: write a value into the RO mandatory attribute: EndProductType\n"); - err = Test3aWriteAValueIntoTheRoMandatoryAttributeEndProductType_11(); - break; + ChipLogProgress(chipTool, " ***** Test Step 11 : 3a: write a value into the RO mandatory attribute: EndProductType\n"); + err = Test3aWriteAValueIntoTheRoMandatoryAttributeEndProductType_11(); + break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : 3b: reads back the RO mandatory attribute: EndProductType\n"); - err = Test3bReadsBackTheRoMandatoryAttributeEndProductType_12(); - break; + ChipLogProgress(chipTool, " ***** Test Step 12 : 3b: reads back the RO mandatory attribute: EndProductType\n"); + err = Test3bReadsBackTheRoMandatoryAttributeEndProductType_12(); + break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : 2: read the RW mandatory attribute default: Mode\n"); - err = Test2ReadTheRwMandatoryAttributeDefaultMode_13(); - break; + ChipLogProgress(chipTool, " ***** Test Step 13 : 2: read the RW mandatory attribute default: Mode\n"); + err = Test2ReadTheRwMandatoryAttributeDefaultMode_13(); + break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : 3a: write a value into the RW mandatory attribute:: Mode\n"); - err = Test3aWriteAValueIntoTheRwMandatoryAttributeMode_14(); - break; + ChipLogProgress(chipTool, " ***** Test Step 14 : 3a: write a value into the RW mandatory attribute:: Mode\n"); + err = Test3aWriteAValueIntoTheRwMandatoryAttributeMode_14(); + break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : 3b: reads back the RW mandatory attribute: Mode\n"); - err = Test3bReadsBackTheRwMandatoryAttributeMode_15(); - break; + ChipLogProgress(chipTool, " ***** Test Step 15 : 3b: reads back the RW mandatory attribute: Mode\n"); + err = Test3bReadsBackTheRwMandatoryAttributeMode_15(); + break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : 2: read the RO optional attribute default: TargetPositionLiftPercent100ths\n"); - err = Test2ReadTheRoOptionalAttributeDefaultTargetPositionLiftPercent100ths_16(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 16 : 2: read the RO optional attribute default: TargetPositionLiftPercent100ths\n"); + err = Test2ReadTheRoOptionalAttributeDefaultTargetPositionLiftPercent100ths_16(); + break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : 3a: write a value into the RO optional attribute: TargetPositionLiftPercent100ths\n"); - err = Test3aWriteAValueIntoTheRoOptionalAttributeTargetPositionLiftPercent100ths_17(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 17 : 3a: write a value into the RO optional attribute: TargetPositionLiftPercent100ths\n"); + err = Test3aWriteAValueIntoTheRoOptionalAttributeTargetPositionLiftPercent100ths_17(); + break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : 3b: reads back the RO optional attribute: TargetPositionLiftPercent100ths\n"); - err = Test3bReadsBackTheRoOptionalAttributeTargetPositionLiftPercent100ths_18(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 18 : 3b: reads back the RO optional attribute: TargetPositionLiftPercent100ths\n"); + err = Test3bReadsBackTheRoOptionalAttributeTargetPositionLiftPercent100ths_18(); + break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : 2: read the RO optional attribute default: TargetPositionTiltPercent100ths\n"); - err = Test2ReadTheRoOptionalAttributeDefaultTargetPositionTiltPercent100ths_19(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 19 : 2: read the RO optional attribute default: TargetPositionTiltPercent100ths\n"); + err = Test2ReadTheRoOptionalAttributeDefaultTargetPositionTiltPercent100ths_19(); + break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : 3a: write a value into the RO optional attribute: TargetPositionTiltPercent100ths\n"); - err = Test3aWriteAValueIntoTheRoOptionalAttributeTargetPositionTiltPercent100ths_20(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 20 : 3a: write a value into the RO optional attribute: TargetPositionTiltPercent100ths\n"); + err = Test3aWriteAValueIntoTheRoOptionalAttributeTargetPositionTiltPercent100ths_20(); + break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : 3b: reads back the RO optional attribute: TargetPositionTiltPercent100ths\n"); - err = Test3bReadsBackTheRoOptionalAttributeTargetPositionTiltPercent100ths_21(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 21 : 3b: reads back the RO optional attribute: TargetPositionTiltPercent100ths\n"); + err = Test3bReadsBackTheRoOptionalAttributeTargetPositionTiltPercent100ths_21(); + break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : 2: read the RO optional attribute default: CurrentPositionLiftPercent100ths\n"); - err = Test2ReadTheRoOptionalAttributeDefaultCurrentPositionLiftPercent100ths_22(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 22 : 2: read the RO optional attribute default: CurrentPositionLiftPercent100ths\n"); + err = Test2ReadTheRoOptionalAttributeDefaultCurrentPositionLiftPercent100ths_22(); + break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : 3a: write a value into the RO optional attribute: CurrentPositionLiftPercent100ths\n"); - err = Test3aWriteAValueIntoTheRoOptionalAttributeCurrentPositionLiftPercent100ths_23(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 23 : 3a: write a value into the RO optional attribute: CurrentPositionLiftPercent100ths\n"); + err = Test3aWriteAValueIntoTheRoOptionalAttributeCurrentPositionLiftPercent100ths_23(); + break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : 3b: reads back the RO optional attribute: CurrentPositionLiftPercent100ths\n"); - err = Test3bReadsBackTheRoOptionalAttributeCurrentPositionLiftPercent100ths_24(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 24 : 3b: reads back the RO optional attribute: CurrentPositionLiftPercent100ths\n"); + err = Test3bReadsBackTheRoOptionalAttributeCurrentPositionLiftPercent100ths_24(); + break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : 2: read the RO optional attribute default: CurrentPositionTiltPercent100ths\n"); - err = Test2ReadTheRoOptionalAttributeDefaultCurrentPositionTiltPercent100ths_25(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 25 : 2: read the RO optional attribute default: CurrentPositionTiltPercent100ths\n"); + err = Test2ReadTheRoOptionalAttributeDefaultCurrentPositionTiltPercent100ths_25(); + break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : 3a: write a value into the RO optional attribute: CurrentPositionTiltPercent100ths\n"); - err = Test3aWriteAValueIntoTheRoOptionalAttributeCurrentPositionTiltPercent100ths_26(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 26 : 3a: write a value into the RO optional attribute: CurrentPositionTiltPercent100ths\n"); + err = Test3aWriteAValueIntoTheRoOptionalAttributeCurrentPositionTiltPercent100ths_26(); + break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : 3b: reads back the RO optional attribute: CurrentPositionTiltPercent100ths\n"); - err = Test3bReadsBackTheRoOptionalAttributeCurrentPositionTiltPercent100ths_27(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 27 : 3b: reads back the RO optional attribute: CurrentPositionTiltPercent100ths\n"); + err = Test3bReadsBackTheRoOptionalAttributeCurrentPositionTiltPercent100ths_27(); + break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : 2: read the RO optional attribute default: InstalledOpenLimitLift\n"); - err = Test2ReadTheRoOptionalAttributeDefaultInstalledOpenLimitLift_28(); - break; + ChipLogProgress(chipTool, " ***** Test Step 28 : 2: read the RO optional attribute default: InstalledOpenLimitLift\n"); + err = Test2ReadTheRoOptionalAttributeDefaultInstalledOpenLimitLift_28(); + break; case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : 3a: write a value into the RO optional attribute: InstalledOpenLimitLift\n"); - err = Test3aWriteAValueIntoTheRoOptionalAttributeInstalledOpenLimitLift_29(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 29 : 3a: write a value into the RO optional attribute: InstalledOpenLimitLift\n"); + err = Test3aWriteAValueIntoTheRoOptionalAttributeInstalledOpenLimitLift_29(); + break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : 3b: reads back the RO optional attribute: InstalledOpenLimitLift\n"); - err = Test3bReadsBackTheRoOptionalAttributeInstalledOpenLimitLift_30(); - break; + ChipLogProgress(chipTool, " ***** Test Step 30 : 3b: reads back the RO optional attribute: InstalledOpenLimitLift\n"); + err = Test3bReadsBackTheRoOptionalAttributeInstalledOpenLimitLift_30(); + break; case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : 2: read the RO optional attribute default: InstalledClosedLimitLift\n"); - err = Test2ReadTheRoOptionalAttributeDefaultInstalledClosedLimitLift_31(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 31 : 2: read the RO optional attribute default: InstalledClosedLimitLift\n"); + err = Test2ReadTheRoOptionalAttributeDefaultInstalledClosedLimitLift_31(); + break; case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : 3a: write a value into the RO optional attribute: InstalledClosedLimitLift\n"); - err = Test3aWriteAValueIntoTheRoOptionalAttributeInstalledClosedLimitLift_32(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 32 : 3a: write a value into the RO optional attribute: InstalledClosedLimitLift\n"); + err = Test3aWriteAValueIntoTheRoOptionalAttributeInstalledClosedLimitLift_32(); + break; case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : 3b: reads back the RO optional attribute: InstalledClosedLimitLift\n"); - err = Test3bReadsBackTheRoOptionalAttributeInstalledClosedLimitLift_33(); - break; + ChipLogProgress(chipTool, " ***** Test Step 33 : 3b: reads back the RO optional attribute: InstalledClosedLimitLift\n"); + err = Test3bReadsBackTheRoOptionalAttributeInstalledClosedLimitLift_33(); + break; case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : 2: read the RO optional attribute default: InstalledOpenLimitTilt\n"); - err = Test2ReadTheRoOptionalAttributeDefaultInstalledOpenLimitTilt_34(); - break; + ChipLogProgress(chipTool, " ***** Test Step 34 : 2: read the RO optional attribute default: InstalledOpenLimitTilt\n"); + err = Test2ReadTheRoOptionalAttributeDefaultInstalledOpenLimitTilt_34(); + break; case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : 3a: write a value into the RO optional attribute: InstalledOpenLimitTilt\n"); - err = Test3aWriteAValueIntoTheRoOptionalAttributeInstalledOpenLimitTilt_35(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 35 : 3a: write a value into the RO optional attribute: InstalledOpenLimitTilt\n"); + err = Test3aWriteAValueIntoTheRoOptionalAttributeInstalledOpenLimitTilt_35(); + break; case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : 3b: reads back the RO optional attribute: InstalledOpenLimitTilt\n"); - err = Test3bReadsBackTheRoOptionalAttributeInstalledOpenLimitTilt_36(); - break; + ChipLogProgress(chipTool, " ***** Test Step 36 : 3b: reads back the RO optional attribute: InstalledOpenLimitTilt\n"); + err = Test3bReadsBackTheRoOptionalAttributeInstalledOpenLimitTilt_36(); + break; case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : 2: read the RO optional attribute default: InstalledClosedLimitTilt\n"); - err = Test2ReadTheRoOptionalAttributeDefaultInstalledClosedLimitTilt_37(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 37 : 2: read the RO optional attribute default: InstalledClosedLimitTilt\n"); + err = Test2ReadTheRoOptionalAttributeDefaultInstalledClosedLimitTilt_37(); + break; case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : 3a: write a value into the RO optional attribute: InstalledClosedLimitTilt\n"); - err = Test3aWriteAValueIntoTheRoOptionalAttributeInstalledClosedLimitTilt_38(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 38 : 3a: write a value into the RO optional attribute: InstalledClosedLimitTilt\n"); + err = Test3aWriteAValueIntoTheRoOptionalAttributeInstalledClosedLimitTilt_38(); + break; case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : 3b: reads back the RO optional attribute: InstalledClosedLimitTilt\n"); - err = Test3bReadsBackTheRoOptionalAttributeInstalledClosedLimitTilt_39(); - break; + ChipLogProgress(chipTool, " ***** Test Step 39 : 3b: reads back the RO optional attribute: InstalledClosedLimitTilt\n"); + err = Test3bReadsBackTheRoOptionalAttributeInstalledClosedLimitTilt_39(); + break; case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : 4: read the RO mandatory attribute default: SafetyStatus\n"); - err = Test4ReadTheRoMandatoryAttributeDefaultSafetyStatus_40(); - break; + ChipLogProgress(chipTool, " ***** Test Step 40 : 4: read the RO mandatory attribute default: SafetyStatus\n"); + err = Test4ReadTheRoMandatoryAttributeDefaultSafetyStatus_40(); + break; case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : 5a: write a value into the RO mandatory attribute: SafetyStatus\n"); - err = Test5aWriteAValueIntoTheRoMandatoryAttributeSafetyStatus_41(); - break; + ChipLogProgress(chipTool, " ***** Test Step 41 : 5a: write a value into the RO mandatory attribute: SafetyStatus\n"); + err = Test5aWriteAValueIntoTheRoMandatoryAttributeSafetyStatus_41(); + break; case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : 5b: reads back the RO mandatory attribute: SafetyStatus\n"); - err = Test5bReadsBackTheRoMandatoryAttributeSafetyStatus_42(); - break; + ChipLogProgress(chipTool, " ***** Test Step 42 : 5b: reads back the RO mandatory attribute: SafetyStatus\n"); + err = Test5bReadsBackTheRoMandatoryAttributeSafetyStatus_42(); + break; case 43: - ChipLogProgress(chipTool, " ***** Test Step 43 : 4: read the RO optional attribute default: CurrentPositionLift\n"); - err = Test4ReadTheRoOptionalAttributeDefaultCurrentPositionLift_43(); - break; + ChipLogProgress(chipTool, " ***** Test Step 43 : 4: read the RO optional attribute default: CurrentPositionLift\n"); + err = Test4ReadTheRoOptionalAttributeDefaultCurrentPositionLift_43(); + break; case 44: - ChipLogProgress(chipTool, " ***** Test Step 44 : 5a: write a value into the RO optional attribute: CurrentPositionLift\n"); - err = Test5aWriteAValueIntoTheRoOptionalAttributeCurrentPositionLift_44(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 44 : 5a: write a value into the RO optional attribute: CurrentPositionLift\n"); + err = Test5aWriteAValueIntoTheRoOptionalAttributeCurrentPositionLift_44(); + break; case 45: - ChipLogProgress(chipTool, " ***** Test Step 45 : 5b: reads back the RO optional attribute: CurrentPositionLift\n"); - err = Test5bReadsBackTheRoOptionalAttributeCurrentPositionLift_45(); - break; + ChipLogProgress(chipTool, " ***** Test Step 45 : 5b: reads back the RO optional attribute: CurrentPositionLift\n"); + err = Test5bReadsBackTheRoOptionalAttributeCurrentPositionLift_45(); + break; case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : 4: read the RO optional attribute default: CurrentPositionTilt\n"); - err = Test4ReadTheRoOptionalAttributeDefaultCurrentPositionTilt_46(); - break; + ChipLogProgress(chipTool, " ***** Test Step 46 : 4: read the RO optional attribute default: CurrentPositionTilt\n"); + err = Test4ReadTheRoOptionalAttributeDefaultCurrentPositionTilt_46(); + break; case 47: - ChipLogProgress(chipTool, " ***** Test Step 47 : 5a: write a value into the RO optional attribute: CurrentPositionTilt\n"); - err = Test5aWriteAValueIntoTheRoOptionalAttributeCurrentPositionTilt_47(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 47 : 5a: write a value into the RO optional attribute: CurrentPositionTilt\n"); + err = Test5aWriteAValueIntoTheRoOptionalAttributeCurrentPositionTilt_47(); + break; case 48: - ChipLogProgress(chipTool, " ***** Test Step 48 : 5b: reads back the RO optional attribute: CurrentPositionTilt\n"); - err = Test5bReadsBackTheRoOptionalAttributeCurrentPositionTilt_48(); - break; + ChipLogProgress(chipTool, " ***** Test Step 48 : 5b: reads back the RO optional attribute: CurrentPositionTilt\n"); + err = Test5bReadsBackTheRoOptionalAttributeCurrentPositionTilt_48(); + break; case 49: - ChipLogProgress(chipTool, " ***** Test Step 49 : 4: read the RO optional attribute default: CurrentPositionLiftPercentage\n"); - err = Test4ReadTheRoOptionalAttributeDefaultCurrentPositionLiftPercentage_49(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 49 : 4: read the RO optional attribute default: CurrentPositionLiftPercentage\n"); + err = Test4ReadTheRoOptionalAttributeDefaultCurrentPositionLiftPercentage_49(); + break; case 50: - ChipLogProgress(chipTool, " ***** Test Step 50 : 5a: write a value into the RO optional attribute: CurrentPositionLiftPercentage\n"); - err = Test5aWriteAValueIntoTheRoOptionalAttributeCurrentPositionLiftPercentage_50(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 50 : 5a: write a value into the RO optional attribute: CurrentPositionLiftPercentage\n"); + err = Test5aWriteAValueIntoTheRoOptionalAttributeCurrentPositionLiftPercentage_50(); + break; case 51: - ChipLogProgress(chipTool, " ***** Test Step 51 : 5b: reads back the RO optional attribute: CurrentPositionLiftPercentage\n"); - err = Test5bReadsBackTheRoOptionalAttributeCurrentPositionLiftPercentage_51(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 51 : 5b: reads back the RO optional attribute: CurrentPositionLiftPercentage\n"); + err = Test5bReadsBackTheRoOptionalAttributeCurrentPositionLiftPercentage_51(); + break; case 52: - ChipLogProgress(chipTool, " ***** Test Step 52 : 4: read the RO optional attribute default: CurrentPositionTiltPercentage\n"); - err = Test4ReadTheRoOptionalAttributeDefaultCurrentPositionTiltPercentage_52(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 52 : 4: read the RO optional attribute default: CurrentPositionTiltPercentage\n"); + err = Test4ReadTheRoOptionalAttributeDefaultCurrentPositionTiltPercentage_52(); + break; case 53: - ChipLogProgress(chipTool, " ***** Test Step 53 : 5a: write a value into the RO optional attribute: CurrentPositionTiltPercentage\n"); - err = Test5aWriteAValueIntoTheRoOptionalAttributeCurrentPositionTiltPercentage_53(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 53 : 5a: write a value into the RO optional attribute: CurrentPositionTiltPercentage\n"); + err = Test5aWriteAValueIntoTheRoOptionalAttributeCurrentPositionTiltPercentage_53(); + break; case 54: - ChipLogProgress(chipTool, " ***** Test Step 54 : 5b: reads back the RO optional attribute: CurrentPositionTiltPercentage\n"); - err = Test5bReadsBackTheRoOptionalAttributeCurrentPositionTiltPercentage_54(); - break; - } + ChipLogProgress(chipTool, + " ***** Test Step 54 : 5b: reads back the RO optional attribute: CurrentPositionTiltPercentage\n"); + err = Test5bReadsBackTheRoOptionalAttributeCurrentPositionTiltPercentage_54(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 55; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint8_t type) + static void OnSuccessCallback_1(void * context, uint8_t type) { (static_cast(context))->OnSuccessResponse_1(type); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context) - { - (static_cast(context))->OnSuccessResponse_2(); - } - - - + static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, uint8_t type) + static void OnSuccessCallback_3(void * context, uint8_t type) { (static_cast(context))->OnSuccessResponse_3(type); } - - - static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, uint8_t configStatus) + static void OnSuccessCallback_4(void * context, uint8_t configStatus) { (static_cast(context))->OnSuccessResponse_4(configStatus); } - - - static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context) - { - (static_cast(context))->OnSuccessResponse_5(); - } - - - + static void OnSuccessCallback_5(void * context) { (static_cast(context))->OnSuccessResponse_5(); } static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, uint8_t configStatus) + static void OnSuccessCallback_6(void * context, uint8_t configStatus) { (static_cast(context))->OnSuccessResponse_6(configStatus); } - - - static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context, uint8_t operationalStatus) + static void OnSuccessCallback_7(void * context, uint8_t operationalStatus) { (static_cast(context))->OnSuccessResponse_7(operationalStatus); } - - - static void OnFailureCallback_8(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context) - { - (static_cast(context))->OnSuccessResponse_8(); - } - - - + static void OnSuccessCallback_8(void * context) { (static_cast(context))->OnSuccessResponse_8(); } static void OnFailureCallback_9(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_9(status); } - static void OnSuccessCallback_9(void * context, uint8_t operationalStatus) + static void OnSuccessCallback_9(void * context, uint8_t operationalStatus) { (static_cast(context))->OnSuccessResponse_9(operationalStatus); } - - - static void OnFailureCallback_10(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_10(status); } - static void OnSuccessCallback_10(void * context, uint8_t endProductType) + static void OnSuccessCallback_10(void * context, uint8_t endProductType) { (static_cast(context))->OnSuccessResponse_10(endProductType); } - - - static void OnFailureCallback_11(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_11(status); } - static void OnSuccessCallback_11(void * context) - { - (static_cast(context))->OnSuccessResponse_11(); - } - - - + static void OnSuccessCallback_11(void * context) { (static_cast(context))->OnSuccessResponse_11(); } static void OnFailureCallback_12(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_12(status); } - static void OnSuccessCallback_12(void * context, uint8_t endProductType) + static void OnSuccessCallback_12(void * context, uint8_t endProductType) { (static_cast(context))->OnSuccessResponse_12(endProductType); } - - - static void OnFailureCallback_13(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_13(status); } - static void OnSuccessCallback_13(void * context, uint8_t mode) + static void OnSuccessCallback_13(void * context, uint8_t mode) { (static_cast(context))->OnSuccessResponse_13(mode); } - - - static void OnFailureCallback_14(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_14(status); } - static void OnSuccessCallback_14(void * context) - { - (static_cast(context))->OnSuccessResponse_14(); - } - - - + static void OnSuccessCallback_14(void * context) { (static_cast(context))->OnSuccessResponse_14(); } static void OnFailureCallback_15(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_15(status); } - static void OnSuccessCallback_15(void * context, uint8_t mode) + static void OnSuccessCallback_15(void * context, uint8_t mode) { (static_cast(context))->OnSuccessResponse_15(mode); } - - - static void OnFailureCallback_16(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_16(status); } - static void OnSuccessCallback_16(void * context, const chip::app::DataModel::Nullable & targetPositionLiftPercent100ths) + static void OnSuccessCallback_16(void * context, + const chip::app::DataModel::Nullable & targetPositionLiftPercent100ths) { (static_cast(context))->OnSuccessResponse_16(targetPositionLiftPercent100ths); } - - - static void OnFailureCallback_17(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_17(status); } - static void OnSuccessCallback_17(void * context) - { - (static_cast(context))->OnSuccessResponse_17(); - } - - - + static void OnSuccessCallback_17(void * context) { (static_cast(context))->OnSuccessResponse_17(); } static void OnFailureCallback_18(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_18(status); } - static void OnSuccessCallback_18(void * context, const chip::app::DataModel::Nullable & targetPositionLiftPercent100ths) + static void OnSuccessCallback_18(void * context, + const chip::app::DataModel::Nullable & targetPositionLiftPercent100ths) { (static_cast(context))->OnSuccessResponse_18(targetPositionLiftPercent100ths); } - - - static void OnFailureCallback_19(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_19(status); } - static void OnSuccessCallback_19(void * context, const chip::app::DataModel::Nullable & targetPositionTiltPercent100ths) + static void OnSuccessCallback_19(void * context, + const chip::app::DataModel::Nullable & targetPositionTiltPercent100ths) { (static_cast(context))->OnSuccessResponse_19(targetPositionTiltPercent100ths); } - - - static void OnFailureCallback_20(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_20(status); } - static void OnSuccessCallback_20(void * context) - { - (static_cast(context))->OnSuccessResponse_20(); - } - - - + static void OnSuccessCallback_20(void * context) { (static_cast(context))->OnSuccessResponse_20(); } static void OnFailureCallback_21(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_21(status); } - static void OnSuccessCallback_21(void * context, const chip::app::DataModel::Nullable & targetPositionTiltPercent100ths) + static void OnSuccessCallback_21(void * context, + const chip::app::DataModel::Nullable & targetPositionTiltPercent100ths) { (static_cast(context))->OnSuccessResponse_21(targetPositionTiltPercent100ths); } - - - static void OnFailureCallback_22(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_22(status); } - static void OnSuccessCallback_22(void * context, const chip::app::DataModel::Nullable & currentPositionLiftPercent100ths) + static void OnSuccessCallback_22(void * context, + const chip::app::DataModel::Nullable & currentPositionLiftPercent100ths) { (static_cast(context))->OnSuccessResponse_22(currentPositionLiftPercent100ths); } - - - static void OnFailureCallback_23(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_23(status); } - static void OnSuccessCallback_23(void * context) - { - (static_cast(context))->OnSuccessResponse_23(); - } - - - + static void OnSuccessCallback_23(void * context) { (static_cast(context))->OnSuccessResponse_23(); } static void OnFailureCallback_24(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_24(status); } - static void OnSuccessCallback_24(void * context, const chip::app::DataModel::Nullable & currentPositionLiftPercent100ths) + static void OnSuccessCallback_24(void * context, + const chip::app::DataModel::Nullable & currentPositionLiftPercent100ths) { (static_cast(context))->OnSuccessResponse_24(currentPositionLiftPercent100ths); } - - - static void OnFailureCallback_25(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_25(status); } - static void OnSuccessCallback_25(void * context, const chip::app::DataModel::Nullable & currentPositionTiltPercent100ths) + static void OnSuccessCallback_25(void * context, + const chip::app::DataModel::Nullable & currentPositionTiltPercent100ths) { (static_cast(context))->OnSuccessResponse_25(currentPositionTiltPercent100ths); } - - - static void OnFailureCallback_26(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_26(status); } - static void OnSuccessCallback_26(void * context) - { - (static_cast(context))->OnSuccessResponse_26(); - } - - - + static void OnSuccessCallback_26(void * context) { (static_cast(context))->OnSuccessResponse_26(); } static void OnFailureCallback_27(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_27(status); } - static void OnSuccessCallback_27(void * context, const chip::app::DataModel::Nullable & currentPositionTiltPercent100ths) + static void OnSuccessCallback_27(void * context, + const chip::app::DataModel::Nullable & currentPositionTiltPercent100ths) { (static_cast(context))->OnSuccessResponse_27(currentPositionTiltPercent100ths); } - - - static void OnFailureCallback_28(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_28(status); } - static void OnSuccessCallback_28(void * context, uint16_t installedOpenLimitLift) + static void OnSuccessCallback_28(void * context, uint16_t installedOpenLimitLift) { (static_cast(context))->OnSuccessResponse_28(installedOpenLimitLift); } - - - static void OnFailureCallback_29(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_29(status); } - static void OnSuccessCallback_29(void * context) - { - (static_cast(context))->OnSuccessResponse_29(); - } - - - + static void OnSuccessCallback_29(void * context) { (static_cast(context))->OnSuccessResponse_29(); } static void OnFailureCallback_30(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_30(status); } - static void OnSuccessCallback_30(void * context, uint16_t installedOpenLimitLift) + static void OnSuccessCallback_30(void * context, uint16_t installedOpenLimitLift) { (static_cast(context))->OnSuccessResponse_30(installedOpenLimitLift); } - - - static void OnFailureCallback_31(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_31(status); } - static void OnSuccessCallback_31(void * context, uint16_t installedClosedLimitLift) + static void OnSuccessCallback_31(void * context, uint16_t installedClosedLimitLift) { (static_cast(context))->OnSuccessResponse_31(installedClosedLimitLift); } - - - static void OnFailureCallback_32(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_32(status); } - static void OnSuccessCallback_32(void * context) - { - (static_cast(context))->OnSuccessResponse_32(); - } - - - + static void OnSuccessCallback_32(void * context) { (static_cast(context))->OnSuccessResponse_32(); } static void OnFailureCallback_33(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_33(status); } - static void OnSuccessCallback_33(void * context, uint16_t installedClosedLimitLift) + static void OnSuccessCallback_33(void * context, uint16_t installedClosedLimitLift) { (static_cast(context))->OnSuccessResponse_33(installedClosedLimitLift); } - - - static void OnFailureCallback_34(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_34(status); } - static void OnSuccessCallback_34(void * context, uint16_t installedOpenLimitTilt) + static void OnSuccessCallback_34(void * context, uint16_t installedOpenLimitTilt) { (static_cast(context))->OnSuccessResponse_34(installedOpenLimitTilt); } - - - static void OnFailureCallback_35(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_35(status); } - static void OnSuccessCallback_35(void * context) - { - (static_cast(context))->OnSuccessResponse_35(); - } - - - + static void OnSuccessCallback_35(void * context) { (static_cast(context))->OnSuccessResponse_35(); } static void OnFailureCallback_36(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_36(status); } - static void OnSuccessCallback_36(void * context, uint16_t installedOpenLimitTilt) + static void OnSuccessCallback_36(void * context, uint16_t installedOpenLimitTilt) { (static_cast(context))->OnSuccessResponse_36(installedOpenLimitTilt); } - - - static void OnFailureCallback_37(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_37(status); } - static void OnSuccessCallback_37(void * context, uint16_t installedClosedLimitTilt) + static void OnSuccessCallback_37(void * context, uint16_t installedClosedLimitTilt) { (static_cast(context))->OnSuccessResponse_37(installedClosedLimitTilt); } - - - static void OnFailureCallback_38(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_38(status); } - static void OnSuccessCallback_38(void * context) - { - (static_cast(context))->OnSuccessResponse_38(); - } - - - + static void OnSuccessCallback_38(void * context) { (static_cast(context))->OnSuccessResponse_38(); } static void OnFailureCallback_39(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_39(status); } - static void OnSuccessCallback_39(void * context, uint16_t installedClosedLimitTilt) + static void OnSuccessCallback_39(void * context, uint16_t installedClosedLimitTilt) { (static_cast(context))->OnSuccessResponse_39(installedClosedLimitTilt); } - - - static void OnFailureCallback_40(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_40(status); } - static void OnSuccessCallback_40(void * context, uint16_t safetyStatus) + static void OnSuccessCallback_40(void * context, uint16_t safetyStatus) { (static_cast(context))->OnSuccessResponse_40(safetyStatus); } - - - static void OnFailureCallback_41(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_41(status); } - static void OnSuccessCallback_41(void * context) - { - (static_cast(context))->OnSuccessResponse_41(); - } - - - + static void OnSuccessCallback_41(void * context) { (static_cast(context))->OnSuccessResponse_41(); } static void OnFailureCallback_42(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_42(status); } - static void OnSuccessCallback_42(void * context, uint16_t safetyStatus) + static void OnSuccessCallback_42(void * context, uint16_t safetyStatus) { (static_cast(context))->OnSuccessResponse_42(safetyStatus); } - - - static void OnFailureCallback_43(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_43(status); } - static void OnSuccessCallback_43(void * context, const chip::app::DataModel::Nullable & currentPositionLift) + static void OnSuccessCallback_43(void * context, const chip::app::DataModel::Nullable & currentPositionLift) { (static_cast(context))->OnSuccessResponse_43(currentPositionLift); } - - - static void OnFailureCallback_44(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_44(status); } - static void OnSuccessCallback_44(void * context) - { - (static_cast(context))->OnSuccessResponse_44(); - } - - - + static void OnSuccessCallback_44(void * context) { (static_cast(context))->OnSuccessResponse_44(); } static void OnFailureCallback_45(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_45(status); } - static void OnSuccessCallback_45(void * context, const chip::app::DataModel::Nullable & currentPositionLift) + static void OnSuccessCallback_45(void * context, const chip::app::DataModel::Nullable & currentPositionLift) { (static_cast(context))->OnSuccessResponse_45(currentPositionLift); } - - - static void OnFailureCallback_46(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_46(status); } - static void OnSuccessCallback_46(void * context, const chip::app::DataModel::Nullable & currentPositionTilt) + static void OnSuccessCallback_46(void * context, const chip::app::DataModel::Nullable & currentPositionTilt) { (static_cast(context))->OnSuccessResponse_46(currentPositionTilt); } - - - static void OnFailureCallback_47(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_47(status); } - static void OnSuccessCallback_47(void * context) - { - (static_cast(context))->OnSuccessResponse_47(); - } - - - + static void OnSuccessCallback_47(void * context) { (static_cast(context))->OnSuccessResponse_47(); } static void OnFailureCallback_48(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_48(status); } - static void OnSuccessCallback_48(void * context, const chip::app::DataModel::Nullable & currentPositionTilt) + static void OnSuccessCallback_48(void * context, const chip::app::DataModel::Nullable & currentPositionTilt) { (static_cast(context))->OnSuccessResponse_48(currentPositionTilt); } - - - static void OnFailureCallback_49(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_49(status); } - static void OnSuccessCallback_49(void * context, const chip::app::DataModel::Nullable & currentPositionLiftPercentage) + static void OnSuccessCallback_49(void * context, + const chip::app::DataModel::Nullable & currentPositionLiftPercentage) { (static_cast(context))->OnSuccessResponse_49(currentPositionLiftPercentage); } - - - static void OnFailureCallback_50(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_50(status); } - static void OnSuccessCallback_50(void * context) - { - (static_cast(context))->OnSuccessResponse_50(); - } - - - + static void OnSuccessCallback_50(void * context) { (static_cast(context))->OnSuccessResponse_50(); } static void OnFailureCallback_51(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_51(status); } - static void OnSuccessCallback_51(void * context, const chip::app::DataModel::Nullable & currentPositionLiftPercentage) + static void OnSuccessCallback_51(void * context, + const chip::app::DataModel::Nullable & currentPositionLiftPercentage) { (static_cast(context))->OnSuccessResponse_51(currentPositionLiftPercentage); } - - - static void OnFailureCallback_52(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_52(status); } - static void OnSuccessCallback_52(void * context, const chip::app::DataModel::Nullable & currentPositionTiltPercentage) + static void OnSuccessCallback_52(void * context, + const chip::app::DataModel::Nullable & currentPositionTiltPercentage) { (static_cast(context))->OnSuccessResponse_52(currentPositionTiltPercentage); } - - - static void OnFailureCallback_53(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_53(status); } - static void OnSuccessCallback_53(void * context) - { - (static_cast(context))->OnSuccessResponse_53(); - } - - - + static void OnSuccessCallback_53(void * context) { (static_cast(context))->OnSuccessResponse_53(); } static void OnFailureCallback_54(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_54(status); } - static void OnSuccessCallback_54(void * context, const chip::app::DataModel::Nullable & currentPositionTiltPercentage) + static void OnSuccessCallback_54(void * context, + const chip::app::DataModel::Nullable & currentPositionTiltPercentage) { (static_cast(context))->OnSuccessResponse_54(currentPositionTiltPercentage); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR Test2ReadTheRoMandatoryAttributeDefaultType_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint8_t type) + void OnSuccessResponse_1(uint8_t type) { - VerifyOrReturn(CheckConstraintType("type", "", "enum8"));VerifyOrReturn(CheckConstraintMinValue("type", type, 0));VerifyOrReturn(CheckConstraintMaxValue("type", type, 9)); + VerifyOrReturn(CheckConstraintType("type", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("type", type, 0)); + VerifyOrReturn(CheckConstraintMaxValue("type", type, 9)); NextTest(); - } - - - + } - CHIP_ERROR Test3aWriteAValueIntoTheRoMandatoryAttributeType_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -48790,79 +37318,63 @@ class Test_TC_WNCV_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t typeArgument; - typeArgument = 250; - - ReturnErrorOnFailure(cluster.WriteAttribute(typeArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + typeArgument = 250; + + ReturnErrorOnFailure(cluster.WriteAttribute( + typeArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_2() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_2() { ThrowSuccessResponse(); } - - - CHIP_ERROR Test3bReadsBackTheRoMandatoryAttributeType_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( uint8_t type) + void OnSuccessResponse_3(uint8_t type) { - VerifyOrReturn(CheckConstraintType("type", "", "enum8")); VerifyOrReturn(CheckConstraintNotValue("type", type, 250)); + VerifyOrReturn(CheckConstraintType("type", "", "enum8")); + VerifyOrReturn(CheckConstraintNotValue("type", type, 250)); NextTest(); - } - - - + } - CHIP_ERROR Test2ReadTheRoMandatoryAttributeDefaultConfigStatus_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( uint8_t configStatus) + void OnSuccessResponse_4(uint8_t configStatus) { - VerifyOrReturn(CheckConstraintType("configStatus", "", "map8"));VerifyOrReturn(CheckConstraintMinValue("configStatus", configStatus, 0));VerifyOrReturn(CheckConstraintMaxValue("configStatus", configStatus, 63)); + VerifyOrReturn(CheckConstraintType("configStatus", "", "map8")); + VerifyOrReturn(CheckConstraintMinValue("configStatus", configStatus, 0)); + VerifyOrReturn(CheckConstraintMaxValue("configStatus", configStatus, 63)); NextTest(); - } - - - + } - CHIP_ERROR Test3aWriteAValueIntoTheRoMandatoryAttributeConfigStatus_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -48870,79 +37382,63 @@ class Test_TC_WNCV_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t configStatusArgument; - configStatusArgument = 128; - - ReturnErrorOnFailure(cluster.WriteAttribute(configStatusArgument, this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; + configStatusArgument = 128; + + ReturnErrorOnFailure(cluster.WriteAttribute( + configStatusArgument, this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; } void OnFailureResponse_5(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_5() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_5() { ThrowSuccessResponse(); } - - - CHIP_ERROR Test3bReadsBackTheRoMandatoryAttributeConfigStatus_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( uint8_t configStatus) + void OnSuccessResponse_6(uint8_t configStatus) { - VerifyOrReturn(CheckConstraintType("configStatus", "", "map8")); VerifyOrReturn(CheckConstraintNotValue("configStatus", configStatus, 128)); + VerifyOrReturn(CheckConstraintType("configStatus", "", "map8")); + VerifyOrReturn(CheckConstraintNotValue("configStatus", configStatus, 128)); NextTest(); - } - - - + } - CHIP_ERROR Test2ReadTheRoMandatoryAttributeDefaultOperationalStatus_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_7, OnFailureCallback_7)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7( uint8_t operationalStatus) + void OnSuccessResponse_7(uint8_t operationalStatus) { - VerifyOrReturn(CheckConstraintType("operationalStatus", "", "map8"));VerifyOrReturn(CheckConstraintMinValue("operationalStatus", operationalStatus, 0));VerifyOrReturn(CheckConstraintMaxValue("operationalStatus", operationalStatus, 63)); + VerifyOrReturn(CheckConstraintType("operationalStatus", "", "map8")); + VerifyOrReturn(CheckConstraintMinValue("operationalStatus", operationalStatus, 0)); + VerifyOrReturn(CheckConstraintMaxValue("operationalStatus", operationalStatus, 63)); NextTest(); - } - - - + } - CHIP_ERROR Test3aWriteAValueIntoTheRoMandatoryAttributeOperationalStatus_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -48950,79 +37446,63 @@ class Test_TC_WNCV_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t operationalStatusArgument; - operationalStatusArgument = 128; - - ReturnErrorOnFailure(cluster.WriteAttribute(operationalStatusArgument, this, OnSuccessCallback_8, OnFailureCallback_8)); - return CHIP_NO_ERROR; + operationalStatusArgument = 128; + + ReturnErrorOnFailure(cluster.WriteAttribute( + operationalStatusArgument, this, OnSuccessCallback_8, OnFailureCallback_8)); + return CHIP_NO_ERROR; } void OnFailureResponse_8(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_8() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_8() { ThrowSuccessResponse(); } - - - CHIP_ERROR Test3bReadsBackTheRoMandatoryAttributeOperationalStatus_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_9, OnFailureCallback_9)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_9, OnFailureCallback_9)); + return CHIP_NO_ERROR; } - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_9( uint8_t operationalStatus) + void OnSuccessResponse_9(uint8_t operationalStatus) { - VerifyOrReturn(CheckConstraintType("operationalStatus", "", "map8")); VerifyOrReturn(CheckConstraintNotValue("operationalStatus", operationalStatus, 128)); + VerifyOrReturn(CheckConstraintType("operationalStatus", "", "map8")); + VerifyOrReturn(CheckConstraintNotValue("operationalStatus", operationalStatus, 128)); NextTest(); - } - - - + } - CHIP_ERROR Test2ReadTheRoMandatoryAttributeDefaultEndProductType_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_10, OnFailureCallback_10)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_10, OnFailureCallback_10)); + return CHIP_NO_ERROR; } - void OnFailureResponse_10(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_10( uint8_t endProductType) + void OnSuccessResponse_10(uint8_t endProductType) { - VerifyOrReturn(CheckConstraintType("endProductType", "", "enum8"));VerifyOrReturn(CheckConstraintMinValue("endProductType", endProductType, 0));VerifyOrReturn(CheckConstraintMaxValue("endProductType", endProductType, 23)); + VerifyOrReturn(CheckConstraintType("endProductType", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("endProductType", endProductType, 0)); + VerifyOrReturn(CheckConstraintMaxValue("endProductType", endProductType, 23)); NextTest(); - } - - - + } - CHIP_ERROR Test3aWriteAValueIntoTheRoMandatoryAttributeEndProductType_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -49030,79 +37510,63 @@ class Test_TC_WNCV_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t endProductTypeArgument; - endProductTypeArgument = 250; - - ReturnErrorOnFailure(cluster.WriteAttribute(endProductTypeArgument, this, OnSuccessCallback_11, OnFailureCallback_11)); - return CHIP_NO_ERROR; + endProductTypeArgument = 250; + + ReturnErrorOnFailure(cluster.WriteAttribute( + endProductTypeArgument, this, OnSuccessCallback_11, OnFailureCallback_11)); + return CHIP_NO_ERROR; } void OnFailureResponse_11(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_11() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_11() { ThrowSuccessResponse(); } - - - CHIP_ERROR Test3bReadsBackTheRoMandatoryAttributeEndProductType_12() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_12, OnFailureCallback_12)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_12, OnFailureCallback_12)); + return CHIP_NO_ERROR; } - void OnFailureResponse_12(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_12( uint8_t endProductType) + void OnSuccessResponse_12(uint8_t endProductType) { - VerifyOrReturn(CheckConstraintType("endProductType", "", "enum8")); VerifyOrReturn(CheckConstraintNotValue("endProductType", endProductType, 250)); + VerifyOrReturn(CheckConstraintType("endProductType", "", "enum8")); + VerifyOrReturn(CheckConstraintNotValue("endProductType", endProductType, 250)); NextTest(); - } - - - + } - CHIP_ERROR Test2ReadTheRwMandatoryAttributeDefaultMode_13() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_13, OnFailureCallback_13)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_13, OnFailureCallback_13)); + return CHIP_NO_ERROR; } - void OnFailureResponse_13(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_13(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_13( uint8_t mode) + void OnSuccessResponse_13(uint8_t mode) { - VerifyOrReturn(CheckConstraintType("mode", "", "map8"));VerifyOrReturn(CheckConstraintMinValue("mode", mode, 0));VerifyOrReturn(CheckConstraintMaxValue("mode", mode, 15)); + VerifyOrReturn(CheckConstraintType("mode", "", "map8")); + VerifyOrReturn(CheckConstraintMinValue("mode", mode, 0)); + VerifyOrReturn(CheckConstraintMaxValue("mode", mode, 15)); NextTest(); - } - - - + } - CHIP_ERROR Test3aWriteAValueIntoTheRwMandatoryAttributeMode_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -49110,79 +37574,61 @@ class Test_TC_WNCV_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t modeArgument; - modeArgument = 8; - - ReturnErrorOnFailure(cluster.WriteAttribute(modeArgument, this, OnSuccessCallback_14, OnFailureCallback_14)); - return CHIP_NO_ERROR; - } + modeArgument = 8; - void OnFailureResponse_14(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_14() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + modeArgument, this, OnSuccessCallback_14, OnFailureCallback_14)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_14() { NextTest(); } - CHIP_ERROR Test3bReadsBackTheRwMandatoryAttributeMode_15() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_15, OnFailureCallback_15)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_15, OnFailureCallback_15)); + return CHIP_NO_ERROR; } - void OnFailureResponse_15(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_15(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_15( uint8_t mode) + void OnSuccessResponse_15(uint8_t mode) { - VerifyOrReturn(CheckValue("mode", mode,8 - )); + VerifyOrReturn(CheckValue("mode", mode, 8)); NextTest(); - } - - - + } - CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultTargetPositionLiftPercent100ths_16() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_16, OnFailureCallback_16)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_16, OnFailureCallback_16)); + return CHIP_NO_ERROR; } - void OnFailureResponse_16(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_16(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_16( const chip::app::DataModel::Nullable & targetPositionLiftPercent100ths) + void OnSuccessResponse_16(const chip::app::DataModel::Nullable & targetPositionLiftPercent100ths) { - VerifyOrReturn(CheckConstraintType("targetPositionLiftPercent100ths", "", "Percent100ths"));VerifyOrReturn(CheckConstraintMinValue("targetPositionLiftPercent100ths", targetPositionLiftPercent100ths, 0U));VerifyOrReturn(CheckConstraintMaxValue("targetPositionLiftPercent100ths", targetPositionLiftPercent100ths, 10000U)); + VerifyOrReturn(CheckConstraintType("targetPositionLiftPercent100ths", "", "Percent100ths")); + VerifyOrReturn( + CheckConstraintMinValue("targetPositionLiftPercent100ths", targetPositionLiftPercent100ths, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("targetPositionLiftPercent100ths", + targetPositionLiftPercent100ths, 10000U)); NextTest(); - } - - - + } - CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeTargetPositionLiftPercent100ths_17() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -49190,80 +37636,69 @@ class Test_TC_WNCV_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable targetPositionLiftPercent100thsArgument; - targetPositionLiftPercent100thsArgument.SetNonNull(); - targetPositionLiftPercent100thsArgument.Value() = 20000U; - - ReturnErrorOnFailure(cluster.WriteAttribute(targetPositionLiftPercent100thsArgument, this, OnSuccessCallback_17, OnFailureCallback_17)); - return CHIP_NO_ERROR; + targetPositionLiftPercent100thsArgument.SetNonNull(); + targetPositionLiftPercent100thsArgument.Value() = 20000U; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + targetPositionLiftPercent100thsArgument, this, OnSuccessCallback_17, OnFailureCallback_17)); + return CHIP_NO_ERROR; } void OnFailureResponse_17(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_17() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_17() { ThrowSuccessResponse(); } - - - CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeTargetPositionLiftPercent100ths_18() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_18, OnFailureCallback_18)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_18, OnFailureCallback_18)); + return CHIP_NO_ERROR; } - void OnFailureResponse_18(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_18(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_18( const chip::app::DataModel::Nullable & targetPositionLiftPercent100ths) + void OnSuccessResponse_18(const chip::app::DataModel::Nullable & targetPositionLiftPercent100ths) { - VerifyOrReturn(CheckConstraintType("targetPositionLiftPercent100ths", "", "Percent100ths")); VerifyOrReturn(CheckConstraintNotValue("targetPositionLiftPercent100ths", targetPositionLiftPercent100ths, 20000U)); + VerifyOrReturn(CheckConstraintType("targetPositionLiftPercent100ths", "", "Percent100ths")); + VerifyOrReturn(CheckConstraintNotValue("targetPositionLiftPercent100ths", targetPositionLiftPercent100ths, 20000U)); NextTest(); - } - - - + } - CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultTargetPositionTiltPercent100ths_19() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_19, OnFailureCallback_19)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_19, OnFailureCallback_19)); + return CHIP_NO_ERROR; } - void OnFailureResponse_19(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_19(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_19( const chip::app::DataModel::Nullable & targetPositionTiltPercent100ths) + void OnSuccessResponse_19(const chip::app::DataModel::Nullable & targetPositionTiltPercent100ths) { - VerifyOrReturn(CheckConstraintType("targetPositionTiltPercent100ths", "", "Percent100ths"));VerifyOrReturn(CheckConstraintMinValue("targetPositionTiltPercent100ths", targetPositionTiltPercent100ths, 0U));VerifyOrReturn(CheckConstraintMaxValue("targetPositionTiltPercent100ths", targetPositionTiltPercent100ths, 10000U)); + VerifyOrReturn(CheckConstraintType("targetPositionTiltPercent100ths", "", "Percent100ths")); + VerifyOrReturn( + CheckConstraintMinValue("targetPositionTiltPercent100ths", targetPositionTiltPercent100ths, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("targetPositionTiltPercent100ths", + targetPositionTiltPercent100ths, 10000U)); NextTest(); - } - - - + } - CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeTargetPositionTiltPercent100ths_20() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -49271,80 +37706,69 @@ class Test_TC_WNCV_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable targetPositionTiltPercent100thsArgument; - targetPositionTiltPercent100thsArgument.SetNonNull(); - targetPositionTiltPercent100thsArgument.Value() = 20000U; - - ReturnErrorOnFailure(cluster.WriteAttribute(targetPositionTiltPercent100thsArgument, this, OnSuccessCallback_20, OnFailureCallback_20)); - return CHIP_NO_ERROR; + targetPositionTiltPercent100thsArgument.SetNonNull(); + targetPositionTiltPercent100thsArgument.Value() = 20000U; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + targetPositionTiltPercent100thsArgument, this, OnSuccessCallback_20, OnFailureCallback_20)); + return CHIP_NO_ERROR; } void OnFailureResponse_20(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_20() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_20() { ThrowSuccessResponse(); } - - - CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeTargetPositionTiltPercent100ths_21() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_21, OnFailureCallback_21)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_21, OnFailureCallback_21)); + return CHIP_NO_ERROR; } - void OnFailureResponse_21(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_21(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_21( const chip::app::DataModel::Nullable & targetPositionTiltPercent100ths) + void OnSuccessResponse_21(const chip::app::DataModel::Nullable & targetPositionTiltPercent100ths) { - VerifyOrReturn(CheckConstraintType("targetPositionTiltPercent100ths", "", "Percent100ths")); VerifyOrReturn(CheckConstraintNotValue("targetPositionTiltPercent100ths", targetPositionTiltPercent100ths, 20000U)); + VerifyOrReturn(CheckConstraintType("targetPositionTiltPercent100ths", "", "Percent100ths")); + VerifyOrReturn(CheckConstraintNotValue("targetPositionTiltPercent100ths", targetPositionTiltPercent100ths, 20000U)); NextTest(); - } - - - + } - CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultCurrentPositionLiftPercent100ths_22() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_22, OnFailureCallback_22)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_22, OnFailureCallback_22)); + return CHIP_NO_ERROR; } - void OnFailureResponse_22(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_22(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_22( const chip::app::DataModel::Nullable & currentPositionLiftPercent100ths) + void OnSuccessResponse_22(const chip::app::DataModel::Nullable & currentPositionLiftPercent100ths) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "", "Percent100ths"));VerifyOrReturn(CheckConstraintMinValue("currentPositionLiftPercent100ths", currentPositionLiftPercent100ths, 0U));VerifyOrReturn(CheckConstraintMaxValue("currentPositionLiftPercent100ths", currentPositionLiftPercent100ths, 10000U)); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "", "Percent100ths")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionLiftPercent100ths", currentPositionLiftPercent100ths, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentPositionLiftPercent100ths", + currentPositionLiftPercent100ths, 10000U)); NextTest(); - } - - - + } - CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeCurrentPositionLiftPercent100ths_23() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -49352,80 +37776,69 @@ class Test_TC_WNCV_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable currentPositionLiftPercent100thsArgument; - currentPositionLiftPercent100thsArgument.SetNonNull(); - currentPositionLiftPercent100thsArgument.Value() = 20000U; - - ReturnErrorOnFailure(cluster.WriteAttribute(currentPositionLiftPercent100thsArgument, this, OnSuccessCallback_23, OnFailureCallback_23)); - return CHIP_NO_ERROR; + currentPositionLiftPercent100thsArgument.SetNonNull(); + currentPositionLiftPercent100thsArgument.Value() = 20000U; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + currentPositionLiftPercent100thsArgument, this, OnSuccessCallback_23, OnFailureCallback_23)); + return CHIP_NO_ERROR; } void OnFailureResponse_23(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_23() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_23() { ThrowSuccessResponse(); } - - - CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeCurrentPositionLiftPercent100ths_24() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_24, OnFailureCallback_24)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_24, OnFailureCallback_24)); + return CHIP_NO_ERROR; } - void OnFailureResponse_24(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_24(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_24( const chip::app::DataModel::Nullable & currentPositionLiftPercent100ths) + void OnSuccessResponse_24(const chip::app::DataModel::Nullable & currentPositionLiftPercent100ths) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "", "Percent100ths")); VerifyOrReturn(CheckConstraintNotValue("currentPositionLiftPercent100ths", currentPositionLiftPercent100ths, 20000U)); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "", "Percent100ths")); + VerifyOrReturn(CheckConstraintNotValue("currentPositionLiftPercent100ths", currentPositionLiftPercent100ths, 20000U)); NextTest(); - } - - - + } - CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultCurrentPositionTiltPercent100ths_25() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_25, OnFailureCallback_25)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_25, OnFailureCallback_25)); + return CHIP_NO_ERROR; } - void OnFailureResponse_25(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_25(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_25( const chip::app::DataModel::Nullable & currentPositionTiltPercent100ths) + void OnSuccessResponse_25(const chip::app::DataModel::Nullable & currentPositionTiltPercent100ths) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "", "Percent100ths"));VerifyOrReturn(CheckConstraintMinValue("currentPositionTiltPercent100ths", currentPositionTiltPercent100ths, 0U));VerifyOrReturn(CheckConstraintMaxValue("currentPositionTiltPercent100ths", currentPositionTiltPercent100ths, 10000U)); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "", "Percent100ths")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionTiltPercent100ths", currentPositionTiltPercent100ths, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentPositionTiltPercent100ths", + currentPositionTiltPercent100ths, 10000U)); NextTest(); - } - - - + } - CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeCurrentPositionTiltPercent100ths_26() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -49433,80 +37846,67 @@ class Test_TC_WNCV_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable currentPositionTiltPercent100thsArgument; - currentPositionTiltPercent100thsArgument.SetNonNull(); - currentPositionTiltPercent100thsArgument.Value() = 20000U; - - ReturnErrorOnFailure(cluster.WriteAttribute(currentPositionTiltPercent100thsArgument, this, OnSuccessCallback_26, OnFailureCallback_26)); - return CHIP_NO_ERROR; + currentPositionTiltPercent100thsArgument.SetNonNull(); + currentPositionTiltPercent100thsArgument.Value() = 20000U; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + currentPositionTiltPercent100thsArgument, this, OnSuccessCallback_26, OnFailureCallback_26)); + return CHIP_NO_ERROR; } void OnFailureResponse_26(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_26() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_26() { ThrowSuccessResponse(); } - - - CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeCurrentPositionTiltPercent100ths_27() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_27, OnFailureCallback_27)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_27, OnFailureCallback_27)); + return CHIP_NO_ERROR; } - void OnFailureResponse_27(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_27(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_27( const chip::app::DataModel::Nullable & currentPositionTiltPercent100ths) + void OnSuccessResponse_27(const chip::app::DataModel::Nullable & currentPositionTiltPercent100ths) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "", "Percent100ths")); VerifyOrReturn(CheckConstraintNotValue("currentPositionTiltPercent100ths", currentPositionTiltPercent100ths, 20000U)); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "", "Percent100ths")); + VerifyOrReturn(CheckConstraintNotValue("currentPositionTiltPercent100ths", currentPositionTiltPercent100ths, 20000U)); NextTest(); - } - - - + } - CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultInstalledOpenLimitLift_28() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_28, OnFailureCallback_28)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_28, OnFailureCallback_28)); + return CHIP_NO_ERROR; } - void OnFailureResponse_28(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_28(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_28( uint16_t installedOpenLimitLift) + void OnSuccessResponse_28(uint16_t installedOpenLimitLift) { - VerifyOrReturn(CheckConstraintType("installedOpenLimitLift", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("installedOpenLimitLift", installedOpenLimitLift, 0U));VerifyOrReturn(CheckConstraintMaxValue("installedOpenLimitLift", installedOpenLimitLift, 65535U)); + VerifyOrReturn(CheckConstraintType("installedOpenLimitLift", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("installedOpenLimitLift", installedOpenLimitLift, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("installedOpenLimitLift", installedOpenLimitLift, 65535U)); NextTest(); - } - - - + } - CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeInstalledOpenLimitLift_29() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -49514,78 +37914,66 @@ class Test_TC_WNCV_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t installedOpenLimitLiftArgument; - installedOpenLimitLiftArgument = 255U; - - ReturnErrorOnFailure(cluster.WriteAttribute(installedOpenLimitLiftArgument, this, OnSuccessCallback_29, OnFailureCallback_29)); - return CHIP_NO_ERROR; + installedOpenLimitLiftArgument = 255U; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + installedOpenLimitLiftArgument, this, OnSuccessCallback_29, OnFailureCallback_29)); + return CHIP_NO_ERROR; } void OnFailureResponse_29(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_29() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_29() { ThrowSuccessResponse(); } - - - CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeInstalledOpenLimitLift_30() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_30, OnFailureCallback_30)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_30, OnFailureCallback_30)); + return CHIP_NO_ERROR; } - void OnFailureResponse_30(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_30(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_30( uint16_t installedOpenLimitLift) + void OnSuccessResponse_30(uint16_t installedOpenLimitLift) { - VerifyOrReturn(CheckConstraintType("installedOpenLimitLift", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("installedOpenLimitLift", installedOpenLimitLift, 0U));VerifyOrReturn(CheckConstraintMaxValue("installedOpenLimitLift", installedOpenLimitLift, 65535U)); + VerifyOrReturn(CheckConstraintType("installedOpenLimitLift", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("installedOpenLimitLift", installedOpenLimitLift, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("installedOpenLimitLift", installedOpenLimitLift, 65535U)); NextTest(); - } - - - + } - CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultInstalledClosedLimitLift_31() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_31, OnFailureCallback_31)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_31, OnFailureCallback_31)); + return CHIP_NO_ERROR; } - void OnFailureResponse_31(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_31(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_31( uint16_t installedClosedLimitLift) + void OnSuccessResponse_31(uint16_t installedClosedLimitLift) { - VerifyOrReturn(CheckConstraintType("installedClosedLimitLift", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("installedClosedLimitLift", installedClosedLimitLift, 0U));VerifyOrReturn(CheckConstraintMaxValue("installedClosedLimitLift", installedClosedLimitLift, 65535U)); + VerifyOrReturn(CheckConstraintType("installedClosedLimitLift", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("installedClosedLimitLift", installedClosedLimitLift, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("installedClosedLimitLift", installedClosedLimitLift, 65535U)); NextTest(); - } - - - + } - CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeInstalledClosedLimitLift_32() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -49593,78 +37981,66 @@ class Test_TC_WNCV_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t installedClosedLimitLiftArgument; - installedClosedLimitLiftArgument = 255U; - - ReturnErrorOnFailure(cluster.WriteAttribute(installedClosedLimitLiftArgument, this, OnSuccessCallback_32, OnFailureCallback_32)); - return CHIP_NO_ERROR; + installedClosedLimitLiftArgument = 255U; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + installedClosedLimitLiftArgument, this, OnSuccessCallback_32, OnFailureCallback_32)); + return CHIP_NO_ERROR; } void OnFailureResponse_32(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_32() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_32() { ThrowSuccessResponse(); } - - - CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeInstalledClosedLimitLift_33() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_33, OnFailureCallback_33)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_33, OnFailureCallback_33)); + return CHIP_NO_ERROR; } - void OnFailureResponse_33(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_33(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_33( uint16_t installedClosedLimitLift) + void OnSuccessResponse_33(uint16_t installedClosedLimitLift) { - VerifyOrReturn(CheckConstraintType("installedClosedLimitLift", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("installedClosedLimitLift", installedClosedLimitLift, 0U));VerifyOrReturn(CheckConstraintMaxValue("installedClosedLimitLift", installedClosedLimitLift, 65535U)); + VerifyOrReturn(CheckConstraintType("installedClosedLimitLift", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("installedClosedLimitLift", installedClosedLimitLift, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("installedClosedLimitLift", installedClosedLimitLift, 65535U)); NextTest(); - } - - - + } - CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultInstalledOpenLimitTilt_34() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_34, OnFailureCallback_34)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_34, OnFailureCallback_34)); + return CHIP_NO_ERROR; } - void OnFailureResponse_34(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_34(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_34( uint16_t installedOpenLimitTilt) + void OnSuccessResponse_34(uint16_t installedOpenLimitTilt) { - VerifyOrReturn(CheckConstraintType("installedOpenLimitTilt", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("installedOpenLimitTilt", installedOpenLimitTilt, 0U));VerifyOrReturn(CheckConstraintMaxValue("installedOpenLimitTilt", installedOpenLimitTilt, 65535U)); + VerifyOrReturn(CheckConstraintType("installedOpenLimitTilt", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("installedOpenLimitTilt", installedOpenLimitTilt, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("installedOpenLimitTilt", installedOpenLimitTilt, 65535U)); NextTest(); - } - - - + } - CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeInstalledOpenLimitTilt_35() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -49672,78 +38048,66 @@ class Test_TC_WNCV_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t installedOpenLimitTiltArgument; - installedOpenLimitTiltArgument = 255U; - - ReturnErrorOnFailure(cluster.WriteAttribute(installedOpenLimitTiltArgument, this, OnSuccessCallback_35, OnFailureCallback_35)); - return CHIP_NO_ERROR; + installedOpenLimitTiltArgument = 255U; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + installedOpenLimitTiltArgument, this, OnSuccessCallback_35, OnFailureCallback_35)); + return CHIP_NO_ERROR; } void OnFailureResponse_35(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_35() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_35() { ThrowSuccessResponse(); } - - - CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeInstalledOpenLimitTilt_36() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_36, OnFailureCallback_36)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_36, OnFailureCallback_36)); + return CHIP_NO_ERROR; } - void OnFailureResponse_36(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_36(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_36( uint16_t installedOpenLimitTilt) + void OnSuccessResponse_36(uint16_t installedOpenLimitTilt) { - VerifyOrReturn(CheckConstraintType("installedOpenLimitTilt", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("installedOpenLimitTilt", installedOpenLimitTilt, 0U));VerifyOrReturn(CheckConstraintMaxValue("installedOpenLimitTilt", installedOpenLimitTilt, 65535U)); + VerifyOrReturn(CheckConstraintType("installedOpenLimitTilt", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("installedOpenLimitTilt", installedOpenLimitTilt, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("installedOpenLimitTilt", installedOpenLimitTilt, 65535U)); NextTest(); - } - - - + } - CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultInstalledClosedLimitTilt_37() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_37, OnFailureCallback_37)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_37, OnFailureCallback_37)); + return CHIP_NO_ERROR; } - void OnFailureResponse_37(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_37(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_37( uint16_t installedClosedLimitTilt) + void OnSuccessResponse_37(uint16_t installedClosedLimitTilt) { - VerifyOrReturn(CheckConstraintType("installedClosedLimitTilt", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("installedClosedLimitTilt", installedClosedLimitTilt, 0U));VerifyOrReturn(CheckConstraintMaxValue("installedClosedLimitTilt", installedClosedLimitTilt, 65535U)); + VerifyOrReturn(CheckConstraintType("installedClosedLimitTilt", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("installedClosedLimitTilt", installedClosedLimitTilt, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("installedClosedLimitTilt", installedClosedLimitTilt, 65535U)); NextTest(); - } - - - + } - CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeInstalledClosedLimitTilt_38() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -49751,78 +38115,65 @@ class Test_TC_WNCV_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t installedClosedLimitTiltArgument; - installedClosedLimitTiltArgument = 255U; - - ReturnErrorOnFailure(cluster.WriteAttribute(installedClosedLimitTiltArgument, this, OnSuccessCallback_38, OnFailureCallback_38)); - return CHIP_NO_ERROR; + installedClosedLimitTiltArgument = 255U; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + installedClosedLimitTiltArgument, this, OnSuccessCallback_38, OnFailureCallback_38)); + return CHIP_NO_ERROR; } void OnFailureResponse_38(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_38() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_38() { ThrowSuccessResponse(); } - - - CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeInstalledClosedLimitTilt_39() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_39, OnFailureCallback_39)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_39, OnFailureCallback_39)); + return CHIP_NO_ERROR; } - void OnFailureResponse_39(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_39(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_39( uint16_t installedClosedLimitTilt) + void OnSuccessResponse_39(uint16_t installedClosedLimitTilt) { - VerifyOrReturn(CheckConstraintType("installedClosedLimitTilt", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("installedClosedLimitTilt", installedClosedLimitTilt, 0U));VerifyOrReturn(CheckConstraintMaxValue("installedClosedLimitTilt", installedClosedLimitTilt, 65535U)); + VerifyOrReturn(CheckConstraintType("installedClosedLimitTilt", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("installedClosedLimitTilt", installedClosedLimitTilt, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("installedClosedLimitTilt", installedClosedLimitTilt, 65535U)); NextTest(); - } - - - + } - CHIP_ERROR Test4ReadTheRoMandatoryAttributeDefaultSafetyStatus_40() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_40, OnFailureCallback_40)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_40, OnFailureCallback_40)); + return CHIP_NO_ERROR; } - void OnFailureResponse_40(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_40(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_40( uint16_t safetyStatus) + void OnSuccessResponse_40(uint16_t safetyStatus) { - VerifyOrReturn(CheckConstraintType("safetyStatus", "", "map16"));VerifyOrReturn(CheckConstraintMinValue("safetyStatus", safetyStatus, 0U));VerifyOrReturn(CheckConstraintMaxValue("safetyStatus", safetyStatus, 2047U)); + VerifyOrReturn(CheckConstraintType("safetyStatus", "", "map16")); + VerifyOrReturn(CheckConstraintMinValue("safetyStatus", safetyStatus, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("safetyStatus", safetyStatus, 2047U)); NextTest(); - } - - - + } - CHIP_ERROR Test5aWriteAValueIntoTheRoMandatoryAttributeSafetyStatus_41() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -49830,79 +38181,63 @@ class Test_TC_WNCV_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t safetyStatusArgument; - safetyStatusArgument = 4096U; - - ReturnErrorOnFailure(cluster.WriteAttribute(safetyStatusArgument, this, OnSuccessCallback_41, OnFailureCallback_41)); - return CHIP_NO_ERROR; + safetyStatusArgument = 4096U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + safetyStatusArgument, this, OnSuccessCallback_41, OnFailureCallback_41)); + return CHIP_NO_ERROR; } void OnFailureResponse_41(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_41() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_41() { ThrowSuccessResponse(); } - - - CHIP_ERROR Test5bReadsBackTheRoMandatoryAttributeSafetyStatus_42() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_42, OnFailureCallback_42)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_42, OnFailureCallback_42)); + return CHIP_NO_ERROR; } - void OnFailureResponse_42(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_42(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_42( uint16_t safetyStatus) + void OnSuccessResponse_42(uint16_t safetyStatus) { - VerifyOrReturn(CheckConstraintType("safetyStatus", "", "map16")); VerifyOrReturn(CheckConstraintNotValue("safetyStatus", safetyStatus, 4096U)); + VerifyOrReturn(CheckConstraintType("safetyStatus", "", "map16")); + VerifyOrReturn(CheckConstraintNotValue("safetyStatus", safetyStatus, 4096U)); NextTest(); - } - - - + } - CHIP_ERROR Test4ReadTheRoOptionalAttributeDefaultCurrentPositionLift_43() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_43, OnFailureCallback_43)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_43, OnFailureCallback_43)); + return CHIP_NO_ERROR; } - void OnFailureResponse_43(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_43(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_43( const chip::app::DataModel::Nullable & currentPositionLift) + void OnSuccessResponse_43(const chip::app::DataModel::Nullable & currentPositionLift) { - VerifyOrReturn(CheckConstraintType("currentPositionLift", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("currentPositionLift", currentPositionLift, 0U));VerifyOrReturn(CheckConstraintMaxValue("currentPositionLift", currentPositionLift, 65535U)); + VerifyOrReturn(CheckConstraintType("currentPositionLift", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("currentPositionLift", currentPositionLift, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentPositionLift", currentPositionLift, 65535U)); NextTest(); - } - - - + } - CHIP_ERROR Test5aWriteAValueIntoTheRoOptionalAttributeCurrentPositionLift_44() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -49910,79 +38245,64 @@ class Test_TC_WNCV_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable currentPositionLiftArgument; - currentPositionLiftArgument.SetNonNull(); - currentPositionLiftArgument.Value() = 255U; - - ReturnErrorOnFailure(cluster.WriteAttribute(currentPositionLiftArgument, this, OnSuccessCallback_44, OnFailureCallback_44)); - return CHIP_NO_ERROR; + currentPositionLiftArgument.SetNonNull(); + currentPositionLiftArgument.Value() = 255U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + currentPositionLiftArgument, this, OnSuccessCallback_44, OnFailureCallback_44)); + return CHIP_NO_ERROR; } void OnFailureResponse_44(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_44() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_44() { ThrowSuccessResponse(); } - - - CHIP_ERROR Test5bReadsBackTheRoOptionalAttributeCurrentPositionLift_45() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_45, OnFailureCallback_45)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_45, OnFailureCallback_45)); + return CHIP_NO_ERROR; } - void OnFailureResponse_45(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_45(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_45( const chip::app::DataModel::Nullable & currentPositionLift) + void OnSuccessResponse_45(const chip::app::DataModel::Nullable & currentPositionLift) { - VerifyOrReturn(CheckConstraintType("currentPositionLift", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("currentPositionLift", currentPositionLift, 0U));VerifyOrReturn(CheckConstraintMaxValue("currentPositionLift", currentPositionLift, 65535U)); + VerifyOrReturn(CheckConstraintType("currentPositionLift", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("currentPositionLift", currentPositionLift, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentPositionLift", currentPositionLift, 65535U)); NextTest(); - } - - - + } - CHIP_ERROR Test4ReadTheRoOptionalAttributeDefaultCurrentPositionTilt_46() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_46, OnFailureCallback_46)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_46, OnFailureCallback_46)); + return CHIP_NO_ERROR; } - void OnFailureResponse_46(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_46(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_46( const chip::app::DataModel::Nullable & currentPositionTilt) + void OnSuccessResponse_46(const chip::app::DataModel::Nullable & currentPositionTilt) { - VerifyOrReturn(CheckConstraintType("currentPositionTilt", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("currentPositionTilt", currentPositionTilt, 0U));VerifyOrReturn(CheckConstraintMaxValue("currentPositionTilt", currentPositionTilt, 65535U)); + VerifyOrReturn(CheckConstraintType("currentPositionTilt", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("currentPositionTilt", currentPositionTilt, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentPositionTilt", currentPositionTilt, 65535U)); NextTest(); - } - - - + } - CHIP_ERROR Test5aWriteAValueIntoTheRoOptionalAttributeCurrentPositionTilt_47() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -49990,79 +38310,65 @@ class Test_TC_WNCV_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable currentPositionTiltArgument; - currentPositionTiltArgument.SetNonNull(); - currentPositionTiltArgument.Value() = 255U; - - ReturnErrorOnFailure(cluster.WriteAttribute(currentPositionTiltArgument, this, OnSuccessCallback_47, OnFailureCallback_47)); - return CHIP_NO_ERROR; + currentPositionTiltArgument.SetNonNull(); + currentPositionTiltArgument.Value() = 255U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + currentPositionTiltArgument, this, OnSuccessCallback_47, OnFailureCallback_47)); + return CHIP_NO_ERROR; } void OnFailureResponse_47(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_47() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_47() { ThrowSuccessResponse(); } - - - CHIP_ERROR Test5bReadsBackTheRoOptionalAttributeCurrentPositionTilt_48() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_48, OnFailureCallback_48)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_48, OnFailureCallback_48)); + return CHIP_NO_ERROR; } - void OnFailureResponse_48(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_48(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_48( const chip::app::DataModel::Nullable & currentPositionTilt) + void OnSuccessResponse_48(const chip::app::DataModel::Nullable & currentPositionTilt) { - VerifyOrReturn(CheckConstraintType("currentPositionTilt", "", "uint16"));VerifyOrReturn(CheckConstraintMinValue("currentPositionTilt", currentPositionTilt, 0U));VerifyOrReturn(CheckConstraintMaxValue("currentPositionTilt", currentPositionTilt, 65535U)); + VerifyOrReturn(CheckConstraintType("currentPositionTilt", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("currentPositionTilt", currentPositionTilt, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentPositionTilt", currentPositionTilt, 65535U)); NextTest(); - } - - - + } - CHIP_ERROR Test4ReadTheRoOptionalAttributeDefaultCurrentPositionLiftPercentage_49() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_49, OnFailureCallback_49)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_49, OnFailureCallback_49)); + return CHIP_NO_ERROR; } - void OnFailureResponse_49(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_49(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_49( const chip::app::DataModel::Nullable & currentPositionLiftPercentage) + void OnSuccessResponse_49(const chip::app::DataModel::Nullable & currentPositionLiftPercentage) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "", "Percent"));VerifyOrReturn(CheckConstraintMinValue("currentPositionLiftPercentage", currentPositionLiftPercentage, 0));VerifyOrReturn(CheckConstraintMaxValue("currentPositionLiftPercentage", currentPositionLiftPercentage, 100)); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "", "Percent")); + VerifyOrReturn(CheckConstraintMinValue("currentPositionLiftPercentage", currentPositionLiftPercentage, 0)); + VerifyOrReturn(CheckConstraintMaxValue("currentPositionLiftPercentage", currentPositionLiftPercentage, 100)); NextTest(); - } - - - + } - CHIP_ERROR Test5aWriteAValueIntoTheRoOptionalAttributeCurrentPositionLiftPercentage_50() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -50070,80 +38376,67 @@ class Test_TC_WNCV_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable currentPositionLiftPercentageArgument; - currentPositionLiftPercentageArgument.SetNonNull(); - currentPositionLiftPercentageArgument.Value() = 200; - - ReturnErrorOnFailure(cluster.WriteAttribute(currentPositionLiftPercentageArgument, this, OnSuccessCallback_50, OnFailureCallback_50)); - return CHIP_NO_ERROR; + currentPositionLiftPercentageArgument.SetNonNull(); + currentPositionLiftPercentageArgument.Value() = 200; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + currentPositionLiftPercentageArgument, this, OnSuccessCallback_50, OnFailureCallback_50)); + return CHIP_NO_ERROR; } void OnFailureResponse_50(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_50() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_50() { ThrowSuccessResponse(); } - - - CHIP_ERROR Test5bReadsBackTheRoOptionalAttributeCurrentPositionLiftPercentage_51() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_51, OnFailureCallback_51)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_51, OnFailureCallback_51)); + return CHIP_NO_ERROR; } - void OnFailureResponse_51(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_51(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_51( const chip::app::DataModel::Nullable & currentPositionLiftPercentage) + void OnSuccessResponse_51(const chip::app::DataModel::Nullable & currentPositionLiftPercentage) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "", "Percent")); VerifyOrReturn(CheckConstraintNotValue("currentPositionLiftPercentage", currentPositionLiftPercentage, 200)); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "", "Percent")); + VerifyOrReturn(CheckConstraintNotValue("currentPositionLiftPercentage", currentPositionLiftPercentage, 200)); NextTest(); - } - - - + } - CHIP_ERROR Test4ReadTheRoOptionalAttributeDefaultCurrentPositionTiltPercentage_52() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_52, OnFailureCallback_52)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_52, OnFailureCallback_52)); + return CHIP_NO_ERROR; } - void OnFailureResponse_52(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_52(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_52( const chip::app::DataModel::Nullable & currentPositionTiltPercentage) + void OnSuccessResponse_52(const chip::app::DataModel::Nullable & currentPositionTiltPercentage) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "", "Percent"));VerifyOrReturn(CheckConstraintMinValue("currentPositionTiltPercentage", currentPositionTiltPercentage, 0));VerifyOrReturn(CheckConstraintMaxValue("currentPositionTiltPercentage", currentPositionTiltPercentage, 100)); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "", "Percent")); + VerifyOrReturn(CheckConstraintMinValue("currentPositionTiltPercentage", currentPositionTiltPercentage, 0)); + VerifyOrReturn(CheckConstraintMaxValue("currentPositionTiltPercentage", currentPositionTiltPercentage, 100)); NextTest(); - } - - - + } - CHIP_ERROR Test5aWriteAValueIntoTheRoOptionalAttributeCurrentPositionTiltPercentage_53() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -50151,140 +38444,106 @@ class Test_TC_WNCV_2_1: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable currentPositionTiltPercentageArgument; - currentPositionTiltPercentageArgument.SetNonNull(); - currentPositionTiltPercentageArgument.Value() = 200; - - ReturnErrorOnFailure(cluster.WriteAttribute(currentPositionTiltPercentageArgument, this, OnSuccessCallback_53, OnFailureCallback_53)); - return CHIP_NO_ERROR; + currentPositionTiltPercentageArgument.SetNonNull(); + currentPositionTiltPercentageArgument.Value() = 200; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + currentPositionTiltPercentageArgument, this, OnSuccessCallback_53, OnFailureCallback_53)); + return CHIP_NO_ERROR; } void OnFailureResponse_53(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_53() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); } + void OnSuccessResponse_53() { ThrowSuccessResponse(); } - - - CHIP_ERROR Test5bReadsBackTheRoOptionalAttributeCurrentPositionTiltPercentage_54() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_54, OnFailureCallback_54)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_54, OnFailureCallback_54)); + return CHIP_NO_ERROR; } - void OnFailureResponse_54(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_54(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_54( const chip::app::DataModel::Nullable & currentPositionTiltPercentage) + void OnSuccessResponse_54(const chip::app::DataModel::Nullable & currentPositionTiltPercentage) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "", "Percent")); VerifyOrReturn(CheckConstraintNotValue("currentPositionTiltPercentage", currentPositionTiltPercentage, 200)); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "", "Percent")); + VerifyOrReturn(CheckConstraintNotValue("currentPositionTiltPercentage", currentPositionTiltPercentage, 200)); NextTest(); - } - - - }; + } +}; -class Test_TC_WNCV_2_2: public TestCommand +class Test_TC_WNCV_2_2 : public TestCommand { - public: - Test_TC_WNCV_2_2(): TestCommand("Test_TC_WNCV_2_2"), mTestIndex(0) +public: + Test_TC_WNCV_2_2() : TestCommand("Test_TC_WNCV_2_2"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_WNCV_2_2() - { - } + ~Test_TC_WNCV_2_2() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_2_2\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_2_2\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_2_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_2_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 1; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); @@ -50292,514 +38551,390 @@ class Test_TC_WNCV_2_2: public TestCommand } }; -class Test_TC_WNCV_2_4: public TestCommand +class Test_TC_WNCV_2_4 : public TestCommand { - public: - Test_TC_WNCV_2_4(): TestCommand("Test_TC_WNCV_2_4"), mTestIndex(0) +public: + Test_TC_WNCV_2_4() : TestCommand("Test_TC_WNCV_2_4"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_WNCV_2_4() - { - } + ~Test_TC_WNCV_2_4() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_2_4\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_2_4\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_2_4\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_2_4\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads Type attribute from DUT\n"); - if (ShouldSkip("A_TYPE")) - { - NextTest(); - return; - } - err = TestReadsTypeAttributeFromDut_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads Type attribute from DUT\n"); + if (ShouldSkip("A_TYPE")) + { + NextTest(); + return; + } + err = TestReadsTypeAttributeFromDut_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads Type attribute constraints\n"); - if (ShouldSkip("A_TYPE")) - { - NextTest(); - return; - } - err = TestReadsTypeAttributeConstraints_2(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads Type attribute constraints\n"); + if (ShouldSkip("A_TYPE")) + { + NextTest(); + return; + } + err = TestReadsTypeAttributeConstraints_2(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint8_t type) + static void OnSuccessCallback_1(void * context, uint8_t type) { (static_cast(context))->OnSuccessResponse_1(type); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint8_t type) + static void OnSuccessCallback_2(void * context, uint8_t type) { (static_cast(context))->OnSuccessResponse_2(type); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadsTypeAttributeFromDut_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint8_t type) + void OnSuccessResponse_1(uint8_t type) { - VerifyOrReturn(CheckValue("type", type,0 - )); + VerifyOrReturn(CheckValue("type", type, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsTypeAttributeConstraints_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint8_t type) + void OnSuccessResponse_2(uint8_t type) { - VerifyOrReturn(CheckConstraintType("type", "", "enum8"));VerifyOrReturn(CheckConstraintMinValue("type", type, 0));VerifyOrReturn(CheckConstraintMaxValue("type", type, 9)); + VerifyOrReturn(CheckConstraintType("type", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("type", type, 0)); + VerifyOrReturn(CheckConstraintMaxValue("type", type, 9)); NextTest(); - } - - - }; + } +}; -class Test_TC_WNCV_2_5: public TestCommand +class Test_TC_WNCV_2_5 : public TestCommand { - public: - Test_TC_WNCV_2_5(): TestCommand("Test_TC_WNCV_2_5"), mTestIndex(0) +public: + Test_TC_WNCV_2_5() : TestCommand("Test_TC_WNCV_2_5"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_WNCV_2_5() - { - } + ~Test_TC_WNCV_2_5() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_2_5\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_2_5\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_2_5\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_2_5\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads EndProductType attribute from DUT\n"); - if (ShouldSkip("A_ENDPRODUCTTYPE")) - { - NextTest(); - return; - } - err = TestReadsEndProductTypeAttributeFromDut_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads EndProductType attribute from DUT\n"); + if (ShouldSkip("A_ENDPRODUCTTYPE")) + { + NextTest(); + return; + } + err = TestReadsEndProductTypeAttributeFromDut_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads EndProductType attribute constraints from DUT\n"); - if (ShouldSkip("A_ENDPRODUCTTYPE")) - { - NextTest(); - return; - } - err = TestReadsEndProductTypeAttributeConstraintsFromDut_2(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads EndProductType attribute constraints from DUT\n"); + if (ShouldSkip("A_ENDPRODUCTTYPE")) + { + NextTest(); + return; + } + err = TestReadsEndProductTypeAttributeConstraintsFromDut_2(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint8_t endProductType) + static void OnSuccessCallback_1(void * context, uint8_t endProductType) { (static_cast(context))->OnSuccessResponse_1(endProductType); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint8_t endProductType) + static void OnSuccessCallback_2(void * context, uint8_t endProductType) { (static_cast(context))->OnSuccessResponse_2(endProductType); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadsEndProductTypeAttributeFromDut_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint8_t endProductType) + void OnSuccessResponse_1(uint8_t endProductType) { - VerifyOrReturn(CheckValue("endProductType", endProductType,0 - )); + VerifyOrReturn(CheckValue("endProductType", endProductType, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsEndProductTypeAttributeConstraintsFromDut_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint8_t endProductType) + void OnSuccessResponse_2(uint8_t endProductType) { - VerifyOrReturn(CheckConstraintType("endProductType", "", "enum8"));VerifyOrReturn(CheckConstraintMinValue("endProductType", endProductType, 0));VerifyOrReturn(CheckConstraintMaxValue("endProductType", endProductType, 23)); + VerifyOrReturn(CheckConstraintType("endProductType", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("endProductType", endProductType, 0)); + VerifyOrReturn(CheckConstraintMaxValue("endProductType", endProductType, 23)); NextTest(); - } - - - }; + } +}; -class Test_TC_WNCV_3_1: public TestCommand +class Test_TC_WNCV_3_1 : public TestCommand { - public: - Test_TC_WNCV_3_1(): TestCommand("Test_TC_WNCV_3_1"), mTestIndex(0) +public: + Test_TC_WNCV_3_1() : TestCommand("Test_TC_WNCV_3_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_WNCV_3_1() - { - } + ~Test_TC_WNCV_3_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_3_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_3_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_3_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_3_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : 1a: TH adjusts the the DUT to a non-open position\n"); - err = Test1aThAdjustsTheTheDutToANonOpenPosition_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : 1a: TH adjusts the the DUT to a non-open position\n"); + err = Test1aThAdjustsTheTheDutToANonOpenPosition_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : 2a: TH sends UpOrOpen command to DUT\n"); - err = Test2aThSendsUpOrOpenCommandToDut_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : 2a: TH sends UpOrOpen command to DUT\n"); + err = Test2aThSendsUpOrOpenCommandToDut_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : 3a: TH reads OperationalStatus attribute from DUT\n"); - err = Test3aThReadsOperationalStatusAttributeFromDut_3(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 3 : 3a: TH reads OperationalStatus attribute from DUT\n"); + err = Test3aThReadsOperationalStatusAttributeFromDut_3(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 4; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, uint8_t operationalStatus) + static void OnSuccessCallback_3(void * context, uint8_t operationalStatus) { (static_cast(context))->OnSuccessResponse_3(operationalStatus); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR Test1aThAdjustsTheTheDutToANonOpenPosition_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::WindowCovering::Commands::DownOrClose::Type; + using RequestType = chip::app::Clusters::WindowCovering::Commands::DownOrClose::Type; RequestType request; @@ -50811,30 +38946,18 @@ class Test_TC_WNCV_3_1: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_1() - { NextTest(); - } - + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR Test2aThSendsUpOrOpenCommandToDut_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Type; + using RequestType = chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Type; RequestType request; @@ -50846,177 +38969,127 @@ class Test_TC_WNCV_3_1: public TestCommand (static_cast(context))->OnFailureResponse_2(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_2() - { NextTest(); - } - + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_2() { NextTest(); } - CHIP_ERROR Test3aThReadsOperationalStatusAttributeFromDut_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( uint8_t operationalStatus) + void OnSuccessResponse_3(uint8_t operationalStatus) { - VerifyOrReturn(CheckValue("operationalStatus", operationalStatus,0 - )); + VerifyOrReturn(CheckValue("operationalStatus", operationalStatus, 0)); NextTest(); - } - - - }; + } +}; -class Test_TC_WNCV_3_2: public TestCommand +class Test_TC_WNCV_3_2 : public TestCommand { - public: - Test_TC_WNCV_3_2(): TestCommand("Test_TC_WNCV_3_2"), mTestIndex(0) +public: + Test_TC_WNCV_3_2() : TestCommand("Test_TC_WNCV_3_2"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_WNCV_3_2() - { - } + ~Test_TC_WNCV_3_2() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_3_2\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_3_2\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_3_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_3_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : 1a: TH adjusts the the DUT to a non-closed position\n"); - err = Test1aThAdjustsTheTheDutToANonClosedPosition_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : 1a: TH adjusts the the DUT to a non-closed position\n"); + err = Test1aThAdjustsTheTheDutToANonClosedPosition_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : 2a: TH sends DownOrClose command to DUT\n"); - err = Test2aThSendsDownOrCloseCommandToDut_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : 2a: TH sends DownOrClose command to DUT\n"); + err = Test2aThSendsDownOrCloseCommandToDut_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : 3a: TH reads OperationalStatus attribute from DUT\n"); - err = Test3aThReadsOperationalStatusAttributeFromDut_3(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 3 : 3a: TH reads OperationalStatus attribute from DUT\n"); + err = Test3aThReadsOperationalStatusAttributeFromDut_3(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 4; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, uint8_t operationalStatus) + static void OnSuccessCallback_3(void * context, uint8_t operationalStatus) { (static_cast(context))->OnSuccessResponse_3(operationalStatus); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR Test1aThAdjustsTheTheDutToANonClosedPosition_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Type; + using RequestType = chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Type; RequestType request; @@ -51028,30 +39101,18 @@ class Test_TC_WNCV_3_2: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_1() - { NextTest(); - } - + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR Test2aThSendsDownOrCloseCommandToDut_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::WindowCovering::Commands::DownOrClose::Type; + using RequestType = chip::app::Clusters::WindowCovering::Commands::DownOrClose::Type; RequestType request; @@ -51063,177 +39124,127 @@ class Test_TC_WNCV_3_2: public TestCommand (static_cast(context))->OnFailureResponse_2(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_2() - { NextTest(); - } - + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_2() { NextTest(); } - CHIP_ERROR Test3aThReadsOperationalStatusAttributeFromDut_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( uint8_t operationalStatus) + void OnSuccessResponse_3(uint8_t operationalStatus) { - VerifyOrReturn(CheckValue("operationalStatus", operationalStatus,0 - )); + VerifyOrReturn(CheckValue("operationalStatus", operationalStatus, 0)); NextTest(); - } - - - }; + } +}; -class Test_TC_WNCV_3_3: public TestCommand +class Test_TC_WNCV_3_3 : public TestCommand { - public: - Test_TC_WNCV_3_3(): TestCommand("Test_TC_WNCV_3_3"), mTestIndex(0) +public: + Test_TC_WNCV_3_3() : TestCommand("Test_TC_WNCV_3_3"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_WNCV_3_3() - { - } + ~Test_TC_WNCV_3_3() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_3_3\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_3_3\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_3_3\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_3_3\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : 1a: TH adjusts the the DUT to a non-open position\n"); - err = Test1aThAdjustsTheTheDutToANonOpenPosition_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : 1a: TH adjusts the the DUT to a non-open position\n"); + err = Test1aThAdjustsTheTheDutToANonOpenPosition_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : 2a: TH sends StopMotion command to DUT\n"); - err = Test2aThSendsStopMotionCommandToDut_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : 2a: TH sends StopMotion command to DUT\n"); + err = Test2aThSendsStopMotionCommandToDut_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : 2b: TH reads OperationalStatus attribute from DUT\n"); - err = Test2bThReadsOperationalStatusAttributeFromDut_3(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 3 : 2b: TH reads OperationalStatus attribute from DUT\n"); + err = Test2bThReadsOperationalStatusAttributeFromDut_3(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 4; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, uint8_t operationalStatus) + static void OnSuccessCallback_3(void * context, uint8_t operationalStatus) { (static_cast(context))->OnSuccessResponse_3(operationalStatus); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR Test1aThAdjustsTheTheDutToANonOpenPosition_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Type; + using RequestType = chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Type; RequestType request; @@ -51245,30 +39256,18 @@ class Test_TC_WNCV_3_3: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_1() - { NextTest(); - } - + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR Test2aThSendsStopMotionCommandToDut_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::WindowCovering::Commands::StopMotion::Type; + using RequestType = chip::app::Clusters::WindowCovering::Commands::StopMotion::Type; RequestType request; @@ -51280,262 +39279,198 @@ class Test_TC_WNCV_3_3: public TestCommand (static_cast(context))->OnFailureResponse_2(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_2() - { NextTest(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_2() { NextTest(); } - - - CHIP_ERROR Test2bThReadsOperationalStatusAttributeFromDut_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( uint8_t operationalStatus) + void OnSuccessResponse_3(uint8_t operationalStatus) { - VerifyOrReturn(CheckValue("operationalStatus", operationalStatus,0 - )); + VerifyOrReturn(CheckValue("operationalStatus", operationalStatus, 0)); NextTest(); - } - - - }; + } +}; -class TV_TargetNavigatorCluster: public TestCommand +class TV_TargetNavigatorCluster : public TestCommand { - public: - TV_TargetNavigatorCluster(): TestCommand("TV_TargetNavigatorCluster"), mTestIndex(0) +public: + TV_TargetNavigatorCluster() : TestCommand("TV_TargetNavigatorCluster"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~TV_TargetNavigatorCluster() - { - } + ~TV_TargetNavigatorCluster() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: TV_TargetNavigatorCluster\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: TV_TargetNavigatorCluster\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: TV_TargetNavigatorCluster\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: TV_TargetNavigatorCluster\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute Target Navigator list\n"); - err = TestReadAttributeTargetNavigatorList_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute Target Navigator list\n"); + err = TestReadAttributeTargetNavigatorList_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute current navigator target\n"); - err = TestReadAttributeCurrentNavigatorTarget_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute current navigator target\n"); + err = TestReadAttributeCurrentNavigatorTarget_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Navigate Target Request Command\n"); - err = TestNavigateTargetRequestCommand_3(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 3 : Navigate Target Request Command\n"); + err = TestNavigateTargetRequestCommand_3(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 4; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, const chip::app::DataModel::DecodableList & targetNavigatorList) + static void OnSuccessCallback_1( + void * context, + const chip::app::DataModel::DecodableList & + targetNavigatorList) { (static_cast(context))->OnSuccessResponse_1(targetNavigatorList); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint8_t currentNavigatorTarget) + static void OnSuccessCallback_2(void * context, uint8_t currentNavigatorTarget) { (static_cast(context))->OnSuccessResponse_2(currentNavigatorTarget); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadAttributeTargetNavigatorList_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TargetNavigatorClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( const chip::app::DataModel::DecodableList & targetNavigatorList) + void OnSuccessResponse_1( + const chip::app::DataModel::DecodableList & + targetNavigatorList) { - { - auto iter_0 = targetNavigatorList.begin(); - VerifyOrReturn(CheckNextListItemDecodes("targetNavigatorList", iter_0, 0)); - VerifyOrReturn(CheckValue("targetNavigatorList[0].identifier", iter_0.GetValue().identifier,1 - )); - VerifyOrReturn(CheckValueAsString("targetNavigatorList[0].name", iter_0.GetValue().name,chip::CharSpan("exampleName", 11) - )); - VerifyOrReturn(CheckNextListItemDecodes("targetNavigatorList", iter_0, 1)); - VerifyOrReturn(CheckValue("targetNavigatorList[1].identifier", iter_0.GetValue().identifier,2 - )); - VerifyOrReturn(CheckValueAsString("targetNavigatorList[1].name", iter_0.GetValue().name,chip::CharSpan("exampleName", 11) - )); - VerifyOrReturn(CheckNoMoreListItems("targetNavigatorList", iter_0, 2)); - } + { + auto iter_0 = targetNavigatorList.begin(); + VerifyOrReturn(CheckNextListItemDecodes("targetNavigatorList", iter_0, 0)); + VerifyOrReturn(CheckValue("targetNavigatorList[0].identifier", iter_0.GetValue().identifier, 1)); + VerifyOrReturn( + CheckValueAsString("targetNavigatorList[0].name", iter_0.GetValue().name, chip::CharSpan("exampleName", 11))); + VerifyOrReturn(CheckNextListItemDecodes("targetNavigatorList", iter_0, 1)); + VerifyOrReturn(CheckValue("targetNavigatorList[1].identifier", iter_0.GetValue().identifier, 2)); + VerifyOrReturn( + CheckValueAsString("targetNavigatorList[1].name", iter_0.GetValue().name, chip::CharSpan("exampleName", 11))); + VerifyOrReturn(CheckNoMoreListItems("targetNavigatorList", iter_0, 2)); + } NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeCurrentNavigatorTarget_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TargetNavigatorClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint8_t currentNavigatorTarget) + void OnSuccessResponse_2(uint8_t currentNavigatorTarget) { - VerifyOrReturn(CheckValue("currentNavigatorTarget", currentNavigatorTarget,0 - )); + VerifyOrReturn(CheckValue("currentNavigatorTarget", currentNavigatorTarget, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestNavigateTargetRequestCommand_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TargetNavigator::Commands::NavigateTargetRequest::Type; + using RequestType = chip::app::Clusters::TargetNavigator::Commands::NavigateTargetRequest::Type; RequestType request; - request.target = 1; - request.data = chip::Span("1garbage: not in length on purpose", 1); + request.target = 1; + request.data = chip::Span("1garbage: not in length on purpose", 1); auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(data.status, data.data); @@ -51545,257 +39480,195 @@ class TV_TargetNavigatorCluster: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( chip::app::Clusters::TargetNavigator::StatusEnum status, chip::CharSpan data) + void OnSuccessResponse_3(chip::app::Clusters::TargetNavigator::StatusEnum status, chip::CharSpan data) { - VerifyOrReturn(CheckValue("status", status,0 - )); - + VerifyOrReturn(CheckValue("status", status, 0)); - VerifyOrReturn(CheckValueAsString("data", data,chip::CharSpan("data response", 13) - )); + VerifyOrReturn(CheckValueAsString("data", data, chip::CharSpan("data response", 13))); NextTest(); - } - - - }; + } +}; -class TV_AudioOutputCluster: public TestCommand +class TV_AudioOutputCluster : public TestCommand { - public: - TV_AudioOutputCluster(): TestCommand("TV_AudioOutputCluster"), mTestIndex(0) +public: + TV_AudioOutputCluster() : TestCommand("TV_AudioOutputCluster"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~TV_AudioOutputCluster() - { - } + ~TV_AudioOutputCluster() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: TV_AudioOutputCluster\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: TV_AudioOutputCluster\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: TV_AudioOutputCluster\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: TV_AudioOutputCluster\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute Audio Output list\n"); - err = TestReadAttributeAudioOutputList_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute Audio Output list\n"); + err = TestReadAttributeAudioOutputList_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute current audio output\n"); - err = TestReadAttributeCurrentAudioOutput_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute current audio output\n"); + err = TestReadAttributeCurrentAudioOutput_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Select Output Command\n"); - err = TestSelectOutputCommand_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Select Output Command\n"); + err = TestSelectOutputCommand_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Rename Output Command\n"); - err = TestRenameOutputCommand_4(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 4 : Rename Output Command\n"); + err = TestRenameOutputCommand_4(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 5; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, const chip::app::DataModel::DecodableList & audioOutputList) + static void OnSuccessCallback_1( + void * context, + const chip::app::DataModel::DecodableList & + audioOutputList) { (static_cast(context))->OnSuccessResponse_1(audioOutputList); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint8_t currentAudioOutput) + static void OnSuccessCallback_2(void * context, uint8_t currentAudioOutput) { (static_cast(context))->OnSuccessResponse_2(currentAudioOutput); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadAttributeAudioOutputList_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 2; chip::Controller::AudioOutputClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( const chip::app::DataModel::DecodableList & audioOutputList) - { - { - auto iter_0 = audioOutputList.begin(); - VerifyOrReturn(CheckNextListItemDecodes("audioOutputList", iter_0, 0)); - VerifyOrReturn(CheckValue("audioOutputList[0].index", iter_0.GetValue().index,1 - )); - VerifyOrReturn(CheckValue("audioOutputList[0].outputType", iter_0.GetValue().outputType,0 - )); - VerifyOrReturn(CheckValueAsString("audioOutputList[0].name", iter_0.GetValue().name,chip::CharSpan("exampleName", 11) - )); - VerifyOrReturn(CheckNextListItemDecodes("audioOutputList", iter_0, 1)); - VerifyOrReturn(CheckValue("audioOutputList[1].index", iter_0.GetValue().index,2 - )); - VerifyOrReturn(CheckValue("audioOutputList[1].outputType", iter_0.GetValue().outputType,0 - )); - VerifyOrReturn(CheckValueAsString("audioOutputList[1].name", iter_0.GetValue().name,chip::CharSpan("exampleName", 11) - )); - VerifyOrReturn(CheckNextListItemDecodes("audioOutputList", iter_0, 2)); - VerifyOrReturn(CheckValue("audioOutputList[2].index", iter_0.GetValue().index,3 - )); - VerifyOrReturn(CheckValue("audioOutputList[2].outputType", iter_0.GetValue().outputType,0 - )); - VerifyOrReturn(CheckValueAsString("audioOutputList[2].name", iter_0.GetValue().name,chip::CharSpan("exampleName", 11) - )); - VerifyOrReturn(CheckNoMoreListItems("audioOutputList", iter_0, 3)); - } + void OnSuccessResponse_1( + const chip::app::DataModel::DecodableList & + audioOutputList) + { + { + auto iter_0 = audioOutputList.begin(); + VerifyOrReturn(CheckNextListItemDecodes("audioOutputList", iter_0, 0)); + VerifyOrReturn(CheckValue("audioOutputList[0].index", iter_0.GetValue().index, 1)); + VerifyOrReturn(CheckValue("audioOutputList[0].outputType", iter_0.GetValue().outputType, 0)); + VerifyOrReturn( + CheckValueAsString("audioOutputList[0].name", iter_0.GetValue().name, chip::CharSpan("exampleName", 11))); + VerifyOrReturn(CheckNextListItemDecodes("audioOutputList", iter_0, 1)); + VerifyOrReturn(CheckValue("audioOutputList[1].index", iter_0.GetValue().index, 2)); + VerifyOrReturn(CheckValue("audioOutputList[1].outputType", iter_0.GetValue().outputType, 0)); + VerifyOrReturn( + CheckValueAsString("audioOutputList[1].name", iter_0.GetValue().name, chip::CharSpan("exampleName", 11))); + VerifyOrReturn(CheckNextListItemDecodes("audioOutputList", iter_0, 2)); + VerifyOrReturn(CheckValue("audioOutputList[2].index", iter_0.GetValue().index, 3)); + VerifyOrReturn(CheckValue("audioOutputList[2].outputType", iter_0.GetValue().outputType, 0)); + VerifyOrReturn( + CheckValueAsString("audioOutputList[2].name", iter_0.GetValue().name, chip::CharSpan("exampleName", 11))); + VerifyOrReturn(CheckNoMoreListItems("audioOutputList", iter_0, 3)); + } NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeCurrentAudioOutput_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 2; chip::Controller::AudioOutputClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint8_t currentAudioOutput) + void OnSuccessResponse_2(uint8_t currentAudioOutput) { - VerifyOrReturn(CheckValue("currentAudioOutput", currentAudioOutput,0 - )); + VerifyOrReturn(CheckValue("currentAudioOutput", currentAudioOutput, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestSelectOutputCommand_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 2; - using RequestType = chip::app::Clusters::AudioOutput::Commands::SelectOutputRequest::Type; + using RequestType = chip::app::Clusters::AudioOutput::Commands::SelectOutputRequest::Type; RequestType request; - request.index = 1; - + request.index = 1; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(); }; @@ -51804,34 +39677,22 @@ class TV_AudioOutputCluster: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_3() - { NextTest(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_3() { NextTest(); } - - - CHIP_ERROR TestRenameOutputCommand_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 2; - using RequestType = chip::app::Clusters::AudioOutput::Commands::RenameOutputRequest::Type; + using RequestType = chip::app::Clusters::AudioOutput::Commands::RenameOutputRequest::Type; RequestType request; - request.index = 1; - request.name = chip::Span("exampleNamegarbage: not in length on purpose", 11); + request.index = 1; + request.name = chip::Span("exampleNamegarbage: not in length on purpose", 11); auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_4(); @@ -51841,196 +39702,145 @@ class TV_AudioOutputCluster: public TestCommand (static_cast(context))->OnFailureResponse_4(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4() - { NextTest(); - } - - - }; + void OnSuccessResponse_4() { NextTest(); } +}; -class TV_ApplicationLauncherCluster: public TestCommand +class TV_ApplicationLauncherCluster : public TestCommand { - public: - TV_ApplicationLauncherCluster(): TestCommand("TV_ApplicationLauncherCluster"), mTestIndex(0) +public: + TV_ApplicationLauncherCluster() : TestCommand("TV_ApplicationLauncherCluster"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~TV_ApplicationLauncherCluster() - { - } + ~TV_ApplicationLauncherCluster() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: TV_ApplicationLauncherCluster\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: TV_ApplicationLauncherCluster\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: TV_ApplicationLauncherCluster\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: TV_ApplicationLauncherCluster\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute Application Launcher list\n"); - err = TestReadAttributeApplicationLauncherList_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute Application Launcher list\n"); + err = TestReadAttributeApplicationLauncherList_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Launch App Command\n"); - err = TestLaunchAppCommand_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Launch App Command\n"); + err = TestLaunchAppCommand_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Stop App Command\n"); - err = TestStopAppCommand_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Stop App Command\n"); + err = TestStopAppCommand_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Hide App Command\n"); - err = TestHideAppCommand_4(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 4 : Hide App Command\n"); + err = TestHideAppCommand_4(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 5; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, const chip::app::DataModel::DecodableList & applicationLauncherList) + static void OnSuccessCallback_1(void * context, const chip::app::DataModel::DecodableList & applicationLauncherList) { (static_cast(context))->OnSuccessResponse_1(applicationLauncherList); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadAttributeApplicationLauncherList_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ApplicationLauncherClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( const chip::app::DataModel::DecodableList & applicationLauncherList) + void OnSuccessResponse_1(const chip::app::DataModel::DecodableList & applicationLauncherList) { - { - auto iter_0 = applicationLauncherList.begin(); - VerifyOrReturn(CheckNextListItemDecodes("applicationLauncherList", iter_0, 0)); - VerifyOrReturn(CheckValue("applicationLauncherList[0]", iter_0.GetValue(),123U - )); - VerifyOrReturn(CheckNextListItemDecodes("applicationLauncherList", iter_0, 1)); - VerifyOrReturn(CheckValue("applicationLauncherList[1]", iter_0.GetValue(),456U - )); - VerifyOrReturn(CheckNoMoreListItems("applicationLauncherList", iter_0, 2)); - } + { + auto iter_0 = applicationLauncherList.begin(); + VerifyOrReturn(CheckNextListItemDecodes("applicationLauncherList", iter_0, 0)); + VerifyOrReturn(CheckValue("applicationLauncherList[0]", iter_0.GetValue(), 123U)); + VerifyOrReturn(CheckNextListItemDecodes("applicationLauncherList", iter_0, 1)); + VerifyOrReturn(CheckValue("applicationLauncherList[1]", iter_0.GetValue(), 456U)); + VerifyOrReturn(CheckNoMoreListItems("applicationLauncherList", iter_0, 2)); + } NextTest(); - } - - - + } - CHIP_ERROR TestLaunchAppCommand_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ApplicationLauncher::Commands::LaunchAppRequest::Type; + using RequestType = chip::app::Clusters::ApplicationLauncher::Commands::LaunchAppRequest::Type; RequestType request; - request.data = chip::Span("datagarbage: not in length on purpose", 4); - - request.application.catalogVendorId = 123U; - request.application.applicationId = chip::Span("applicationIdgarbage: not in length on purpose", 13); + request.data = chip::Span("datagarbage: not in length on purpose", 4); + request.application.catalogVendorId = 123U; + request.application.applicationId = chip::Span("applicationIdgarbage: not in length on purpose", 13); auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_2(data.status, data.data); @@ -52040,44 +39850,30 @@ class TV_ApplicationLauncherCluster: public TestCommand (static_cast(context))->OnFailureResponse_2(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( chip::app::Clusters::ApplicationLauncher::StatusEnum status, chip::CharSpan data) + void OnSuccessResponse_2(chip::app::Clusters::ApplicationLauncher::StatusEnum status, chip::CharSpan data) { - VerifyOrReturn(CheckValue("status", status,0 - )); + VerifyOrReturn(CheckValue("status", status, 0)); - - VerifyOrReturn(CheckValueAsString("data", data,chip::CharSpan("data", 4) - )); + VerifyOrReturn(CheckValueAsString("data", data, chip::CharSpan("data", 4))); NextTest(); - } - - - + } - CHIP_ERROR TestStopAppCommand_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ApplicationLauncher::Commands::StopAppRequest::Type; + using RequestType = chip::app::Clusters::ApplicationLauncher::Commands::StopAppRequest::Type; RequestType request; - - request.application.catalogVendorId = 123U; - request.application.applicationId = chip::Span("applicationIdgarbage: not in length on purpose", 13); + request.application.catalogVendorId = 123U; + request.application.applicationId = chip::Span("applicationIdgarbage: not in length on purpose", 13); auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(data.status, data.data); @@ -52087,44 +39883,30 @@ class TV_ApplicationLauncherCluster: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( chip::app::Clusters::ApplicationLauncher::StatusEnum status, chip::CharSpan data) + void OnSuccessResponse_3(chip::app::Clusters::ApplicationLauncher::StatusEnum status, chip::CharSpan data) { - VerifyOrReturn(CheckValue("status", status,0 - )); - + VerifyOrReturn(CheckValue("status", status, 0)); - VerifyOrReturn(CheckValueAsString("data", data,chip::CharSpan("data", 4) - )); + VerifyOrReturn(CheckValueAsString("data", data, chip::CharSpan("data", 4))); NextTest(); - } - - - + } - CHIP_ERROR TestHideAppCommand_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ApplicationLauncher::Commands::HideAppRequest::Type; + using RequestType = chip::app::Clusters::ApplicationLauncher::Commands::HideAppRequest::Type; RequestType request; - - request.application.catalogVendorId = 123U; - request.application.applicationId = chip::Span("applicationIdgarbage: not in length on purpose", 13); + request.application.catalogVendorId = 123U; + request.application.applicationId = chip::Span("applicationIdgarbage: not in length on purpose", 13); auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_4(data.status, data.data); @@ -52134,139 +39916,99 @@ class TV_ApplicationLauncherCluster: public TestCommand (static_cast(context))->OnFailureResponse_4(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( chip::app::Clusters::ApplicationLauncher::StatusEnum status, chip::CharSpan data) + void OnSuccessResponse_4(chip::app::Clusters::ApplicationLauncher::StatusEnum status, chip::CharSpan data) { - VerifyOrReturn(CheckValue("status", status,0 - )); - + VerifyOrReturn(CheckValue("status", status, 0)); - VerifyOrReturn(CheckValueAsString("data", data,chip::CharSpan("data", 4) - )); + VerifyOrReturn(CheckValueAsString("data", data, chip::CharSpan("data", 4))); NextTest(); - } - - - }; + } +}; -class TV_KeypadInputCluster: public TestCommand +class TV_KeypadInputCluster : public TestCommand { - public: - TV_KeypadInputCluster(): TestCommand("TV_KeypadInputCluster"), mTestIndex(0) +public: + TV_KeypadInputCluster() : TestCommand("TV_KeypadInputCluster"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~TV_KeypadInputCluster() - { - } + ~TV_KeypadInputCluster() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: TV_KeypadInputCluster\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: TV_KeypadInputCluster\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: TV_KeypadInputCluster\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: TV_KeypadInputCluster\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Send Key Command\n"); - err = TestSendKeyCommand_1(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 1 : Send Key Command\n"); + err = TestSendKeyCommand_1(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 2; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestSendKeyCommand_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::KeypadInput::Commands::SendKeyRequest::Type; + using RequestType = chip::app::Clusters::KeypadInput::Commands::SendKeyRequest::Type; RequestType request; - request.keyCode =static_cast(3); + request.keyCode = static_cast(3); auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_1(data.status); @@ -52276,143 +40018,105 @@ class TV_KeypadInputCluster: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( chip::app::Clusters::KeypadInput::StatusEnum status) + void OnSuccessResponse_1(chip::app::Clusters::KeypadInput::StatusEnum status) { - VerifyOrReturn(CheckValue("status", status,0 - )); + VerifyOrReturn(CheckValue("status", status, 0)); NextTest(); - } - - - }; + } +}; -class TV_AccountLoginCluster: public TestCommand +class TV_AccountLoginCluster : public TestCommand { - public: - TV_AccountLoginCluster(): TestCommand("TV_AccountLoginCluster"), mTestIndex(0) +public: + TV_AccountLoginCluster() : TestCommand("TV_AccountLoginCluster"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~TV_AccountLoginCluster() - { - } + ~TV_AccountLoginCluster() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: TV_AccountLoginCluster\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: TV_AccountLoginCluster\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: TV_AccountLoginCluster\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: TV_AccountLoginCluster\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Get Setup PIN Command\n"); - err = TestGetSetupPinCommand_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Get Setup PIN Command\n"); + err = TestGetSetupPinCommand_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Login Command\n"); - err = TestLoginCommand_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Login Command\n"); + err = TestLoginCommand_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Logout Command\n"); - err = TestLogoutCommand_3(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 3 : Logout Command\n"); + err = TestLogoutCommand_3(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 4; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestGetSetupPinCommand_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; - using RequestType = chip::app::Clusters::AccountLogin::Commands::GetSetupPINRequest::Type; + using RequestType = chip::app::Clusters::AccountLogin::Commands::GetSetupPINRequest::Type; RequestType request; - request.tempAccountIdentifier = chip::Span("asdfgarbage: not in length on purpose", 4); + request.tempAccountIdentifier = chip::Span("asdfgarbage: not in length on purpose", 4); auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_1(data.setupPIN); @@ -52422,39 +40126,28 @@ class TV_AccountLoginCluster: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - , 10000 - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request, 10000)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( chip::CharSpan setupPIN) + void OnSuccessResponse_1(chip::CharSpan setupPIN) { - VerifyOrReturn(CheckValueAsString("setupPIN", setupPIN,chip::CharSpan("tempPin123", 10) - )); + VerifyOrReturn(CheckValueAsString("setupPIN", setupPIN, chip::CharSpan("tempPin123", 10))); NextTest(); - } - - - + } - CHIP_ERROR TestLoginCommand_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; - using RequestType = chip::app::Clusters::AccountLogin::Commands::LoginRequest::Type; + using RequestType = chip::app::Clusters::AccountLogin::Commands::LoginRequest::Type; RequestType request; - request.tempAccountIdentifier = chip::Span("asdfgarbage: not in length on purpose", 4); - request.setupPIN = chip::Span("tempPin123garbage: not in length on purpose", 10); + request.tempAccountIdentifier = chip::Span("asdfgarbage: not in length on purpose", 4); + request.setupPIN = chip::Span("tempPin123garbage: not in length on purpose", 10); auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_2(); @@ -52464,31 +40157,19 @@ class TV_AccountLoginCluster: public TestCommand (static_cast(context))->OnFailureResponse_2(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - , 10000 - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request, 10000)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2() - { NextTest(); - } + void OnSuccessResponse_2() { NextTest(); } - - - - CHIP_ERROR TestLogoutCommand_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; - using RequestType = chip::app::Clusters::AccountLogin::Commands::LogoutRequest::Type; + using RequestType = chip::app::Clusters::AccountLogin::Commands::LogoutRequest::Type; RequestType request; @@ -52500,942 +40181,706 @@ class TV_AccountLoginCluster: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - , 10000 - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request, 10000)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_3() - { NextTest(); - } - + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - }; + void OnSuccessResponse_3() { NextTest(); } +}; -class TV_WakeOnLanCluster: public TestCommand +class TV_WakeOnLanCluster : public TestCommand { - public: - TV_WakeOnLanCluster(): TestCommand("TV_WakeOnLanCluster"), mTestIndex(0) +public: + TV_WakeOnLanCluster() : TestCommand("TV_WakeOnLanCluster"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~TV_WakeOnLanCluster() - { - } + ~TV_WakeOnLanCluster() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: TV_WakeOnLanCluster\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: TV_WakeOnLanCluster\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: TV_WakeOnLanCluster\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: TV_WakeOnLanCluster\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read mac address\n"); - err = TestReadMacAddress_1(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 1 : Read mac address\n"); + err = TestReadMacAddress_1(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 2; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, chip::CharSpan wakeOnLanMacAddress) + static void OnSuccessCallback_1(void * context, chip::CharSpan wakeOnLanMacAddress) { (static_cast(context))->OnSuccessResponse_1(wakeOnLanMacAddress); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadMacAddress_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::WakeOnLanClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( chip::CharSpan wakeOnLanMacAddress) + void OnSuccessResponse_1(chip::CharSpan wakeOnLanMacAddress) { - VerifyOrReturn(CheckValueAsString("wakeOnLanMacAddress", wakeOnLanMacAddress,chip::CharSpan("00:00:00:00:00", 14) - )); + VerifyOrReturn(CheckValueAsString("wakeOnLanMacAddress", wakeOnLanMacAddress, chip::CharSpan("00:00:00:00:00", 14))); NextTest(); - } - - - }; + } +}; -class TV_ApplicationBasicCluster: public TestCommand +class TV_ApplicationBasicCluster : public TestCommand { - public: - TV_ApplicationBasicCluster(): TestCommand("TV_ApplicationBasicCluster"), mTestIndex(0) +public: + TV_ApplicationBasicCluster() : TestCommand("TV_ApplicationBasicCluster"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~TV_ApplicationBasicCluster() - { - } + ~TV_ApplicationBasicCluster() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: TV_ApplicationBasicCluster\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: TV_ApplicationBasicCluster\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: TV_ApplicationBasicCluster\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: TV_ApplicationBasicCluster\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute vendor name\n"); - err = TestReadAttributeVendorName_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute vendor name\n"); + err = TestReadAttributeVendorName_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute vendor id\n"); - err = TestReadAttributeVendorId_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute vendor id\n"); + err = TestReadAttributeVendorId_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read attribute application name\n"); - err = TestReadAttributeApplicationName_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Read attribute application name\n"); + err = TestReadAttributeApplicationName_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read attribute product id\n"); - err = TestReadAttributeProductId_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Read attribute product id\n"); + err = TestReadAttributeProductId_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read attribute application status\n"); - err = TestReadAttributeApplicationStatus_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Read attribute application status\n"); + err = TestReadAttributeApplicationStatus_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read attribute application version\n"); - err = TestReadAttributeApplicationVersion_6(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 6 : Read attribute application version\n"); + err = TestReadAttributeApplicationVersion_6(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 7; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, chip::CharSpan vendorName) + static void OnSuccessCallback_1(void * context, chip::CharSpan vendorName) { (static_cast(context))->OnSuccessResponse_1(vendorName); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint16_t vendorId) + static void OnSuccessCallback_2(void * context, uint16_t vendorId) { (static_cast(context))->OnSuccessResponse_2(vendorId); } - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, chip::CharSpan applicationName) + static void OnSuccessCallback_3(void * context, chip::CharSpan applicationName) { (static_cast(context))->OnSuccessResponse_3(applicationName); } - - - static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, uint16_t productId) + static void OnSuccessCallback_4(void * context, uint16_t productId) { (static_cast(context))->OnSuccessResponse_4(productId); } - - - static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context, chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum applicationStatus) + static void OnSuccessCallback_5(void * context, chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum applicationStatus) { (static_cast(context))->OnSuccessResponse_5(applicationStatus); } - - - static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, chip::CharSpan applicationVersion) + static void OnSuccessCallback_6(void * context, chip::CharSpan applicationVersion) { (static_cast(context))->OnSuccessResponse_6(applicationVersion); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadAttributeVendorName_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; chip::Controller::ApplicationBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( chip::CharSpan vendorName) + void OnSuccessResponse_1(chip::CharSpan vendorName) { - VerifyOrReturn(CheckValueAsString("vendorName", vendorName,chip::CharSpan("exampleVendorName1", 18) - )); + VerifyOrReturn(CheckValueAsString("vendorName", vendorName, chip::CharSpan("exampleVendorName1", 18))); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeVendorId_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; chip::Controller::ApplicationBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint16_t vendorId) + void OnSuccessResponse_2(uint16_t vendorId) { - VerifyOrReturn(CheckValue("vendorId", vendorId,1U - )); + VerifyOrReturn(CheckValue("vendorId", vendorId, 1U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeApplicationName_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; chip::Controller::ApplicationBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( chip::CharSpan applicationName) + void OnSuccessResponse_3(chip::CharSpan applicationName) { - VerifyOrReturn(CheckValueAsString("applicationName", applicationName,chip::CharSpan("exampleName1", 12) - )); + VerifyOrReturn(CheckValueAsString("applicationName", applicationName, chip::CharSpan("exampleName1", 12))); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeProductId_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; chip::Controller::ApplicationBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( uint16_t productId) + void OnSuccessResponse_4(uint16_t productId) { - VerifyOrReturn(CheckValue("productId", productId,1U - )); + VerifyOrReturn(CheckValue("productId", productId, 1U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeApplicationStatus_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; chip::Controller::ApplicationBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5( chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum applicationStatus) + void OnSuccessResponse_5(chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum applicationStatus) { - VerifyOrReturn(CheckValue("applicationStatus", applicationStatus,0 - )); + VerifyOrReturn(CheckValue("applicationStatus", applicationStatus, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeApplicationVersion_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; chip::Controller::ApplicationBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( chip::CharSpan applicationVersion) + void OnSuccessResponse_6(chip::CharSpan applicationVersion) { - VerifyOrReturn(CheckValueAsString("applicationVersion", applicationVersion,chip::CharSpan("exampleVersion", 14) - )); + VerifyOrReturn(CheckValueAsString("applicationVersion", applicationVersion, chip::CharSpan("exampleVersion", 14))); NextTest(); - } - - - }; + } +}; -class TV_MediaPlaybackCluster: public TestCommand +class TV_MediaPlaybackCluster : public TestCommand { - public: - TV_MediaPlaybackCluster(): TestCommand("TV_MediaPlaybackCluster"), mTestIndex(0) +public: + TV_MediaPlaybackCluster() : TestCommand("TV_MediaPlaybackCluster"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~TV_MediaPlaybackCluster() - { - } + ~TV_MediaPlaybackCluster() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: TV_MediaPlaybackCluster\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: TV_MediaPlaybackCluster\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: TV_MediaPlaybackCluster\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: TV_MediaPlaybackCluster\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute playback state\n"); - err = TestReadAttributePlaybackState_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute playback state\n"); + err = TestReadAttributePlaybackState_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute start time\n"); - err = TestReadAttributeStartTime_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute start time\n"); + err = TestReadAttributeStartTime_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read attribute duration\n"); - err = TestReadAttributeDuration_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Read attribute duration\n"); + err = TestReadAttributeDuration_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read attribute playback speed\n"); - err = TestReadAttributePlaybackSpeed_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Read attribute playback speed\n"); + err = TestReadAttributePlaybackSpeed_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read attribute seek range end\n"); - err = TestReadAttributeSeekRangeEnd_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Read attribute seek range end\n"); + err = TestReadAttributeSeekRangeEnd_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read attribute seek range start\n"); - err = TestReadAttributeSeekRangeStart_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : Read attribute seek range start\n"); + err = TestReadAttributeSeekRangeStart_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Media Playback Play Command\n"); - err = TestMediaPlaybackPlayCommand_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : Media Playback Play Command\n"); + err = TestMediaPlaybackPlayCommand_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Media Playback Pause Command\n"); - err = TestMediaPlaybackPauseCommand_8(); - break; + ChipLogProgress(chipTool, " ***** Test Step 8 : Media Playback Pause Command\n"); + err = TestMediaPlaybackPauseCommand_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Media Playback Stop Command\n"); - err = TestMediaPlaybackStopCommand_9(); - break; + ChipLogProgress(chipTool, " ***** Test Step 9 : Media Playback Stop Command\n"); + err = TestMediaPlaybackStopCommand_9(); + break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Media Playback Start Over Command\n"); - err = TestMediaPlaybackStartOverCommand_10(); - break; + ChipLogProgress(chipTool, " ***** Test Step 10 : Media Playback Start Over Command\n"); + err = TestMediaPlaybackStartOverCommand_10(); + break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Media Playback Previous Command\n"); - err = TestMediaPlaybackPreviousCommand_11(); - break; + ChipLogProgress(chipTool, " ***** Test Step 11 : Media Playback Previous Command\n"); + err = TestMediaPlaybackPreviousCommand_11(); + break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Media Playback Next Command\n"); - err = TestMediaPlaybackNextCommand_12(); - break; + ChipLogProgress(chipTool, " ***** Test Step 12 : Media Playback Next Command\n"); + err = TestMediaPlaybackNextCommand_12(); + break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Media Playback Rewind Command\n"); - err = TestMediaPlaybackRewindCommand_13(); - break; + ChipLogProgress(chipTool, " ***** Test Step 13 : Media Playback Rewind Command\n"); + err = TestMediaPlaybackRewindCommand_13(); + break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Media Playback Fast Forward Command\n"); - err = TestMediaPlaybackFastForwardCommand_14(); - break; + ChipLogProgress(chipTool, " ***** Test Step 14 : Media Playback Fast Forward Command\n"); + err = TestMediaPlaybackFastForwardCommand_14(); + break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Media Playback Skip Forward Command\n"); - err = TestMediaPlaybackSkipForwardCommand_15(); - break; + ChipLogProgress(chipTool, " ***** Test Step 15 : Media Playback Skip Forward Command\n"); + err = TestMediaPlaybackSkipForwardCommand_15(); + break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Media Playback Skip Backward Command\n"); - err = TestMediaPlaybackSkipBackwardCommand_16(); - break; + ChipLogProgress(chipTool, " ***** Test Step 16 : Media Playback Skip Backward Command\n"); + err = TestMediaPlaybackSkipBackwardCommand_16(); + break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Media Playback Seek Command\n"); - err = TestMediaPlaybackSeekCommand_17(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 17 : Media Playback Seek Command\n"); + err = TestMediaPlaybackSeekCommand_17(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 18; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, chip::app::Clusters::MediaPlayback::PlaybackStateEnum playbackState) + static void OnSuccessCallback_1(void * context, chip::app::Clusters::MediaPlayback::PlaybackStateEnum playbackState) { (static_cast(context))->OnSuccessResponse_1(playbackState); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint64_t startTime) + static void OnSuccessCallback_2(void * context, uint64_t startTime) { (static_cast(context))->OnSuccessResponse_2(startTime); } - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, uint64_t duration) + static void OnSuccessCallback_3(void * context, uint64_t duration) { (static_cast(context))->OnSuccessResponse_3(duration); } - - - static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, float playbackSpeed) + static void OnSuccessCallback_4(void * context, float playbackSpeed) { (static_cast(context))->OnSuccessResponse_4(playbackSpeed); } - - - static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context, uint64_t seekRangeEnd) + static void OnSuccessCallback_5(void * context, uint64_t seekRangeEnd) { (static_cast(context))->OnSuccessResponse_5(seekRangeEnd); } - - - static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, uint64_t seekRangeStart) + static void OnSuccessCallback_6(void * context, uint64_t seekRangeStart) { (static_cast(context))->OnSuccessResponse_6(seekRangeStart); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadAttributePlaybackState_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; chip::Controller::MediaPlaybackClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( chip::app::Clusters::MediaPlayback::PlaybackStateEnum playbackState) + void OnSuccessResponse_1(chip::app::Clusters::MediaPlayback::PlaybackStateEnum playbackState) { - VerifyOrReturn(CheckValue("playbackState", playbackState,0 - )); + VerifyOrReturn(CheckValue("playbackState", playbackState, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeStartTime_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; chip::Controller::MediaPlaybackClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint64_t startTime) + void OnSuccessResponse_2(uint64_t startTime) { - VerifyOrReturn(CheckValue("startTime", startTime,0ULL - )); + VerifyOrReturn(CheckValue("startTime", startTime, 0ULL)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeDuration_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; chip::Controller::MediaPlaybackClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( uint64_t duration) + void OnSuccessResponse_3(uint64_t duration) { - VerifyOrReturn(CheckValue("duration", duration,0ULL - )); + VerifyOrReturn(CheckValue("duration", duration, 0ULL)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributePlaybackSpeed_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; chip::Controller::MediaPlaybackClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( float playbackSpeed) + void OnSuccessResponse_4(float playbackSpeed) { - VerifyOrReturn(CheckValue("playbackSpeed", playbackSpeed,0.0f - )); + VerifyOrReturn(CheckValue("playbackSpeed", playbackSpeed, 0.0f)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeSeekRangeEnd_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; chip::Controller::MediaPlaybackClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5( uint64_t seekRangeEnd) + void OnSuccessResponse_5(uint64_t seekRangeEnd) { - VerifyOrReturn(CheckValue("seekRangeEnd", seekRangeEnd,0ULL - )); + VerifyOrReturn(CheckValue("seekRangeEnd", seekRangeEnd, 0ULL)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeSeekRangeStart_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; chip::Controller::MediaPlaybackClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( uint64_t seekRangeStart) + void OnSuccessResponse_6(uint64_t seekRangeStart) { - VerifyOrReturn(CheckValue("seekRangeStart", seekRangeStart,0ULL - )); + VerifyOrReturn(CheckValue("seekRangeStart", seekRangeStart, 0ULL)); NextTest(); - } - - - + } - CHIP_ERROR TestMediaPlaybackPlayCommand_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; - using RequestType = chip::app::Clusters::MediaPlayback::Commands::PlayRequest::Type; + using RequestType = chip::app::Clusters::MediaPlayback::Commands::PlayRequest::Type; RequestType request; @@ -53447,34 +40892,23 @@ class TV_MediaPlaybackCluster: public TestCommand (static_cast(context))->OnFailureResponse_7(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7( chip::app::Clusters::MediaPlayback::StatusEnum status) + void OnSuccessResponse_7(chip::app::Clusters::MediaPlayback::StatusEnum status) { - VerifyOrReturn(CheckValue("status", status,0 - )); + VerifyOrReturn(CheckValue("status", status, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestMediaPlaybackPauseCommand_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; - using RequestType = chip::app::Clusters::MediaPlayback::Commands::PauseRequest::Type; + using RequestType = chip::app::Clusters::MediaPlayback::Commands::PauseRequest::Type; RequestType request; @@ -53486,34 +40920,23 @@ class TV_MediaPlaybackCluster: public TestCommand (static_cast(context))->OnFailureResponse_8(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_8(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_8( chip::app::Clusters::MediaPlayback::StatusEnum status) + void OnSuccessResponse_8(chip::app::Clusters::MediaPlayback::StatusEnum status) { - VerifyOrReturn(CheckValue("status", status,0 - )); + VerifyOrReturn(CheckValue("status", status, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestMediaPlaybackStopCommand_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; - using RequestType = chip::app::Clusters::MediaPlayback::Commands::StopRequest::Type; + using RequestType = chip::app::Clusters::MediaPlayback::Commands::StopRequest::Type; RequestType request; @@ -53525,34 +40948,23 @@ class TV_MediaPlaybackCluster: public TestCommand (static_cast(context))->OnFailureResponse_9(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_9( chip::app::Clusters::MediaPlayback::StatusEnum status) + void OnSuccessResponse_9(chip::app::Clusters::MediaPlayback::StatusEnum status) { - VerifyOrReturn(CheckValue("status", status,0 - )); + VerifyOrReturn(CheckValue("status", status, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestMediaPlaybackStartOverCommand_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; - using RequestType = chip::app::Clusters::MediaPlayback::Commands::StartOverRequest::Type; + using RequestType = chip::app::Clusters::MediaPlayback::Commands::StartOverRequest::Type; RequestType request; @@ -53564,34 +40976,23 @@ class TV_MediaPlaybackCluster: public TestCommand (static_cast(context))->OnFailureResponse_10(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_10(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_10( chip::app::Clusters::MediaPlayback::StatusEnum status) + void OnSuccessResponse_10(chip::app::Clusters::MediaPlayback::StatusEnum status) { - VerifyOrReturn(CheckValue("status", status,0 - )); + VerifyOrReturn(CheckValue("status", status, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestMediaPlaybackPreviousCommand_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; - using RequestType = chip::app::Clusters::MediaPlayback::Commands::PreviousRequest::Type; + using RequestType = chip::app::Clusters::MediaPlayback::Commands::PreviousRequest::Type; RequestType request; @@ -53603,34 +41004,23 @@ class TV_MediaPlaybackCluster: public TestCommand (static_cast(context))->OnFailureResponse_11(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_11(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_11( chip::app::Clusters::MediaPlayback::StatusEnum status) + void OnSuccessResponse_11(chip::app::Clusters::MediaPlayback::StatusEnum status) { - VerifyOrReturn(CheckValue("status", status,0 - )); + VerifyOrReturn(CheckValue("status", status, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestMediaPlaybackNextCommand_12() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; - using RequestType = chip::app::Clusters::MediaPlayback::Commands::NextRequest::Type; + using RequestType = chip::app::Clusters::MediaPlayback::Commands::NextRequest::Type; RequestType request; @@ -53642,34 +41032,23 @@ class TV_MediaPlaybackCluster: public TestCommand (static_cast(context))->OnFailureResponse_12(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_12(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_12( chip::app::Clusters::MediaPlayback::StatusEnum status) + void OnSuccessResponse_12(chip::app::Clusters::MediaPlayback::StatusEnum status) { - VerifyOrReturn(CheckValue("status", status,0 - )); + VerifyOrReturn(CheckValue("status", status, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestMediaPlaybackRewindCommand_13() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; - using RequestType = chip::app::Clusters::MediaPlayback::Commands::RewindRequest::Type; + using RequestType = chip::app::Clusters::MediaPlayback::Commands::RewindRequest::Type; RequestType request; @@ -53681,34 +41060,23 @@ class TV_MediaPlaybackCluster: public TestCommand (static_cast(context))->OnFailureResponse_13(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_13(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_13(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_13( chip::app::Clusters::MediaPlayback::StatusEnum status) + void OnSuccessResponse_13(chip::app::Clusters::MediaPlayback::StatusEnum status) { - VerifyOrReturn(CheckValue("status", status,0 - )); + VerifyOrReturn(CheckValue("status", status, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestMediaPlaybackFastForwardCommand_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; - using RequestType = chip::app::Clusters::MediaPlayback::Commands::FastForwardRequest::Type; + using RequestType = chip::app::Clusters::MediaPlayback::Commands::FastForwardRequest::Type; RequestType request; @@ -53720,38 +41088,27 @@ class TV_MediaPlaybackCluster: public TestCommand (static_cast(context))->OnFailureResponse_14(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_14(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_14( chip::app::Clusters::MediaPlayback::StatusEnum status) + void OnSuccessResponse_14(chip::app::Clusters::MediaPlayback::StatusEnum status) { - VerifyOrReturn(CheckValue("status", status,0 - )); + VerifyOrReturn(CheckValue("status", status, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestMediaPlaybackSkipForwardCommand_15() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; - using RequestType = chip::app::Clusters::MediaPlayback::Commands::SkipForwardRequest::Type; + using RequestType = chip::app::Clusters::MediaPlayback::Commands::SkipForwardRequest::Type; RequestType request; - request.deltaPositionMilliseconds = 100ULL; - + request.deltaPositionMilliseconds = 100ULL; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_15(data.status); }; @@ -53760,38 +41117,27 @@ class TV_MediaPlaybackCluster: public TestCommand (static_cast(context))->OnFailureResponse_15(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_15(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_15(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_15( chip::app::Clusters::MediaPlayback::StatusEnum status) + void OnSuccessResponse_15(chip::app::Clusters::MediaPlayback::StatusEnum status) { - VerifyOrReturn(CheckValue("status", status,0 - )); + VerifyOrReturn(CheckValue("status", status, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestMediaPlaybackSkipBackwardCommand_16() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; - using RequestType = chip::app::Clusters::MediaPlayback::Commands::SkipBackwardRequest::Type; + using RequestType = chip::app::Clusters::MediaPlayback::Commands::SkipBackwardRequest::Type; RequestType request; - request.deltaPositionMilliseconds = 100ULL; - + request.deltaPositionMilliseconds = 100ULL; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_16(data.status); }; @@ -53800,38 +41146,27 @@ class TV_MediaPlaybackCluster: public TestCommand (static_cast(context))->OnFailureResponse_16(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_16(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_16(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_16( chip::app::Clusters::MediaPlayback::StatusEnum status) + void OnSuccessResponse_16(chip::app::Clusters::MediaPlayback::StatusEnum status) { - VerifyOrReturn(CheckValue("status", status,0 - )); + VerifyOrReturn(CheckValue("status", status, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestMediaPlaybackSeekCommand_17() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 3; - using RequestType = chip::app::Clusters::MediaPlayback::Commands::SeekRequest::Type; + using RequestType = chip::app::Clusters::MediaPlayback::Commands::SeekRequest::Type; RequestType request; - request.position = 100ULL; - + request.position = 100ULL; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_17(data.status); }; @@ -53840,212 +41175,161 @@ class TV_MediaPlaybackCluster: public TestCommand (static_cast(context))->OnFailureResponse_17(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_17(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_17(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_17( chip::app::Clusters::MediaPlayback::StatusEnum status) + void OnSuccessResponse_17(chip::app::Clusters::MediaPlayback::StatusEnum status) { - VerifyOrReturn(CheckValue("status", status,0 - )); + VerifyOrReturn(CheckValue("status", status, 0)); NextTest(); - } - - - }; + } +}; -class TV_ChannelCluster: public TestCommand +class TV_ChannelCluster : public TestCommand { - public: - TV_ChannelCluster(): TestCommand("TV_ChannelCluster"), mTestIndex(0) +public: + TV_ChannelCluster() : TestCommand("TV_ChannelCluster"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~TV_ChannelCluster() - { - } + ~TV_ChannelCluster() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: TV_ChannelCluster\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: TV_ChannelCluster\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: TV_ChannelCluster\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: TV_ChannelCluster\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute Channel list\n"); - err = TestReadAttributeChannelList_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute Channel list\n"); + err = TestReadAttributeChannelList_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Change Channel Command\n"); - err = TestChangeChannelCommand_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Change Channel Command\n"); + err = TestChangeChannelCommand_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Change Channel By Number Command\n"); - err = TestChangeChannelByNumberCommand_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Change Channel By Number Command\n"); + err = TestChangeChannelByNumberCommand_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Skip Channel Command\n"); - err = TestSkipChannelCommand_4(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 4 : Skip Channel Command\n"); + err = TestSkipChannelCommand_4(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 5; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, const chip::app::DataModel::DecodableList & channelList) + static void OnSuccessCallback_1( + void * context, + const chip::app::DataModel::DecodableList & channelList) { (static_cast(context))->OnSuccessResponse_1(channelList); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadAttributeChannelList_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ChannelClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( const chip::app::DataModel::DecodableList & channelList) - { - { - auto iter_0 = channelList.begin(); - VerifyOrReturn(CheckNextListItemDecodes("channelList", iter_0, 0)); - VerifyOrReturn(CheckValue("channelList[0].majorNumber", iter_0.GetValue().majorNumber,1U - )); - VerifyOrReturn(CheckValue("channelList[0].minorNumber", iter_0.GetValue().minorNumber,2U - )); - VerifyOrReturn(CheckValueAsString("channelList[0].name", iter_0.GetValue().name,chip::CharSpan("exampleName", 11) - )); - VerifyOrReturn(CheckValueAsString("channelList[0].callSign", iter_0.GetValue().callSign,chip::CharSpan("exampleCSign", 12) - )); - VerifyOrReturn(CheckValueAsString("channelList[0].affiliateCallSign", iter_0.GetValue().affiliateCallSign,chip::CharSpan("exampleASign", 12) - )); - VerifyOrReturn(CheckNextListItemDecodes("channelList", iter_0, 1)); - VerifyOrReturn(CheckValue("channelList[1].majorNumber", iter_0.GetValue().majorNumber,2U - )); - VerifyOrReturn(CheckValue("channelList[1].minorNumber", iter_0.GetValue().minorNumber,3U - )); - VerifyOrReturn(CheckValueAsString("channelList[1].name", iter_0.GetValue().name,chip::CharSpan("exampleName", 11) - )); - VerifyOrReturn(CheckValueAsString("channelList[1].callSign", iter_0.GetValue().callSign,chip::CharSpan("exampleCSign", 12) - )); - VerifyOrReturn(CheckValueAsString("channelList[1].affiliateCallSign", iter_0.GetValue().affiliateCallSign,chip::CharSpan("exampleASign", 12) - )); - VerifyOrReturn(CheckNoMoreListItems("channelList", iter_0, 2)); - } + void OnSuccessResponse_1( + const chip::app::DataModel::DecodableList & channelList) + { + { + auto iter_0 = channelList.begin(); + VerifyOrReturn(CheckNextListItemDecodes("channelList", iter_0, 0)); + VerifyOrReturn(CheckValue("channelList[0].majorNumber", iter_0.GetValue().majorNumber, 1U)); + VerifyOrReturn(CheckValue("channelList[0].minorNumber", iter_0.GetValue().minorNumber, 2U)); + VerifyOrReturn(CheckValueAsString("channelList[0].name", iter_0.GetValue().name, chip::CharSpan("exampleName", 11))); + VerifyOrReturn( + CheckValueAsString("channelList[0].callSign", iter_0.GetValue().callSign, chip::CharSpan("exampleCSign", 12))); + VerifyOrReturn(CheckValueAsString("channelList[0].affiliateCallSign", iter_0.GetValue().affiliateCallSign, + chip::CharSpan("exampleASign", 12))); + VerifyOrReturn(CheckNextListItemDecodes("channelList", iter_0, 1)); + VerifyOrReturn(CheckValue("channelList[1].majorNumber", iter_0.GetValue().majorNumber, 2U)); + VerifyOrReturn(CheckValue("channelList[1].minorNumber", iter_0.GetValue().minorNumber, 3U)); + VerifyOrReturn(CheckValueAsString("channelList[1].name", iter_0.GetValue().name, chip::CharSpan("exampleName", 11))); + VerifyOrReturn( + CheckValueAsString("channelList[1].callSign", iter_0.GetValue().callSign, chip::CharSpan("exampleCSign", 12))); + VerifyOrReturn(CheckValueAsString("channelList[1].affiliateCallSign", iter_0.GetValue().affiliateCallSign, + chip::CharSpan("exampleASign", 12))); + VerifyOrReturn(CheckNoMoreListItems("channelList", iter_0, 2)); + } NextTest(); - } - - - + } - CHIP_ERROR TestChangeChannelCommand_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::Channel::Commands::ChangeChannelRequest::Type; + using RequestType = chip::app::Clusters::Channel::Commands::ChangeChannelRequest::Type; RequestType request; - request.match = chip::Span("CNNgarbage: not in length on purpose", 3); + request.match = chip::Span("CNNgarbage: not in length on purpose", 3); auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_2(data.channelMatch, data.errorType); @@ -54055,51 +41339,36 @@ class TV_ChannelCluster: public TestCommand (static_cast(context))->OnFailureResponse_2(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( const chip::app::Clusters::Channel::Structs::ChannelInfo::DecodableType & channelMatch, chip::app::Clusters::Channel::ErrorTypeEnum errorType) + void OnSuccessResponse_2(const chip::app::Clusters::Channel::Structs::ChannelInfo::DecodableType & channelMatch, + chip::app::Clusters::Channel::ErrorTypeEnum errorType) { - VerifyOrReturn(CheckValue("channelMatch.majorNumber", channelMatch.majorNumber,1U - )); - VerifyOrReturn(CheckValue("channelMatch.minorNumber", channelMatch.minorNumber,0U - )); - VerifyOrReturn(CheckValueAsString("channelMatch.name", channelMatch.name,chip::CharSpan("name", 4) - )); - VerifyOrReturn(CheckValueAsString("channelMatch.callSign", channelMatch.callSign,chip::CharSpan("callSign", 8) - )); - VerifyOrReturn(CheckValueAsString("channelMatch.affiliateCallSign", channelMatch.affiliateCallSign,chip::CharSpan("affiliateCallSign", 17) - )); + VerifyOrReturn(CheckValue("channelMatch.majorNumber", channelMatch.majorNumber, 1U)); + VerifyOrReturn(CheckValue("channelMatch.minorNumber", channelMatch.minorNumber, 0U)); + VerifyOrReturn(CheckValueAsString("channelMatch.name", channelMatch.name, chip::CharSpan("name", 4))); + VerifyOrReturn(CheckValueAsString("channelMatch.callSign", channelMatch.callSign, chip::CharSpan("callSign", 8))); + VerifyOrReturn(CheckValueAsString("channelMatch.affiliateCallSign", channelMatch.affiliateCallSign, + chip::CharSpan("affiliateCallSign", 17))); - - VerifyOrReturn(CheckValue("errorType", errorType,0 - )); + VerifyOrReturn(CheckValue("errorType", errorType, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestChangeChannelByNumberCommand_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::Channel::Commands::ChangeChannelByNumberRequest::Type; + using RequestType = chip::app::Clusters::Channel::Commands::ChangeChannelByNumberRequest::Type; RequestType request; - request.majorNumber = 1U; - request.minorNumber = 2U; - + request.majorNumber = 1U; + request.minorNumber = 2U; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(); }; @@ -54108,34 +41377,22 @@ class TV_ChannelCluster: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_3() - { NextTest(); - } - + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_3() { NextTest(); } - CHIP_ERROR TestSkipChannelCommand_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::Channel::Commands::SkipChannelRequest::Type; + using RequestType = chip::app::Clusters::Channel::Commands::SkipChannelRequest::Type; RequestType request; - request.count = 1U; - + request.count = 1U; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_4(); }; @@ -54144,128 +41401,89 @@ class TV_ChannelCluster: public TestCommand (static_cast(context))->OnFailureResponse_4(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_4() - { NextTest(); - } - + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - }; + void OnSuccessResponse_4() { NextTest(); } +}; -class TV_LowPowerCluster: public TestCommand +class TV_LowPowerCluster : public TestCommand { - public: - TV_LowPowerCluster(): TestCommand("TV_LowPowerCluster"), mTestIndex(0) +public: + TV_LowPowerCluster() : TestCommand("TV_LowPowerCluster"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~TV_LowPowerCluster() - { - } + ~TV_LowPowerCluster() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: TV_LowPowerCluster\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: TV_LowPowerCluster\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: TV_LowPowerCluster\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: TV_LowPowerCluster\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Sleep Input Status Command\n"); - err = TestSleepInputStatusCommand_1(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 1 : Sleep Input Status Command\n"); + err = TestSleepInputStatusCommand_1(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 2; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestSleepInputStatusCommand_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::LowPower::Commands::Sleep::Type; + using RequestType = chip::app::Clusters::LowPower::Commands::Sleep::Type; RequestType request; @@ -54277,236 +41495,175 @@ class TV_LowPowerCluster: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_1() - { NextTest(); - } - + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - }; + void OnSuccessResponse_1() { NextTest(); } +}; -class TV_ContentLauncherCluster: public TestCommand +class TV_ContentLauncherCluster : public TestCommand { - public: - TV_ContentLauncherCluster(): TestCommand("TV_ContentLauncherCluster"), mTestIndex(0) +public: + TV_ContentLauncherCluster() : TestCommand("TV_ContentLauncherCluster"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~TV_ContentLauncherCluster() - { - } + ~TV_ContentLauncherCluster() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: TV_ContentLauncherCluster\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: TV_ContentLauncherCluster\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: TV_ContentLauncherCluster\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: TV_ContentLauncherCluster\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute accept header list\n"); - err = TestReadAttributeAcceptHeaderList_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute accept header list\n"); + err = TestReadAttributeAcceptHeaderList_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute supported streaming protocols\n"); - err = TestReadAttributeSupportedStreamingProtocols_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute supported streaming protocols\n"); + err = TestReadAttributeSupportedStreamingProtocols_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Launch Content Command\n"); - err = TestLaunchContentCommand_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Launch Content Command\n"); + err = TestLaunchContentCommand_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Launch URL Command\n"); - err = TestLaunchUrlCommand_4(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 4 : Launch URL Command\n"); + err = TestLaunchUrlCommand_4(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 5; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, const chip::app::DataModel::DecodableList & acceptHeaderList) + static void OnSuccessCallback_1(void * context, const chip::app::DataModel::DecodableList & acceptHeaderList) { (static_cast(context))->OnSuccessResponse_1(acceptHeaderList); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint32_t supportedStreamingProtocols) + static void OnSuccessCallback_2(void * context, uint32_t supportedStreamingProtocols) { (static_cast(context))->OnSuccessResponse_2(supportedStreamingProtocols); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadAttributeAcceptHeaderList_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ContentLauncherClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( const chip::app::DataModel::DecodableList & acceptHeaderList) + void OnSuccessResponse_1(const chip::app::DataModel::DecodableList & acceptHeaderList) { - { - auto iter_0 = acceptHeaderList.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acceptHeaderList", iter_0, 0)); - VerifyOrReturn(CheckValueAsString("acceptHeaderList[0]", iter_0.GetValue(),chip::CharSpan("example", 7) - )); - VerifyOrReturn(CheckNextListItemDecodes("acceptHeaderList", iter_0, 1)); - VerifyOrReturn(CheckValueAsString("acceptHeaderList[1]", iter_0.GetValue(),chip::CharSpan("example", 7) - )); - VerifyOrReturn(CheckNoMoreListItems("acceptHeaderList", iter_0, 2)); - } + { + auto iter_0 = acceptHeaderList.begin(); + VerifyOrReturn(CheckNextListItemDecodes("acceptHeaderList", iter_0, 0)); + VerifyOrReturn(CheckValueAsString("acceptHeaderList[0]", iter_0.GetValue(), chip::CharSpan("example", 7))); + VerifyOrReturn(CheckNextListItemDecodes("acceptHeaderList", iter_0, 1)); + VerifyOrReturn(CheckValueAsString("acceptHeaderList[1]", iter_0.GetValue(), chip::CharSpan("example", 7))); + VerifyOrReturn(CheckNoMoreListItems("acceptHeaderList", iter_0, 2)); + } NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeSupportedStreamingProtocols_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ContentLauncherClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint32_t supportedStreamingProtocols) + void OnSuccessResponse_2(uint32_t supportedStreamingProtocols) { - VerifyOrReturn(CheckValue("supportedStreamingProtocols", supportedStreamingProtocols,0UL - )); + VerifyOrReturn(CheckValue("supportedStreamingProtocols", supportedStreamingProtocols, 0UL)); NextTest(); - } - - - + } - CHIP_ERROR TestLaunchContentCommand_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ContentLauncher::Commands::LaunchContentRequest::Type; + using RequestType = chip::app::Clusters::ContentLauncher::Commands::LaunchContentRequest::Type; RequestType request; - request.autoPlay = true; - request.data = chip::Span("exampleDatagarbage: not in length on purpose", 11); - - request.search = chip::app::DataModel::List(); + request.autoPlay = true; + request.data = chip::Span("exampleDatagarbage: not in length on purpose", 11); + + request.search = chip::app::DataModel::List(); auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(data.status, data.data); @@ -54516,90 +41673,67 @@ class TV_ContentLauncherCluster: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( chip::app::Clusters::ContentLauncher::StatusEnum status, chip::CharSpan data) + void OnSuccessResponse_3(chip::app::Clusters::ContentLauncher::StatusEnum status, chip::CharSpan data) { - VerifyOrReturn(CheckValue("status", status,0 - )); - + VerifyOrReturn(CheckValue("status", status, 0)); - VerifyOrReturn(CheckValueAsString("data", data,chip::CharSpan("exampleData", 11) - )); + VerifyOrReturn(CheckValueAsString("data", data, chip::CharSpan("exampleData", 11))); NextTest(); - } - - - + } - CHIP_ERROR TestLaunchUrlCommand_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ContentLauncher::Commands::LaunchURLRequest::Type; + using RequestType = chip::app::Clusters::ContentLauncher::Commands::LaunchURLRequest::Type; RequestType request; - request.contentURL = chip::Span("exampleUrlgarbage: not in length on purpose", 10); - request.displayString = chip::Span("exampleDisplayStringgarbage: not in length on purpose", 20); - - request.brandingInformation.providerName = chip::Span("exampleNamegarbage: not in length on purpose", 11); - - request.brandingInformation.background.imageUrl = chip::Span("exampleUrlgarbage: not in length on purpose", 10); - request.brandingInformation.background.color = chip::Span("exampleColorgarbage: not in length on purpose", 12); - - request.brandingInformation.background.size.width = 0; - request.brandingInformation.background.size.height = 0; - request.brandingInformation.background.size.metric =static_cast(0); + request.contentURL = chip::Span("exampleUrlgarbage: not in length on purpose", 10); + request.displayString = chip::Span("exampleDisplayStringgarbage: not in length on purpose", 20); + request.brandingInformation.providerName = chip::Span("exampleNamegarbage: not in length on purpose", 11); - - request.brandingInformation.logo.imageUrl = chip::Span("exampleUrlgarbage: not in length on purpose", 10); - request.brandingInformation.logo.color = chip::Span("exampleColorgarbage: not in length on purpose", 12); - - request.brandingInformation.logo.size.width = 0; - request.brandingInformation.logo.size.height = 0; - request.brandingInformation.logo.size.metric =static_cast(0); + request.brandingInformation.background.imageUrl = chip::Span("exampleUrlgarbage: not in length on purpose", 10); + request.brandingInformation.background.color = chip::Span("exampleColorgarbage: not in length on purpose", 12); + request.brandingInformation.background.size.width = 0; + request.brandingInformation.background.size.height = 0; + request.brandingInformation.background.size.metric = static_cast(0); - - request.brandingInformation.progressBar.imageUrl = chip::Span("exampleUrlgarbage: not in length on purpose", 10); - request.brandingInformation.progressBar.color = chip::Span("exampleColorgarbage: not in length on purpose", 12); - - request.brandingInformation.progressBar.size.width = 0; - request.brandingInformation.progressBar.size.height = 0; - request.brandingInformation.progressBar.size.metric =static_cast(0); + request.brandingInformation.logo.imageUrl = chip::Span("exampleUrlgarbage: not in length on purpose", 10); + request.brandingInformation.logo.color = chip::Span("exampleColorgarbage: not in length on purpose", 12); + request.brandingInformation.logo.size.width = 0; + request.brandingInformation.logo.size.height = 0; + request.brandingInformation.logo.size.metric = static_cast(0); - - request.brandingInformation.splash.imageUrl = chip::Span("exampleUrlgarbage: not in length on purpose", 10); - request.brandingInformation.splash.color = chip::Span("exampleColorgarbage: not in length on purpose", 12); - - request.brandingInformation.splash.size.width = 0; - request.brandingInformation.splash.size.height = 0; - request.brandingInformation.splash.size.metric =static_cast(0); + request.brandingInformation.progressBar.imageUrl = + chip::Span("exampleUrlgarbage: not in length on purpose", 10); + request.brandingInformation.progressBar.color = chip::Span("exampleColorgarbage: not in length on purpose", 12); + request.brandingInformation.progressBar.size.width = 0; + request.brandingInformation.progressBar.size.height = 0; + request.brandingInformation.progressBar.size.metric = static_cast(0); - - request.brandingInformation.waterMark.imageUrl = chip::Span("exampleUrlgarbage: not in length on purpose", 10); - request.brandingInformation.waterMark.color = chip::Span("exampleColorgarbage: not in length on purpose", 12); - - request.brandingInformation.waterMark.size.width = 0; - request.brandingInformation.waterMark.size.height = 0; - request.brandingInformation.waterMark.size.metric =static_cast(0); + request.brandingInformation.splash.imageUrl = chip::Span("exampleUrlgarbage: not in length on purpose", 10); + request.brandingInformation.splash.color = chip::Span("exampleColorgarbage: not in length on purpose", 12); + request.brandingInformation.splash.size.width = 0; + request.brandingInformation.splash.size.height = 0; + request.brandingInformation.splash.size.metric = static_cast(0); + request.brandingInformation.waterMark.imageUrl = chip::Span("exampleUrlgarbage: not in length on purpose", 10); + request.brandingInformation.waterMark.color = chip::Span("exampleColorgarbage: not in length on purpose", 12); + request.brandingInformation.waterMark.size.width = 0; + request.brandingInformation.waterMark.size.height = 0; + request.brandingInformation.waterMark.size.metric = static_cast(0); auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_4(data.status, data.data); @@ -54609,262 +41743,200 @@ class TV_ContentLauncherCluster: public TestCommand (static_cast(context))->OnFailureResponse_4(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( chip::app::Clusters::ContentLauncher::StatusEnum status, chip::CharSpan data) + void OnSuccessResponse_4(chip::app::Clusters::ContentLauncher::StatusEnum status, chip::CharSpan data) { - VerifyOrReturn(CheckValue("status", status,0 - )); + VerifyOrReturn(CheckValue("status", status, 0)); - - VerifyOrReturn(CheckValueAsString("data", data,chip::CharSpan("exampleData", 11) - )); + VerifyOrReturn(CheckValueAsString("data", data, chip::CharSpan("exampleData", 11))); NextTest(); - } - - - }; + } +}; -class TV_MediaInputCluster: public TestCommand +class TV_MediaInputCluster : public TestCommand { - public: - TV_MediaInputCluster(): TestCommand("TV_MediaInputCluster"), mTestIndex(0) +public: + TV_MediaInputCluster() : TestCommand("TV_MediaInputCluster"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~TV_MediaInputCluster() - { - } + ~TV_MediaInputCluster() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: TV_MediaInputCluster\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: TV_MediaInputCluster\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: TV_MediaInputCluster\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: TV_MediaInputCluster\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute media input list\n"); - err = TestReadAttributeMediaInputList_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute media input list\n"); + err = TestReadAttributeMediaInputList_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read current media input\n"); - err = TestReadCurrentMediaInput_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Read current media input\n"); + err = TestReadCurrentMediaInput_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Select Input Command\n"); - err = TestSelectInputCommand_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Select Input Command\n"); + err = TestSelectInputCommand_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Hide Input Status Command\n"); - err = TestHideInputStatusCommand_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Hide Input Status Command\n"); + err = TestHideInputStatusCommand_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Show Input Status Command\n"); - err = TestShowInputStatusCommand_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Show Input Status Command\n"); + err = TestShowInputStatusCommand_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Rename Input Command\n"); - err = TestRenameInputCommand_6(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 6 : Rename Input Command\n"); + err = TestRenameInputCommand_6(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 7; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, const chip::app::DataModel::DecodableList & mediaInputList) + static void OnSuccessCallback_1( + void * context, + const chip::app::DataModel::DecodableList & + mediaInputList) { (static_cast(context))->OnSuccessResponse_1(mediaInputList); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint8_t currentMediaInput) + static void OnSuccessCallback_2(void * context, uint8_t currentMediaInput) { (static_cast(context))->OnSuccessResponse_2(currentMediaInput); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadAttributeMediaInputList_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::MediaInputClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( const chip::app::DataModel::DecodableList & mediaInputList) - { - { - auto iter_0 = mediaInputList.begin(); - VerifyOrReturn(CheckNextListItemDecodes("mediaInputList", iter_0, 0)); - VerifyOrReturn(CheckValue("mediaInputList[0].index", iter_0.GetValue().index,1 - )); - VerifyOrReturn(CheckValue("mediaInputList[0].inputType", iter_0.GetValue().inputType,4 - )); - VerifyOrReturn(CheckValueAsString("mediaInputList[0].name", iter_0.GetValue().name,chip::CharSpan("exampleName", 11) - )); - VerifyOrReturn(CheckValueAsString("mediaInputList[0].description", iter_0.GetValue().description,chip::CharSpan("exampleDescription", 18) - )); - VerifyOrReturn(CheckNextListItemDecodes("mediaInputList", iter_0, 1)); - VerifyOrReturn(CheckValue("mediaInputList[1].index", iter_0.GetValue().index,2 - )); - VerifyOrReturn(CheckValue("mediaInputList[1].inputType", iter_0.GetValue().inputType,4 - )); - VerifyOrReturn(CheckValueAsString("mediaInputList[1].name", iter_0.GetValue().name,chip::CharSpan("exampleName", 11) - )); - VerifyOrReturn(CheckValueAsString("mediaInputList[1].description", iter_0.GetValue().description,chip::CharSpan("exampleDescription", 18) - )); - VerifyOrReturn(CheckNoMoreListItems("mediaInputList", iter_0, 2)); - } + void OnSuccessResponse_1( + const chip::app::DataModel::DecodableList & + mediaInputList) + { + { + auto iter_0 = mediaInputList.begin(); + VerifyOrReturn(CheckNextListItemDecodes("mediaInputList", iter_0, 0)); + VerifyOrReturn(CheckValue("mediaInputList[0].index", iter_0.GetValue().index, 1)); + VerifyOrReturn(CheckValue("mediaInputList[0].inputType", iter_0.GetValue().inputType, 4)); + VerifyOrReturn(CheckValueAsString("mediaInputList[0].name", iter_0.GetValue().name, chip::CharSpan("exampleName", 11))); + VerifyOrReturn(CheckValueAsString("mediaInputList[0].description", iter_0.GetValue().description, + chip::CharSpan("exampleDescription", 18))); + VerifyOrReturn(CheckNextListItemDecodes("mediaInputList", iter_0, 1)); + VerifyOrReturn(CheckValue("mediaInputList[1].index", iter_0.GetValue().index, 2)); + VerifyOrReturn(CheckValue("mediaInputList[1].inputType", iter_0.GetValue().inputType, 4)); + VerifyOrReturn(CheckValueAsString("mediaInputList[1].name", iter_0.GetValue().name, chip::CharSpan("exampleName", 11))); + VerifyOrReturn(CheckValueAsString("mediaInputList[1].description", iter_0.GetValue().description, + chip::CharSpan("exampleDescription", 18))); + VerifyOrReturn(CheckNoMoreListItems("mediaInputList", iter_0, 2)); + } NextTest(); - } - - - + } - CHIP_ERROR TestReadCurrentMediaInput_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::MediaInputClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint8_t currentMediaInput) + void OnSuccessResponse_2(uint8_t currentMediaInput) { - VerifyOrReturn(CheckValue("currentMediaInput", currentMediaInput,0 - )); + VerifyOrReturn(CheckValue("currentMediaInput", currentMediaInput, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestSelectInputCommand_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::MediaInput::Commands::SelectInputRequest::Type; + using RequestType = chip::app::Clusters::MediaInput::Commands::SelectInputRequest::Type; RequestType request; - request.index = 1; - + request.index = 1; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(); }; @@ -54873,30 +41945,18 @@ class TV_MediaInputCluster: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_3() - { NextTest(); - } - + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_3() { NextTest(); } - CHIP_ERROR TestHideInputStatusCommand_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::MediaInput::Commands::HideInputStatusRequest::Type; + using RequestType = chip::app::Clusters::MediaInput::Commands::HideInputStatusRequest::Type; RequestType request; @@ -54908,30 +41968,18 @@ class TV_MediaInputCluster: public TestCommand (static_cast(context))->OnFailureResponse_4(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_4() - { NextTest(); - } - + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_4() { NextTest(); } - CHIP_ERROR TestShowInputStatusCommand_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::MediaInput::Commands::ShowInputStatusRequest::Type; + using RequestType = chip::app::Clusters::MediaInput::Commands::ShowInputStatusRequest::Type; RequestType request; @@ -54943,34 +41991,22 @@ class TV_MediaInputCluster: public TestCommand (static_cast(context))->OnFailureResponse_5(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_5() - { NextTest(); - } - + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_5() { NextTest(); } - CHIP_ERROR TestRenameInputCommand_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::MediaInput::Commands::RenameInputRequest::Type; + using RequestType = chip::app::Clusters::MediaInput::Commands::RenameInputRequest::Type; RequestType request; - request.index = 1; - request.name = chip::Span("newNamegarbage: not in length on purpose", 7); + request.index = 1; + request.name = chip::Span("newNamegarbage: not in length on purpose", 7); auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_6(); @@ -54980,6384 +42016,5042 @@ class TV_MediaInputCluster: public TestCommand (static_cast(context))->OnFailureResponse_6(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_6() - { NextTest(); - } - + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - }; + void OnSuccessResponse_6() { NextTest(); } +}; -class TestCluster: public TestCommand +class TestCluster : public TestCommand { - public: - TestCluster(): TestCommand("TestCluster"), mTestIndex(0) +public: + TestCluster() : TestCommand("TestCluster"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~TestCluster() - { - } + ~TestCluster() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: TestCluster\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: TestCluster\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: TestCluster\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: TestCluster\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Send Test Command\n"); - err = TestSendTestCommand_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Send Test Command\n"); + err = TestSendTestCommand_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Send Test Not Handled Command\n"); - err = TestSendTestNotHandledCommand_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Send Test Not Handled Command\n"); + err = TestSendTestNotHandledCommand_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Send Test Specific Command\n"); - err = TestSendTestSpecificCommand_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Send Test Specific Command\n"); + err = TestSendTestSpecificCommand_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Send Test Add Arguments Command\n"); - err = TestSendTestAddArgumentsCommand_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Send Test Add Arguments Command\n"); + err = TestSendTestAddArgumentsCommand_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Send failing Test Add Arguments Command\n"); - err = TestSendFailingTestAddArgumentsCommand_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Send failing Test Add Arguments Command\n"); + err = TestSendFailingTestAddArgumentsCommand_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read attribute BOOLEAN Default Value\n"); - err = TestReadAttributeBooleanDefaultValue_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : Read attribute BOOLEAN Default Value\n"); + err = TestReadAttributeBooleanDefaultValue_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Write attribute BOOLEAN True\n"); - err = TestWriteAttributeBooleanTrue_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : Write attribute BOOLEAN True\n"); + err = TestWriteAttributeBooleanTrue_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read attribute BOOLEAN True\n"); - err = TestReadAttributeBooleanTrue_8(); - break; + ChipLogProgress(chipTool, " ***** Test Step 8 : Read attribute BOOLEAN True\n"); + err = TestReadAttributeBooleanTrue_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Write attribute BOOLEAN False\n"); - err = TestWriteAttributeBooleanFalse_9(); - break; + ChipLogProgress(chipTool, " ***** Test Step 9 : Write attribute BOOLEAN False\n"); + err = TestWriteAttributeBooleanFalse_9(); + break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read attribute BOOLEAN False\n"); - err = TestReadAttributeBooleanFalse_10(); - break; + ChipLogProgress(chipTool, " ***** Test Step 10 : Read attribute BOOLEAN False\n"); + err = TestReadAttributeBooleanFalse_10(); + break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read attribute BITMAP8 Default Value\n"); - err = TestReadAttributeBitmap8DefaultValue_11(); - break; + ChipLogProgress(chipTool, " ***** Test Step 11 : Read attribute BITMAP8 Default Value\n"); + err = TestReadAttributeBitmap8DefaultValue_11(); + break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Write attribute BITMAP8 Max Value\n"); - err = TestWriteAttributeBitmap8MaxValue_12(); - break; + ChipLogProgress(chipTool, " ***** Test Step 12 : Write attribute BITMAP8 Max Value\n"); + err = TestWriteAttributeBitmap8MaxValue_12(); + break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read attribute BITMAP8 Max Value\n"); - err = TestReadAttributeBitmap8MaxValue_13(); - break; + ChipLogProgress(chipTool, " ***** Test Step 13 : Read attribute BITMAP8 Max Value\n"); + err = TestReadAttributeBitmap8MaxValue_13(); + break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Write attribute BITMAP8 Min Value\n"); - err = TestWriteAttributeBitmap8MinValue_14(); - break; + ChipLogProgress(chipTool, " ***** Test Step 14 : Write attribute BITMAP8 Min Value\n"); + err = TestWriteAttributeBitmap8MinValue_14(); + break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read attribute BITMAP8 Min Value\n"); - err = TestReadAttributeBitmap8MinValue_15(); - break; + ChipLogProgress(chipTool, " ***** Test Step 15 : Read attribute BITMAP8 Min Value\n"); + err = TestReadAttributeBitmap8MinValue_15(); + break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Read attribute BITMAP16 Default Value\n"); - err = TestReadAttributeBitmap16DefaultValue_16(); - break; + ChipLogProgress(chipTool, " ***** Test Step 16 : Read attribute BITMAP16 Default Value\n"); + err = TestReadAttributeBitmap16DefaultValue_16(); + break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Write attribute BITMAP16 Max Value\n"); - err = TestWriteAttributeBitmap16MaxValue_17(); - break; + ChipLogProgress(chipTool, " ***** Test Step 17 : Write attribute BITMAP16 Max Value\n"); + err = TestWriteAttributeBitmap16MaxValue_17(); + break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Read attribute BITMAP16 Max Value\n"); - err = TestReadAttributeBitmap16MaxValue_18(); - break; + ChipLogProgress(chipTool, " ***** Test Step 18 : Read attribute BITMAP16 Max Value\n"); + err = TestReadAttributeBitmap16MaxValue_18(); + break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Write attribute BITMAP16 Min Value\n"); - err = TestWriteAttributeBitmap16MinValue_19(); - break; + ChipLogProgress(chipTool, " ***** Test Step 19 : Write attribute BITMAP16 Min Value\n"); + err = TestWriteAttributeBitmap16MinValue_19(); + break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Read attribute BITMAP16 Min Value\n"); - err = TestReadAttributeBitmap16MinValue_20(); - break; + ChipLogProgress(chipTool, " ***** Test Step 20 : Read attribute BITMAP16 Min Value\n"); + err = TestReadAttributeBitmap16MinValue_20(); + break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Read attribute BITMAP32 Default Value\n"); - err = TestReadAttributeBitmap32DefaultValue_21(); - break; + ChipLogProgress(chipTool, " ***** Test Step 21 : Read attribute BITMAP32 Default Value\n"); + err = TestReadAttributeBitmap32DefaultValue_21(); + break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Write attribute BITMAP32 Max Value\n"); - err = TestWriteAttributeBitmap32MaxValue_22(); - break; + ChipLogProgress(chipTool, " ***** Test Step 22 : Write attribute BITMAP32 Max Value\n"); + err = TestWriteAttributeBitmap32MaxValue_22(); + break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Read attribute BITMAP32 Max Value\n"); - err = TestReadAttributeBitmap32MaxValue_23(); - break; + ChipLogProgress(chipTool, " ***** Test Step 23 : Read attribute BITMAP32 Max Value\n"); + err = TestReadAttributeBitmap32MaxValue_23(); + break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Write attribute BITMAP32 Min Value\n"); - err = TestWriteAttributeBitmap32MinValue_24(); - break; + ChipLogProgress(chipTool, " ***** Test Step 24 : Write attribute BITMAP32 Min Value\n"); + err = TestWriteAttributeBitmap32MinValue_24(); + break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Read attribute BITMAP32 Min Value\n"); - err = TestReadAttributeBitmap32MinValue_25(); - break; + ChipLogProgress(chipTool, " ***** Test Step 25 : Read attribute BITMAP32 Min Value\n"); + err = TestReadAttributeBitmap32MinValue_25(); + break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Read attribute BITMAP64 Default Value\n"); - err = TestReadAttributeBitmap64DefaultValue_26(); - break; + ChipLogProgress(chipTool, " ***** Test Step 26 : Read attribute BITMAP64 Default Value\n"); + err = TestReadAttributeBitmap64DefaultValue_26(); + break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Write attribute BITMAP64 Max Value\n"); - err = TestWriteAttributeBitmap64MaxValue_27(); - break; + ChipLogProgress(chipTool, " ***** Test Step 27 : Write attribute BITMAP64 Max Value\n"); + err = TestWriteAttributeBitmap64MaxValue_27(); + break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Read attribute BITMAP64 Max Value\n"); - err = TestReadAttributeBitmap64MaxValue_28(); - break; + ChipLogProgress(chipTool, " ***** Test Step 28 : Read attribute BITMAP64 Max Value\n"); + err = TestReadAttributeBitmap64MaxValue_28(); + break; case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Write attribute BITMAP64 Min Value\n"); - err = TestWriteAttributeBitmap64MinValue_29(); - break; + ChipLogProgress(chipTool, " ***** Test Step 29 : Write attribute BITMAP64 Min Value\n"); + err = TestWriteAttributeBitmap64MinValue_29(); + break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Read attribute BITMAP64 Min Value\n"); - err = TestReadAttributeBitmap64MinValue_30(); - break; + ChipLogProgress(chipTool, " ***** Test Step 30 : Read attribute BITMAP64 Min Value\n"); + err = TestReadAttributeBitmap64MinValue_30(); + break; case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Read attribute INT8U Default Value\n"); - err = TestReadAttributeInt8uDefaultValue_31(); - break; + ChipLogProgress(chipTool, " ***** Test Step 31 : Read attribute INT8U Default Value\n"); + err = TestReadAttributeInt8uDefaultValue_31(); + break; case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Write attribute INT8U Max Value\n"); - err = TestWriteAttributeInt8uMaxValue_32(); - break; + ChipLogProgress(chipTool, " ***** Test Step 32 : Write attribute INT8U Max Value\n"); + err = TestWriteAttributeInt8uMaxValue_32(); + break; case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Read attribute INT8U Max Value\n"); - err = TestReadAttributeInt8uMaxValue_33(); - break; + ChipLogProgress(chipTool, " ***** Test Step 33 : Read attribute INT8U Max Value\n"); + err = TestReadAttributeInt8uMaxValue_33(); + break; case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Write attribute INT8U Min Value\n"); - err = TestWriteAttributeInt8uMinValue_34(); - break; + ChipLogProgress(chipTool, " ***** Test Step 34 : Write attribute INT8U Min Value\n"); + err = TestWriteAttributeInt8uMinValue_34(); + break; case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Read attribute INT8U Min Value\n"); - err = TestReadAttributeInt8uMinValue_35(); - break; + ChipLogProgress(chipTool, " ***** Test Step 35 : Read attribute INT8U Min Value\n"); + err = TestReadAttributeInt8uMinValue_35(); + break; case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Read attribute INT16U Default Value\n"); - err = TestReadAttributeInt16uDefaultValue_36(); - break; + ChipLogProgress(chipTool, " ***** Test Step 36 : Read attribute INT16U Default Value\n"); + err = TestReadAttributeInt16uDefaultValue_36(); + break; case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Write attribute INT16U Max Value\n"); - err = TestWriteAttributeInt16uMaxValue_37(); - break; + ChipLogProgress(chipTool, " ***** Test Step 37 : Write attribute INT16U Max Value\n"); + err = TestWriteAttributeInt16uMaxValue_37(); + break; case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : Read attribute INT16U Max Value\n"); - err = TestReadAttributeInt16uMaxValue_38(); - break; + ChipLogProgress(chipTool, " ***** Test Step 38 : Read attribute INT16U Max Value\n"); + err = TestReadAttributeInt16uMaxValue_38(); + break; case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : Write attribute INT16U Min Value\n"); - err = TestWriteAttributeInt16uMinValue_39(); - break; + ChipLogProgress(chipTool, " ***** Test Step 39 : Write attribute INT16U Min Value\n"); + err = TestWriteAttributeInt16uMinValue_39(); + break; case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : Read attribute INT16U Min Value\n"); - err = TestReadAttributeInt16uMinValue_40(); - break; + ChipLogProgress(chipTool, " ***** Test Step 40 : Read attribute INT16U Min Value\n"); + err = TestReadAttributeInt16uMinValue_40(); + break; case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : Read attribute INT32U Default Value\n"); - err = TestReadAttributeInt32uDefaultValue_41(); - break; + ChipLogProgress(chipTool, " ***** Test Step 41 : Read attribute INT32U Default Value\n"); + err = TestReadAttributeInt32uDefaultValue_41(); + break; case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : Write attribute INT32U Max Value\n"); - err = TestWriteAttributeInt32uMaxValue_42(); - break; + ChipLogProgress(chipTool, " ***** Test Step 42 : Write attribute INT32U Max Value\n"); + err = TestWriteAttributeInt32uMaxValue_42(); + break; case 43: - ChipLogProgress(chipTool, " ***** Test Step 43 : Read attribute INT32U Max Value\n"); - err = TestReadAttributeInt32uMaxValue_43(); - break; + ChipLogProgress(chipTool, " ***** Test Step 43 : Read attribute INT32U Max Value\n"); + err = TestReadAttributeInt32uMaxValue_43(); + break; case 44: - ChipLogProgress(chipTool, " ***** Test Step 44 : Write attribute INT32U Min Value\n"); - err = TestWriteAttributeInt32uMinValue_44(); - break; + ChipLogProgress(chipTool, " ***** Test Step 44 : Write attribute INT32U Min Value\n"); + err = TestWriteAttributeInt32uMinValue_44(); + break; case 45: - ChipLogProgress(chipTool, " ***** Test Step 45 : Read attribute INT32U Min Value\n"); - err = TestReadAttributeInt32uMinValue_45(); - break; + ChipLogProgress(chipTool, " ***** Test Step 45 : Read attribute INT32U Min Value\n"); + err = TestReadAttributeInt32uMinValue_45(); + break; case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : Read attribute INT64U Default Value\n"); - err = TestReadAttributeInt64uDefaultValue_46(); - break; + ChipLogProgress(chipTool, " ***** Test Step 46 : Read attribute INT64U Default Value\n"); + err = TestReadAttributeInt64uDefaultValue_46(); + break; case 47: - ChipLogProgress(chipTool, " ***** Test Step 47 : Write attribute INT64U Max Value\n"); - err = TestWriteAttributeInt64uMaxValue_47(); - break; + ChipLogProgress(chipTool, " ***** Test Step 47 : Write attribute INT64U Max Value\n"); + err = TestWriteAttributeInt64uMaxValue_47(); + break; case 48: - ChipLogProgress(chipTool, " ***** Test Step 48 : Read attribute INT64U Max Value\n"); - err = TestReadAttributeInt64uMaxValue_48(); - break; + ChipLogProgress(chipTool, " ***** Test Step 48 : Read attribute INT64U Max Value\n"); + err = TestReadAttributeInt64uMaxValue_48(); + break; case 49: - ChipLogProgress(chipTool, " ***** Test Step 49 : Write attribute INT64U Min Value\n"); - err = TestWriteAttributeInt64uMinValue_49(); - break; + ChipLogProgress(chipTool, " ***** Test Step 49 : Write attribute INT64U Min Value\n"); + err = TestWriteAttributeInt64uMinValue_49(); + break; case 50: - ChipLogProgress(chipTool, " ***** Test Step 50 : Read attribute INT64U Min Value\n"); - err = TestReadAttributeInt64uMinValue_50(); - break; + ChipLogProgress(chipTool, " ***** Test Step 50 : Read attribute INT64U Min Value\n"); + err = TestReadAttributeInt64uMinValue_50(); + break; case 51: - ChipLogProgress(chipTool, " ***** Test Step 51 : Read attribute INT8S Default Value\n"); - err = TestReadAttributeInt8sDefaultValue_51(); - break; + ChipLogProgress(chipTool, " ***** Test Step 51 : Read attribute INT8S Default Value\n"); + err = TestReadAttributeInt8sDefaultValue_51(); + break; case 52: - ChipLogProgress(chipTool, " ***** Test Step 52 : Write attribute INT8S Max Value\n"); - err = TestWriteAttributeInt8sMaxValue_52(); - break; + ChipLogProgress(chipTool, " ***** Test Step 52 : Write attribute INT8S Max Value\n"); + err = TestWriteAttributeInt8sMaxValue_52(); + break; case 53: - ChipLogProgress(chipTool, " ***** Test Step 53 : Read attribute INT8S Max Value\n"); - err = TestReadAttributeInt8sMaxValue_53(); - break; + ChipLogProgress(chipTool, " ***** Test Step 53 : Read attribute INT8S Max Value\n"); + err = TestReadAttributeInt8sMaxValue_53(); + break; case 54: - ChipLogProgress(chipTool, " ***** Test Step 54 : Write attribute INT8S Min Value\n"); - err = TestWriteAttributeInt8sMinValue_54(); - break; + ChipLogProgress(chipTool, " ***** Test Step 54 : Write attribute INT8S Min Value\n"); + err = TestWriteAttributeInt8sMinValue_54(); + break; case 55: - ChipLogProgress(chipTool, " ***** Test Step 55 : Read attribute INT8S Min Value\n"); - err = TestReadAttributeInt8sMinValue_55(); - break; + ChipLogProgress(chipTool, " ***** Test Step 55 : Read attribute INT8S Min Value\n"); + err = TestReadAttributeInt8sMinValue_55(); + break; case 56: - ChipLogProgress(chipTool, " ***** Test Step 56 : Write attribute INT8S Default Value\n"); - err = TestWriteAttributeInt8sDefaultValue_56(); - break; + ChipLogProgress(chipTool, " ***** Test Step 56 : Write attribute INT8S Default Value\n"); + err = TestWriteAttributeInt8sDefaultValue_56(); + break; case 57: - ChipLogProgress(chipTool, " ***** Test Step 57 : Read attribute INT8S Default Value\n"); - err = TestReadAttributeInt8sDefaultValue_57(); - break; + ChipLogProgress(chipTool, " ***** Test Step 57 : Read attribute INT8S Default Value\n"); + err = TestReadAttributeInt8sDefaultValue_57(); + break; case 58: - ChipLogProgress(chipTool, " ***** Test Step 58 : Read attribute INT16S Default Value\n"); - err = TestReadAttributeInt16sDefaultValue_58(); - break; + ChipLogProgress(chipTool, " ***** Test Step 58 : Read attribute INT16S Default Value\n"); + err = TestReadAttributeInt16sDefaultValue_58(); + break; case 59: - ChipLogProgress(chipTool, " ***** Test Step 59 : Write attribute INT16S Max Value\n"); - err = TestWriteAttributeInt16sMaxValue_59(); - break; + ChipLogProgress(chipTool, " ***** Test Step 59 : Write attribute INT16S Max Value\n"); + err = TestWriteAttributeInt16sMaxValue_59(); + break; case 60: - ChipLogProgress(chipTool, " ***** Test Step 60 : Read attribute INT16S Max Value\n"); - err = TestReadAttributeInt16sMaxValue_60(); - break; + ChipLogProgress(chipTool, " ***** Test Step 60 : Read attribute INT16S Max Value\n"); + err = TestReadAttributeInt16sMaxValue_60(); + break; case 61: - ChipLogProgress(chipTool, " ***** Test Step 61 : Write attribute INT16S Min Value\n"); - err = TestWriteAttributeInt16sMinValue_61(); - break; + ChipLogProgress(chipTool, " ***** Test Step 61 : Write attribute INT16S Min Value\n"); + err = TestWriteAttributeInt16sMinValue_61(); + break; case 62: - ChipLogProgress(chipTool, " ***** Test Step 62 : Read attribute INT16S Min Value\n"); - err = TestReadAttributeInt16sMinValue_62(); - break; + ChipLogProgress(chipTool, " ***** Test Step 62 : Read attribute INT16S Min Value\n"); + err = TestReadAttributeInt16sMinValue_62(); + break; case 63: - ChipLogProgress(chipTool, " ***** Test Step 63 : Write attribute INT16S Default Value\n"); - err = TestWriteAttributeInt16sDefaultValue_63(); - break; + ChipLogProgress(chipTool, " ***** Test Step 63 : Write attribute INT16S Default Value\n"); + err = TestWriteAttributeInt16sDefaultValue_63(); + break; case 64: - ChipLogProgress(chipTool, " ***** Test Step 64 : Read attribute INT16S Default Value\n"); - err = TestReadAttributeInt16sDefaultValue_64(); - break; + ChipLogProgress(chipTool, " ***** Test Step 64 : Read attribute INT16S Default Value\n"); + err = TestReadAttributeInt16sDefaultValue_64(); + break; case 65: - ChipLogProgress(chipTool, " ***** Test Step 65 : Read attribute INT32S Default Value\n"); - err = TestReadAttributeInt32sDefaultValue_65(); - break; + ChipLogProgress(chipTool, " ***** Test Step 65 : Read attribute INT32S Default Value\n"); + err = TestReadAttributeInt32sDefaultValue_65(); + break; case 66: - ChipLogProgress(chipTool, " ***** Test Step 66 : Write attribute INT32S Max Value\n"); - err = TestWriteAttributeInt32sMaxValue_66(); - break; + ChipLogProgress(chipTool, " ***** Test Step 66 : Write attribute INT32S Max Value\n"); + err = TestWriteAttributeInt32sMaxValue_66(); + break; case 67: - ChipLogProgress(chipTool, " ***** Test Step 67 : Read attribute INT32S Max Value\n"); - err = TestReadAttributeInt32sMaxValue_67(); - break; + ChipLogProgress(chipTool, " ***** Test Step 67 : Read attribute INT32S Max Value\n"); + err = TestReadAttributeInt32sMaxValue_67(); + break; case 68: - ChipLogProgress(chipTool, " ***** Test Step 68 : Write attribute INT32S Min Value\n"); - err = TestWriteAttributeInt32sMinValue_68(); - break; + ChipLogProgress(chipTool, " ***** Test Step 68 : Write attribute INT32S Min Value\n"); + err = TestWriteAttributeInt32sMinValue_68(); + break; case 69: - ChipLogProgress(chipTool, " ***** Test Step 69 : Read attribute INT32S Min Value\n"); - err = TestReadAttributeInt32sMinValue_69(); - break; + ChipLogProgress(chipTool, " ***** Test Step 69 : Read attribute INT32S Min Value\n"); + err = TestReadAttributeInt32sMinValue_69(); + break; case 70: - ChipLogProgress(chipTool, " ***** Test Step 70 : Write attribute INT32S Default Value\n"); - err = TestWriteAttributeInt32sDefaultValue_70(); - break; + ChipLogProgress(chipTool, " ***** Test Step 70 : Write attribute INT32S Default Value\n"); + err = TestWriteAttributeInt32sDefaultValue_70(); + break; case 71: - ChipLogProgress(chipTool, " ***** Test Step 71 : Read attribute INT32S Default Value\n"); - err = TestReadAttributeInt32sDefaultValue_71(); - break; + ChipLogProgress(chipTool, " ***** Test Step 71 : Read attribute INT32S Default Value\n"); + err = TestReadAttributeInt32sDefaultValue_71(); + break; case 72: - ChipLogProgress(chipTool, " ***** Test Step 72 : Read attribute INT64S Default Value\n"); - err = TestReadAttributeInt64sDefaultValue_72(); - break; + ChipLogProgress(chipTool, " ***** Test Step 72 : Read attribute INT64S Default Value\n"); + err = TestReadAttributeInt64sDefaultValue_72(); + break; case 73: - ChipLogProgress(chipTool, " ***** Test Step 73 : Write attribute INT64S Max Value\n"); - err = TestWriteAttributeInt64sMaxValue_73(); - break; + ChipLogProgress(chipTool, " ***** Test Step 73 : Write attribute INT64S Max Value\n"); + err = TestWriteAttributeInt64sMaxValue_73(); + break; case 74: - ChipLogProgress(chipTool, " ***** Test Step 74 : Read attribute INT64S Max Value\n"); - err = TestReadAttributeInt64sMaxValue_74(); - break; + ChipLogProgress(chipTool, " ***** Test Step 74 : Read attribute INT64S Max Value\n"); + err = TestReadAttributeInt64sMaxValue_74(); + break; case 75: - ChipLogProgress(chipTool, " ***** Test Step 75 : Write attribute INT64S Min Value\n"); - err = TestWriteAttributeInt64sMinValue_75(); - break; + ChipLogProgress(chipTool, " ***** Test Step 75 : Write attribute INT64S Min Value\n"); + err = TestWriteAttributeInt64sMinValue_75(); + break; case 76: - ChipLogProgress(chipTool, " ***** Test Step 76 : Read attribute INT64S Min Value\n"); - err = TestReadAttributeInt64sMinValue_76(); - break; + ChipLogProgress(chipTool, " ***** Test Step 76 : Read attribute INT64S Min Value\n"); + err = TestReadAttributeInt64sMinValue_76(); + break; case 77: - ChipLogProgress(chipTool, " ***** Test Step 77 : Write attribute INT64S Default Value\n"); - err = TestWriteAttributeInt64sDefaultValue_77(); - break; + ChipLogProgress(chipTool, " ***** Test Step 77 : Write attribute INT64S Default Value\n"); + err = TestWriteAttributeInt64sDefaultValue_77(); + break; case 78: - ChipLogProgress(chipTool, " ***** Test Step 78 : Read attribute INT64S Default Value\n"); - err = TestReadAttributeInt64sDefaultValue_78(); - break; + ChipLogProgress(chipTool, " ***** Test Step 78 : Read attribute INT64S Default Value\n"); + err = TestReadAttributeInt64sDefaultValue_78(); + break; case 79: - ChipLogProgress(chipTool, " ***** Test Step 79 : Read attribute SINGLE Default Value\n"); - err = TestReadAttributeSingleDefaultValue_79(); - break; + ChipLogProgress(chipTool, " ***** Test Step 79 : Read attribute SINGLE Default Value\n"); + err = TestReadAttributeSingleDefaultValue_79(); + break; case 80: - ChipLogProgress(chipTool, " ***** Test Step 80 : Write attribute SINGLE medium Value\n"); - err = TestWriteAttributeSingleMediumValue_80(); - break; + ChipLogProgress(chipTool, " ***** Test Step 80 : Write attribute SINGLE medium Value\n"); + err = TestWriteAttributeSingleMediumValue_80(); + break; case 81: - ChipLogProgress(chipTool, " ***** Test Step 81 : Read attribute SINGLE medium Value\n"); - err = TestReadAttributeSingleMediumValue_81(); - break; + ChipLogProgress(chipTool, " ***** Test Step 81 : Read attribute SINGLE medium Value\n"); + err = TestReadAttributeSingleMediumValue_81(); + break; case 82: - ChipLogProgress(chipTool, " ***** Test Step 82 : Write attribute SINGLE large Value\n"); - err = TestWriteAttributeSingleLargeValue_82(); - break; + ChipLogProgress(chipTool, " ***** Test Step 82 : Write attribute SINGLE large Value\n"); + err = TestWriteAttributeSingleLargeValue_82(); + break; case 83: - ChipLogProgress(chipTool, " ***** Test Step 83 : Read attribute SINGLE large Value\n"); - err = TestReadAttributeSingleLargeValue_83(); - break; + ChipLogProgress(chipTool, " ***** Test Step 83 : Read attribute SINGLE large Value\n"); + err = TestReadAttributeSingleLargeValue_83(); + break; case 84: - ChipLogProgress(chipTool, " ***** Test Step 84 : Write attribute SINGLE small Value\n"); - err = TestWriteAttributeSingleSmallValue_84(); - break; + ChipLogProgress(chipTool, " ***** Test Step 84 : Write attribute SINGLE small Value\n"); + err = TestWriteAttributeSingleSmallValue_84(); + break; case 85: - ChipLogProgress(chipTool, " ***** Test Step 85 : Read attribute SINGLE small Value\n"); - err = TestReadAttributeSingleSmallValue_85(); - break; + ChipLogProgress(chipTool, " ***** Test Step 85 : Read attribute SINGLE small Value\n"); + err = TestReadAttributeSingleSmallValue_85(); + break; case 86: - ChipLogProgress(chipTool, " ***** Test Step 86 : Write attribute SINGLE Default Value\n"); - err = TestWriteAttributeSingleDefaultValue_86(); - break; + ChipLogProgress(chipTool, " ***** Test Step 86 : Write attribute SINGLE Default Value\n"); + err = TestWriteAttributeSingleDefaultValue_86(); + break; case 87: - ChipLogProgress(chipTool, " ***** Test Step 87 : Read attribute SINGLE Default Value\n"); - err = TestReadAttributeSingleDefaultValue_87(); - break; + ChipLogProgress(chipTool, " ***** Test Step 87 : Read attribute SINGLE Default Value\n"); + err = TestReadAttributeSingleDefaultValue_87(); + break; case 88: - ChipLogProgress(chipTool, " ***** Test Step 88 : Read attribute DOUBLE Default Value\n"); - err = TestReadAttributeDoubleDefaultValue_88(); - break; + ChipLogProgress(chipTool, " ***** Test Step 88 : Read attribute DOUBLE Default Value\n"); + err = TestReadAttributeDoubleDefaultValue_88(); + break; case 89: - ChipLogProgress(chipTool, " ***** Test Step 89 : Write attribute DOUBLE medium Value\n"); - err = TestWriteAttributeDoubleMediumValue_89(); - break; + ChipLogProgress(chipTool, " ***** Test Step 89 : Write attribute DOUBLE medium Value\n"); + err = TestWriteAttributeDoubleMediumValue_89(); + break; case 90: - ChipLogProgress(chipTool, " ***** Test Step 90 : Read attribute DOUBLE medium Value\n"); - err = TestReadAttributeDoubleMediumValue_90(); - break; + ChipLogProgress(chipTool, " ***** Test Step 90 : Read attribute DOUBLE medium Value\n"); + err = TestReadAttributeDoubleMediumValue_90(); + break; case 91: - ChipLogProgress(chipTool, " ***** Test Step 91 : Write attribute DOUBLE large Value\n"); - err = TestWriteAttributeDoubleLargeValue_91(); - break; + ChipLogProgress(chipTool, " ***** Test Step 91 : Write attribute DOUBLE large Value\n"); + err = TestWriteAttributeDoubleLargeValue_91(); + break; case 92: - ChipLogProgress(chipTool, " ***** Test Step 92 : Read attribute DOUBLE large Value\n"); - err = TestReadAttributeDoubleLargeValue_92(); - break; + ChipLogProgress(chipTool, " ***** Test Step 92 : Read attribute DOUBLE large Value\n"); + err = TestReadAttributeDoubleLargeValue_92(); + break; case 93: - ChipLogProgress(chipTool, " ***** Test Step 93 : Write attribute DOUBLE small Value\n"); - err = TestWriteAttributeDoubleSmallValue_93(); - break; + ChipLogProgress(chipTool, " ***** Test Step 93 : Write attribute DOUBLE small Value\n"); + err = TestWriteAttributeDoubleSmallValue_93(); + break; case 94: - ChipLogProgress(chipTool, " ***** Test Step 94 : Read attribute DOUBLE small Value\n"); - err = TestReadAttributeDoubleSmallValue_94(); - break; + ChipLogProgress(chipTool, " ***** Test Step 94 : Read attribute DOUBLE small Value\n"); + err = TestReadAttributeDoubleSmallValue_94(); + break; case 95: - ChipLogProgress(chipTool, " ***** Test Step 95 : Write attribute DOUBLE Default Value\n"); - err = TestWriteAttributeDoubleDefaultValue_95(); - break; + ChipLogProgress(chipTool, " ***** Test Step 95 : Write attribute DOUBLE Default Value\n"); + err = TestWriteAttributeDoubleDefaultValue_95(); + break; case 96: - ChipLogProgress(chipTool, " ***** Test Step 96 : Read attribute DOUBLE Default Value\n"); - err = TestReadAttributeDoubleDefaultValue_96(); - break; + ChipLogProgress(chipTool, " ***** Test Step 96 : Read attribute DOUBLE Default Value\n"); + err = TestReadAttributeDoubleDefaultValue_96(); + break; case 97: - ChipLogProgress(chipTool, " ***** Test Step 97 : Read attribute ENUM8 Default Value\n"); - err = TestReadAttributeEnum8DefaultValue_97(); - break; + ChipLogProgress(chipTool, " ***** Test Step 97 : Read attribute ENUM8 Default Value\n"); + err = TestReadAttributeEnum8DefaultValue_97(); + break; case 98: - ChipLogProgress(chipTool, " ***** Test Step 98 : Write attribute ENUM8 Max Value\n"); - err = TestWriteAttributeEnum8MaxValue_98(); - break; + ChipLogProgress(chipTool, " ***** Test Step 98 : Write attribute ENUM8 Max Value\n"); + err = TestWriteAttributeEnum8MaxValue_98(); + break; case 99: - ChipLogProgress(chipTool, " ***** Test Step 99 : Read attribute ENUM8 Max Value\n"); - err = TestReadAttributeEnum8MaxValue_99(); - break; + ChipLogProgress(chipTool, " ***** Test Step 99 : Read attribute ENUM8 Max Value\n"); + err = TestReadAttributeEnum8MaxValue_99(); + break; case 100: - ChipLogProgress(chipTool, " ***** Test Step 100 : Write attribute ENUM8 Min Value\n"); - err = TestWriteAttributeEnum8MinValue_100(); - break; + ChipLogProgress(chipTool, " ***** Test Step 100 : Write attribute ENUM8 Min Value\n"); + err = TestWriteAttributeEnum8MinValue_100(); + break; case 101: - ChipLogProgress(chipTool, " ***** Test Step 101 : Read attribute ENUM8 Min Value\n"); - err = TestReadAttributeEnum8MinValue_101(); - break; + ChipLogProgress(chipTool, " ***** Test Step 101 : Read attribute ENUM8 Min Value\n"); + err = TestReadAttributeEnum8MinValue_101(); + break; case 102: - ChipLogProgress(chipTool, " ***** Test Step 102 : Read attribute ENUM16 Default Value\n"); - err = TestReadAttributeEnum16DefaultValue_102(); - break; + ChipLogProgress(chipTool, " ***** Test Step 102 : Read attribute ENUM16 Default Value\n"); + err = TestReadAttributeEnum16DefaultValue_102(); + break; case 103: - ChipLogProgress(chipTool, " ***** Test Step 103 : Write attribute ENUM16 Max Value\n"); - err = TestWriteAttributeEnum16MaxValue_103(); - break; + ChipLogProgress(chipTool, " ***** Test Step 103 : Write attribute ENUM16 Max Value\n"); + err = TestWriteAttributeEnum16MaxValue_103(); + break; case 104: - ChipLogProgress(chipTool, " ***** Test Step 104 : Read attribute ENUM16 Max Value\n"); - err = TestReadAttributeEnum16MaxValue_104(); - break; + ChipLogProgress(chipTool, " ***** Test Step 104 : Read attribute ENUM16 Max Value\n"); + err = TestReadAttributeEnum16MaxValue_104(); + break; case 105: - ChipLogProgress(chipTool, " ***** Test Step 105 : Write attribute ENUM16 Min Value\n"); - err = TestWriteAttributeEnum16MinValue_105(); - break; + ChipLogProgress(chipTool, " ***** Test Step 105 : Write attribute ENUM16 Min Value\n"); + err = TestWriteAttributeEnum16MinValue_105(); + break; case 106: - ChipLogProgress(chipTool, " ***** Test Step 106 : Read attribute ENUM16 Min Value\n"); - err = TestReadAttributeEnum16MinValue_106(); - break; + ChipLogProgress(chipTool, " ***** Test Step 106 : Read attribute ENUM16 Min Value\n"); + err = TestReadAttributeEnum16MinValue_106(); + break; case 107: - ChipLogProgress(chipTool, " ***** Test Step 107 : Read attribute OCTET_STRING Default Value\n"); - err = TestReadAttributeOctetStringDefaultValue_107(); - break; + ChipLogProgress(chipTool, " ***** Test Step 107 : Read attribute OCTET_STRING Default Value\n"); + err = TestReadAttributeOctetStringDefaultValue_107(); + break; case 108: - ChipLogProgress(chipTool, " ***** Test Step 108 : Write attribute OCTET_STRING with embedded null\n"); - err = TestWriteAttributeOctetStringWithEmbeddedNull_108(); - break; + ChipLogProgress(chipTool, " ***** Test Step 108 : Write attribute OCTET_STRING with embedded null\n"); + err = TestWriteAttributeOctetStringWithEmbeddedNull_108(); + break; case 109: - ChipLogProgress(chipTool, " ***** Test Step 109 : Read attribute OCTET_STRING with embedded null\n"); - err = TestReadAttributeOctetStringWithEmbeddedNull_109(); - break; + ChipLogProgress(chipTool, " ***** Test Step 109 : Read attribute OCTET_STRING with embedded null\n"); + err = TestReadAttributeOctetStringWithEmbeddedNull_109(); + break; case 110: - ChipLogProgress(chipTool, " ***** Test Step 110 : Write attribute OCTET_STRING with weird chars\n"); - err = TestWriteAttributeOctetStringWithWeirdChars_110(); - break; + ChipLogProgress(chipTool, " ***** Test Step 110 : Write attribute OCTET_STRING with weird chars\n"); + err = TestWriteAttributeOctetStringWithWeirdChars_110(); + break; case 111: - ChipLogProgress(chipTool, " ***** Test Step 111 : Read attribute OCTET_STRING with weird chars\n"); - err = TestReadAttributeOctetStringWithWeirdChars_111(); - break; + ChipLogProgress(chipTool, " ***** Test Step 111 : Read attribute OCTET_STRING with weird chars\n"); + err = TestReadAttributeOctetStringWithWeirdChars_111(); + break; case 112: - ChipLogProgress(chipTool, " ***** Test Step 112 : Write attribute OCTET_STRING\n"); - err = TestWriteAttributeOctetString_112(); - break; + ChipLogProgress(chipTool, " ***** Test Step 112 : Write attribute OCTET_STRING\n"); + err = TestWriteAttributeOctetString_112(); + break; case 113: - ChipLogProgress(chipTool, " ***** Test Step 113 : Read attribute OCTET_STRING\n"); - err = TestReadAttributeOctetString_113(); - break; + ChipLogProgress(chipTool, " ***** Test Step 113 : Read attribute OCTET_STRING\n"); + err = TestReadAttributeOctetString_113(); + break; case 114: - ChipLogProgress(chipTool, " ***** Test Step 114 : Write attribute OCTET_STRING\n"); - err = TestWriteAttributeOctetString_114(); - break; + ChipLogProgress(chipTool, " ***** Test Step 114 : Write attribute OCTET_STRING\n"); + err = TestWriteAttributeOctetString_114(); + break; case 115: - ChipLogProgress(chipTool, " ***** Test Step 115 : Read attribute OCTET_STRING\n"); - err = TestReadAttributeOctetString_115(); - break; + ChipLogProgress(chipTool, " ***** Test Step 115 : Read attribute OCTET_STRING\n"); + err = TestReadAttributeOctetString_115(); + break; case 116: - ChipLogProgress(chipTool, " ***** Test Step 116 : Write attribute OCTET_STRING\n"); - err = TestWriteAttributeOctetString_116(); - break; + ChipLogProgress(chipTool, " ***** Test Step 116 : Write attribute OCTET_STRING\n"); + err = TestWriteAttributeOctetString_116(); + break; case 117: - ChipLogProgress(chipTool, " ***** Test Step 117 : Read attribute LONG_OCTET_STRING Default Value\n"); - err = TestReadAttributeLongOctetStringDefaultValue_117(); - break; + ChipLogProgress(chipTool, " ***** Test Step 117 : Read attribute LONG_OCTET_STRING Default Value\n"); + err = TestReadAttributeLongOctetStringDefaultValue_117(); + break; case 118: - ChipLogProgress(chipTool, " ***** Test Step 118 : Write attribute LONG_OCTET_STRING\n"); - err = TestWriteAttributeLongOctetString_118(); - break; + ChipLogProgress(chipTool, " ***** Test Step 118 : Write attribute LONG_OCTET_STRING\n"); + err = TestWriteAttributeLongOctetString_118(); + break; case 119: - ChipLogProgress(chipTool, " ***** Test Step 119 : Read attribute LONG_OCTET_STRING\n"); - err = TestReadAttributeLongOctetString_119(); - break; + ChipLogProgress(chipTool, " ***** Test Step 119 : Read attribute LONG_OCTET_STRING\n"); + err = TestReadAttributeLongOctetString_119(); + break; case 120: - ChipLogProgress(chipTool, " ***** Test Step 120 : Write attribute LONG_OCTET_STRING\n"); - err = TestWriteAttributeLongOctetString_120(); - break; + ChipLogProgress(chipTool, " ***** Test Step 120 : Write attribute LONG_OCTET_STRING\n"); + err = TestWriteAttributeLongOctetString_120(); + break; case 121: - ChipLogProgress(chipTool, " ***** Test Step 121 : Read attribute CHAR_STRING Default Value\n"); - err = TestReadAttributeCharStringDefaultValue_121(); - break; + ChipLogProgress(chipTool, " ***** Test Step 121 : Read attribute CHAR_STRING Default Value\n"); + err = TestReadAttributeCharStringDefaultValue_121(); + break; case 122: - ChipLogProgress(chipTool, " ***** Test Step 122 : Write attribute CHAR_STRING\n"); - err = TestWriteAttributeCharString_122(); - break; + ChipLogProgress(chipTool, " ***** Test Step 122 : Write attribute CHAR_STRING\n"); + err = TestWriteAttributeCharString_122(); + break; case 123: - ChipLogProgress(chipTool, " ***** Test Step 123 : Read attribute CHAR_STRING\n"); - err = TestReadAttributeCharString_123(); - break; + ChipLogProgress(chipTool, " ***** Test Step 123 : Read attribute CHAR_STRING\n"); + err = TestReadAttributeCharString_123(); + break; case 124: - ChipLogProgress(chipTool, " ***** Test Step 124 : Write attribute CHAR_STRING - Value too long\n"); - err = TestWriteAttributeCharStringValueTooLong_124(); - break; + ChipLogProgress(chipTool, " ***** Test Step 124 : Write attribute CHAR_STRING - Value too long\n"); + err = TestWriteAttributeCharStringValueTooLong_124(); + break; case 125: - ChipLogProgress(chipTool, " ***** Test Step 125 : Read attribute CHAR_STRING\n"); - err = TestReadAttributeCharString_125(); - break; + ChipLogProgress(chipTool, " ***** Test Step 125 : Read attribute CHAR_STRING\n"); + err = TestReadAttributeCharString_125(); + break; case 126: - ChipLogProgress(chipTool, " ***** Test Step 126 : Write attribute CHAR_STRING - Empty\n"); - err = TestWriteAttributeCharStringEmpty_126(); - break; + ChipLogProgress(chipTool, " ***** Test Step 126 : Write attribute CHAR_STRING - Empty\n"); + err = TestWriteAttributeCharStringEmpty_126(); + break; case 127: - ChipLogProgress(chipTool, " ***** Test Step 127 : Read attribute LONG_CHAR_STRING Default Value\n"); - err = TestReadAttributeLongCharStringDefaultValue_127(); - break; + ChipLogProgress(chipTool, " ***** Test Step 127 : Read attribute LONG_CHAR_STRING Default Value\n"); + err = TestReadAttributeLongCharStringDefaultValue_127(); + break; case 128: - ChipLogProgress(chipTool, " ***** Test Step 128 : Write attribute LONG_CHAR_STRING\n"); - err = TestWriteAttributeLongCharString_128(); - break; + ChipLogProgress(chipTool, " ***** Test Step 128 : Write attribute LONG_CHAR_STRING\n"); + err = TestWriteAttributeLongCharString_128(); + break; case 129: - ChipLogProgress(chipTool, " ***** Test Step 129 : Read attribute LONG_CHAR_STRING\n"); - err = TestReadAttributeLongCharString_129(); - break; + ChipLogProgress(chipTool, " ***** Test Step 129 : Read attribute LONG_CHAR_STRING\n"); + err = TestReadAttributeLongCharString_129(); + break; case 130: - ChipLogProgress(chipTool, " ***** Test Step 130 : Write attribute LONG_CHAR_STRING\n"); - err = TestWriteAttributeLongCharString_130(); - break; + ChipLogProgress(chipTool, " ***** Test Step 130 : Write attribute LONG_CHAR_STRING\n"); + err = TestWriteAttributeLongCharString_130(); + break; case 131: - ChipLogProgress(chipTool, " ***** Test Step 131 : Read attribute LIST_LONG_OCTET_STRING\n"); - err = TestReadAttributeListLongOctetString_131(); - break; + ChipLogProgress(chipTool, " ***** Test Step 131 : Read attribute LIST_LONG_OCTET_STRING\n"); + err = TestReadAttributeListLongOctetString_131(); + break; case 132: - ChipLogProgress(chipTool, " ***** Test Step 132 : Read attribute EPOCH_US Default Value\n"); - err = TestReadAttributeEpochUsDefaultValue_132(); - break; + ChipLogProgress(chipTool, " ***** Test Step 132 : Read attribute EPOCH_US Default Value\n"); + err = TestReadAttributeEpochUsDefaultValue_132(); + break; case 133: - ChipLogProgress(chipTool, " ***** Test Step 133 : Write attribute EPOCH_US Max Value\n"); - err = TestWriteAttributeEpochUsMaxValue_133(); - break; + ChipLogProgress(chipTool, " ***** Test Step 133 : Write attribute EPOCH_US Max Value\n"); + err = TestWriteAttributeEpochUsMaxValue_133(); + break; case 134: - ChipLogProgress(chipTool, " ***** Test Step 134 : Read attribute EPOCH_US Max Value\n"); - err = TestReadAttributeEpochUsMaxValue_134(); - break; + ChipLogProgress(chipTool, " ***** Test Step 134 : Read attribute EPOCH_US Max Value\n"); + err = TestReadAttributeEpochUsMaxValue_134(); + break; case 135: - ChipLogProgress(chipTool, " ***** Test Step 135 : Write attribute EPOCH_US Min Value\n"); - err = TestWriteAttributeEpochUsMinValue_135(); - break; + ChipLogProgress(chipTool, " ***** Test Step 135 : Write attribute EPOCH_US Min Value\n"); + err = TestWriteAttributeEpochUsMinValue_135(); + break; case 136: - ChipLogProgress(chipTool, " ***** Test Step 136 : Read attribute EPOCH_US Min Value\n"); - err = TestReadAttributeEpochUsMinValue_136(); - break; + ChipLogProgress(chipTool, " ***** Test Step 136 : Read attribute EPOCH_US Min Value\n"); + err = TestReadAttributeEpochUsMinValue_136(); + break; case 137: - ChipLogProgress(chipTool, " ***** Test Step 137 : Read attribute EPOCH_S Default Value\n"); - err = TestReadAttributeEpochSDefaultValue_137(); - break; + ChipLogProgress(chipTool, " ***** Test Step 137 : Read attribute EPOCH_S Default Value\n"); + err = TestReadAttributeEpochSDefaultValue_137(); + break; case 138: - ChipLogProgress(chipTool, " ***** Test Step 138 : Write attribute EPOCH_S Max Value\n"); - err = TestWriteAttributeEpochSMaxValue_138(); - break; + ChipLogProgress(chipTool, " ***** Test Step 138 : Write attribute EPOCH_S Max Value\n"); + err = TestWriteAttributeEpochSMaxValue_138(); + break; case 139: - ChipLogProgress(chipTool, " ***** Test Step 139 : Read attribute EPOCH_S Max Value\n"); - err = TestReadAttributeEpochSMaxValue_139(); - break; + ChipLogProgress(chipTool, " ***** Test Step 139 : Read attribute EPOCH_S Max Value\n"); + err = TestReadAttributeEpochSMaxValue_139(); + break; case 140: - ChipLogProgress(chipTool, " ***** Test Step 140 : Write attribute EPOCH_S Min Value\n"); - err = TestWriteAttributeEpochSMinValue_140(); - break; + ChipLogProgress(chipTool, " ***** Test Step 140 : Write attribute EPOCH_S Min Value\n"); + err = TestWriteAttributeEpochSMinValue_140(); + break; case 141: - ChipLogProgress(chipTool, " ***** Test Step 141 : Read attribute EPOCH_S Min Value\n"); - err = TestReadAttributeEpochSMinValue_141(); - break; + ChipLogProgress(chipTool, " ***** Test Step 141 : Read attribute EPOCH_S Min Value\n"); + err = TestReadAttributeEpochSMinValue_141(); + break; case 142: - ChipLogProgress(chipTool, " ***** Test Step 142 : Read attribute UNSUPPORTED\n"); - err = TestReadAttributeUnsupported_142(); - break; + ChipLogProgress(chipTool, " ***** Test Step 142 : Read attribute UNSUPPORTED\n"); + err = TestReadAttributeUnsupported_142(); + break; case 143: - ChipLogProgress(chipTool, " ***** Test Step 143 : Writeattribute UNSUPPORTED\n"); - err = TestWriteattributeUnsupported_143(); - break; + ChipLogProgress(chipTool, " ***** Test Step 143 : Writeattribute UNSUPPORTED\n"); + err = TestWriteattributeUnsupported_143(); + break; case 144: - ChipLogProgress(chipTool, " ***** Test Step 144 : Send Test Command to unsupported endpoint\n"); - err = TestSendTestCommandToUnsupportedEndpoint_144(); - break; + ChipLogProgress(chipTool, " ***** Test Step 144 : Send Test Command to unsupported endpoint\n"); + err = TestSendTestCommandToUnsupportedEndpoint_144(); + break; case 145: - ChipLogProgress(chipTool, " ***** Test Step 145 : Send Test Command to unsupported cluster\n"); - err = TestSendTestCommandToUnsupportedCluster_145(); - break; + ChipLogProgress(chipTool, " ***** Test Step 145 : Send Test Command to unsupported cluster\n"); + err = TestSendTestCommandToUnsupportedCluster_145(); + break; case 146: - ChipLogProgress(chipTool, " ***** Test Step 146 : Read attribute vendor_id Default Value\n"); - err = TestReadAttributeVendorIdDefaultValue_146(); - break; + ChipLogProgress(chipTool, " ***** Test Step 146 : Read attribute vendor_id Default Value\n"); + err = TestReadAttributeVendorIdDefaultValue_146(); + break; case 147: - ChipLogProgress(chipTool, " ***** Test Step 147 : Write attribute vendor_id\n"); - err = TestWriteAttributeVendorId_147(); - break; + ChipLogProgress(chipTool, " ***** Test Step 147 : Write attribute vendor_id\n"); + err = TestWriteAttributeVendorId_147(); + break; case 148: - ChipLogProgress(chipTool, " ***** Test Step 148 : Read attribute vendor_id\n"); - err = TestReadAttributeVendorId_148(); - break; + ChipLogProgress(chipTool, " ***** Test Step 148 : Read attribute vendor_id\n"); + err = TestReadAttributeVendorId_148(); + break; case 149: - ChipLogProgress(chipTool, " ***** Test Step 149 : Restore attribute vendor_id\n"); - err = TestRestoreAttributeVendorId_149(); - break; + ChipLogProgress(chipTool, " ***** Test Step 149 : Restore attribute vendor_id\n"); + err = TestRestoreAttributeVendorId_149(); + break; case 150: - ChipLogProgress(chipTool, " ***** Test Step 150 : Send a command with a vendor_id and enum\n"); - err = TestSendACommandWithAVendorIdAndEnum_150(); - break; + ChipLogProgress(chipTool, " ***** Test Step 150 : Send a command with a vendor_id and enum\n"); + err = TestSendACommandWithAVendorIdAndEnum_150(); + break; case 151: - ChipLogProgress(chipTool, " ***** Test Step 151 : Send Test Command With Struct Argument and arg1.b is true\n"); - err = TestSendTestCommandWithStructArgumentAndArg1bIsTrue_151(); - break; + ChipLogProgress(chipTool, " ***** Test Step 151 : Send Test Command With Struct Argument and arg1.b is true\n"); + err = TestSendTestCommandWithStructArgumentAndArg1bIsTrue_151(); + break; case 152: - ChipLogProgress(chipTool, " ***** Test Step 152 : Send Test Command With Struct Argument and arg1.b is false\n"); - err = TestSendTestCommandWithStructArgumentAndArg1bIsFalse_152(); - break; + ChipLogProgress(chipTool, " ***** Test Step 152 : Send Test Command With Struct Argument and arg1.b is false\n"); + err = TestSendTestCommandWithStructArgumentAndArg1bIsFalse_152(); + break; case 153: - ChipLogProgress(chipTool, " ***** Test Step 153 : Send Test Command With Nested Struct Argument and arg1.c.b is true\n"); - err = TestSendTestCommandWithNestedStructArgumentAndArg1cbIsTrue_153(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 153 : Send Test Command With Nested Struct Argument and arg1.c.b is true\n"); + err = TestSendTestCommandWithNestedStructArgumentAndArg1cbIsTrue_153(); + break; case 154: - ChipLogProgress(chipTool, " ***** Test Step 154 : Send Test Command With Nested Struct Argument arg1.c.b is false\n"); - err = TestSendTestCommandWithNestedStructArgumentArg1cbIsFalse_154(); - break; + ChipLogProgress(chipTool, " ***** Test Step 154 : Send Test Command With Nested Struct Argument arg1.c.b is false\n"); + err = TestSendTestCommandWithNestedStructArgumentArg1cbIsFalse_154(); + break; case 155: - ChipLogProgress(chipTool, " ***** Test Step 155 : Send Test Command With Nested Struct List Argument and all fields b of arg1.d are true\n"); - err = TestSendTestCommandWithNestedStructListArgumentAndAllFieldsBOfArg1dAreTrue_155(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 155 : Send Test Command With Nested Struct List Argument and all fields b of arg1.d are true\n"); + err = TestSendTestCommandWithNestedStructListArgumentAndAllFieldsBOfArg1dAreTrue_155(); + break; case 156: - ChipLogProgress(chipTool, " ***** Test Step 156 : Send Test Command With Nested Struct List Argument and some fields b of arg1.d are false\n"); - err = TestSendTestCommandWithNestedStructListArgumentAndSomeFieldsBOfArg1dAreFalse_156(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 156 : Send Test Command With Nested Struct List Argument and some fields b of arg1.d " + "are false\n"); + err = TestSendTestCommandWithNestedStructListArgumentAndSomeFieldsBOfArg1dAreFalse_156(); + break; case 157: - ChipLogProgress(chipTool, " ***** Test Step 157 : Send Test Command With Struct Argument and see what we get back\n"); - err = TestSendTestCommandWithStructArgumentAndSeeWhatWeGetBack_157(); - break; + ChipLogProgress(chipTool, " ***** Test Step 157 : Send Test Command With Struct Argument and see what we get back\n"); + err = TestSendTestCommandWithStructArgumentAndSeeWhatWeGetBack_157(); + break; case 158: - ChipLogProgress(chipTool, " ***** Test Step 158 : Send Test Command With List of INT8U and none of them is set to 0\n"); - err = TestSendTestCommandWithListOfInt8uAndNoneOfThemIsSetTo0_158(); - break; + ChipLogProgress(chipTool, " ***** Test Step 158 : Send Test Command With List of INT8U and none of them is set to 0\n"); + err = TestSendTestCommandWithListOfInt8uAndNoneOfThemIsSetTo0_158(); + break; case 159: - ChipLogProgress(chipTool, " ***** Test Step 159 : Send Test Command With List of INT8U and one of them is set to 0\n"); - err = TestSendTestCommandWithListOfInt8uAndOneOfThemIsSetTo0_159(); - break; + ChipLogProgress(chipTool, " ***** Test Step 159 : Send Test Command With List of INT8U and one of them is set to 0\n"); + err = TestSendTestCommandWithListOfInt8uAndOneOfThemIsSetTo0_159(); + break; case 160: - ChipLogProgress(chipTool, " ***** Test Step 160 : Send Test Command With List of INT8U and get it reversed\n"); - err = TestSendTestCommandWithListOfInt8uAndGetItReversed_160(); - break; + ChipLogProgress(chipTool, " ***** Test Step 160 : Send Test Command With List of INT8U and get it reversed\n"); + err = TestSendTestCommandWithListOfInt8uAndGetItReversed_160(); + break; case 161: - ChipLogProgress(chipTool, " ***** Test Step 161 : Send Test Command With empty List of INT8U and get an empty list back\n"); - err = TestSendTestCommandWithEmptyListOfInt8uAndGetAnEmptyListBack_161(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 161 : Send Test Command With empty List of INT8U and get an empty list back\n"); + err = TestSendTestCommandWithEmptyListOfInt8uAndGetAnEmptyListBack_161(); + break; case 162: - ChipLogProgress(chipTool, " ***** Test Step 162 : Send Test Command With List of Struct Argument and arg1.b of first item is true\n"); - err = TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsTrue_162(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 162 : Send Test Command With List of Struct Argument and arg1.b of first item is true\n"); + err = TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsTrue_162(); + break; case 163: - ChipLogProgress(chipTool, " ***** Test Step 163 : Send Test Command With List of Struct Argument and arg1.b of first item is false\n"); - err = TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsFalse_163(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 163 : Send Test Command With List of Struct Argument and arg1.b of first item is false\n"); + err = TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsFalse_163(); + break; case 164: - ChipLogProgress(chipTool, " ***** Test Step 164 : Send Test Command With List of Nested Struct List Argument and all fields b of elements of arg1.d are true\n"); - err = TestSendTestCommandWithListOfNestedStructListArgumentAndAllFieldsBOfElementsOfArg1dAreTrue_164(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 164 : Send Test Command With List of Nested Struct List Argument and all fields b of " + "elements of arg1.d are true\n"); + err = TestSendTestCommandWithListOfNestedStructListArgumentAndAllFieldsBOfElementsOfArg1dAreTrue_164(); + break; case 165: - ChipLogProgress(chipTool, " ***** Test Step 165 : Send Test Command With Nested Struct List Argument and some fields b of elements of arg1.d are false\n"); - err = TestSendTestCommandWithNestedStructListArgumentAndSomeFieldsBOfElementsOfArg1dAreFalse_165(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 165 : Send Test Command With Nested Struct List Argument and some fields b of " + "elements of arg1.d are false\n"); + err = TestSendTestCommandWithNestedStructListArgumentAndSomeFieldsBOfElementsOfArg1dAreFalse_165(); + break; case 166: - ChipLogProgress(chipTool, " ***** Test Step 166 : Write attribute LIST With List of INT8U and none of them is set to 0\n"); - err = TestWriteAttributeListWithListOfInt8uAndNoneOfThemIsSetTo0_166(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 166 : Write attribute LIST With List of INT8U and none of them is set to 0\n"); + err = TestWriteAttributeListWithListOfInt8uAndNoneOfThemIsSetTo0_166(); + break; case 167: - ChipLogProgress(chipTool, " ***** Test Step 167 : Read attribute LIST With List of INT8U\n"); - err = TestReadAttributeListWithListOfInt8u_167(); - break; + ChipLogProgress(chipTool, " ***** Test Step 167 : Read attribute LIST With List of INT8U\n"); + err = TestReadAttributeListWithListOfInt8u_167(); + break; case 168: - ChipLogProgress(chipTool, " ***** Test Step 168 : Write attribute LIST With List of OCTET_STRING\n"); - err = TestWriteAttributeListWithListOfOctetString_168(); - break; + ChipLogProgress(chipTool, " ***** Test Step 168 : Write attribute LIST With List of OCTET_STRING\n"); + err = TestWriteAttributeListWithListOfOctetString_168(); + break; case 169: - ChipLogProgress(chipTool, " ***** Test Step 169 : Read attribute LIST With List of OCTET_STRING\n"); - err = TestReadAttributeListWithListOfOctetString_169(); - break; + ChipLogProgress(chipTool, " ***** Test Step 169 : Read attribute LIST With List of OCTET_STRING\n"); + err = TestReadAttributeListWithListOfOctetString_169(); + break; case 170: - ChipLogProgress(chipTool, " ***** Test Step 170 : Write attribute LIST With List of LIST_STRUCT_OCTET_STRING\n"); - err = TestWriteAttributeListWithListOfListStructOctetString_170(); - break; + ChipLogProgress(chipTool, " ***** Test Step 170 : Write attribute LIST With List of LIST_STRUCT_OCTET_STRING\n"); + err = TestWriteAttributeListWithListOfListStructOctetString_170(); + break; case 171: - ChipLogProgress(chipTool, " ***** Test Step 171 : Read attribute LIST With List of LIST_STRUCT_OCTET_STRING\n"); - err = TestReadAttributeListWithListOfListStructOctetString_171(); - break; + ChipLogProgress(chipTool, " ***** Test Step 171 : Read attribute LIST With List of LIST_STRUCT_OCTET_STRING\n"); + err = TestReadAttributeListWithListOfListStructOctetString_171(); + break; case 172: - ChipLogProgress(chipTool, " ***** Test Step 172 : Send Test Command with optional arg set.\n"); - err = TestSendTestCommandWithOptionalArgSet_172(); - break; + ChipLogProgress(chipTool, " ***** Test Step 172 : Send Test Command with optional arg set.\n"); + err = TestSendTestCommandWithOptionalArgSet_172(); + break; case 173: - ChipLogProgress(chipTool, " ***** Test Step 173 : Send Test Command without its optional arg.\n"); - err = TestSendTestCommandWithoutItsOptionalArg_173(); - break; + ChipLogProgress(chipTool, " ***** Test Step 173 : Send Test Command without its optional arg.\n"); + err = TestSendTestCommandWithoutItsOptionalArg_173(); + break; case 174: - ChipLogProgress(chipTool, " ***** Test Step 174 : Read list of structs containing nullables and optionals\n"); - err = TestReadListOfStructsContainingNullablesAndOptionals_174(); - break; + ChipLogProgress(chipTool, " ***** Test Step 174 : Read list of structs containing nullables and optionals\n"); + err = TestReadListOfStructsContainingNullablesAndOptionals_174(); + break; case 175: - ChipLogProgress(chipTool, " ***** Test Step 175 : Write list of structs containing nullables and optionals\n"); - err = TestWriteListOfStructsContainingNullablesAndOptionals_175(); - break; + ChipLogProgress(chipTool, " ***** Test Step 175 : Write list of structs containing nullables and optionals\n"); + err = TestWriteListOfStructsContainingNullablesAndOptionals_175(); + break; case 176: - ChipLogProgress(chipTool, " ***** Test Step 176 : Read list of structs containing nullables and optionals after writing\n"); - err = TestReadListOfStructsContainingNullablesAndOptionalsAfterWriting_176(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 176 : Read list of structs containing nullables and optionals after writing\n"); + err = TestReadListOfStructsContainingNullablesAndOptionalsAfterWriting_176(); + break; case 177: - ChipLogProgress(chipTool, " ***** Test Step 177 : Write attribute NULLABLE_BOOLEAN null\n"); - err = TestWriteAttributeNullableBooleanNull_177(); - break; + ChipLogProgress(chipTool, " ***** Test Step 177 : Write attribute NULLABLE_BOOLEAN null\n"); + err = TestWriteAttributeNullableBooleanNull_177(); + break; case 178: - ChipLogProgress(chipTool, " ***** Test Step 178 : Read attribute NULLABLE_BOOLEAN null\n"); - err = TestReadAttributeNullableBooleanNull_178(); - break; + ChipLogProgress(chipTool, " ***** Test Step 178 : Read attribute NULLABLE_BOOLEAN null\n"); + err = TestReadAttributeNullableBooleanNull_178(); + break; case 179: - ChipLogProgress(chipTool, " ***** Test Step 179 : Write attribute NULLABLE_BOOLEAN True\n"); - err = TestWriteAttributeNullableBooleanTrue_179(); - break; + ChipLogProgress(chipTool, " ***** Test Step 179 : Write attribute NULLABLE_BOOLEAN True\n"); + err = TestWriteAttributeNullableBooleanTrue_179(); + break; case 180: - ChipLogProgress(chipTool, " ***** Test Step 180 : Read attribute NULLABLE_BOOLEAN True\n"); - err = TestReadAttributeNullableBooleanTrue_180(); - break; + ChipLogProgress(chipTool, " ***** Test Step 180 : Read attribute NULLABLE_BOOLEAN True\n"); + err = TestReadAttributeNullableBooleanTrue_180(); + break; case 181: - ChipLogProgress(chipTool, " ***** Test Step 181 : Write attribute NULLABLE_BITMAP8 Max Value\n"); - err = TestWriteAttributeNullableBitmap8MaxValue_181(); - break; + ChipLogProgress(chipTool, " ***** Test Step 181 : Write attribute NULLABLE_BITMAP8 Max Value\n"); + err = TestWriteAttributeNullableBitmap8MaxValue_181(); + break; case 182: - ChipLogProgress(chipTool, " ***** Test Step 182 : Read attribute NULLABLE_BITMAP8 Max Value\n"); - err = TestReadAttributeNullableBitmap8MaxValue_182(); - break; + ChipLogProgress(chipTool, " ***** Test Step 182 : Read attribute NULLABLE_BITMAP8 Max Value\n"); + err = TestReadAttributeNullableBitmap8MaxValue_182(); + break; case 183: - ChipLogProgress(chipTool, " ***** Test Step 183 : Write attribute NULLABLE_BITMAP8 Invalid Value\n"); - err = TestWriteAttributeNullableBitmap8InvalidValue_183(); - break; + ChipLogProgress(chipTool, " ***** Test Step 183 : Write attribute NULLABLE_BITMAP8 Invalid Value\n"); + err = TestWriteAttributeNullableBitmap8InvalidValue_183(); + break; case 184: - ChipLogProgress(chipTool, " ***** Test Step 184 : Read attribute NULLABLE_BITMAP8 unchanged Value\n"); - err = TestReadAttributeNullableBitmap8UnchangedValue_184(); - break; + ChipLogProgress(chipTool, " ***** Test Step 184 : Read attribute NULLABLE_BITMAP8 unchanged Value\n"); + err = TestReadAttributeNullableBitmap8UnchangedValue_184(); + break; case 185: - ChipLogProgress(chipTool, " ***** Test Step 185 : Write attribute NULLABLE_BITMAP8 null Value\n"); - err = TestWriteAttributeNullableBitmap8NullValue_185(); - break; + ChipLogProgress(chipTool, " ***** Test Step 185 : Write attribute NULLABLE_BITMAP8 null Value\n"); + err = TestWriteAttributeNullableBitmap8NullValue_185(); + break; case 186: - ChipLogProgress(chipTool, " ***** Test Step 186 : Read attribute NULLABLE_BITMAP8 null Value\n"); - err = TestReadAttributeNullableBitmap8NullValue_186(); - break; + ChipLogProgress(chipTool, " ***** Test Step 186 : Read attribute NULLABLE_BITMAP8 null Value\n"); + err = TestReadAttributeNullableBitmap8NullValue_186(); + break; case 187: - ChipLogProgress(chipTool, " ***** Test Step 187 : Write attribute NULLABLE_BITMAP16 Max Value\n"); - err = TestWriteAttributeNullableBitmap16MaxValue_187(); - break; + ChipLogProgress(chipTool, " ***** Test Step 187 : Write attribute NULLABLE_BITMAP16 Max Value\n"); + err = TestWriteAttributeNullableBitmap16MaxValue_187(); + break; case 188: - ChipLogProgress(chipTool, " ***** Test Step 188 : Read attribute NULLABLE_BITMAP16 Max Value\n"); - err = TestReadAttributeNullableBitmap16MaxValue_188(); - break; + ChipLogProgress(chipTool, " ***** Test Step 188 : Read attribute NULLABLE_BITMAP16 Max Value\n"); + err = TestReadAttributeNullableBitmap16MaxValue_188(); + break; case 189: - ChipLogProgress(chipTool, " ***** Test Step 189 : Write attribute NULLABLE_BITMAP16 Invalid Value\n"); - err = TestWriteAttributeNullableBitmap16InvalidValue_189(); - break; + ChipLogProgress(chipTool, " ***** Test Step 189 : Write attribute NULLABLE_BITMAP16 Invalid Value\n"); + err = TestWriteAttributeNullableBitmap16InvalidValue_189(); + break; case 190: - ChipLogProgress(chipTool, " ***** Test Step 190 : Read attribute NULLABLE_BITMAP16 unchanged Value\n"); - err = TestReadAttributeNullableBitmap16UnchangedValue_190(); - break; + ChipLogProgress(chipTool, " ***** Test Step 190 : Read attribute NULLABLE_BITMAP16 unchanged Value\n"); + err = TestReadAttributeNullableBitmap16UnchangedValue_190(); + break; case 191: - ChipLogProgress(chipTool, " ***** Test Step 191 : Write attribute NULLABLE_BITMAP16 null Value\n"); - err = TestWriteAttributeNullableBitmap16NullValue_191(); - break; + ChipLogProgress(chipTool, " ***** Test Step 191 : Write attribute NULLABLE_BITMAP16 null Value\n"); + err = TestWriteAttributeNullableBitmap16NullValue_191(); + break; case 192: - ChipLogProgress(chipTool, " ***** Test Step 192 : Read attribute NULLABLE_BITMAP16 null Value\n"); - err = TestReadAttributeNullableBitmap16NullValue_192(); - break; + ChipLogProgress(chipTool, " ***** Test Step 192 : Read attribute NULLABLE_BITMAP16 null Value\n"); + err = TestReadAttributeNullableBitmap16NullValue_192(); + break; case 193: - ChipLogProgress(chipTool, " ***** Test Step 193 : Write attribute NULLABLE_BITMAP32 Max Value\n"); - err = TestWriteAttributeNullableBitmap32MaxValue_193(); - break; + ChipLogProgress(chipTool, " ***** Test Step 193 : Write attribute NULLABLE_BITMAP32 Max Value\n"); + err = TestWriteAttributeNullableBitmap32MaxValue_193(); + break; case 194: - ChipLogProgress(chipTool, " ***** Test Step 194 : Read attribute NULLABLE_BITMAP32 Max Value\n"); - err = TestReadAttributeNullableBitmap32MaxValue_194(); - break; + ChipLogProgress(chipTool, " ***** Test Step 194 : Read attribute NULLABLE_BITMAP32 Max Value\n"); + err = TestReadAttributeNullableBitmap32MaxValue_194(); + break; case 195: - ChipLogProgress(chipTool, " ***** Test Step 195 : Write attribute NULLABLE_BITMAP32 Invalid Value\n"); - err = TestWriteAttributeNullableBitmap32InvalidValue_195(); - break; + ChipLogProgress(chipTool, " ***** Test Step 195 : Write attribute NULLABLE_BITMAP32 Invalid Value\n"); + err = TestWriteAttributeNullableBitmap32InvalidValue_195(); + break; case 196: - ChipLogProgress(chipTool, " ***** Test Step 196 : Read attribute NULLABLE_BITMAP32 unchanged Value\n"); - err = TestReadAttributeNullableBitmap32UnchangedValue_196(); - break; + ChipLogProgress(chipTool, " ***** Test Step 196 : Read attribute NULLABLE_BITMAP32 unchanged Value\n"); + err = TestReadAttributeNullableBitmap32UnchangedValue_196(); + break; case 197: - ChipLogProgress(chipTool, " ***** Test Step 197 : Write attribute NULLABLE_BITMAP32 null Value\n"); - err = TestWriteAttributeNullableBitmap32NullValue_197(); - break; + ChipLogProgress(chipTool, " ***** Test Step 197 : Write attribute NULLABLE_BITMAP32 null Value\n"); + err = TestWriteAttributeNullableBitmap32NullValue_197(); + break; case 198: - ChipLogProgress(chipTool, " ***** Test Step 198 : Read attribute NULLABLE_BITMAP32 null Value\n"); - err = TestReadAttributeNullableBitmap32NullValue_198(); - break; + ChipLogProgress(chipTool, " ***** Test Step 198 : Read attribute NULLABLE_BITMAP32 null Value\n"); + err = TestReadAttributeNullableBitmap32NullValue_198(); + break; case 199: - ChipLogProgress(chipTool, " ***** Test Step 199 : Write attribute NULLABLE_BITMAP64 Max Value\n"); - err = TestWriteAttributeNullableBitmap64MaxValue_199(); - break; + ChipLogProgress(chipTool, " ***** Test Step 199 : Write attribute NULLABLE_BITMAP64 Max Value\n"); + err = TestWriteAttributeNullableBitmap64MaxValue_199(); + break; case 200: - ChipLogProgress(chipTool, " ***** Test Step 200 : Read attribute NULLABLE_BITMAP64 Max Value\n"); - err = TestReadAttributeNullableBitmap64MaxValue_200(); - break; + ChipLogProgress(chipTool, " ***** Test Step 200 : Read attribute NULLABLE_BITMAP64 Max Value\n"); + err = TestReadAttributeNullableBitmap64MaxValue_200(); + break; case 201: - ChipLogProgress(chipTool, " ***** Test Step 201 : Write attribute NULLABLE_BITMAP64 Invalid Value\n"); - err = TestWriteAttributeNullableBitmap64InvalidValue_201(); - break; + ChipLogProgress(chipTool, " ***** Test Step 201 : Write attribute NULLABLE_BITMAP64 Invalid Value\n"); + err = TestWriteAttributeNullableBitmap64InvalidValue_201(); + break; case 202: - ChipLogProgress(chipTool, " ***** Test Step 202 : Read attribute NULLABLE_BITMAP64 unchanged Value\n"); - err = TestReadAttributeNullableBitmap64UnchangedValue_202(); - break; + ChipLogProgress(chipTool, " ***** Test Step 202 : Read attribute NULLABLE_BITMAP64 unchanged Value\n"); + err = TestReadAttributeNullableBitmap64UnchangedValue_202(); + break; case 203: - ChipLogProgress(chipTool, " ***** Test Step 203 : Write attribute NULLABLE_BITMAP64 null Value\n"); - err = TestWriteAttributeNullableBitmap64NullValue_203(); - break; + ChipLogProgress(chipTool, " ***** Test Step 203 : Write attribute NULLABLE_BITMAP64 null Value\n"); + err = TestWriteAttributeNullableBitmap64NullValue_203(); + break; case 204: - ChipLogProgress(chipTool, " ***** Test Step 204 : Read attribute NULLABLE_BITMAP64 null Value\n"); - err = TestReadAttributeNullableBitmap64NullValue_204(); - break; + ChipLogProgress(chipTool, " ***** Test Step 204 : Read attribute NULLABLE_BITMAP64 null Value\n"); + err = TestReadAttributeNullableBitmap64NullValue_204(); + break; case 205: - ChipLogProgress(chipTool, " ***** Test Step 205 : Write attribute NULLABLE_INT8U Min Value\n"); - err = TestWriteAttributeNullableInt8uMinValue_205(); - break; + ChipLogProgress(chipTool, " ***** Test Step 205 : Write attribute NULLABLE_INT8U Min Value\n"); + err = TestWriteAttributeNullableInt8uMinValue_205(); + break; case 206: - ChipLogProgress(chipTool, " ***** Test Step 206 : Read attribute NULLABLE_INT8U Min Value\n"); - err = TestReadAttributeNullableInt8uMinValue_206(); - break; + ChipLogProgress(chipTool, " ***** Test Step 206 : Read attribute NULLABLE_INT8U Min Value\n"); + err = TestReadAttributeNullableInt8uMinValue_206(); + break; case 207: - ChipLogProgress(chipTool, " ***** Test Step 207 : Write attribute NULLABLE_INT8U Max Value\n"); - err = TestWriteAttributeNullableInt8uMaxValue_207(); - break; + ChipLogProgress(chipTool, " ***** Test Step 207 : Write attribute NULLABLE_INT8U Max Value\n"); + err = TestWriteAttributeNullableInt8uMaxValue_207(); + break; case 208: - ChipLogProgress(chipTool, " ***** Test Step 208 : Read attribute NULLABLE_INT8U Max Value\n"); - err = TestReadAttributeNullableInt8uMaxValue_208(); - break; + ChipLogProgress(chipTool, " ***** Test Step 208 : Read attribute NULLABLE_INT8U Max Value\n"); + err = TestReadAttributeNullableInt8uMaxValue_208(); + break; case 209: - ChipLogProgress(chipTool, " ***** Test Step 209 : Write attribute NULLABLE_INT8U Invalid Value\n"); - err = TestWriteAttributeNullableInt8uInvalidValue_209(); - break; + ChipLogProgress(chipTool, " ***** Test Step 209 : Write attribute NULLABLE_INT8U Invalid Value\n"); + err = TestWriteAttributeNullableInt8uInvalidValue_209(); + break; case 210: - ChipLogProgress(chipTool, " ***** Test Step 210 : Read attribute NULLABLE_INT8U unchanged Value\n"); - err = TestReadAttributeNullableInt8uUnchangedValue_210(); - break; + ChipLogProgress(chipTool, " ***** Test Step 210 : Read attribute NULLABLE_INT8U unchanged Value\n"); + err = TestReadAttributeNullableInt8uUnchangedValue_210(); + break; case 211: - ChipLogProgress(chipTool, " ***** Test Step 211 : Read attribute NULLABLE_INT8U unchanged Value with constraint\n"); - err = TestReadAttributeNullableInt8uUnchangedValueWithConstraint_211(); - break; + ChipLogProgress(chipTool, " ***** Test Step 211 : Read attribute NULLABLE_INT8U unchanged Value with constraint\n"); + err = TestReadAttributeNullableInt8uUnchangedValueWithConstraint_211(); + break; case 212: - ChipLogProgress(chipTool, " ***** Test Step 212 : Write attribute NULLABLE_INT8U null Value\n"); - err = TestWriteAttributeNullableInt8uNullValue_212(); - break; + ChipLogProgress(chipTool, " ***** Test Step 212 : Write attribute NULLABLE_INT8U null Value\n"); + err = TestWriteAttributeNullableInt8uNullValue_212(); + break; case 213: - ChipLogProgress(chipTool, " ***** Test Step 213 : Read attribute NULLABLE_INT8U null Value\n"); - err = TestReadAttributeNullableInt8uNullValue_213(); - break; + ChipLogProgress(chipTool, " ***** Test Step 213 : Read attribute NULLABLE_INT8U null Value\n"); + err = TestReadAttributeNullableInt8uNullValue_213(); + break; case 214: - ChipLogProgress(chipTool, " ***** Test Step 214 : Read attribute NULLABLE_INT8U null Value & range\n"); - err = TestReadAttributeNullableInt8uNullValueRange_214(); - break; + ChipLogProgress(chipTool, " ***** Test Step 214 : Read attribute NULLABLE_INT8U null Value & range\n"); + err = TestReadAttributeNullableInt8uNullValueRange_214(); + break; case 215: - ChipLogProgress(chipTool, " ***** Test Step 215 : Read attribute NULLABLE_INT8U null Value & not\n"); - err = TestReadAttributeNullableInt8uNullValueNot_215(); - break; + ChipLogProgress(chipTool, " ***** Test Step 215 : Read attribute NULLABLE_INT8U null Value & not\n"); + err = TestReadAttributeNullableInt8uNullValueNot_215(); + break; case 216: - ChipLogProgress(chipTool, " ***** Test Step 216 : Write attribute NULLABLE_INT8U Value\n"); - err = TestWriteAttributeNullableInt8uValue_216(); - break; + ChipLogProgress(chipTool, " ***** Test Step 216 : Write attribute NULLABLE_INT8U Value\n"); + err = TestWriteAttributeNullableInt8uValue_216(); + break; case 217: - ChipLogProgress(chipTool, " ***** Test Step 217 : Read attribute NULLABLE_INT8U Value in range\n"); - err = TestReadAttributeNullableInt8uValueInRange_217(); - break; + ChipLogProgress(chipTool, " ***** Test Step 217 : Read attribute NULLABLE_INT8U Value in range\n"); + err = TestReadAttributeNullableInt8uValueInRange_217(); + break; case 218: - ChipLogProgress(chipTool, " ***** Test Step 218 : Read attribute NULLABLE_INT8U notValue OK\n"); - err = TestReadAttributeNullableInt8uNotValueOk_218(); - break; + ChipLogProgress(chipTool, " ***** Test Step 218 : Read attribute NULLABLE_INT8U notValue OK\n"); + err = TestReadAttributeNullableInt8uNotValueOk_218(); + break; case 219: - ChipLogProgress(chipTool, " ***** Test Step 219 : Write attribute NULLABLE_INT16U Min Value\n"); - err = TestWriteAttributeNullableInt16uMinValue_219(); - break; + ChipLogProgress(chipTool, " ***** Test Step 219 : Write attribute NULLABLE_INT16U Min Value\n"); + err = TestWriteAttributeNullableInt16uMinValue_219(); + break; case 220: - ChipLogProgress(chipTool, " ***** Test Step 220 : Read attribute NULLABLE_INT16U Min Value\n"); - err = TestReadAttributeNullableInt16uMinValue_220(); - break; + ChipLogProgress(chipTool, " ***** Test Step 220 : Read attribute NULLABLE_INT16U Min Value\n"); + err = TestReadAttributeNullableInt16uMinValue_220(); + break; case 221: - ChipLogProgress(chipTool, " ***** Test Step 221 : Write attribute NULLABLE_INT16U Max Value\n"); - err = TestWriteAttributeNullableInt16uMaxValue_221(); - break; + ChipLogProgress(chipTool, " ***** Test Step 221 : Write attribute NULLABLE_INT16U Max Value\n"); + err = TestWriteAttributeNullableInt16uMaxValue_221(); + break; case 222: - ChipLogProgress(chipTool, " ***** Test Step 222 : Read attribute NULLABLE_INT16U Max Value\n"); - err = TestReadAttributeNullableInt16uMaxValue_222(); - break; + ChipLogProgress(chipTool, " ***** Test Step 222 : Read attribute NULLABLE_INT16U Max Value\n"); + err = TestReadAttributeNullableInt16uMaxValue_222(); + break; case 223: - ChipLogProgress(chipTool, " ***** Test Step 223 : Write attribute NULLABLE_INT16U Invalid Value\n"); - err = TestWriteAttributeNullableInt16uInvalidValue_223(); - break; + ChipLogProgress(chipTool, " ***** Test Step 223 : Write attribute NULLABLE_INT16U Invalid Value\n"); + err = TestWriteAttributeNullableInt16uInvalidValue_223(); + break; case 224: - ChipLogProgress(chipTool, " ***** Test Step 224 : Read attribute NULLABLE_INT16U unchanged Value\n"); - err = TestReadAttributeNullableInt16uUnchangedValue_224(); - break; + ChipLogProgress(chipTool, " ***** Test Step 224 : Read attribute NULLABLE_INT16U unchanged Value\n"); + err = TestReadAttributeNullableInt16uUnchangedValue_224(); + break; case 225: - ChipLogProgress(chipTool, " ***** Test Step 225 : Write attribute NULLABLE_INT16U null Value\n"); - err = TestWriteAttributeNullableInt16uNullValue_225(); - break; + ChipLogProgress(chipTool, " ***** Test Step 225 : Write attribute NULLABLE_INT16U null Value\n"); + err = TestWriteAttributeNullableInt16uNullValue_225(); + break; case 226: - ChipLogProgress(chipTool, " ***** Test Step 226 : Read attribute NULLABLE_INT16U null Value\n"); - err = TestReadAttributeNullableInt16uNullValue_226(); - break; + ChipLogProgress(chipTool, " ***** Test Step 226 : Read attribute NULLABLE_INT16U null Value\n"); + err = TestReadAttributeNullableInt16uNullValue_226(); + break; case 227: - ChipLogProgress(chipTool, " ***** Test Step 227 : Read attribute NULLABLE_INT16U null Value & range\n"); - err = TestReadAttributeNullableInt16uNullValueRange_227(); - break; + ChipLogProgress(chipTool, " ***** Test Step 227 : Read attribute NULLABLE_INT16U null Value & range\n"); + err = TestReadAttributeNullableInt16uNullValueRange_227(); + break; case 228: - ChipLogProgress(chipTool, " ***** Test Step 228 : Read attribute NULLABLE_INT16U null Value & not\n"); - err = TestReadAttributeNullableInt16uNullValueNot_228(); - break; + ChipLogProgress(chipTool, " ***** Test Step 228 : Read attribute NULLABLE_INT16U null Value & not\n"); + err = TestReadAttributeNullableInt16uNullValueNot_228(); + break; case 229: - ChipLogProgress(chipTool, " ***** Test Step 229 : Write attribute NULLABLE_INT16U Value\n"); - err = TestWriteAttributeNullableInt16uValue_229(); - break; + ChipLogProgress(chipTool, " ***** Test Step 229 : Write attribute NULLABLE_INT16U Value\n"); + err = TestWriteAttributeNullableInt16uValue_229(); + break; case 230: - ChipLogProgress(chipTool, " ***** Test Step 230 : Read attribute NULLABLE_INT16U Value in range\n"); - err = TestReadAttributeNullableInt16uValueInRange_230(); - break; + ChipLogProgress(chipTool, " ***** Test Step 230 : Read attribute NULLABLE_INT16U Value in range\n"); + err = TestReadAttributeNullableInt16uValueInRange_230(); + break; case 231: - ChipLogProgress(chipTool, " ***** Test Step 231 : Read attribute NULLABLE_INT16U notValue OK\n"); - err = TestReadAttributeNullableInt16uNotValueOk_231(); - break; + ChipLogProgress(chipTool, " ***** Test Step 231 : Read attribute NULLABLE_INT16U notValue OK\n"); + err = TestReadAttributeNullableInt16uNotValueOk_231(); + break; case 232: - ChipLogProgress(chipTool, " ***** Test Step 232 : Write attribute NULLABLE_INT32U Min Value\n"); - err = TestWriteAttributeNullableInt32uMinValue_232(); - break; + ChipLogProgress(chipTool, " ***** Test Step 232 : Write attribute NULLABLE_INT32U Min Value\n"); + err = TestWriteAttributeNullableInt32uMinValue_232(); + break; case 233: - ChipLogProgress(chipTool, " ***** Test Step 233 : Read attribute NULLABLE_INT32U Min Value\n"); - err = TestReadAttributeNullableInt32uMinValue_233(); - break; + ChipLogProgress(chipTool, " ***** Test Step 233 : Read attribute NULLABLE_INT32U Min Value\n"); + err = TestReadAttributeNullableInt32uMinValue_233(); + break; case 234: - ChipLogProgress(chipTool, " ***** Test Step 234 : Write attribute NULLABLE_INT32U Max Value\n"); - err = TestWriteAttributeNullableInt32uMaxValue_234(); - break; + ChipLogProgress(chipTool, " ***** Test Step 234 : Write attribute NULLABLE_INT32U Max Value\n"); + err = TestWriteAttributeNullableInt32uMaxValue_234(); + break; case 235: - ChipLogProgress(chipTool, " ***** Test Step 235 : Read attribute NULLABLE_INT32U Max Value\n"); - err = TestReadAttributeNullableInt32uMaxValue_235(); - break; + ChipLogProgress(chipTool, " ***** Test Step 235 : Read attribute NULLABLE_INT32U Max Value\n"); + err = TestReadAttributeNullableInt32uMaxValue_235(); + break; case 236: - ChipLogProgress(chipTool, " ***** Test Step 236 : Write attribute NULLABLE_INT32U Invalid Value\n"); - err = TestWriteAttributeNullableInt32uInvalidValue_236(); - break; + ChipLogProgress(chipTool, " ***** Test Step 236 : Write attribute NULLABLE_INT32U Invalid Value\n"); + err = TestWriteAttributeNullableInt32uInvalidValue_236(); + break; case 237: - ChipLogProgress(chipTool, " ***** Test Step 237 : Read attribute NULLABLE_INT32U unchanged Value\n"); - err = TestReadAttributeNullableInt32uUnchangedValue_237(); - break; + ChipLogProgress(chipTool, " ***** Test Step 237 : Read attribute NULLABLE_INT32U unchanged Value\n"); + err = TestReadAttributeNullableInt32uUnchangedValue_237(); + break; case 238: - ChipLogProgress(chipTool, " ***** Test Step 238 : Write attribute NULLABLE_INT32U null Value\n"); - err = TestWriteAttributeNullableInt32uNullValue_238(); - break; + ChipLogProgress(chipTool, " ***** Test Step 238 : Write attribute NULLABLE_INT32U null Value\n"); + err = TestWriteAttributeNullableInt32uNullValue_238(); + break; case 239: - ChipLogProgress(chipTool, " ***** Test Step 239 : Read attribute NULLABLE_INT32U null Value\n"); - err = TestReadAttributeNullableInt32uNullValue_239(); - break; + ChipLogProgress(chipTool, " ***** Test Step 239 : Read attribute NULLABLE_INT32U null Value\n"); + err = TestReadAttributeNullableInt32uNullValue_239(); + break; case 240: - ChipLogProgress(chipTool, " ***** Test Step 240 : Read attribute NULLABLE_INT32U null Value & range\n"); - err = TestReadAttributeNullableInt32uNullValueRange_240(); - break; + ChipLogProgress(chipTool, " ***** Test Step 240 : Read attribute NULLABLE_INT32U null Value & range\n"); + err = TestReadAttributeNullableInt32uNullValueRange_240(); + break; case 241: - ChipLogProgress(chipTool, " ***** Test Step 241 : Read attribute NULLABLE_INT32U null Value & not\n"); - err = TestReadAttributeNullableInt32uNullValueNot_241(); - break; + ChipLogProgress(chipTool, " ***** Test Step 241 : Read attribute NULLABLE_INT32U null Value & not\n"); + err = TestReadAttributeNullableInt32uNullValueNot_241(); + break; case 242: - ChipLogProgress(chipTool, " ***** Test Step 242 : Write attribute NULLABLE_INT32U Value\n"); - err = TestWriteAttributeNullableInt32uValue_242(); - break; + ChipLogProgress(chipTool, " ***** Test Step 242 : Write attribute NULLABLE_INT32U Value\n"); + err = TestWriteAttributeNullableInt32uValue_242(); + break; case 243: - ChipLogProgress(chipTool, " ***** Test Step 243 : Read attribute NULLABLE_INT32U Value in range\n"); - err = TestReadAttributeNullableInt32uValueInRange_243(); - break; + ChipLogProgress(chipTool, " ***** Test Step 243 : Read attribute NULLABLE_INT32U Value in range\n"); + err = TestReadAttributeNullableInt32uValueInRange_243(); + break; case 244: - ChipLogProgress(chipTool, " ***** Test Step 244 : Read attribute NULLABLE_INT32U notValue OK\n"); - err = TestReadAttributeNullableInt32uNotValueOk_244(); - break; + ChipLogProgress(chipTool, " ***** Test Step 244 : Read attribute NULLABLE_INT32U notValue OK\n"); + err = TestReadAttributeNullableInt32uNotValueOk_244(); + break; case 245: - ChipLogProgress(chipTool, " ***** Test Step 245 : Write attribute NULLABLE_INT64U Min Value\n"); - err = TestWriteAttributeNullableInt64uMinValue_245(); - break; + ChipLogProgress(chipTool, " ***** Test Step 245 : Write attribute NULLABLE_INT64U Min Value\n"); + err = TestWriteAttributeNullableInt64uMinValue_245(); + break; case 246: - ChipLogProgress(chipTool, " ***** Test Step 246 : Read attribute NULLABLE_INT64U Min Value\n"); - err = TestReadAttributeNullableInt64uMinValue_246(); - break; + ChipLogProgress(chipTool, " ***** Test Step 246 : Read attribute NULLABLE_INT64U Min Value\n"); + err = TestReadAttributeNullableInt64uMinValue_246(); + break; case 247: - ChipLogProgress(chipTool, " ***** Test Step 247 : Write attribute NULLABLE_INT64U Max Value\n"); - err = TestWriteAttributeNullableInt64uMaxValue_247(); - break; + ChipLogProgress(chipTool, " ***** Test Step 247 : Write attribute NULLABLE_INT64U Max Value\n"); + err = TestWriteAttributeNullableInt64uMaxValue_247(); + break; case 248: - ChipLogProgress(chipTool, " ***** Test Step 248 : Read attribute NULLABLE_INT64U Max Value\n"); - err = TestReadAttributeNullableInt64uMaxValue_248(); - break; + ChipLogProgress(chipTool, " ***** Test Step 248 : Read attribute NULLABLE_INT64U Max Value\n"); + err = TestReadAttributeNullableInt64uMaxValue_248(); + break; case 249: - ChipLogProgress(chipTool, " ***** Test Step 249 : Write attribute NULLABLE_INT64U Invalid Value\n"); - err = TestWriteAttributeNullableInt64uInvalidValue_249(); - break; + ChipLogProgress(chipTool, " ***** Test Step 249 : Write attribute NULLABLE_INT64U Invalid Value\n"); + err = TestWriteAttributeNullableInt64uInvalidValue_249(); + break; case 250: - ChipLogProgress(chipTool, " ***** Test Step 250 : Read attribute NULLABLE_INT64U unchanged Value\n"); - err = TestReadAttributeNullableInt64uUnchangedValue_250(); - break; + ChipLogProgress(chipTool, " ***** Test Step 250 : Read attribute NULLABLE_INT64U unchanged Value\n"); + err = TestReadAttributeNullableInt64uUnchangedValue_250(); + break; case 251: - ChipLogProgress(chipTool, " ***** Test Step 251 : Write attribute NULLABLE_INT64U null Value\n"); - err = TestWriteAttributeNullableInt64uNullValue_251(); - break; + ChipLogProgress(chipTool, " ***** Test Step 251 : Write attribute NULLABLE_INT64U null Value\n"); + err = TestWriteAttributeNullableInt64uNullValue_251(); + break; case 252: - ChipLogProgress(chipTool, " ***** Test Step 252 : Read attribute NULLABLE_INT64U null Value\n"); - err = TestReadAttributeNullableInt64uNullValue_252(); - break; + ChipLogProgress(chipTool, " ***** Test Step 252 : Read attribute NULLABLE_INT64U null Value\n"); + err = TestReadAttributeNullableInt64uNullValue_252(); + break; case 253: - ChipLogProgress(chipTool, " ***** Test Step 253 : Read attribute NULLABLE_INT64U null Value & range\n"); - err = TestReadAttributeNullableInt64uNullValueRange_253(); - break; + ChipLogProgress(chipTool, " ***** Test Step 253 : Read attribute NULLABLE_INT64U null Value & range\n"); + err = TestReadAttributeNullableInt64uNullValueRange_253(); + break; case 254: - ChipLogProgress(chipTool, " ***** Test Step 254 : Read attribute NULLABLE_INT64U null Value & not\n"); - err = TestReadAttributeNullableInt64uNullValueNot_254(); - break; + ChipLogProgress(chipTool, " ***** Test Step 254 : Read attribute NULLABLE_INT64U null Value & not\n"); + err = TestReadAttributeNullableInt64uNullValueNot_254(); + break; case 255: - ChipLogProgress(chipTool, " ***** Test Step 255 : Write attribute NULLABLE_INT64U Value\n"); - err = TestWriteAttributeNullableInt64uValue_255(); - break; + ChipLogProgress(chipTool, " ***** Test Step 255 : Write attribute NULLABLE_INT64U Value\n"); + err = TestWriteAttributeNullableInt64uValue_255(); + break; case 256: - ChipLogProgress(chipTool, " ***** Test Step 256 : Read attribute NULLABLE_INT64U Value in range\n"); - err = TestReadAttributeNullableInt64uValueInRange_256(); - break; + ChipLogProgress(chipTool, " ***** Test Step 256 : Read attribute NULLABLE_INT64U Value in range\n"); + err = TestReadAttributeNullableInt64uValueInRange_256(); + break; case 257: - ChipLogProgress(chipTool, " ***** Test Step 257 : Read attribute NULLABLE_INT64U notValue OK\n"); - err = TestReadAttributeNullableInt64uNotValueOk_257(); - break; + ChipLogProgress(chipTool, " ***** Test Step 257 : Read attribute NULLABLE_INT64U notValue OK\n"); + err = TestReadAttributeNullableInt64uNotValueOk_257(); + break; case 258: - ChipLogProgress(chipTool, " ***** Test Step 258 : Write attribute NULLABLE_INT8S Min Value\n"); - err = TestWriteAttributeNullableInt8sMinValue_258(); - break; + ChipLogProgress(chipTool, " ***** Test Step 258 : Write attribute NULLABLE_INT8S Min Value\n"); + err = TestWriteAttributeNullableInt8sMinValue_258(); + break; case 259: - ChipLogProgress(chipTool, " ***** Test Step 259 : Read attribute NULLABLE_INT8S Min Value\n"); - err = TestReadAttributeNullableInt8sMinValue_259(); - break; + ChipLogProgress(chipTool, " ***** Test Step 259 : Read attribute NULLABLE_INT8S Min Value\n"); + err = TestReadAttributeNullableInt8sMinValue_259(); + break; case 260: - ChipLogProgress(chipTool, " ***** Test Step 260 : Write attribute NULLABLE_INT8S Invalid Value\n"); - err = TestWriteAttributeNullableInt8sInvalidValue_260(); - break; + ChipLogProgress(chipTool, " ***** Test Step 260 : Write attribute NULLABLE_INT8S Invalid Value\n"); + err = TestWriteAttributeNullableInt8sInvalidValue_260(); + break; case 261: - ChipLogProgress(chipTool, " ***** Test Step 261 : Read attribute NULLABLE_INT8S unchanged Value\n"); - err = TestReadAttributeNullableInt8sUnchangedValue_261(); - break; + ChipLogProgress(chipTool, " ***** Test Step 261 : Read attribute NULLABLE_INT8S unchanged Value\n"); + err = TestReadAttributeNullableInt8sUnchangedValue_261(); + break; case 262: - ChipLogProgress(chipTool, " ***** Test Step 262 : Write attribute NULLABLE_INT8S null Value\n"); - err = TestWriteAttributeNullableInt8sNullValue_262(); - break; + ChipLogProgress(chipTool, " ***** Test Step 262 : Write attribute NULLABLE_INT8S null Value\n"); + err = TestWriteAttributeNullableInt8sNullValue_262(); + break; case 263: - ChipLogProgress(chipTool, " ***** Test Step 263 : Read attribute NULLABLE_INT8S null Value\n"); - err = TestReadAttributeNullableInt8sNullValue_263(); - break; + ChipLogProgress(chipTool, " ***** Test Step 263 : Read attribute NULLABLE_INT8S null Value\n"); + err = TestReadAttributeNullableInt8sNullValue_263(); + break; case 264: - ChipLogProgress(chipTool, " ***** Test Step 264 : Read attribute NULLABLE_INT8S null Value & range\n"); - err = TestReadAttributeNullableInt8sNullValueRange_264(); - break; + ChipLogProgress(chipTool, " ***** Test Step 264 : Read attribute NULLABLE_INT8S null Value & range\n"); + err = TestReadAttributeNullableInt8sNullValueRange_264(); + break; case 265: - ChipLogProgress(chipTool, " ***** Test Step 265 : Read attribute NULLABLE_INT8S null Value & not\n"); - err = TestReadAttributeNullableInt8sNullValueNot_265(); - break; + ChipLogProgress(chipTool, " ***** Test Step 265 : Read attribute NULLABLE_INT8S null Value & not\n"); + err = TestReadAttributeNullableInt8sNullValueNot_265(); + break; case 266: - ChipLogProgress(chipTool, " ***** Test Step 266 : Write attribute NULLABLE_INT8S Value\n"); - err = TestWriteAttributeNullableInt8sValue_266(); - break; + ChipLogProgress(chipTool, " ***** Test Step 266 : Write attribute NULLABLE_INT8S Value\n"); + err = TestWriteAttributeNullableInt8sValue_266(); + break; case 267: - ChipLogProgress(chipTool, " ***** Test Step 267 : Read attribute NULLABLE_INT8S Value in range\n"); - err = TestReadAttributeNullableInt8sValueInRange_267(); - break; + ChipLogProgress(chipTool, " ***** Test Step 267 : Read attribute NULLABLE_INT8S Value in range\n"); + err = TestReadAttributeNullableInt8sValueInRange_267(); + break; case 268: - ChipLogProgress(chipTool, " ***** Test Step 268 : Read attribute NULLABLE_INT8S notValue OK\n"); - err = TestReadAttributeNullableInt8sNotValueOk_268(); - break; + ChipLogProgress(chipTool, " ***** Test Step 268 : Read attribute NULLABLE_INT8S notValue OK\n"); + err = TestReadAttributeNullableInt8sNotValueOk_268(); + break; case 269: - ChipLogProgress(chipTool, " ***** Test Step 269 : Write attribute NULLABLE_INT16S Min Value\n"); - err = TestWriteAttributeNullableInt16sMinValue_269(); - break; + ChipLogProgress(chipTool, " ***** Test Step 269 : Write attribute NULLABLE_INT16S Min Value\n"); + err = TestWriteAttributeNullableInt16sMinValue_269(); + break; case 270: - ChipLogProgress(chipTool, " ***** Test Step 270 : Read attribute NULLABLE_INT16S Min Value\n"); - err = TestReadAttributeNullableInt16sMinValue_270(); - break; + ChipLogProgress(chipTool, " ***** Test Step 270 : Read attribute NULLABLE_INT16S Min Value\n"); + err = TestReadAttributeNullableInt16sMinValue_270(); + break; case 271: - ChipLogProgress(chipTool, " ***** Test Step 271 : Write attribute NULLABLE_INT16S Invalid Value\n"); - err = TestWriteAttributeNullableInt16sInvalidValue_271(); - break; + ChipLogProgress(chipTool, " ***** Test Step 271 : Write attribute NULLABLE_INT16S Invalid Value\n"); + err = TestWriteAttributeNullableInt16sInvalidValue_271(); + break; case 272: - ChipLogProgress(chipTool, " ***** Test Step 272 : Read attribute NULLABLE_INT16S unchanged Value\n"); - err = TestReadAttributeNullableInt16sUnchangedValue_272(); - break; + ChipLogProgress(chipTool, " ***** Test Step 272 : Read attribute NULLABLE_INT16S unchanged Value\n"); + err = TestReadAttributeNullableInt16sUnchangedValue_272(); + break; case 273: - ChipLogProgress(chipTool, " ***** Test Step 273 : Write attribute NULLABLE_INT16S null Value\n"); - err = TestWriteAttributeNullableInt16sNullValue_273(); - break; + ChipLogProgress(chipTool, " ***** Test Step 273 : Write attribute NULLABLE_INT16S null Value\n"); + err = TestWriteAttributeNullableInt16sNullValue_273(); + break; case 274: - ChipLogProgress(chipTool, " ***** Test Step 274 : Read attribute NULLABLE_INT16S null Value\n"); - err = TestReadAttributeNullableInt16sNullValue_274(); - break; + ChipLogProgress(chipTool, " ***** Test Step 274 : Read attribute NULLABLE_INT16S null Value\n"); + err = TestReadAttributeNullableInt16sNullValue_274(); + break; case 275: - ChipLogProgress(chipTool, " ***** Test Step 275 : Read attribute NULLABLE_INT16S null Value & range\n"); - err = TestReadAttributeNullableInt16sNullValueRange_275(); - break; + ChipLogProgress(chipTool, " ***** Test Step 275 : Read attribute NULLABLE_INT16S null Value & range\n"); + err = TestReadAttributeNullableInt16sNullValueRange_275(); + break; case 276: - ChipLogProgress(chipTool, " ***** Test Step 276 : Read attribute NULLABLE_INT16S null Value & not\n"); - err = TestReadAttributeNullableInt16sNullValueNot_276(); - break; + ChipLogProgress(chipTool, " ***** Test Step 276 : Read attribute NULLABLE_INT16S null Value & not\n"); + err = TestReadAttributeNullableInt16sNullValueNot_276(); + break; case 277: - ChipLogProgress(chipTool, " ***** Test Step 277 : Write attribute NULLABLE_INT16S Value\n"); - err = TestWriteAttributeNullableInt16sValue_277(); - break; + ChipLogProgress(chipTool, " ***** Test Step 277 : Write attribute NULLABLE_INT16S Value\n"); + err = TestWriteAttributeNullableInt16sValue_277(); + break; case 278: - ChipLogProgress(chipTool, " ***** Test Step 278 : Read attribute NULLABLE_INT16S Value in range\n"); - err = TestReadAttributeNullableInt16sValueInRange_278(); - break; + ChipLogProgress(chipTool, " ***** Test Step 278 : Read attribute NULLABLE_INT16S Value in range\n"); + err = TestReadAttributeNullableInt16sValueInRange_278(); + break; case 279: - ChipLogProgress(chipTool, " ***** Test Step 279 : Read attribute NULLABLE_INT16S notValue OK\n"); - err = TestReadAttributeNullableInt16sNotValueOk_279(); - break; + ChipLogProgress(chipTool, " ***** Test Step 279 : Read attribute NULLABLE_INT16S notValue OK\n"); + err = TestReadAttributeNullableInt16sNotValueOk_279(); + break; case 280: - ChipLogProgress(chipTool, " ***** Test Step 280 : Write attribute NULLABLE_INT32S Min Value\n"); - err = TestWriteAttributeNullableInt32sMinValue_280(); - break; + ChipLogProgress(chipTool, " ***** Test Step 280 : Write attribute NULLABLE_INT32S Min Value\n"); + err = TestWriteAttributeNullableInt32sMinValue_280(); + break; case 281: - ChipLogProgress(chipTool, " ***** Test Step 281 : Read attribute NULLABLE_INT32S Min Value\n"); - err = TestReadAttributeNullableInt32sMinValue_281(); - break; + ChipLogProgress(chipTool, " ***** Test Step 281 : Read attribute NULLABLE_INT32S Min Value\n"); + err = TestReadAttributeNullableInt32sMinValue_281(); + break; case 282: - ChipLogProgress(chipTool, " ***** Test Step 282 : Write attribute NULLABLE_INT32S Invalid Value\n"); - err = TestWriteAttributeNullableInt32sInvalidValue_282(); - break; + ChipLogProgress(chipTool, " ***** Test Step 282 : Write attribute NULLABLE_INT32S Invalid Value\n"); + err = TestWriteAttributeNullableInt32sInvalidValue_282(); + break; case 283: - ChipLogProgress(chipTool, " ***** Test Step 283 : Read attribute NULLABLE_INT32S unchanged Value\n"); - err = TestReadAttributeNullableInt32sUnchangedValue_283(); - break; + ChipLogProgress(chipTool, " ***** Test Step 283 : Read attribute NULLABLE_INT32S unchanged Value\n"); + err = TestReadAttributeNullableInt32sUnchangedValue_283(); + break; case 284: - ChipLogProgress(chipTool, " ***** Test Step 284 : Write attribute NULLABLE_INT32S null Value\n"); - err = TestWriteAttributeNullableInt32sNullValue_284(); - break; + ChipLogProgress(chipTool, " ***** Test Step 284 : Write attribute NULLABLE_INT32S null Value\n"); + err = TestWriteAttributeNullableInt32sNullValue_284(); + break; case 285: - ChipLogProgress(chipTool, " ***** Test Step 285 : Read attribute NULLABLE_INT32S null Value\n"); - err = TestReadAttributeNullableInt32sNullValue_285(); - break; + ChipLogProgress(chipTool, " ***** Test Step 285 : Read attribute NULLABLE_INT32S null Value\n"); + err = TestReadAttributeNullableInt32sNullValue_285(); + break; case 286: - ChipLogProgress(chipTool, " ***** Test Step 286 : Read attribute NULLABLE_INT32S null Value & range\n"); - err = TestReadAttributeNullableInt32sNullValueRange_286(); - break; + ChipLogProgress(chipTool, " ***** Test Step 286 : Read attribute NULLABLE_INT32S null Value & range\n"); + err = TestReadAttributeNullableInt32sNullValueRange_286(); + break; case 287: - ChipLogProgress(chipTool, " ***** Test Step 287 : Read attribute NULLABLE_INT32S null Value & not\n"); - err = TestReadAttributeNullableInt32sNullValueNot_287(); - break; + ChipLogProgress(chipTool, " ***** Test Step 287 : Read attribute NULLABLE_INT32S null Value & not\n"); + err = TestReadAttributeNullableInt32sNullValueNot_287(); + break; case 288: - ChipLogProgress(chipTool, " ***** Test Step 288 : Write attribute NULLABLE_INT32S Value\n"); - err = TestWriteAttributeNullableInt32sValue_288(); - break; + ChipLogProgress(chipTool, " ***** Test Step 288 : Write attribute NULLABLE_INT32S Value\n"); + err = TestWriteAttributeNullableInt32sValue_288(); + break; case 289: - ChipLogProgress(chipTool, " ***** Test Step 289 : Read attribute NULLABLE_INT32S Value in range\n"); - err = TestReadAttributeNullableInt32sValueInRange_289(); - break; + ChipLogProgress(chipTool, " ***** Test Step 289 : Read attribute NULLABLE_INT32S Value in range\n"); + err = TestReadAttributeNullableInt32sValueInRange_289(); + break; case 290: - ChipLogProgress(chipTool, " ***** Test Step 290 : Read attribute NULLABLE_INT32S notValue OK\n"); - err = TestReadAttributeNullableInt32sNotValueOk_290(); - break; + ChipLogProgress(chipTool, " ***** Test Step 290 : Read attribute NULLABLE_INT32S notValue OK\n"); + err = TestReadAttributeNullableInt32sNotValueOk_290(); + break; case 291: - ChipLogProgress(chipTool, " ***** Test Step 291 : Write attribute NULLABLE_INT64S Min Value\n"); - err = TestWriteAttributeNullableInt64sMinValue_291(); - break; + ChipLogProgress(chipTool, " ***** Test Step 291 : Write attribute NULLABLE_INT64S Min Value\n"); + err = TestWriteAttributeNullableInt64sMinValue_291(); + break; case 292: - ChipLogProgress(chipTool, " ***** Test Step 292 : Read attribute NULLABLE_INT64S Min Value\n"); - err = TestReadAttributeNullableInt64sMinValue_292(); - break; + ChipLogProgress(chipTool, " ***** Test Step 292 : Read attribute NULLABLE_INT64S Min Value\n"); + err = TestReadAttributeNullableInt64sMinValue_292(); + break; case 293: - ChipLogProgress(chipTool, " ***** Test Step 293 : Write attribute NULLABLE_INT64S Invalid Value\n"); - err = TestWriteAttributeNullableInt64sInvalidValue_293(); - break; + ChipLogProgress(chipTool, " ***** Test Step 293 : Write attribute NULLABLE_INT64S Invalid Value\n"); + err = TestWriteAttributeNullableInt64sInvalidValue_293(); + break; case 294: - ChipLogProgress(chipTool, " ***** Test Step 294 : Read attribute NULLABLE_INT64S unchanged Value\n"); - err = TestReadAttributeNullableInt64sUnchangedValue_294(); - break; + ChipLogProgress(chipTool, " ***** Test Step 294 : Read attribute NULLABLE_INT64S unchanged Value\n"); + err = TestReadAttributeNullableInt64sUnchangedValue_294(); + break; case 295: - ChipLogProgress(chipTool, " ***** Test Step 295 : Write attribute NULLABLE_INT64S null Value\n"); - err = TestWriteAttributeNullableInt64sNullValue_295(); - break; + ChipLogProgress(chipTool, " ***** Test Step 295 : Write attribute NULLABLE_INT64S null Value\n"); + err = TestWriteAttributeNullableInt64sNullValue_295(); + break; case 296: - ChipLogProgress(chipTool, " ***** Test Step 296 : Read attribute NULLABLE_INT64S null Value\n"); - err = TestReadAttributeNullableInt64sNullValue_296(); - break; + ChipLogProgress(chipTool, " ***** Test Step 296 : Read attribute NULLABLE_INT64S null Value\n"); + err = TestReadAttributeNullableInt64sNullValue_296(); + break; case 297: - ChipLogProgress(chipTool, " ***** Test Step 297 : Read attribute NULLABLE_INT64S null Value & range\n"); - err = TestReadAttributeNullableInt64sNullValueRange_297(); - break; + ChipLogProgress(chipTool, " ***** Test Step 297 : Read attribute NULLABLE_INT64S null Value & range\n"); + err = TestReadAttributeNullableInt64sNullValueRange_297(); + break; case 298: - ChipLogProgress(chipTool, " ***** Test Step 298 : Read attribute NULLABLE_INT64S null Value & not\n"); - err = TestReadAttributeNullableInt64sNullValueNot_298(); - break; + ChipLogProgress(chipTool, " ***** Test Step 298 : Read attribute NULLABLE_INT64S null Value & not\n"); + err = TestReadAttributeNullableInt64sNullValueNot_298(); + break; case 299: - ChipLogProgress(chipTool, " ***** Test Step 299 : Write attribute NULLABLE_INT64S Value\n"); - err = TestWriteAttributeNullableInt64sValue_299(); - break; + ChipLogProgress(chipTool, " ***** Test Step 299 : Write attribute NULLABLE_INT64S Value\n"); + err = TestWriteAttributeNullableInt64sValue_299(); + break; case 300: - ChipLogProgress(chipTool, " ***** Test Step 300 : Read attribute NULLABLE_INT64S Value in range\n"); - err = TestReadAttributeNullableInt64sValueInRange_300(); - break; + ChipLogProgress(chipTool, " ***** Test Step 300 : Read attribute NULLABLE_INT64S Value in range\n"); + err = TestReadAttributeNullableInt64sValueInRange_300(); + break; case 301: - ChipLogProgress(chipTool, " ***** Test Step 301 : Read attribute NULLABLE_INT64S notValue OK\n"); - err = TestReadAttributeNullableInt64sNotValueOk_301(); - break; + ChipLogProgress(chipTool, " ***** Test Step 301 : Read attribute NULLABLE_INT64S notValue OK\n"); + err = TestReadAttributeNullableInt64sNotValueOk_301(); + break; case 302: - ChipLogProgress(chipTool, " ***** Test Step 302 : Write attribute NULLABLE_SINGLE medium Value\n"); - err = TestWriteAttributeNullableSingleMediumValue_302(); - break; + ChipLogProgress(chipTool, " ***** Test Step 302 : Write attribute NULLABLE_SINGLE medium Value\n"); + err = TestWriteAttributeNullableSingleMediumValue_302(); + break; case 303: - ChipLogProgress(chipTool, " ***** Test Step 303 : Read attribute NULLABLE_SINGLE medium Value\n"); - err = TestReadAttributeNullableSingleMediumValue_303(); - break; + ChipLogProgress(chipTool, " ***** Test Step 303 : Read attribute NULLABLE_SINGLE medium Value\n"); + err = TestReadAttributeNullableSingleMediumValue_303(); + break; case 304: - ChipLogProgress(chipTool, " ***** Test Step 304 : Write attribute NULLABLE_SINGLE largest Value\n"); - err = TestWriteAttributeNullableSingleLargestValue_304(); - break; + ChipLogProgress(chipTool, " ***** Test Step 304 : Write attribute NULLABLE_SINGLE largest Value\n"); + err = TestWriteAttributeNullableSingleLargestValue_304(); + break; case 305: - ChipLogProgress(chipTool, " ***** Test Step 305 : Read attribute NULLABLE_SINGLE largest Value\n"); - err = TestReadAttributeNullableSingleLargestValue_305(); - break; + ChipLogProgress(chipTool, " ***** Test Step 305 : Read attribute NULLABLE_SINGLE largest Value\n"); + err = TestReadAttributeNullableSingleLargestValue_305(); + break; case 306: - ChipLogProgress(chipTool, " ***** Test Step 306 : Write attribute NULLABLE_SINGLE smallest Value\n"); - err = TestWriteAttributeNullableSingleSmallestValue_306(); - break; + ChipLogProgress(chipTool, " ***** Test Step 306 : Write attribute NULLABLE_SINGLE smallest Value\n"); + err = TestWriteAttributeNullableSingleSmallestValue_306(); + break; case 307: - ChipLogProgress(chipTool, " ***** Test Step 307 : Read attribute NULLABLE_SINGLE smallest Value\n"); - err = TestReadAttributeNullableSingleSmallestValue_307(); - break; + ChipLogProgress(chipTool, " ***** Test Step 307 : Read attribute NULLABLE_SINGLE smallest Value\n"); + err = TestReadAttributeNullableSingleSmallestValue_307(); + break; case 308: - ChipLogProgress(chipTool, " ***** Test Step 308 : Write attribute NULLABLE_SINGLE null Value\n"); - err = TestWriteAttributeNullableSingleNullValue_308(); - break; + ChipLogProgress(chipTool, " ***** Test Step 308 : Write attribute NULLABLE_SINGLE null Value\n"); + err = TestWriteAttributeNullableSingleNullValue_308(); + break; case 309: - ChipLogProgress(chipTool, " ***** Test Step 309 : Read attribute NULLABLE_SINGLE null Value\n"); - err = TestReadAttributeNullableSingleNullValue_309(); - break; + ChipLogProgress(chipTool, " ***** Test Step 309 : Read attribute NULLABLE_SINGLE null Value\n"); + err = TestReadAttributeNullableSingleNullValue_309(); + break; case 310: - ChipLogProgress(chipTool, " ***** Test Step 310 : Write attribute NULLABLE_SINGLE 0 Value\n"); - err = TestWriteAttributeNullableSingle0Value_310(); - break; + ChipLogProgress(chipTool, " ***** Test Step 310 : Write attribute NULLABLE_SINGLE 0 Value\n"); + err = TestWriteAttributeNullableSingle0Value_310(); + break; case 311: - ChipLogProgress(chipTool, " ***** Test Step 311 : Read attribute NULLABLE_SINGLE 0 Value\n"); - err = TestReadAttributeNullableSingle0Value_311(); - break; + ChipLogProgress(chipTool, " ***** Test Step 311 : Read attribute NULLABLE_SINGLE 0 Value\n"); + err = TestReadAttributeNullableSingle0Value_311(); + break; case 312: - ChipLogProgress(chipTool, " ***** Test Step 312 : Write attribute NULLABLE_DOUBLE medium Value\n"); - err = TestWriteAttributeNullableDoubleMediumValue_312(); - break; + ChipLogProgress(chipTool, " ***** Test Step 312 : Write attribute NULLABLE_DOUBLE medium Value\n"); + err = TestWriteAttributeNullableDoubleMediumValue_312(); + break; case 313: - ChipLogProgress(chipTool, " ***** Test Step 313 : Read attribute NULLABLE_DOUBLE medium Value\n"); - err = TestReadAttributeNullableDoubleMediumValue_313(); - break; + ChipLogProgress(chipTool, " ***** Test Step 313 : Read attribute NULLABLE_DOUBLE medium Value\n"); + err = TestReadAttributeNullableDoubleMediumValue_313(); + break; case 314: - ChipLogProgress(chipTool, " ***** Test Step 314 : Write attribute NULLABLE_DOUBLE largest Value\n"); - err = TestWriteAttributeNullableDoubleLargestValue_314(); - break; + ChipLogProgress(chipTool, " ***** Test Step 314 : Write attribute NULLABLE_DOUBLE largest Value\n"); + err = TestWriteAttributeNullableDoubleLargestValue_314(); + break; case 315: - ChipLogProgress(chipTool, " ***** Test Step 315 : Read attribute NULLABLE_DOUBLE largest Value\n"); - err = TestReadAttributeNullableDoubleLargestValue_315(); - break; + ChipLogProgress(chipTool, " ***** Test Step 315 : Read attribute NULLABLE_DOUBLE largest Value\n"); + err = TestReadAttributeNullableDoubleLargestValue_315(); + break; case 316: - ChipLogProgress(chipTool, " ***** Test Step 316 : Write attribute NULLABLE_DOUBLE smallest Value\n"); - err = TestWriteAttributeNullableDoubleSmallestValue_316(); - break; + ChipLogProgress(chipTool, " ***** Test Step 316 : Write attribute NULLABLE_DOUBLE smallest Value\n"); + err = TestWriteAttributeNullableDoubleSmallestValue_316(); + break; case 317: - ChipLogProgress(chipTool, " ***** Test Step 317 : Read attribute NULLABLE_DOUBLE smallest Value\n"); - err = TestReadAttributeNullableDoubleSmallestValue_317(); - break; + ChipLogProgress(chipTool, " ***** Test Step 317 : Read attribute NULLABLE_DOUBLE smallest Value\n"); + err = TestReadAttributeNullableDoubleSmallestValue_317(); + break; case 318: - ChipLogProgress(chipTool, " ***** Test Step 318 : Write attribute NULLABLE_DOUBLE null Value\n"); - err = TestWriteAttributeNullableDoubleNullValue_318(); - break; + ChipLogProgress(chipTool, " ***** Test Step 318 : Write attribute NULLABLE_DOUBLE null Value\n"); + err = TestWriteAttributeNullableDoubleNullValue_318(); + break; case 319: - ChipLogProgress(chipTool, " ***** Test Step 319 : Read attribute NULLABLE_DOUBLE null Value\n"); - err = TestReadAttributeNullableDoubleNullValue_319(); - break; + ChipLogProgress(chipTool, " ***** Test Step 319 : Read attribute NULLABLE_DOUBLE null Value\n"); + err = TestReadAttributeNullableDoubleNullValue_319(); + break; case 320: - ChipLogProgress(chipTool, " ***** Test Step 320 : Write attribute NULLABLE_DOUBLE 0 Value\n"); - err = TestWriteAttributeNullableDouble0Value_320(); - break; + ChipLogProgress(chipTool, " ***** Test Step 320 : Write attribute NULLABLE_DOUBLE 0 Value\n"); + err = TestWriteAttributeNullableDouble0Value_320(); + break; case 321: - ChipLogProgress(chipTool, " ***** Test Step 321 : Read attribute NULLABLE_DOUBLE 0 Value\n"); - err = TestReadAttributeNullableDouble0Value_321(); - break; + ChipLogProgress(chipTool, " ***** Test Step 321 : Read attribute NULLABLE_DOUBLE 0 Value\n"); + err = TestReadAttributeNullableDouble0Value_321(); + break; case 322: - ChipLogProgress(chipTool, " ***** Test Step 322 : Write attribute NULLABLE_ENUM8 Min Value\n"); - err = TestWriteAttributeNullableEnum8MinValue_322(); - break; + ChipLogProgress(chipTool, " ***** Test Step 322 : Write attribute NULLABLE_ENUM8 Min Value\n"); + err = TestWriteAttributeNullableEnum8MinValue_322(); + break; case 323: - ChipLogProgress(chipTool, " ***** Test Step 323 : Read attribute NULLABLE_ENUM8 Min Value\n"); - err = TestReadAttributeNullableEnum8MinValue_323(); - break; + ChipLogProgress(chipTool, " ***** Test Step 323 : Read attribute NULLABLE_ENUM8 Min Value\n"); + err = TestReadAttributeNullableEnum8MinValue_323(); + break; case 324: - ChipLogProgress(chipTool, " ***** Test Step 324 : Write attribute NULLABLE_ENUM8 Max Value\n"); - err = TestWriteAttributeNullableEnum8MaxValue_324(); - break; + ChipLogProgress(chipTool, " ***** Test Step 324 : Write attribute NULLABLE_ENUM8 Max Value\n"); + err = TestWriteAttributeNullableEnum8MaxValue_324(); + break; case 325: - ChipLogProgress(chipTool, " ***** Test Step 325 : Read attribute NULLABLE_ENUM8 Max Value\n"); - err = TestReadAttributeNullableEnum8MaxValue_325(); - break; + ChipLogProgress(chipTool, " ***** Test Step 325 : Read attribute NULLABLE_ENUM8 Max Value\n"); + err = TestReadAttributeNullableEnum8MaxValue_325(); + break; case 326: - ChipLogProgress(chipTool, " ***** Test Step 326 : Write attribute NULLABLE_ENUM8 Invalid Value\n"); - err = TestWriteAttributeNullableEnum8InvalidValue_326(); - break; + ChipLogProgress(chipTool, " ***** Test Step 326 : Write attribute NULLABLE_ENUM8 Invalid Value\n"); + err = TestWriteAttributeNullableEnum8InvalidValue_326(); + break; case 327: - ChipLogProgress(chipTool, " ***** Test Step 327 : Read attribute NULLABLE_ENUM8 unchanged Value\n"); - err = TestReadAttributeNullableEnum8UnchangedValue_327(); - break; + ChipLogProgress(chipTool, " ***** Test Step 327 : Read attribute NULLABLE_ENUM8 unchanged Value\n"); + err = TestReadAttributeNullableEnum8UnchangedValue_327(); + break; case 328: - ChipLogProgress(chipTool, " ***** Test Step 328 : Write attribute NULLABLE_ENUM8 null Value\n"); - err = TestWriteAttributeNullableEnum8NullValue_328(); - break; + ChipLogProgress(chipTool, " ***** Test Step 328 : Write attribute NULLABLE_ENUM8 null Value\n"); + err = TestWriteAttributeNullableEnum8NullValue_328(); + break; case 329: - ChipLogProgress(chipTool, " ***** Test Step 329 : Read attribute NULLABLE_ENUM8 null Value\n"); - err = TestReadAttributeNullableEnum8NullValue_329(); - break; + ChipLogProgress(chipTool, " ***** Test Step 329 : Read attribute NULLABLE_ENUM8 null Value\n"); + err = TestReadAttributeNullableEnum8NullValue_329(); + break; case 330: - ChipLogProgress(chipTool, " ***** Test Step 330 : Write attribute NULLABLE_ENUM16 Min Value\n"); - err = TestWriteAttributeNullableEnum16MinValue_330(); - break; + ChipLogProgress(chipTool, " ***** Test Step 330 : Write attribute NULLABLE_ENUM16 Min Value\n"); + err = TestWriteAttributeNullableEnum16MinValue_330(); + break; case 331: - ChipLogProgress(chipTool, " ***** Test Step 331 : Read attribute NULLABLE_ENUM16 Min Value\n"); - err = TestReadAttributeNullableEnum16MinValue_331(); - break; + ChipLogProgress(chipTool, " ***** Test Step 331 : Read attribute NULLABLE_ENUM16 Min Value\n"); + err = TestReadAttributeNullableEnum16MinValue_331(); + break; case 332: - ChipLogProgress(chipTool, " ***** Test Step 332 : Write attribute NULLABLE_ENUM16 Max Value\n"); - err = TestWriteAttributeNullableEnum16MaxValue_332(); - break; + ChipLogProgress(chipTool, " ***** Test Step 332 : Write attribute NULLABLE_ENUM16 Max Value\n"); + err = TestWriteAttributeNullableEnum16MaxValue_332(); + break; case 333: - ChipLogProgress(chipTool, " ***** Test Step 333 : Read attribute NULLABLE_ENUM16 Max Value\n"); - err = TestReadAttributeNullableEnum16MaxValue_333(); - break; + ChipLogProgress(chipTool, " ***** Test Step 333 : Read attribute NULLABLE_ENUM16 Max Value\n"); + err = TestReadAttributeNullableEnum16MaxValue_333(); + break; case 334: - ChipLogProgress(chipTool, " ***** Test Step 334 : Write attribute NULLABLE_ENUM16 Invalid Value\n"); - err = TestWriteAttributeNullableEnum16InvalidValue_334(); - break; + ChipLogProgress(chipTool, " ***** Test Step 334 : Write attribute NULLABLE_ENUM16 Invalid Value\n"); + err = TestWriteAttributeNullableEnum16InvalidValue_334(); + break; case 335: - ChipLogProgress(chipTool, " ***** Test Step 335 : Read attribute NULLABLE_ENUM16 unchanged Value\n"); - err = TestReadAttributeNullableEnum16UnchangedValue_335(); - break; + ChipLogProgress(chipTool, " ***** Test Step 335 : Read attribute NULLABLE_ENUM16 unchanged Value\n"); + err = TestReadAttributeNullableEnum16UnchangedValue_335(); + break; case 336: - ChipLogProgress(chipTool, " ***** Test Step 336 : Write attribute NULLABLE_ENUM16 null Value\n"); - err = TestWriteAttributeNullableEnum16NullValue_336(); - break; + ChipLogProgress(chipTool, " ***** Test Step 336 : Write attribute NULLABLE_ENUM16 null Value\n"); + err = TestWriteAttributeNullableEnum16NullValue_336(); + break; case 337: - ChipLogProgress(chipTool, " ***** Test Step 337 : Read attribute NULLABLE_ENUM16 null Value\n"); - err = TestReadAttributeNullableEnum16NullValue_337(); - break; + ChipLogProgress(chipTool, " ***** Test Step 337 : Read attribute NULLABLE_ENUM16 null Value\n"); + err = TestReadAttributeNullableEnum16NullValue_337(); + break; case 338: - ChipLogProgress(chipTool, " ***** Test Step 338 : Write attribute NULLABLE_SIMPLE_ENUM Min Value\n"); - err = TestWriteAttributeNullableSimpleEnumMinValue_338(); - break; + ChipLogProgress(chipTool, " ***** Test Step 338 : Write attribute NULLABLE_SIMPLE_ENUM Min Value\n"); + err = TestWriteAttributeNullableSimpleEnumMinValue_338(); + break; case 339: - ChipLogProgress(chipTool, " ***** Test Step 339 : Read attribute NULLABLE_SIMPLE_ENUM Min Value\n"); - err = TestReadAttributeNullableSimpleEnumMinValue_339(); - break; + ChipLogProgress(chipTool, " ***** Test Step 339 : Read attribute NULLABLE_SIMPLE_ENUM Min Value\n"); + err = TestReadAttributeNullableSimpleEnumMinValue_339(); + break; case 340: - ChipLogProgress(chipTool, " ***** Test Step 340 : Write attribute NULLABLE_SIMPLE_ENUM Max Value\n"); - err = TestWriteAttributeNullableSimpleEnumMaxValue_340(); - break; + ChipLogProgress(chipTool, " ***** Test Step 340 : Write attribute NULLABLE_SIMPLE_ENUM Max Value\n"); + err = TestWriteAttributeNullableSimpleEnumMaxValue_340(); + break; case 341: - ChipLogProgress(chipTool, " ***** Test Step 341 : Read attribute NULLABLE_SIMPLE_ENUM Max Value\n"); - err = TestReadAttributeNullableSimpleEnumMaxValue_341(); - break; + ChipLogProgress(chipTool, " ***** Test Step 341 : Read attribute NULLABLE_SIMPLE_ENUM Max Value\n"); + err = TestReadAttributeNullableSimpleEnumMaxValue_341(); + break; case 342: - ChipLogProgress(chipTool, " ***** Test Step 342 : Write attribute NULLABLE_SIMPLE_ENUM Invalid Value\n"); - err = TestWriteAttributeNullableSimpleEnumInvalidValue_342(); - break; + ChipLogProgress(chipTool, " ***** Test Step 342 : Write attribute NULLABLE_SIMPLE_ENUM Invalid Value\n"); + err = TestWriteAttributeNullableSimpleEnumInvalidValue_342(); + break; case 343: - ChipLogProgress(chipTool, " ***** Test Step 343 : Read attribute NULLABLE_SIMPLE_ENUM unchanged Value\n"); - err = TestReadAttributeNullableSimpleEnumUnchangedValue_343(); - break; + ChipLogProgress(chipTool, " ***** Test Step 343 : Read attribute NULLABLE_SIMPLE_ENUM unchanged Value\n"); + err = TestReadAttributeNullableSimpleEnumUnchangedValue_343(); + break; case 344: - ChipLogProgress(chipTool, " ***** Test Step 344 : Write attribute NULLABLE_SIMPLE_ENUM null Value\n"); - err = TestWriteAttributeNullableSimpleEnumNullValue_344(); - break; + ChipLogProgress(chipTool, " ***** Test Step 344 : Write attribute NULLABLE_SIMPLE_ENUM null Value\n"); + err = TestWriteAttributeNullableSimpleEnumNullValue_344(); + break; case 345: - ChipLogProgress(chipTool, " ***** Test Step 345 : Read attribute NULLABLE_SIMPLE_ENUM null Value\n"); - err = TestReadAttributeNullableSimpleEnumNullValue_345(); - break; + ChipLogProgress(chipTool, " ***** Test Step 345 : Read attribute NULLABLE_SIMPLE_ENUM null Value\n"); + err = TestReadAttributeNullableSimpleEnumNullValue_345(); + break; case 346: - ChipLogProgress(chipTool, " ***** Test Step 346 : Read attribute NULLABLE_OCTET_STRING Default Value\n"); - err = TestReadAttributeNullableOctetStringDefaultValue_346(); - break; + ChipLogProgress(chipTool, " ***** Test Step 346 : Read attribute NULLABLE_OCTET_STRING Default Value\n"); + err = TestReadAttributeNullableOctetStringDefaultValue_346(); + break; case 347: - ChipLogProgress(chipTool, " ***** Test Step 347 : Write attribute NULLABLE_OCTET_STRING\n"); - err = TestWriteAttributeNullableOctetString_347(); - break; + ChipLogProgress(chipTool, " ***** Test Step 347 : Write attribute NULLABLE_OCTET_STRING\n"); + err = TestWriteAttributeNullableOctetString_347(); + break; case 348: - ChipLogProgress(chipTool, " ***** Test Step 348 : Read attribute NULLABLE_OCTET_STRING\n"); - err = TestReadAttributeNullableOctetString_348(); - break; + ChipLogProgress(chipTool, " ***** Test Step 348 : Read attribute NULLABLE_OCTET_STRING\n"); + err = TestReadAttributeNullableOctetString_348(); + break; case 349: - ChipLogProgress(chipTool, " ***** Test Step 349 : Write attribute NULLABLE_OCTET_STRING\n"); - err = TestWriteAttributeNullableOctetString_349(); - break; + ChipLogProgress(chipTool, " ***** Test Step 349 : Write attribute NULLABLE_OCTET_STRING\n"); + err = TestWriteAttributeNullableOctetString_349(); + break; case 350: - ChipLogProgress(chipTool, " ***** Test Step 350 : Read attribute NULLABLE_OCTET_STRING\n"); - err = TestReadAttributeNullableOctetString_350(); - break; + ChipLogProgress(chipTool, " ***** Test Step 350 : Read attribute NULLABLE_OCTET_STRING\n"); + err = TestReadAttributeNullableOctetString_350(); + break; case 351: - ChipLogProgress(chipTool, " ***** Test Step 351 : Write attribute NULLABLE_OCTET_STRING\n"); - err = TestWriteAttributeNullableOctetString_351(); - break; + ChipLogProgress(chipTool, " ***** Test Step 351 : Write attribute NULLABLE_OCTET_STRING\n"); + err = TestWriteAttributeNullableOctetString_351(); + break; case 352: - ChipLogProgress(chipTool, " ***** Test Step 352 : Read attribute NULLABLE_OCTET_STRING\n"); - err = TestReadAttributeNullableOctetString_352(); - break; + ChipLogProgress(chipTool, " ***** Test Step 352 : Read attribute NULLABLE_OCTET_STRING\n"); + err = TestReadAttributeNullableOctetString_352(); + break; case 353: - ChipLogProgress(chipTool, " ***** Test Step 353 : Read attribute NULLABLE_CHAR_STRING Default Value\n"); - err = TestReadAttributeNullableCharStringDefaultValue_353(); - break; + ChipLogProgress(chipTool, " ***** Test Step 353 : Read attribute NULLABLE_CHAR_STRING Default Value\n"); + err = TestReadAttributeNullableCharStringDefaultValue_353(); + break; case 354: - ChipLogProgress(chipTool, " ***** Test Step 354 : Write attribute NULLABLE_CHAR_STRING\n"); - err = TestWriteAttributeNullableCharString_354(); - break; + ChipLogProgress(chipTool, " ***** Test Step 354 : Write attribute NULLABLE_CHAR_STRING\n"); + err = TestWriteAttributeNullableCharString_354(); + break; case 355: - ChipLogProgress(chipTool, " ***** Test Step 355 : Read attribute NULLABLE_CHAR_STRING\n"); - err = TestReadAttributeNullableCharString_355(); - break; + ChipLogProgress(chipTool, " ***** Test Step 355 : Read attribute NULLABLE_CHAR_STRING\n"); + err = TestReadAttributeNullableCharString_355(); + break; case 356: - ChipLogProgress(chipTool, " ***** Test Step 356 : Write attribute NULLABLE_CHAR_STRING - Value too long\n"); - err = TestWriteAttributeNullableCharStringValueTooLong_356(); - break; + ChipLogProgress(chipTool, " ***** Test Step 356 : Write attribute NULLABLE_CHAR_STRING - Value too long\n"); + err = TestWriteAttributeNullableCharStringValueTooLong_356(); + break; case 357: - ChipLogProgress(chipTool, " ***** Test Step 357 : Read attribute NULLABLE_CHAR_STRING\n"); - err = TestReadAttributeNullableCharString_357(); - break; + ChipLogProgress(chipTool, " ***** Test Step 357 : Read attribute NULLABLE_CHAR_STRING\n"); + err = TestReadAttributeNullableCharString_357(); + break; case 358: - ChipLogProgress(chipTool, " ***** Test Step 358 : Write attribute NULLABLE_CHAR_STRING - Empty\n"); - err = TestWriteAttributeNullableCharStringEmpty_358(); - break; + ChipLogProgress(chipTool, " ***** Test Step 358 : Write attribute NULLABLE_CHAR_STRING - Empty\n"); + err = TestWriteAttributeNullableCharStringEmpty_358(); + break; case 359: - ChipLogProgress(chipTool, " ***** Test Step 359 : Read attribute NULLABLE_CHAR_STRING\n"); - err = TestReadAttributeNullableCharString_359(); - break; + ChipLogProgress(chipTool, " ***** Test Step 359 : Read attribute NULLABLE_CHAR_STRING\n"); + err = TestReadAttributeNullableCharString_359(); + break; case 360: - ChipLogProgress(chipTool, " ***** Test Step 360 : Read attribute from nonexistent endpoint.\n"); - err = TestReadAttributeFromNonexistentEndpoint_360(); - break; + ChipLogProgress(chipTool, " ***** Test Step 360 : Read attribute from nonexistent endpoint.\n"); + err = TestReadAttributeFromNonexistentEndpoint_360(); + break; case 361: - ChipLogProgress(chipTool, " ***** Test Step 361 : Read attribute from nonexistent cluster.\n"); - err = TestReadAttributeFromNonexistentCluster_361(); - break; + ChipLogProgress(chipTool, " ***** Test Step 361 : Read attribute from nonexistent cluster.\n"); + err = TestReadAttributeFromNonexistentCluster_361(); + break; case 362: - ChipLogProgress(chipTool, " ***** Test Step 362 : Send a command that takes an optional parameter but do not set it.\n"); - err = TestSendACommandThatTakesAnOptionalParameterButDoNotSetIt_362(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 362 : Send a command that takes an optional parameter but do not set it.\n"); + err = TestSendACommandThatTakesAnOptionalParameterButDoNotSetIt_362(); + break; case 363: - ChipLogProgress(chipTool, " ***** Test Step 363 : Send a command that takes an optional parameter but do not set it.\n"); - err = TestSendACommandThatTakesAnOptionalParameterButDoNotSetIt_363(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 363 : Send a command that takes an optional parameter but do not set it.\n"); + err = TestSendACommandThatTakesAnOptionalParameterButDoNotSetIt_363(); + break; case 364: - ChipLogProgress(chipTool, " ***** Test Step 364 : Report: Subscribe to list attribute\n"); - err = TestReportSubscribeToListAttribute_364(); - break; + ChipLogProgress(chipTool, " ***** Test Step 364 : Report: Subscribe to list attribute\n"); + err = TestReportSubscribeToListAttribute_364(); + break; case 365: - ChipLogProgress(chipTool, " ***** Test Step 365 : Subscribe to list attribute\n"); - err = TestSubscribeToListAttribute_365(); - break; + ChipLogProgress(chipTool, " ***** Test Step 365 : Subscribe to list attribute\n"); + err = TestSubscribeToListAttribute_365(); + break; case 366: - ChipLogProgress(chipTool, " ***** Test Step 366 : Write subscribed-to list attribute\n"); - err = TestWriteSubscribedToListAttribute_366(); - break; + ChipLogProgress(chipTool, " ***** Test Step 366 : Write subscribed-to list attribute\n"); + err = TestWriteSubscribedToListAttribute_366(); + break; case 367: - ChipLogProgress(chipTool, " ***** Test Step 367 : Check for list attribute report\n"); - err = TestCheckForListAttributeReport_367(); - break; + ChipLogProgress(chipTool, " ***** Test Step 367 : Check for list attribute report\n"); + err = TestCheckForListAttributeReport_367(); + break; case 368: - ChipLogProgress(chipTool, " ***** Test Step 368 : Read range-restricted unsigned 8-bit integer\n"); - err = TestReadRangeRestrictedUnsigned8BitInteger_368(); - break; + ChipLogProgress(chipTool, " ***** Test Step 368 : Read range-restricted unsigned 8-bit integer\n"); + err = TestReadRangeRestrictedUnsigned8BitInteger_368(); + break; case 369: - ChipLogProgress(chipTool, " ***** Test Step 369 : Write min value to a range-restricted unsigned 8-bit integer\n"); - err = TestWriteMinValueToARangeRestrictedUnsigned8BitInteger_369(); - break; + ChipLogProgress(chipTool, " ***** Test Step 369 : Write min value to a range-restricted unsigned 8-bit integer\n"); + err = TestWriteMinValueToARangeRestrictedUnsigned8BitInteger_369(); + break; case 370: - ChipLogProgress(chipTool, " ***** Test Step 370 : Write just-below-range value to a range-restricted unsigned 8-bit integer\n"); - err = TestWriteJustBelowRangeValueToARangeRestrictedUnsigned8BitInteger_370(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 370 : Write just-below-range value to a range-restricted unsigned 8-bit integer\n"); + err = TestWriteJustBelowRangeValueToARangeRestrictedUnsigned8BitInteger_370(); + break; case 371: - ChipLogProgress(chipTool, " ***** Test Step 371 : Write just-above-range value to a range-restricted unsigned 8-bit integer\n"); - err = TestWriteJustAboveRangeValueToARangeRestrictedUnsigned8BitInteger_371(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 371 : Write just-above-range value to a range-restricted unsigned 8-bit integer\n"); + err = TestWriteJustAboveRangeValueToARangeRestrictedUnsigned8BitInteger_371(); + break; case 372: - ChipLogProgress(chipTool, " ***** Test Step 372 : Write max value to a range-restricted unsigned 8-bit integer\n"); - err = TestWriteMaxValueToARangeRestrictedUnsigned8BitInteger_372(); - break; + ChipLogProgress(chipTool, " ***** Test Step 372 : Write max value to a range-restricted unsigned 8-bit integer\n"); + err = TestWriteMaxValueToARangeRestrictedUnsigned8BitInteger_372(); + break; case 373: - ChipLogProgress(chipTool, " ***** Test Step 373 : Verify range-restricted unsigned 8-bit integer value has not changed\n"); - err = TestVerifyRangeRestrictedUnsigned8BitIntegerValueHasNotChanged_373(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 373 : Verify range-restricted unsigned 8-bit integer value has not changed\n"); + err = TestVerifyRangeRestrictedUnsigned8BitIntegerValueHasNotChanged_373(); + break; case 374: - ChipLogProgress(chipTool, " ***** Test Step 374 : Write min valid value to a range-restricted unsigned 8-bit integer\n"); - err = TestWriteMinValidValueToARangeRestrictedUnsigned8BitInteger_374(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 374 : Write min valid value to a range-restricted unsigned 8-bit integer\n"); + err = TestWriteMinValidValueToARangeRestrictedUnsigned8BitInteger_374(); + break; case 375: - ChipLogProgress(chipTool, " ***** Test Step 375 : Verify range-restricted unsigned 8-bit integer value is at min valid\n"); - err = TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMinValid_375(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 375 : Verify range-restricted unsigned 8-bit integer value is at min valid\n"); + err = TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMinValid_375(); + break; case 376: - ChipLogProgress(chipTool, " ***** Test Step 376 : Write max valid value to a range-restricted unsigned 8-bit integer\n"); - err = TestWriteMaxValidValueToARangeRestrictedUnsigned8BitInteger_376(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 376 : Write max valid value to a range-restricted unsigned 8-bit integer\n"); + err = TestWriteMaxValidValueToARangeRestrictedUnsigned8BitInteger_376(); + break; case 377: - ChipLogProgress(chipTool, " ***** Test Step 377 : Verify range-restricted unsigned 8-bit integer value is at max valid\n"); - err = TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMaxValid_377(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 377 : Verify range-restricted unsigned 8-bit integer value is at max valid\n"); + err = TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMaxValid_377(); + break; case 378: - ChipLogProgress(chipTool, " ***** Test Step 378 : Write middle valid value to a range-restricted unsigned 8-bit integer\n"); - err = TestWriteMiddleValidValueToARangeRestrictedUnsigned8BitInteger_378(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 378 : Write middle valid value to a range-restricted unsigned 8-bit integer\n"); + err = TestWriteMiddleValidValueToARangeRestrictedUnsigned8BitInteger_378(); + break; case 379: - ChipLogProgress(chipTool, " ***** Test Step 379 : Verify range-restricted unsigned 8-bit integer value is at mid valid\n"); - err = TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMidValid_379(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 379 : Verify range-restricted unsigned 8-bit integer value is at mid valid\n"); + err = TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMidValid_379(); + break; case 380: - ChipLogProgress(chipTool, " ***** Test Step 380 : Read range-restricted unsigned 16-bit integer\n"); - err = TestReadRangeRestrictedUnsigned16BitInteger_380(); - break; + ChipLogProgress(chipTool, " ***** Test Step 380 : Read range-restricted unsigned 16-bit integer\n"); + err = TestReadRangeRestrictedUnsigned16BitInteger_380(); + break; case 381: - ChipLogProgress(chipTool, " ***** Test Step 381 : Write min value to a range-restricted unsigned 16-bit integer\n"); - err = TestWriteMinValueToARangeRestrictedUnsigned16BitInteger_381(); - break; + ChipLogProgress(chipTool, " ***** Test Step 381 : Write min value to a range-restricted unsigned 16-bit integer\n"); + err = TestWriteMinValueToARangeRestrictedUnsigned16BitInteger_381(); + break; case 382: - ChipLogProgress(chipTool, " ***** Test Step 382 : Write just-below-range value to a range-restricted unsigned 16-bit integer\n"); - err = TestWriteJustBelowRangeValueToARangeRestrictedUnsigned16BitInteger_382(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 382 : Write just-below-range value to a range-restricted unsigned 16-bit integer\n"); + err = TestWriteJustBelowRangeValueToARangeRestrictedUnsigned16BitInteger_382(); + break; case 383: - ChipLogProgress(chipTool, " ***** Test Step 383 : Write just-above-range value to a range-restricted unsigned 16-bit integer\n"); - err = TestWriteJustAboveRangeValueToARangeRestrictedUnsigned16BitInteger_383(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 383 : Write just-above-range value to a range-restricted unsigned 16-bit integer\n"); + err = TestWriteJustAboveRangeValueToARangeRestrictedUnsigned16BitInteger_383(); + break; case 384: - ChipLogProgress(chipTool, " ***** Test Step 384 : Write max value to a range-restricted unsigned 16-bit integer\n"); - err = TestWriteMaxValueToARangeRestrictedUnsigned16BitInteger_384(); - break; + ChipLogProgress(chipTool, " ***** Test Step 384 : Write max value to a range-restricted unsigned 16-bit integer\n"); + err = TestWriteMaxValueToARangeRestrictedUnsigned16BitInteger_384(); + break; case 385: - ChipLogProgress(chipTool, " ***** Test Step 385 : Verify range-restricted unsigned 16-bit integer value has not changed\n"); - err = TestVerifyRangeRestrictedUnsigned16BitIntegerValueHasNotChanged_385(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 385 : Verify range-restricted unsigned 16-bit integer value has not changed\n"); + err = TestVerifyRangeRestrictedUnsigned16BitIntegerValueHasNotChanged_385(); + break; case 386: - ChipLogProgress(chipTool, " ***** Test Step 386 : Write min valid value to a range-restricted unsigned 16-bit integer\n"); - err = TestWriteMinValidValueToARangeRestrictedUnsigned16BitInteger_386(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 386 : Write min valid value to a range-restricted unsigned 16-bit integer\n"); + err = TestWriteMinValidValueToARangeRestrictedUnsigned16BitInteger_386(); + break; case 387: - ChipLogProgress(chipTool, " ***** Test Step 387 : Verify range-restricted unsigned 16-bit integer value is at min valid\n"); - err = TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMinValid_387(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 387 : Verify range-restricted unsigned 16-bit integer value is at min valid\n"); + err = TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMinValid_387(); + break; case 388: - ChipLogProgress(chipTool, " ***** Test Step 388 : Write max valid value to a range-restricted unsigned 16-bit integer\n"); - err = TestWriteMaxValidValueToARangeRestrictedUnsigned16BitInteger_388(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 388 : Write max valid value to a range-restricted unsigned 16-bit integer\n"); + err = TestWriteMaxValidValueToARangeRestrictedUnsigned16BitInteger_388(); + break; case 389: - ChipLogProgress(chipTool, " ***** Test Step 389 : Verify range-restricted unsigned 16-bit integer value is at max valid\n"); - err = TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMaxValid_389(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 389 : Verify range-restricted unsigned 16-bit integer value is at max valid\n"); + err = TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMaxValid_389(); + break; case 390: - ChipLogProgress(chipTool, " ***** Test Step 390 : Write middle valid value to a range-restricted unsigned 16-bit integer\n"); - err = TestWriteMiddleValidValueToARangeRestrictedUnsigned16BitInteger_390(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 390 : Write middle valid value to a range-restricted unsigned 16-bit integer\n"); + err = TestWriteMiddleValidValueToARangeRestrictedUnsigned16BitInteger_390(); + break; case 391: - ChipLogProgress(chipTool, " ***** Test Step 391 : Verify range-restricted unsigned 16-bit integer value is at mid valid\n"); - err = TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMidValid_391(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 391 : Verify range-restricted unsigned 16-bit integer value is at mid valid\n"); + err = TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMidValid_391(); + break; case 392: - ChipLogProgress(chipTool, " ***** Test Step 392 : Read range-restricted signed 8-bit integer\n"); - err = TestReadRangeRestrictedSigned8BitInteger_392(); - break; + ChipLogProgress(chipTool, " ***** Test Step 392 : Read range-restricted signed 8-bit integer\n"); + err = TestReadRangeRestrictedSigned8BitInteger_392(); + break; case 393: - ChipLogProgress(chipTool, " ***** Test Step 393 : Write min value to a range-restricted signed 8-bit integer\n"); - err = TestWriteMinValueToARangeRestrictedSigned8BitInteger_393(); - break; + ChipLogProgress(chipTool, " ***** Test Step 393 : Write min value to a range-restricted signed 8-bit integer\n"); + err = TestWriteMinValueToARangeRestrictedSigned8BitInteger_393(); + break; case 394: - ChipLogProgress(chipTool, " ***** Test Step 394 : Write just-below-range value to a range-restricted signed 8-bit integer\n"); - err = TestWriteJustBelowRangeValueToARangeRestrictedSigned8BitInteger_394(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 394 : Write just-below-range value to a range-restricted signed 8-bit integer\n"); + err = TestWriteJustBelowRangeValueToARangeRestrictedSigned8BitInteger_394(); + break; case 395: - ChipLogProgress(chipTool, " ***** Test Step 395 : Write just-above-range value to a range-restricted signed 8-bit integer\n"); - err = TestWriteJustAboveRangeValueToARangeRestrictedSigned8BitInteger_395(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 395 : Write just-above-range value to a range-restricted signed 8-bit integer\n"); + err = TestWriteJustAboveRangeValueToARangeRestrictedSigned8BitInteger_395(); + break; case 396: - ChipLogProgress(chipTool, " ***** Test Step 396 : Write max value to a range-restricted signed 8-bit integer\n"); - err = TestWriteMaxValueToARangeRestrictedSigned8BitInteger_396(); - break; + ChipLogProgress(chipTool, " ***** Test Step 396 : Write max value to a range-restricted signed 8-bit integer\n"); + err = TestWriteMaxValueToARangeRestrictedSigned8BitInteger_396(); + break; case 397: - ChipLogProgress(chipTool, " ***** Test Step 397 : Verify range-restricted signed 8-bit integer value has not changed\n"); - err = TestVerifyRangeRestrictedSigned8BitIntegerValueHasNotChanged_397(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 397 : Verify range-restricted signed 8-bit integer value has not changed\n"); + err = TestVerifyRangeRestrictedSigned8BitIntegerValueHasNotChanged_397(); + break; case 398: - ChipLogProgress(chipTool, " ***** Test Step 398 : Write min valid value to a range-restricted signed 8-bit integer\n"); - err = TestWriteMinValidValueToARangeRestrictedSigned8BitInteger_398(); - break; + ChipLogProgress(chipTool, " ***** Test Step 398 : Write min valid value to a range-restricted signed 8-bit integer\n"); + err = TestWriteMinValidValueToARangeRestrictedSigned8BitInteger_398(); + break; case 399: - ChipLogProgress(chipTool, " ***** Test Step 399 : Verify range-restricted signed 8-bit integer value is at min valid\n"); - err = TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMinValid_399(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 399 : Verify range-restricted signed 8-bit integer value is at min valid\n"); + err = TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMinValid_399(); + break; case 400: - ChipLogProgress(chipTool, " ***** Test Step 400 : Write max valid value to a range-restricted signed 8-bit integer\n"); - err = TestWriteMaxValidValueToARangeRestrictedSigned8BitInteger_400(); - break; + ChipLogProgress(chipTool, " ***** Test Step 400 : Write max valid value to a range-restricted signed 8-bit integer\n"); + err = TestWriteMaxValidValueToARangeRestrictedSigned8BitInteger_400(); + break; case 401: - ChipLogProgress(chipTool, " ***** Test Step 401 : Verify range-restricted signed 8-bit integer value is at max valid\n"); - err = TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMaxValid_401(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 401 : Verify range-restricted signed 8-bit integer value is at max valid\n"); + err = TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMaxValid_401(); + break; case 402: - ChipLogProgress(chipTool, " ***** Test Step 402 : Write middle valid value to a range-restricted signed 8-bit integer\n"); - err = TestWriteMiddleValidValueToARangeRestrictedSigned8BitInteger_402(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 402 : Write middle valid value to a range-restricted signed 8-bit integer\n"); + err = TestWriteMiddleValidValueToARangeRestrictedSigned8BitInteger_402(); + break; case 403: - ChipLogProgress(chipTool, " ***** Test Step 403 : Verify range-restricted signed 8-bit integer value is at mid valid\n"); - err = TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMidValid_403(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 403 : Verify range-restricted signed 8-bit integer value is at mid valid\n"); + err = TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMidValid_403(); + break; case 404: - ChipLogProgress(chipTool, " ***** Test Step 404 : Read range-restricted signed 16-bit integer\n"); - err = TestReadRangeRestrictedSigned16BitInteger_404(); - break; + ChipLogProgress(chipTool, " ***** Test Step 404 : Read range-restricted signed 16-bit integer\n"); + err = TestReadRangeRestrictedSigned16BitInteger_404(); + break; case 405: - ChipLogProgress(chipTool, " ***** Test Step 405 : Write min value to a range-restricted signed 16-bit integer\n"); - err = TestWriteMinValueToARangeRestrictedSigned16BitInteger_405(); - break; + ChipLogProgress(chipTool, " ***** Test Step 405 : Write min value to a range-restricted signed 16-bit integer\n"); + err = TestWriteMinValueToARangeRestrictedSigned16BitInteger_405(); + break; case 406: - ChipLogProgress(chipTool, " ***** Test Step 406 : Write just-below-range value to a range-restricted signed 16-bit integer\n"); - err = TestWriteJustBelowRangeValueToARangeRestrictedSigned16BitInteger_406(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 406 : Write just-below-range value to a range-restricted signed 16-bit integer\n"); + err = TestWriteJustBelowRangeValueToARangeRestrictedSigned16BitInteger_406(); + break; case 407: - ChipLogProgress(chipTool, " ***** Test Step 407 : Write just-above-range value to a range-restricted signed 16-bit integer\n"); - err = TestWriteJustAboveRangeValueToARangeRestrictedSigned16BitInteger_407(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 407 : Write just-above-range value to a range-restricted signed 16-bit integer\n"); + err = TestWriteJustAboveRangeValueToARangeRestrictedSigned16BitInteger_407(); + break; case 408: - ChipLogProgress(chipTool, " ***** Test Step 408 : Write max value to a range-restricted signed 16-bit integer\n"); - err = TestWriteMaxValueToARangeRestrictedSigned16BitInteger_408(); - break; + ChipLogProgress(chipTool, " ***** Test Step 408 : Write max value to a range-restricted signed 16-bit integer\n"); + err = TestWriteMaxValueToARangeRestrictedSigned16BitInteger_408(); + break; case 409: - ChipLogProgress(chipTool, " ***** Test Step 409 : Verify range-restricted signed 16-bit integer value has not changed\n"); - err = TestVerifyRangeRestrictedSigned16BitIntegerValueHasNotChanged_409(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 409 : Verify range-restricted signed 16-bit integer value has not changed\n"); + err = TestVerifyRangeRestrictedSigned16BitIntegerValueHasNotChanged_409(); + break; case 410: - ChipLogProgress(chipTool, " ***** Test Step 410 : Write min valid value to a range-restricted signed 16-bit integer\n"); - err = TestWriteMinValidValueToARangeRestrictedSigned16BitInteger_410(); - break; + ChipLogProgress(chipTool, " ***** Test Step 410 : Write min valid value to a range-restricted signed 16-bit integer\n"); + err = TestWriteMinValidValueToARangeRestrictedSigned16BitInteger_410(); + break; case 411: - ChipLogProgress(chipTool, " ***** Test Step 411 : Verify range-restricted signed 16-bit integer value is at min valid\n"); - err = TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMinValid_411(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 411 : Verify range-restricted signed 16-bit integer value is at min valid\n"); + err = TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMinValid_411(); + break; case 412: - ChipLogProgress(chipTool, " ***** Test Step 412 : Write max valid value to a range-restricted signed 16-bit integer\n"); - err = TestWriteMaxValidValueToARangeRestrictedSigned16BitInteger_412(); - break; + ChipLogProgress(chipTool, " ***** Test Step 412 : Write max valid value to a range-restricted signed 16-bit integer\n"); + err = TestWriteMaxValidValueToARangeRestrictedSigned16BitInteger_412(); + break; case 413: - ChipLogProgress(chipTool, " ***** Test Step 413 : Verify range-restricted signed 16-bit integer value is at max valid\n"); - err = TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMaxValid_413(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 413 : Verify range-restricted signed 16-bit integer value is at max valid\n"); + err = TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMaxValid_413(); + break; case 414: - ChipLogProgress(chipTool, " ***** Test Step 414 : Write middle valid value to a range-restricted signed 16-bit integer\n"); - err = TestWriteMiddleValidValueToARangeRestrictedSigned16BitInteger_414(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 414 : Write middle valid value to a range-restricted signed 16-bit integer\n"); + err = TestWriteMiddleValidValueToARangeRestrictedSigned16BitInteger_414(); + break; case 415: - ChipLogProgress(chipTool, " ***** Test Step 415 : Verify range-restricted signed 16-bit integer value is at mid valid\n"); - err = TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMidValid_415(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 415 : Verify range-restricted signed 16-bit integer value is at mid valid\n"); + err = TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMidValid_415(); + break; case 416: - ChipLogProgress(chipTool, " ***** Test Step 416 : Read nullable range-restricted unsigned 8-bit integer\n"); - err = TestReadNullableRangeRestrictedUnsigned8BitInteger_416(); - break; + ChipLogProgress(chipTool, " ***** Test Step 416 : Read nullable range-restricted unsigned 8-bit integer\n"); + err = TestReadNullableRangeRestrictedUnsigned8BitInteger_416(); + break; case 417: - ChipLogProgress(chipTool, " ***** Test Step 417 : Write min value to a nullable range-restricted unsigned 8-bit integer\n"); - err = TestWriteMinValueToANullableRangeRestrictedUnsigned8BitInteger_417(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 417 : Write min value to a nullable range-restricted unsigned 8-bit integer\n"); + err = TestWriteMinValueToANullableRangeRestrictedUnsigned8BitInteger_417(); + break; case 418: - ChipLogProgress(chipTool, " ***** Test Step 418 : Write just-below-range value to a nullable range-restricted unsigned 8-bit integer\n"); - err = TestWriteJustBelowRangeValueToANullableRangeRestrictedUnsigned8BitInteger_418(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 418 : Write just-below-range value to a nullable range-restricted unsigned 8-bit integer\n"); + err = TestWriteJustBelowRangeValueToANullableRangeRestrictedUnsigned8BitInteger_418(); + break; case 419: - ChipLogProgress(chipTool, " ***** Test Step 419 : Write just-above-range value to a nullable range-restricted unsigned 8-bit integer\n"); - err = TestWriteJustAboveRangeValueToANullableRangeRestrictedUnsigned8BitInteger_419(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 419 : Write just-above-range value to a nullable range-restricted unsigned 8-bit integer\n"); + err = TestWriteJustAboveRangeValueToANullableRangeRestrictedUnsigned8BitInteger_419(); + break; case 420: - ChipLogProgress(chipTool, " ***** Test Step 420 : Write max value to a nullable range-restricted unsigned 8-bit integer\n"); - err = TestWriteMaxValueToANullableRangeRestrictedUnsigned8BitInteger_420(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 420 : Write max value to a nullable range-restricted unsigned 8-bit integer\n"); + err = TestWriteMaxValueToANullableRangeRestrictedUnsigned8BitInteger_420(); + break; case 421: - ChipLogProgress(chipTool, " ***** Test Step 421 : Verify nullable range-restricted unsigned 8-bit integer value has not changed\n"); - err = TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueHasNotChanged_421(); - break; + ChipLogProgress( + chipTool, " ***** Test Step 421 : Verify nullable range-restricted unsigned 8-bit integer value has not changed\n"); + err = TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueHasNotChanged_421(); + break; case 422: - ChipLogProgress(chipTool, " ***** Test Step 422 : Write min valid value to a nullable range-restricted unsigned 8-bit integer\n"); - err = TestWriteMinValidValueToANullableRangeRestrictedUnsigned8BitInteger_422(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 422 : Write min valid value to a nullable range-restricted unsigned 8-bit integer\n"); + err = TestWriteMinValidValueToANullableRangeRestrictedUnsigned8BitInteger_422(); + break; case 423: - ChipLogProgress(chipTool, " ***** Test Step 423 : Verify nullable range-restricted unsigned 8-bit integer value is at min valid\n"); - err = TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMinValid_423(); - break; + ChipLogProgress( + chipTool, " ***** Test Step 423 : Verify nullable range-restricted unsigned 8-bit integer value is at min valid\n"); + err = TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMinValid_423(); + break; case 424: - ChipLogProgress(chipTool, " ***** Test Step 424 : Write max valid value to a nullable range-restricted unsigned 8-bit integer\n"); - err = TestWriteMaxValidValueToANullableRangeRestrictedUnsigned8BitInteger_424(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 424 : Write max valid value to a nullable range-restricted unsigned 8-bit integer\n"); + err = TestWriteMaxValidValueToANullableRangeRestrictedUnsigned8BitInteger_424(); + break; case 425: - ChipLogProgress(chipTool, " ***** Test Step 425 : Verify nullable range-restricted unsigned 8-bit integer value is at max valid\n"); - err = TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMaxValid_425(); - break; + ChipLogProgress( + chipTool, " ***** Test Step 425 : Verify nullable range-restricted unsigned 8-bit integer value is at max valid\n"); + err = TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMaxValid_425(); + break; case 426: - ChipLogProgress(chipTool, " ***** Test Step 426 : Write middle valid value to a nullable range-restricted unsigned 8-bit integer\n"); - err = TestWriteMiddleValidValueToANullableRangeRestrictedUnsigned8BitInteger_426(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 426 : Write middle valid value to a nullable range-restricted unsigned 8-bit integer\n"); + err = TestWriteMiddleValidValueToANullableRangeRestrictedUnsigned8BitInteger_426(); + break; case 427: - ChipLogProgress(chipTool, " ***** Test Step 427 : Verify nullable range-restricted unsigned 8-bit integer value is at mid valid\n"); - err = TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMidValid_427(); - break; + ChipLogProgress( + chipTool, " ***** Test Step 427 : Verify nullable range-restricted unsigned 8-bit integer value is at mid valid\n"); + err = TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMidValid_427(); + break; case 428: - ChipLogProgress(chipTool, " ***** Test Step 428 : Write null value to a nullable range-restricted unsigned 8-bit integer\n"); - err = TestWriteNullValueToANullableRangeRestrictedUnsigned8BitInteger_428(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 428 : Write null value to a nullable range-restricted unsigned 8-bit integer\n"); + err = TestWriteNullValueToANullableRangeRestrictedUnsigned8BitInteger_428(); + break; case 429: - ChipLogProgress(chipTool, " ***** Test Step 429 : Verify nullable range-restricted unsigned 8-bit integer value is null\n"); - err = TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsNull_429(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 429 : Verify nullable range-restricted unsigned 8-bit integer value is null\n"); + err = TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsNull_429(); + break; case 430: - ChipLogProgress(chipTool, " ***** Test Step 430 : Read nullable range-restricted unsigned 16-bit integer\n"); - err = TestReadNullableRangeRestrictedUnsigned16BitInteger_430(); - break; + ChipLogProgress(chipTool, " ***** Test Step 430 : Read nullable range-restricted unsigned 16-bit integer\n"); + err = TestReadNullableRangeRestrictedUnsigned16BitInteger_430(); + break; case 431: - ChipLogProgress(chipTool, " ***** Test Step 431 : Write min value to a nullable range-restricted unsigned 16-bit integer\n"); - err = TestWriteMinValueToANullableRangeRestrictedUnsigned16BitInteger_431(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 431 : Write min value to a nullable range-restricted unsigned 16-bit integer\n"); + err = TestWriteMinValueToANullableRangeRestrictedUnsigned16BitInteger_431(); + break; case 432: - ChipLogProgress(chipTool, " ***** Test Step 432 : Write just-below-range value to a nullable range-restricted unsigned 16-bit integer\n"); - err = TestWriteJustBelowRangeValueToANullableRangeRestrictedUnsigned16BitInteger_432(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 432 : Write just-below-range value to a nullable range-restricted unsigned 16-bit integer\n"); + err = TestWriteJustBelowRangeValueToANullableRangeRestrictedUnsigned16BitInteger_432(); + break; case 433: - ChipLogProgress(chipTool, " ***** Test Step 433 : Write just-above-range value to a nullable range-restricted unsigned 16-bit integer\n"); - err = TestWriteJustAboveRangeValueToANullableRangeRestrictedUnsigned16BitInteger_433(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 433 : Write just-above-range value to a nullable range-restricted unsigned 16-bit integer\n"); + err = TestWriteJustAboveRangeValueToANullableRangeRestrictedUnsigned16BitInteger_433(); + break; case 434: - ChipLogProgress(chipTool, " ***** Test Step 434 : Write max value to a nullable range-restricted unsigned 16-bit integer\n"); - err = TestWriteMaxValueToANullableRangeRestrictedUnsigned16BitInteger_434(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 434 : Write max value to a nullable range-restricted unsigned 16-bit integer\n"); + err = TestWriteMaxValueToANullableRangeRestrictedUnsigned16BitInteger_434(); + break; case 435: - ChipLogProgress(chipTool, " ***** Test Step 435 : Verify nullable range-restricted unsigned 16-bit integer value has not changed\n"); - err = TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueHasNotChanged_435(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 435 : Verify nullable range-restricted unsigned 16-bit integer value has not changed\n"); + err = TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueHasNotChanged_435(); + break; case 436: - ChipLogProgress(chipTool, " ***** Test Step 436 : Write min valid value to a nullable range-restricted unsigned 16-bit integer\n"); - err = TestWriteMinValidValueToANullableRangeRestrictedUnsigned16BitInteger_436(); - break; + ChipLogProgress( + chipTool, " ***** Test Step 436 : Write min valid value to a nullable range-restricted unsigned 16-bit integer\n"); + err = TestWriteMinValidValueToANullableRangeRestrictedUnsigned16BitInteger_436(); + break; case 437: - ChipLogProgress(chipTool, " ***** Test Step 437 : Verify nullable range-restricted unsigned 16-bit integer value is at min valid\n"); - err = TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMinValid_437(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 437 : Verify nullable range-restricted unsigned 16-bit integer value is at min valid\n"); + err = TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMinValid_437(); + break; case 438: - ChipLogProgress(chipTool, " ***** Test Step 438 : Write max valid value to a nullable range-restricted unsigned 16-bit integer\n"); - err = TestWriteMaxValidValueToANullableRangeRestrictedUnsigned16BitInteger_438(); - break; + ChipLogProgress( + chipTool, " ***** Test Step 438 : Write max valid value to a nullable range-restricted unsigned 16-bit integer\n"); + err = TestWriteMaxValidValueToANullableRangeRestrictedUnsigned16BitInteger_438(); + break; case 439: - ChipLogProgress(chipTool, " ***** Test Step 439 : Verify nullable range-restricted unsigned 16-bit integer value is at max valid\n"); - err = TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMaxValid_439(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 439 : Verify nullable range-restricted unsigned 16-bit integer value is at max valid\n"); + err = TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMaxValid_439(); + break; case 440: - ChipLogProgress(chipTool, " ***** Test Step 440 : Write middle valid value to a nullable range-restricted unsigned 16-bit integer\n"); - err = TestWriteMiddleValidValueToANullableRangeRestrictedUnsigned16BitInteger_440(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 440 : Write middle valid value to a nullable range-restricted unsigned 16-bit integer\n"); + err = TestWriteMiddleValidValueToANullableRangeRestrictedUnsigned16BitInteger_440(); + break; case 441: - ChipLogProgress(chipTool, " ***** Test Step 441 : Verify nullable range-restricted unsigned 16-bit integer value is at mid valid\n"); - err = TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMidValid_441(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 441 : Verify nullable range-restricted unsigned 16-bit integer value is at mid valid\n"); + err = TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMidValid_441(); + break; case 442: - ChipLogProgress(chipTool, " ***** Test Step 442 : Write null value to a nullable range-restricted unsigned 16-bit integer\n"); - err = TestWriteNullValueToANullableRangeRestrictedUnsigned16BitInteger_442(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 442 : Write null value to a nullable range-restricted unsigned 16-bit integer\n"); + err = TestWriteNullValueToANullableRangeRestrictedUnsigned16BitInteger_442(); + break; case 443: - ChipLogProgress(chipTool, " ***** Test Step 443 : Verify nullable range-restricted unsigned 16-bit integer value is null\n"); - err = TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsNull_443(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 443 : Verify nullable range-restricted unsigned 16-bit integer value is null\n"); + err = TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsNull_443(); + break; case 444: - ChipLogProgress(chipTool, " ***** Test Step 444 : Read nullable range-restricted signed 8-bit integer\n"); - err = TestReadNullableRangeRestrictedSigned8BitInteger_444(); - break; + ChipLogProgress(chipTool, " ***** Test Step 444 : Read nullable range-restricted signed 8-bit integer\n"); + err = TestReadNullableRangeRestrictedSigned8BitInteger_444(); + break; case 445: - ChipLogProgress(chipTool, " ***** Test Step 445 : Write min value to a nullable range-restricted signed 8-bit integer\n"); - err = TestWriteMinValueToANullableRangeRestrictedSigned8BitInteger_445(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 445 : Write min value to a nullable range-restricted signed 8-bit integer\n"); + err = TestWriteMinValueToANullableRangeRestrictedSigned8BitInteger_445(); + break; case 446: - ChipLogProgress(chipTool, " ***** Test Step 446 : Write just-below-range value to a nullable range-restricted signed 8-bit integer\n"); - err = TestWriteJustBelowRangeValueToANullableRangeRestrictedSigned8BitInteger_446(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 446 : Write just-below-range value to a nullable range-restricted signed 8-bit integer\n"); + err = TestWriteJustBelowRangeValueToANullableRangeRestrictedSigned8BitInteger_446(); + break; case 447: - ChipLogProgress(chipTool, " ***** Test Step 447 : Write just-above-range value to a nullable range-restricted signed 8-bit integer\n"); - err = TestWriteJustAboveRangeValueToANullableRangeRestrictedSigned8BitInteger_447(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 447 : Write just-above-range value to a nullable range-restricted signed 8-bit integer\n"); + err = TestWriteJustAboveRangeValueToANullableRangeRestrictedSigned8BitInteger_447(); + break; case 448: - ChipLogProgress(chipTool, " ***** Test Step 448 : Write max value to a nullable range-restricted signed 8-bit integer\n"); - err = TestWriteMaxValueToANullableRangeRestrictedSigned8BitInteger_448(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 448 : Write max value to a nullable range-restricted signed 8-bit integer\n"); + err = TestWriteMaxValueToANullableRangeRestrictedSigned8BitInteger_448(); + break; case 449: - ChipLogProgress(chipTool, " ***** Test Step 449 : Verify nullable range-restricted signed 8-bit integer value has not changed\n"); - err = TestVerifyNullableRangeRestrictedSigned8BitIntegerValueHasNotChanged_449(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 449 : Verify nullable range-restricted signed 8-bit integer value has not changed\n"); + err = TestVerifyNullableRangeRestrictedSigned8BitIntegerValueHasNotChanged_449(); + break; case 450: - ChipLogProgress(chipTool, " ***** Test Step 450 : Write min valid value to a nullable range-restricted signed 8-bit integer\n"); - err = TestWriteMinValidValueToANullableRangeRestrictedSigned8BitInteger_450(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 450 : Write min valid value to a nullable range-restricted signed 8-bit integer\n"); + err = TestWriteMinValidValueToANullableRangeRestrictedSigned8BitInteger_450(); + break; case 451: - ChipLogProgress(chipTool, " ***** Test Step 451 : Verify nullable range-restricted signed 8-bit integer value is at min valid\n"); - err = TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMinValid_451(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 451 : Verify nullable range-restricted signed 8-bit integer value is at min valid\n"); + err = TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMinValid_451(); + break; case 452: - ChipLogProgress(chipTool, " ***** Test Step 452 : Write max valid value to a nullable range-restricted signed 8-bit integer\n"); - err = TestWriteMaxValidValueToANullableRangeRestrictedSigned8BitInteger_452(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 452 : Write max valid value to a nullable range-restricted signed 8-bit integer\n"); + err = TestWriteMaxValidValueToANullableRangeRestrictedSigned8BitInteger_452(); + break; case 453: - ChipLogProgress(chipTool, " ***** Test Step 453 : Verify nullable range-restricted signed 8-bit integer value is at max valid\n"); - err = TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMaxValid_453(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 453 : Verify nullable range-restricted signed 8-bit integer value is at max valid\n"); + err = TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMaxValid_453(); + break; case 454: - ChipLogProgress(chipTool, " ***** Test Step 454 : Write middle valid value to a nullable range-restricted signed 8-bit integer\n"); - err = TestWriteMiddleValidValueToANullableRangeRestrictedSigned8BitInteger_454(); - break; + ChipLogProgress( + chipTool, " ***** Test Step 454 : Write middle valid value to a nullable range-restricted signed 8-bit integer\n"); + err = TestWriteMiddleValidValueToANullableRangeRestrictedSigned8BitInteger_454(); + break; case 455: - ChipLogProgress(chipTool, " ***** Test Step 455 : Verify nullable range-restricted signed 8-bit integer value is at mid valid\n"); - err = TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMidValid_455(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 455 : Verify nullable range-restricted signed 8-bit integer value is at mid valid\n"); + err = TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMidValid_455(); + break; case 456: - ChipLogProgress(chipTool, " ***** Test Step 456 : Write null value to a nullable range-restricted signed 8-bit integer\n"); - err = TestWriteNullValueToANullableRangeRestrictedSigned8BitInteger_456(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 456 : Write null value to a nullable range-restricted signed 8-bit integer\n"); + err = TestWriteNullValueToANullableRangeRestrictedSigned8BitInteger_456(); + break; case 457: - ChipLogProgress(chipTool, " ***** Test Step 457 : Verify nullable range-restricted signed 8-bit integer value is at null\n"); - err = TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtNull_457(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 457 : Verify nullable range-restricted signed 8-bit integer value is at null\n"); + err = TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtNull_457(); + break; case 458: - ChipLogProgress(chipTool, " ***** Test Step 458 : Read nullable range-restricted signed 16-bit integer\n"); - err = TestReadNullableRangeRestrictedSigned16BitInteger_458(); - break; + ChipLogProgress(chipTool, " ***** Test Step 458 : Read nullable range-restricted signed 16-bit integer\n"); + err = TestReadNullableRangeRestrictedSigned16BitInteger_458(); + break; case 459: - ChipLogProgress(chipTool, " ***** Test Step 459 : Write min value to a nullable range-restricted signed 16-bit integer\n"); - err = TestWriteMinValueToANullableRangeRestrictedSigned16BitInteger_459(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 459 : Write min value to a nullable range-restricted signed 16-bit integer\n"); + err = TestWriteMinValueToANullableRangeRestrictedSigned16BitInteger_459(); + break; case 460: - ChipLogProgress(chipTool, " ***** Test Step 460 : Write just-below-range value to a nullable range-restricted signed 16-bit integer\n"); - err = TestWriteJustBelowRangeValueToANullableRangeRestrictedSigned16BitInteger_460(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 460 : Write just-below-range value to a nullable range-restricted signed 16-bit integer\n"); + err = TestWriteJustBelowRangeValueToANullableRangeRestrictedSigned16BitInteger_460(); + break; case 461: - ChipLogProgress(chipTool, " ***** Test Step 461 : Write just-above-range value to a nullable range-restricted signed 16-bit integer\n"); - err = TestWriteJustAboveRangeValueToANullableRangeRestrictedSigned16BitInteger_461(); - break; + ChipLogProgress( + chipTool, + " ***** Test Step 461 : Write just-above-range value to a nullable range-restricted signed 16-bit integer\n"); + err = TestWriteJustAboveRangeValueToANullableRangeRestrictedSigned16BitInteger_461(); + break; case 462: - ChipLogProgress(chipTool, " ***** Test Step 462 : Write max value to a nullable range-restricted signed 16-bit integer\n"); - err = TestWriteMaxValueToANullableRangeRestrictedSigned16BitInteger_462(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 462 : Write max value to a nullable range-restricted signed 16-bit integer\n"); + err = TestWriteMaxValueToANullableRangeRestrictedSigned16BitInteger_462(); + break; case 463: - ChipLogProgress(chipTool, " ***** Test Step 463 : Verify nullable range-restricted signed 16-bit integer value has not changed\n"); - err = TestVerifyNullableRangeRestrictedSigned16BitIntegerValueHasNotChanged_463(); - break; + ChipLogProgress( + chipTool, " ***** Test Step 463 : Verify nullable range-restricted signed 16-bit integer value has not changed\n"); + err = TestVerifyNullableRangeRestrictedSigned16BitIntegerValueHasNotChanged_463(); + break; case 464: - ChipLogProgress(chipTool, " ***** Test Step 464 : Write min valid value to a nullable range-restricted signed 16-bit integer\n"); - err = TestWriteMinValidValueToANullableRangeRestrictedSigned16BitInteger_464(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 464 : Write min valid value to a nullable range-restricted signed 16-bit integer\n"); + err = TestWriteMinValidValueToANullableRangeRestrictedSigned16BitInteger_464(); + break; case 465: - ChipLogProgress(chipTool, " ***** Test Step 465 : Verify nullable range-restricted signed 16-bit integer value is at min valid\n"); - err = TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMinValid_465(); - break; + ChipLogProgress( + chipTool, " ***** Test Step 465 : Verify nullable range-restricted signed 16-bit integer value is at min valid\n"); + err = TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMinValid_465(); + break; case 466: - ChipLogProgress(chipTool, " ***** Test Step 466 : Write max valid value to a nullable range-restricted signed 16-bit integer\n"); - err = TestWriteMaxValidValueToANullableRangeRestrictedSigned16BitInteger_466(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 466 : Write max valid value to a nullable range-restricted signed 16-bit integer\n"); + err = TestWriteMaxValidValueToANullableRangeRestrictedSigned16BitInteger_466(); + break; case 467: - ChipLogProgress(chipTool, " ***** Test Step 467 : Verify nullable range-restricted signed 16-bit integer value is at max valid\n"); - err = TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMaxValid_467(); - break; + ChipLogProgress( + chipTool, " ***** Test Step 467 : Verify nullable range-restricted signed 16-bit integer value is at max valid\n"); + err = TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMaxValid_467(); + break; case 468: - ChipLogProgress(chipTool, " ***** Test Step 468 : Write middle valid value to a nullable range-restricted signed 16-bit integer\n"); - err = TestWriteMiddleValidValueToANullableRangeRestrictedSigned16BitInteger_468(); - break; + ChipLogProgress( + chipTool, " ***** Test Step 468 : Write middle valid value to a nullable range-restricted signed 16-bit integer\n"); + err = TestWriteMiddleValidValueToANullableRangeRestrictedSigned16BitInteger_468(); + break; case 469: - ChipLogProgress(chipTool, " ***** Test Step 469 : Verify nullable range-restricted signed 16-bit integer value is at mid valid\n"); - err = TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMidValid_469(); - break; + ChipLogProgress( + chipTool, " ***** Test Step 469 : Verify nullable range-restricted signed 16-bit integer value is at mid valid\n"); + err = TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMidValid_469(); + break; case 470: - ChipLogProgress(chipTool, " ***** Test Step 470 : Write null value to a nullable range-restricted signed 16-bit integer\n"); - err = TestWriteNullValueToANullableRangeRestrictedSigned16BitInteger_470(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 470 : Write null value to a nullable range-restricted signed 16-bit integer\n"); + err = TestWriteNullValueToANullableRangeRestrictedSigned16BitInteger_470(); + break; case 471: - ChipLogProgress(chipTool, " ***** Test Step 471 : Verify nullable range-restricted signed 16-bit integer value is null\n"); - err = TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsNull_471(); - break; - } + ChipLogProgress(chipTool, + " ***** Test Step 471 : Verify nullable range-restricted signed 16-bit integer value is null\n"); + err = TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsNull_471(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 472; chip::Optional mCluster; chip::Optional mEndpoint; - - typedef void (* Test_TestCluster_list_int8u_ReportCallback -)(void * context, const chip::app::DataModel::DecodableList & value); - Test_TestCluster_list_int8u_ReportCallback - mTest_TestCluster_list_int8u_Reported - = nullptr; - - - - - - - - - - - - - - - - - - - - - + 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; static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, bool boolean) + static void OnSuccessCallback_6(void * context, bool boolean) { (static_cast(context))->OnSuccessResponse_6(boolean); } - - - static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context) - { - (static_cast(context))->OnSuccessResponse_7(); - } - - - + static void OnSuccessCallback_7(void * context) { (static_cast(context))->OnSuccessResponse_7(); } static void OnFailureCallback_8(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context, bool boolean) + static void OnSuccessCallback_8(void * context, bool boolean) { (static_cast(context))->OnSuccessResponse_8(boolean); } - - - static void OnFailureCallback_9(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_9(status); } - static void OnSuccessCallback_9(void * context) - { - (static_cast(context))->OnSuccessResponse_9(); - } - - - + static void OnSuccessCallback_9(void * context) { (static_cast(context))->OnSuccessResponse_9(); } static void OnFailureCallback_10(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_10(status); } - static void OnSuccessCallback_10(void * context, bool boolean) + static void OnSuccessCallback_10(void * context, bool boolean) { (static_cast(context))->OnSuccessResponse_10(boolean); } - - - static void OnFailureCallback_11(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_11(status); } - static void OnSuccessCallback_11(void * context, uint8_t bitmap8) + static void OnSuccessCallback_11(void * context, uint8_t bitmap8) { (static_cast(context))->OnSuccessResponse_11(bitmap8); } - - - static void OnFailureCallback_12(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_12(status); } - static void OnSuccessCallback_12(void * context) - { - (static_cast(context))->OnSuccessResponse_12(); - } - - - + static void OnSuccessCallback_12(void * context) { (static_cast(context))->OnSuccessResponse_12(); } static void OnFailureCallback_13(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_13(status); } - static void OnSuccessCallback_13(void * context, uint8_t bitmap8) + static void OnSuccessCallback_13(void * context, uint8_t bitmap8) { (static_cast(context))->OnSuccessResponse_13(bitmap8); } - - - static void OnFailureCallback_14(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_14(status); } - static void OnSuccessCallback_14(void * context) - { - (static_cast(context))->OnSuccessResponse_14(); - } - - - + static void OnSuccessCallback_14(void * context) { (static_cast(context))->OnSuccessResponse_14(); } static void OnFailureCallback_15(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_15(status); } - static void OnSuccessCallback_15(void * context, uint8_t bitmap8) + static void OnSuccessCallback_15(void * context, uint8_t bitmap8) { (static_cast(context))->OnSuccessResponse_15(bitmap8); } - - - static void OnFailureCallback_16(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_16(status); } - static void OnSuccessCallback_16(void * context, uint16_t bitmap16) + static void OnSuccessCallback_16(void * context, uint16_t bitmap16) { (static_cast(context))->OnSuccessResponse_16(bitmap16); } - - - static void OnFailureCallback_17(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_17(status); } - static void OnSuccessCallback_17(void * context) - { - (static_cast(context))->OnSuccessResponse_17(); - } - - - + static void OnSuccessCallback_17(void * context) { (static_cast(context))->OnSuccessResponse_17(); } static void OnFailureCallback_18(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_18(status); } - static void OnSuccessCallback_18(void * context, uint16_t bitmap16) + static void OnSuccessCallback_18(void * context, uint16_t bitmap16) { (static_cast(context))->OnSuccessResponse_18(bitmap16); } - - - static void OnFailureCallback_19(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_19(status); } - static void OnSuccessCallback_19(void * context) - { - (static_cast(context))->OnSuccessResponse_19(); - } - - - + static void OnSuccessCallback_19(void * context) { (static_cast(context))->OnSuccessResponse_19(); } static void OnFailureCallback_20(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_20(status); } - static void OnSuccessCallback_20(void * context, uint16_t bitmap16) + static void OnSuccessCallback_20(void * context, uint16_t bitmap16) { (static_cast(context))->OnSuccessResponse_20(bitmap16); } - - - static void OnFailureCallback_21(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_21(status); } - static void OnSuccessCallback_21(void * context, uint32_t bitmap32) + static void OnSuccessCallback_21(void * context, uint32_t bitmap32) { (static_cast(context))->OnSuccessResponse_21(bitmap32); } - - - static void OnFailureCallback_22(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_22(status); } - static void OnSuccessCallback_22(void * context) - { - (static_cast(context))->OnSuccessResponse_22(); - } - - - + static void OnSuccessCallback_22(void * context) { (static_cast(context))->OnSuccessResponse_22(); } static void OnFailureCallback_23(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_23(status); } - static void OnSuccessCallback_23(void * context, uint32_t bitmap32) + static void OnSuccessCallback_23(void * context, uint32_t bitmap32) { (static_cast(context))->OnSuccessResponse_23(bitmap32); } - - - static void OnFailureCallback_24(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_24(status); } - static void OnSuccessCallback_24(void * context) - { - (static_cast(context))->OnSuccessResponse_24(); - } - - - + static void OnSuccessCallback_24(void * context) { (static_cast(context))->OnSuccessResponse_24(); } static void OnFailureCallback_25(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_25(status); } - static void OnSuccessCallback_25(void * context, uint32_t bitmap32) + static void OnSuccessCallback_25(void * context, uint32_t bitmap32) { (static_cast(context))->OnSuccessResponse_25(bitmap32); } - - - static void OnFailureCallback_26(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_26(status); } - static void OnSuccessCallback_26(void * context, uint64_t bitmap64) + static void OnSuccessCallback_26(void * context, uint64_t bitmap64) { (static_cast(context))->OnSuccessResponse_26(bitmap64); } - - - static void OnFailureCallback_27(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_27(status); } - static void OnSuccessCallback_27(void * context) - { - (static_cast(context))->OnSuccessResponse_27(); - } - - - + static void OnSuccessCallback_27(void * context) { (static_cast(context))->OnSuccessResponse_27(); } static void OnFailureCallback_28(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_28(status); } - static void OnSuccessCallback_28(void * context, uint64_t bitmap64) + static void OnSuccessCallback_28(void * context, uint64_t bitmap64) { (static_cast(context))->OnSuccessResponse_28(bitmap64); } - - - static void OnFailureCallback_29(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_29(status); } - static void OnSuccessCallback_29(void * context) - { - (static_cast(context))->OnSuccessResponse_29(); - } - - - + static void OnSuccessCallback_29(void * context) { (static_cast(context))->OnSuccessResponse_29(); } static void OnFailureCallback_30(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_30(status); } - static void OnSuccessCallback_30(void * context, uint64_t bitmap64) + static void OnSuccessCallback_30(void * context, uint64_t bitmap64) { (static_cast(context))->OnSuccessResponse_30(bitmap64); } - - - static void OnFailureCallback_31(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_31(status); } - static void OnSuccessCallback_31(void * context, uint8_t int8u) + static void OnSuccessCallback_31(void * context, uint8_t int8u) { (static_cast(context))->OnSuccessResponse_31(int8u); } - - - static void OnFailureCallback_32(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_32(status); } - static void OnSuccessCallback_32(void * context) - { - (static_cast(context))->OnSuccessResponse_32(); - } - - - + static void OnSuccessCallback_32(void * context) { (static_cast(context))->OnSuccessResponse_32(); } static void OnFailureCallback_33(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_33(status); } - static void OnSuccessCallback_33(void * context, uint8_t int8u) + static void OnSuccessCallback_33(void * context, uint8_t int8u) { (static_cast(context))->OnSuccessResponse_33(int8u); } - - - static void OnFailureCallback_34(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_34(status); } - static void OnSuccessCallback_34(void * context) - { - (static_cast(context))->OnSuccessResponse_34(); - } - - - + static void OnSuccessCallback_34(void * context) { (static_cast(context))->OnSuccessResponse_34(); } static void OnFailureCallback_35(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_35(status); } - static void OnSuccessCallback_35(void * context, uint8_t int8u) + static void OnSuccessCallback_35(void * context, uint8_t int8u) { (static_cast(context))->OnSuccessResponse_35(int8u); } - - - static void OnFailureCallback_36(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_36(status); } - static void OnSuccessCallback_36(void * context, uint16_t int16u) + static void OnSuccessCallback_36(void * context, uint16_t int16u) { (static_cast(context))->OnSuccessResponse_36(int16u); } - - - static void OnFailureCallback_37(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_37(status); } - static void OnSuccessCallback_37(void * context) - { - (static_cast(context))->OnSuccessResponse_37(); - } - - - + static void OnSuccessCallback_37(void * context) { (static_cast(context))->OnSuccessResponse_37(); } static void OnFailureCallback_38(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_38(status); } - static void OnSuccessCallback_38(void * context, uint16_t int16u) + static void OnSuccessCallback_38(void * context, uint16_t int16u) { (static_cast(context))->OnSuccessResponse_38(int16u); } - - - static void OnFailureCallback_39(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_39(status); } - static void OnSuccessCallback_39(void * context) - { - (static_cast(context))->OnSuccessResponse_39(); - } - - - + static void OnSuccessCallback_39(void * context) { (static_cast(context))->OnSuccessResponse_39(); } static void OnFailureCallback_40(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_40(status); } - static void OnSuccessCallback_40(void * context, uint16_t int16u) + static void OnSuccessCallback_40(void * context, uint16_t int16u) { (static_cast(context))->OnSuccessResponse_40(int16u); } - - - static void OnFailureCallback_41(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_41(status); } - static void OnSuccessCallback_41(void * context, uint32_t int32u) + static void OnSuccessCallback_41(void * context, uint32_t int32u) { (static_cast(context))->OnSuccessResponse_41(int32u); } - - - static void OnFailureCallback_42(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_42(status); } - static void OnSuccessCallback_42(void * context) - { - (static_cast(context))->OnSuccessResponse_42(); - } - - - + static void OnSuccessCallback_42(void * context) { (static_cast(context))->OnSuccessResponse_42(); } static void OnFailureCallback_43(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_43(status); } - static void OnSuccessCallback_43(void * context, uint32_t int32u) + static void OnSuccessCallback_43(void * context, uint32_t int32u) { (static_cast(context))->OnSuccessResponse_43(int32u); } - - - static void OnFailureCallback_44(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_44(status); } - static void OnSuccessCallback_44(void * context) - { - (static_cast(context))->OnSuccessResponse_44(); - } - - - + static void OnSuccessCallback_44(void * context) { (static_cast(context))->OnSuccessResponse_44(); } static void OnFailureCallback_45(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_45(status); } - static void OnSuccessCallback_45(void * context, uint32_t int32u) + static void OnSuccessCallback_45(void * context, uint32_t int32u) { (static_cast(context))->OnSuccessResponse_45(int32u); } - - - static void OnFailureCallback_46(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_46(status); } - static void OnSuccessCallback_46(void * context, uint64_t int64u) + static void OnSuccessCallback_46(void * context, uint64_t int64u) { (static_cast(context))->OnSuccessResponse_46(int64u); } - - - static void OnFailureCallback_47(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_47(status); } - static void OnSuccessCallback_47(void * context) - { - (static_cast(context))->OnSuccessResponse_47(); - } - - - + static void OnSuccessCallback_47(void * context) { (static_cast(context))->OnSuccessResponse_47(); } static void OnFailureCallback_48(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_48(status); } - static void OnSuccessCallback_48(void * context, uint64_t int64u) + static void OnSuccessCallback_48(void * context, uint64_t int64u) { (static_cast(context))->OnSuccessResponse_48(int64u); } - - - static void OnFailureCallback_49(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_49(status); } - static void OnSuccessCallback_49(void * context) - { - (static_cast(context))->OnSuccessResponse_49(); - } - - - + static void OnSuccessCallback_49(void * context) { (static_cast(context))->OnSuccessResponse_49(); } static void OnFailureCallback_50(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_50(status); } - static void OnSuccessCallback_50(void * context, uint64_t int64u) + static void OnSuccessCallback_50(void * context, uint64_t int64u) { (static_cast(context))->OnSuccessResponse_50(int64u); } - - - static void OnFailureCallback_51(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_51(status); } - static void OnSuccessCallback_51(void * context, int8_t int8s) + static void OnSuccessCallback_51(void * context, int8_t int8s) { (static_cast(context))->OnSuccessResponse_51(int8s); } - - - static void OnFailureCallback_52(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_52(status); } - static void OnSuccessCallback_52(void * context) - { - (static_cast(context))->OnSuccessResponse_52(); - } - - - + static void OnSuccessCallback_52(void * context) { (static_cast(context))->OnSuccessResponse_52(); } static void OnFailureCallback_53(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_53(status); } - static void OnSuccessCallback_53(void * context, int8_t int8s) + static void OnSuccessCallback_53(void * context, int8_t int8s) { (static_cast(context))->OnSuccessResponse_53(int8s); } - - - static void OnFailureCallback_54(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_54(status); } - static void OnSuccessCallback_54(void * context) - { - (static_cast(context))->OnSuccessResponse_54(); - } - - - + static void OnSuccessCallback_54(void * context) { (static_cast(context))->OnSuccessResponse_54(); } static void OnFailureCallback_55(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_55(status); } - static void OnSuccessCallback_55(void * context, int8_t int8s) + static void OnSuccessCallback_55(void * context, int8_t int8s) { (static_cast(context))->OnSuccessResponse_55(int8s); } - - - static void OnFailureCallback_56(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_56(status); } - static void OnSuccessCallback_56(void * context) - { - (static_cast(context))->OnSuccessResponse_56(); - } - - - + static void OnSuccessCallback_56(void * context) { (static_cast(context))->OnSuccessResponse_56(); } static void OnFailureCallback_57(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_57(status); } - static void OnSuccessCallback_57(void * context, int8_t int8s) + static void OnSuccessCallback_57(void * context, int8_t int8s) { (static_cast(context))->OnSuccessResponse_57(int8s); } - - - static void OnFailureCallback_58(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_58(status); } - static void OnSuccessCallback_58(void * context, int16_t int16s) + static void OnSuccessCallback_58(void * context, int16_t int16s) { (static_cast(context))->OnSuccessResponse_58(int16s); } - - - static void OnFailureCallback_59(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_59(status); } - static void OnSuccessCallback_59(void * context) - { - (static_cast(context))->OnSuccessResponse_59(); - } - - - + static void OnSuccessCallback_59(void * context) { (static_cast(context))->OnSuccessResponse_59(); } static void OnFailureCallback_60(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_60(status); } - static void OnSuccessCallback_60(void * context, int16_t int16s) + static void OnSuccessCallback_60(void * context, int16_t int16s) { (static_cast(context))->OnSuccessResponse_60(int16s); } - - - static void OnFailureCallback_61(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_61(status); } - static void OnSuccessCallback_61(void * context) - { - (static_cast(context))->OnSuccessResponse_61(); - } - - - + static void OnSuccessCallback_61(void * context) { (static_cast(context))->OnSuccessResponse_61(); } static void OnFailureCallback_62(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_62(status); } - static void OnSuccessCallback_62(void * context, int16_t int16s) + static void OnSuccessCallback_62(void * context, int16_t int16s) { (static_cast(context))->OnSuccessResponse_62(int16s); } - - - static void OnFailureCallback_63(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_63(status); } - static void OnSuccessCallback_63(void * context) - { - (static_cast(context))->OnSuccessResponse_63(); - } - - - + static void OnSuccessCallback_63(void * context) { (static_cast(context))->OnSuccessResponse_63(); } static void OnFailureCallback_64(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_64(status); } - static void OnSuccessCallback_64(void * context, int16_t int16s) + static void OnSuccessCallback_64(void * context, int16_t int16s) { (static_cast(context))->OnSuccessResponse_64(int16s); } - - - static void OnFailureCallback_65(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_65(status); } - static void OnSuccessCallback_65(void * context, int32_t int32s) + static void OnSuccessCallback_65(void * context, int32_t int32s) { (static_cast(context))->OnSuccessResponse_65(int32s); } - - - static void OnFailureCallback_66(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_66(status); } - static void OnSuccessCallback_66(void * context) - { - (static_cast(context))->OnSuccessResponse_66(); - } - - - + static void OnSuccessCallback_66(void * context) { (static_cast(context))->OnSuccessResponse_66(); } static void OnFailureCallback_67(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_67(status); } - static void OnSuccessCallback_67(void * context, int32_t int32s) + static void OnSuccessCallback_67(void * context, int32_t int32s) { (static_cast(context))->OnSuccessResponse_67(int32s); } - - - static void OnFailureCallback_68(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_68(status); } - static void OnSuccessCallback_68(void * context) - { - (static_cast(context))->OnSuccessResponse_68(); - } - - - + static void OnSuccessCallback_68(void * context) { (static_cast(context))->OnSuccessResponse_68(); } static void OnFailureCallback_69(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_69(status); } - static void OnSuccessCallback_69(void * context, int32_t int32s) + static void OnSuccessCallback_69(void * context, int32_t int32s) { (static_cast(context))->OnSuccessResponse_69(int32s); } - - - static void OnFailureCallback_70(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_70(status); } - static void OnSuccessCallback_70(void * context) - { - (static_cast(context))->OnSuccessResponse_70(); - } - - - + static void OnSuccessCallback_70(void * context) { (static_cast(context))->OnSuccessResponse_70(); } static void OnFailureCallback_71(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_71(status); } - static void OnSuccessCallback_71(void * context, int32_t int32s) + static void OnSuccessCallback_71(void * context, int32_t int32s) { (static_cast(context))->OnSuccessResponse_71(int32s); } - - - static void OnFailureCallback_72(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_72(status); } - static void OnSuccessCallback_72(void * context, int64_t int64s) + static void OnSuccessCallback_72(void * context, int64_t int64s) { (static_cast(context))->OnSuccessResponse_72(int64s); } - - - static void OnFailureCallback_73(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_73(status); } - static void OnSuccessCallback_73(void * context) - { - (static_cast(context))->OnSuccessResponse_73(); - } - - - + static void OnSuccessCallback_73(void * context) { (static_cast(context))->OnSuccessResponse_73(); } static void OnFailureCallback_74(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_74(status); } - static void OnSuccessCallback_74(void * context, int64_t int64s) + static void OnSuccessCallback_74(void * context, int64_t int64s) { (static_cast(context))->OnSuccessResponse_74(int64s); } - - - static void OnFailureCallback_75(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_75(status); } - static void OnSuccessCallback_75(void * context) - { - (static_cast(context))->OnSuccessResponse_75(); - } - - - + static void OnSuccessCallback_75(void * context) { (static_cast(context))->OnSuccessResponse_75(); } static void OnFailureCallback_76(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_76(status); } - static void OnSuccessCallback_76(void * context, int64_t int64s) + static void OnSuccessCallback_76(void * context, int64_t int64s) { (static_cast(context))->OnSuccessResponse_76(int64s); } - - - static void OnFailureCallback_77(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_77(status); } - static void OnSuccessCallback_77(void * context) - { - (static_cast(context))->OnSuccessResponse_77(); - } - - - + static void OnSuccessCallback_77(void * context) { (static_cast(context))->OnSuccessResponse_77(); } static void OnFailureCallback_78(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_78(status); } - static void OnSuccessCallback_78(void * context, int64_t int64s) + static void OnSuccessCallback_78(void * context, int64_t int64s) { (static_cast(context))->OnSuccessResponse_78(int64s); } - - - static void OnFailureCallback_79(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_79(status); } - static void OnSuccessCallback_79(void * context, float floatSingle) + static void OnSuccessCallback_79(void * context, float floatSingle) { (static_cast(context))->OnSuccessResponse_79(floatSingle); } - - - static void OnFailureCallback_80(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_80(status); } - static void OnSuccessCallback_80(void * context) - { - (static_cast(context))->OnSuccessResponse_80(); - } - - - + static void OnSuccessCallback_80(void * context) { (static_cast(context))->OnSuccessResponse_80(); } static void OnFailureCallback_81(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_81(status); } - static void OnSuccessCallback_81(void * context, float floatSingle) + static void OnSuccessCallback_81(void * context, float floatSingle) { (static_cast(context))->OnSuccessResponse_81(floatSingle); } - - - static void OnFailureCallback_82(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_82(status); } - static void OnSuccessCallback_82(void * context) - { - (static_cast(context))->OnSuccessResponse_82(); - } - - - + static void OnSuccessCallback_82(void * context) { (static_cast(context))->OnSuccessResponse_82(); } static void OnFailureCallback_83(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_83(status); } - static void OnSuccessCallback_83(void * context, float floatSingle) + static void OnSuccessCallback_83(void * context, float floatSingle) { (static_cast(context))->OnSuccessResponse_83(floatSingle); } - - - static void OnFailureCallback_84(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_84(status); } - static void OnSuccessCallback_84(void * context) - { - (static_cast(context))->OnSuccessResponse_84(); - } - - - + static void OnSuccessCallback_84(void * context) { (static_cast(context))->OnSuccessResponse_84(); } static void OnFailureCallback_85(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_85(status); } - static void OnSuccessCallback_85(void * context, float floatSingle) + static void OnSuccessCallback_85(void * context, float floatSingle) { (static_cast(context))->OnSuccessResponse_85(floatSingle); } - - - static void OnFailureCallback_86(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_86(status); } - static void OnSuccessCallback_86(void * context) - { - (static_cast(context))->OnSuccessResponse_86(); - } - - - + static void OnSuccessCallback_86(void * context) { (static_cast(context))->OnSuccessResponse_86(); } static void OnFailureCallback_87(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_87(status); } - static void OnSuccessCallback_87(void * context, float floatSingle) + static void OnSuccessCallback_87(void * context, float floatSingle) { (static_cast(context))->OnSuccessResponse_87(floatSingle); } - - - static void OnFailureCallback_88(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_88(status); } - static void OnSuccessCallback_88(void * context, double floatDouble) + static void OnSuccessCallback_88(void * context, double floatDouble) { (static_cast(context))->OnSuccessResponse_88(floatDouble); } - - - static void OnFailureCallback_89(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_89(status); } - static void OnSuccessCallback_89(void * context) - { - (static_cast(context))->OnSuccessResponse_89(); - } - - - + static void OnSuccessCallback_89(void * context) { (static_cast(context))->OnSuccessResponse_89(); } static void OnFailureCallback_90(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_90(status); } - static void OnSuccessCallback_90(void * context, double floatDouble) + static void OnSuccessCallback_90(void * context, double floatDouble) { (static_cast(context))->OnSuccessResponse_90(floatDouble); } - - - static void OnFailureCallback_91(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_91(status); } - static void OnSuccessCallback_91(void * context) - { - (static_cast(context))->OnSuccessResponse_91(); - } - - - + static void OnSuccessCallback_91(void * context) { (static_cast(context))->OnSuccessResponse_91(); } static void OnFailureCallback_92(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_92(status); } - static void OnSuccessCallback_92(void * context, double floatDouble) + static void OnSuccessCallback_92(void * context, double floatDouble) { (static_cast(context))->OnSuccessResponse_92(floatDouble); } - - - static void OnFailureCallback_93(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_93(status); } - static void OnSuccessCallback_93(void * context) - { - (static_cast(context))->OnSuccessResponse_93(); - } - - - + static void OnSuccessCallback_93(void * context) { (static_cast(context))->OnSuccessResponse_93(); } static void OnFailureCallback_94(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_94(status); } - static void OnSuccessCallback_94(void * context, double floatDouble) + static void OnSuccessCallback_94(void * context, double floatDouble) { (static_cast(context))->OnSuccessResponse_94(floatDouble); } - - - static void OnFailureCallback_95(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_95(status); } - static void OnSuccessCallback_95(void * context) - { - (static_cast(context))->OnSuccessResponse_95(); - } - - - + static void OnSuccessCallback_95(void * context) { (static_cast(context))->OnSuccessResponse_95(); } static void OnFailureCallback_96(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_96(status); } - static void OnSuccessCallback_96(void * context, double floatDouble) + static void OnSuccessCallback_96(void * context, double floatDouble) { (static_cast(context))->OnSuccessResponse_96(floatDouble); } - - - static void OnFailureCallback_97(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_97(status); } - static void OnSuccessCallback_97(void * context, uint8_t enum8) + static void OnSuccessCallback_97(void * context, uint8_t enum8) { (static_cast(context))->OnSuccessResponse_97(enum8); } - - - static void OnFailureCallback_98(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_98(status); } - static void OnSuccessCallback_98(void * context) - { - (static_cast(context))->OnSuccessResponse_98(); - } - - - + static void OnSuccessCallback_98(void * context) { (static_cast(context))->OnSuccessResponse_98(); } static void OnFailureCallback_99(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_99(status); } - static void OnSuccessCallback_99(void * context, uint8_t enum8) + static void OnSuccessCallback_99(void * context, uint8_t enum8) { (static_cast(context))->OnSuccessResponse_99(enum8); } - - - static void OnFailureCallback_100(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_100(status); } - static void OnSuccessCallback_100(void * context) - { - (static_cast(context))->OnSuccessResponse_100(); - } - - - + static void OnSuccessCallback_100(void * context) { (static_cast(context))->OnSuccessResponse_100(); } static void OnFailureCallback_101(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_101(status); } - static void OnSuccessCallback_101(void * context, uint8_t enum8) + static void OnSuccessCallback_101(void * context, uint8_t enum8) { (static_cast(context))->OnSuccessResponse_101(enum8); } - - - static void OnFailureCallback_102(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_102(status); } - static void OnSuccessCallback_102(void * context, uint16_t enum16) + static void OnSuccessCallback_102(void * context, uint16_t enum16) { (static_cast(context))->OnSuccessResponse_102(enum16); } - - - static void OnFailureCallback_103(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_103(status); } - static void OnSuccessCallback_103(void * context) - { - (static_cast(context))->OnSuccessResponse_103(); - } - - - + static void OnSuccessCallback_103(void * context) { (static_cast(context))->OnSuccessResponse_103(); } static void OnFailureCallback_104(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_104(status); } - static void OnSuccessCallback_104(void * context, uint16_t enum16) + static void OnSuccessCallback_104(void * context, uint16_t enum16) { (static_cast(context))->OnSuccessResponse_104(enum16); } - - - static void OnFailureCallback_105(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_105(status); } - static void OnSuccessCallback_105(void * context) - { - (static_cast(context))->OnSuccessResponse_105(); - } - - - + static void OnSuccessCallback_105(void * context) { (static_cast(context))->OnSuccessResponse_105(); } static void OnFailureCallback_106(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_106(status); } - static void OnSuccessCallback_106(void * context, uint16_t enum16) + static void OnSuccessCallback_106(void * context, uint16_t enum16) { (static_cast(context))->OnSuccessResponse_106(enum16); } - - - static void OnFailureCallback_107(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_107(status); } - static void OnSuccessCallback_107(void * context, chip::ByteSpan octetString) + static void OnSuccessCallback_107(void * context, chip::ByteSpan octetString) { (static_cast(context))->OnSuccessResponse_107(octetString); } - - - static void OnFailureCallback_108(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_108(status); } - static void OnSuccessCallback_108(void * context) - { - (static_cast(context))->OnSuccessResponse_108(); - } - - - + static void OnSuccessCallback_108(void * context) { (static_cast(context))->OnSuccessResponse_108(); } static void OnFailureCallback_109(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_109(status); } - static void OnSuccessCallback_109(void * context, chip::ByteSpan octetString) + static void OnSuccessCallback_109(void * context, chip::ByteSpan octetString) { (static_cast(context))->OnSuccessResponse_109(octetString); } - - - static void OnFailureCallback_110(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_110(status); } - static void OnSuccessCallback_110(void * context) - { - (static_cast(context))->OnSuccessResponse_110(); - } - - - + static void OnSuccessCallback_110(void * context) { (static_cast(context))->OnSuccessResponse_110(); } static void OnFailureCallback_111(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_111(status); } - static void OnSuccessCallback_111(void * context, chip::ByteSpan octetString) + static void OnSuccessCallback_111(void * context, chip::ByteSpan octetString) { (static_cast(context))->OnSuccessResponse_111(octetString); } - - - static void OnFailureCallback_112(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_112(status); } - static void OnSuccessCallback_112(void * context) - { - (static_cast(context))->OnSuccessResponse_112(); - } - - - + static void OnSuccessCallback_112(void * context) { (static_cast(context))->OnSuccessResponse_112(); } static void OnFailureCallback_113(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_113(status); } - static void OnSuccessCallback_113(void * context, chip::ByteSpan octetString) + static void OnSuccessCallback_113(void * context, chip::ByteSpan octetString) { (static_cast(context))->OnSuccessResponse_113(octetString); } - - - static void OnFailureCallback_114(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_114(status); } - static void OnSuccessCallback_114(void * context) - { - (static_cast(context))->OnSuccessResponse_114(); - } - - - + static void OnSuccessCallback_114(void * context) { (static_cast(context))->OnSuccessResponse_114(); } static void OnFailureCallback_115(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_115(status); } - static void OnSuccessCallback_115(void * context, chip::ByteSpan octetString) + static void OnSuccessCallback_115(void * context, chip::ByteSpan octetString) { (static_cast(context))->OnSuccessResponse_115(octetString); } - - - static void OnFailureCallback_116(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_116(status); } - static void OnSuccessCallback_116(void * context) - { - (static_cast(context))->OnSuccessResponse_116(); - } - - - + static void OnSuccessCallback_116(void * context) { (static_cast(context))->OnSuccessResponse_116(); } static void OnFailureCallback_117(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_117(status); } - static void OnSuccessCallback_117(void * context, chip::ByteSpan longOctetString) + static void OnSuccessCallback_117(void * context, chip::ByteSpan longOctetString) { (static_cast(context))->OnSuccessResponse_117(longOctetString); } - - - static void OnFailureCallback_118(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_118(status); } - static void OnSuccessCallback_118(void * context) - { - (static_cast(context))->OnSuccessResponse_118(); - } - - - + static void OnSuccessCallback_118(void * context) { (static_cast(context))->OnSuccessResponse_118(); } static void OnFailureCallback_119(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_119(status); } - static void OnSuccessCallback_119(void * context, chip::ByteSpan longOctetString) + static void OnSuccessCallback_119(void * context, chip::ByteSpan longOctetString) { (static_cast(context))->OnSuccessResponse_119(longOctetString); } - - - static void OnFailureCallback_120(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_120(status); } - static void OnSuccessCallback_120(void * context) - { - (static_cast(context))->OnSuccessResponse_120(); - } - - - + static void OnSuccessCallback_120(void * context) { (static_cast(context))->OnSuccessResponse_120(); } static void OnFailureCallback_121(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_121(status); } - static void OnSuccessCallback_121(void * context, chip::CharSpan charString) + static void OnSuccessCallback_121(void * context, chip::CharSpan charString) { (static_cast(context))->OnSuccessResponse_121(charString); } - - - static void OnFailureCallback_122(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_122(status); } - static void OnSuccessCallback_122(void * context) - { - (static_cast(context))->OnSuccessResponse_122(); - } - - - + static void OnSuccessCallback_122(void * context) { (static_cast(context))->OnSuccessResponse_122(); } static void OnFailureCallback_123(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_123(status); } - static void OnSuccessCallback_123(void * context, chip::CharSpan charString) + static void OnSuccessCallback_123(void * context, chip::CharSpan charString) { (static_cast(context))->OnSuccessResponse_123(charString); } - - - static void OnFailureCallback_124(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_124(status); } - static void OnSuccessCallback_124(void * context) - { - (static_cast(context))->OnSuccessResponse_124(); - } - - - + static void OnSuccessCallback_124(void * context) { (static_cast(context))->OnSuccessResponse_124(); } static void OnFailureCallback_125(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_125(status); } - static void OnSuccessCallback_125(void * context, chip::CharSpan charString) + static void OnSuccessCallback_125(void * context, chip::CharSpan charString) { (static_cast(context))->OnSuccessResponse_125(charString); } - - - static void OnFailureCallback_126(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_126(status); } - static void OnSuccessCallback_126(void * context) - { - (static_cast(context))->OnSuccessResponse_126(); - } - - - + static void OnSuccessCallback_126(void * context) { (static_cast(context))->OnSuccessResponse_126(); } static void OnFailureCallback_127(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_127(status); } - static void OnSuccessCallback_127(void * context, chip::CharSpan longCharString) + static void OnSuccessCallback_127(void * context, chip::CharSpan longCharString) { (static_cast(context))->OnSuccessResponse_127(longCharString); } - - - static void OnFailureCallback_128(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_128(status); } - static void OnSuccessCallback_128(void * context) - { - (static_cast(context))->OnSuccessResponse_128(); - } - - - + static void OnSuccessCallback_128(void * context) { (static_cast(context))->OnSuccessResponse_128(); } static void OnFailureCallback_129(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_129(status); } - static void OnSuccessCallback_129(void * context, chip::CharSpan longCharString) + static void OnSuccessCallback_129(void * context, chip::CharSpan longCharString) { (static_cast(context))->OnSuccessResponse_129(longCharString); } - - - static void OnFailureCallback_130(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_130(status); } - static void OnSuccessCallback_130(void * context) - { - (static_cast(context))->OnSuccessResponse_130(); - } - - - + static void OnSuccessCallback_130(void * context) { (static_cast(context))->OnSuccessResponse_130(); } static void OnFailureCallback_131(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_131(status); } - static void OnSuccessCallback_131(void * context, const chip::app::DataModel::DecodableList & listLongOctetString) + static void OnSuccessCallback_131(void * context, + const chip::app::DataModel::DecodableList & listLongOctetString) { (static_cast(context))->OnSuccessResponse_131(listLongOctetString); } - - - static void OnFailureCallback_132(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_132(status); } - static void OnSuccessCallback_132(void * context, uint64_t epochUs) + static void OnSuccessCallback_132(void * context, uint64_t epochUs) { (static_cast(context))->OnSuccessResponse_132(epochUs); } - - - static void OnFailureCallback_133(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_133(status); - } - - static void OnSuccessCallback_133(void * context) - { - (static_cast(context))->OnSuccessResponse_133(); - } - - + } + static void OnSuccessCallback_133(void * context) { (static_cast(context))->OnSuccessResponse_133(); } static void OnFailureCallback_134(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_134(status); } - static void OnSuccessCallback_134(void * context, uint64_t epochUs) + static void OnSuccessCallback_134(void * context, uint64_t epochUs) { (static_cast(context))->OnSuccessResponse_134(epochUs); } - - - static void OnFailureCallback_135(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_135(status); } - static void OnSuccessCallback_135(void * context) - { - (static_cast(context))->OnSuccessResponse_135(); - } - - - + static void OnSuccessCallback_135(void * context) { (static_cast(context))->OnSuccessResponse_135(); } static void OnFailureCallback_136(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_136(status); } - static void OnSuccessCallback_136(void * context, uint64_t epochUs) + static void OnSuccessCallback_136(void * context, uint64_t epochUs) { (static_cast(context))->OnSuccessResponse_136(epochUs); } - - - static void OnFailureCallback_137(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_137(status); } - static void OnSuccessCallback_137(void * context, uint32_t epochS) + static void OnSuccessCallback_137(void * context, uint32_t epochS) { (static_cast(context))->OnSuccessResponse_137(epochS); } - - - static void OnFailureCallback_138(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_138(status); } - static void OnSuccessCallback_138(void * context) - { - (static_cast(context))->OnSuccessResponse_138(); - } - - - + static void OnSuccessCallback_138(void * context) { (static_cast(context))->OnSuccessResponse_138(); } static void OnFailureCallback_139(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_139(status); } - static void OnSuccessCallback_139(void * context, uint32_t epochS) + static void OnSuccessCallback_139(void * context, uint32_t epochS) { (static_cast(context))->OnSuccessResponse_139(epochS); } - - - static void OnFailureCallback_140(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_140(status); } - static void OnSuccessCallback_140(void * context) - { - (static_cast(context))->OnSuccessResponse_140(); - } - - - + static void OnSuccessCallback_140(void * context) { (static_cast(context))->OnSuccessResponse_140(); } static void OnFailureCallback_141(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_141(status); } - static void OnSuccessCallback_141(void * context, uint32_t epochS) + static void OnSuccessCallback_141(void * context, uint32_t epochS) { (static_cast(context))->OnSuccessResponse_141(epochS); } - - - static void OnFailureCallback_142(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_142(status); } - static void OnSuccessCallback_142(void * context, bool unsupported) + static void OnSuccessCallback_142(void * context, bool unsupported) { (static_cast(context))->OnSuccessResponse_142(unsupported); } - - - static void OnFailureCallback_143(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_143(status); } - static void OnSuccessCallback_143(void * context) - { - (static_cast(context))->OnSuccessResponse_143(); - } - - - + static void OnSuccessCallback_143(void * context) { (static_cast(context))->OnSuccessResponse_143(); } static void OnFailureCallback_146(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_146(status); } - static void OnSuccessCallback_146(void * context, chip::VendorId vendorId) + static void OnSuccessCallback_146(void * context, chip::VendorId vendorId) { (static_cast(context))->OnSuccessResponse_146(vendorId); } - - - static void OnFailureCallback_147(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_147(status); } - static void OnSuccessCallback_147(void * context) - { - (static_cast(context))->OnSuccessResponse_147(); - } - - - + static void OnSuccessCallback_147(void * context) { (static_cast(context))->OnSuccessResponse_147(); } static void OnFailureCallback_148(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_148(status); } - static void OnSuccessCallback_148(void * context, chip::VendorId vendorId) + static void OnSuccessCallback_148(void * context, chip::VendorId vendorId) { (static_cast(context))->OnSuccessResponse_148(vendorId); } - - - static void OnFailureCallback_149(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_149(status); } - static void OnSuccessCallback_149(void * context) - { - (static_cast(context))->OnSuccessResponse_149(); - } - - - + static void OnSuccessCallback_149(void * context) { (static_cast(context))->OnSuccessResponse_149(); } static void OnFailureCallback_166(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_166(status); } - static void OnSuccessCallback_166(void * context) - { - (static_cast(context))->OnSuccessResponse_166(); - } - - - + static void OnSuccessCallback_166(void * context) { (static_cast(context))->OnSuccessResponse_166(); } static void OnFailureCallback_167(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_167(status); } - static void OnSuccessCallback_167(void * context, const chip::app::DataModel::DecodableList & listInt8u) + static void OnSuccessCallback_167(void * context, const chip::app::DataModel::DecodableList & listInt8u) { (static_cast(context))->OnSuccessResponse_167(listInt8u); } - - - static void OnFailureCallback_168(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_168(status); } - static void OnSuccessCallback_168(void * context) - { - (static_cast(context))->OnSuccessResponse_168(); - } - - - + static void OnSuccessCallback_168(void * context) { (static_cast(context))->OnSuccessResponse_168(); } static void OnFailureCallback_169(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_169(status); } - static void OnSuccessCallback_169(void * context, const chip::app::DataModel::DecodableList & listOctetString) + static void OnSuccessCallback_169(void * context, const chip::app::DataModel::DecodableList & listOctetString) { (static_cast(context))->OnSuccessResponse_169(listOctetString); } - - - static void OnFailureCallback_170(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_170(status); } - static void OnSuccessCallback_170(void * context) - { - (static_cast(context))->OnSuccessResponse_170(); - } - - - + static void OnSuccessCallback_170(void * context) { (static_cast(context))->OnSuccessResponse_170(); } static void OnFailureCallback_171(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_171(status); } - static void OnSuccessCallback_171(void * context, const chip::app::DataModel::DecodableList & listStructOctetString) + static void OnSuccessCallback_171( + void * context, + const chip::app::DataModel::DecodableList & + listStructOctetString) { (static_cast(context))->OnSuccessResponse_171(listStructOctetString); } - - - static void OnFailureCallback_174(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_174(status); } - static void OnSuccessCallback_174(void * context, const chip::app::DataModel::DecodableList & listNullablesAndOptionalsStruct) + static void OnSuccessCallback_174(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::DecodableType> & + listNullablesAndOptionalsStruct) { (static_cast(context))->OnSuccessResponse_174(listNullablesAndOptionalsStruct); } - - - static void OnFailureCallback_175(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_175(status); } - static void OnSuccessCallback_175(void * context) - { - (static_cast(context))->OnSuccessResponse_175(); - } - - - + static void OnSuccessCallback_175(void * context) { (static_cast(context))->OnSuccessResponse_175(); } static void OnFailureCallback_176(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_176(status); } - static void OnSuccessCallback_176(void * context, const chip::app::DataModel::DecodableList & listNullablesAndOptionalsStruct) + static void OnSuccessCallback_176(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::DecodableType> & + listNullablesAndOptionalsStruct) { (static_cast(context))->OnSuccessResponse_176(listNullablesAndOptionalsStruct); } - - - static void OnFailureCallback_177(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_177(status); } - static void OnSuccessCallback_177(void * context) - { - (static_cast(context))->OnSuccessResponse_177(); - } - - - + static void OnSuccessCallback_177(void * context) { (static_cast(context))->OnSuccessResponse_177(); } static void OnFailureCallback_178(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_178(status); } - static void OnSuccessCallback_178(void * context, const chip::app::DataModel::Nullable & nullableBoolean) + static void OnSuccessCallback_178(void * context, const chip::app::DataModel::Nullable & nullableBoolean) { (static_cast(context))->OnSuccessResponse_178(nullableBoolean); } - - - static void OnFailureCallback_179(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_179(status); } - static void OnSuccessCallback_179(void * context) - { - (static_cast(context))->OnSuccessResponse_179(); - } - - - + static void OnSuccessCallback_179(void * context) { (static_cast(context))->OnSuccessResponse_179(); } static void OnFailureCallback_180(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_180(status); } - static void OnSuccessCallback_180(void * context, const chip::app::DataModel::Nullable & nullableBoolean) + static void OnSuccessCallback_180(void * context, const chip::app::DataModel::Nullable & nullableBoolean) { (static_cast(context))->OnSuccessResponse_180(nullableBoolean); } - - - static void OnFailureCallback_181(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_181(status); } - static void OnSuccessCallback_181(void * context) - { - (static_cast(context))->OnSuccessResponse_181(); - } - - - + static void OnSuccessCallback_181(void * context) { (static_cast(context))->OnSuccessResponse_181(); } static void OnFailureCallback_182(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_182(status); } - static void OnSuccessCallback_182(void * context, const chip::app::DataModel::Nullable & nullableBitmap8) + static void OnSuccessCallback_182(void * context, const chip::app::DataModel::Nullable & nullableBitmap8) { (static_cast(context))->OnSuccessResponse_182(nullableBitmap8); } - - - static void OnFailureCallback_183(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_183(status); } - static void OnSuccessCallback_183(void * context) - { - (static_cast(context))->OnSuccessResponse_183(); - } - - - + static void OnSuccessCallback_183(void * context) { (static_cast(context))->OnSuccessResponse_183(); } static void OnFailureCallback_184(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_184(status); } - static void OnSuccessCallback_184(void * context, const chip::app::DataModel::Nullable & nullableBitmap8) + static void OnSuccessCallback_184(void * context, const chip::app::DataModel::Nullable & nullableBitmap8) { (static_cast(context))->OnSuccessResponse_184(nullableBitmap8); } - - - static void OnFailureCallback_185(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_185(status); } - static void OnSuccessCallback_185(void * context) - { - (static_cast(context))->OnSuccessResponse_185(); - } - - - + static void OnSuccessCallback_185(void * context) { (static_cast(context))->OnSuccessResponse_185(); } static void OnFailureCallback_186(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_186(status); } - static void OnSuccessCallback_186(void * context, const chip::app::DataModel::Nullable & nullableBitmap8) + static void OnSuccessCallback_186(void * context, const chip::app::DataModel::Nullable & nullableBitmap8) { (static_cast(context))->OnSuccessResponse_186(nullableBitmap8); } - - - static void OnFailureCallback_187(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_187(status); } - static void OnSuccessCallback_187(void * context) - { - (static_cast(context))->OnSuccessResponse_187(); - } - - - + static void OnSuccessCallback_187(void * context) { (static_cast(context))->OnSuccessResponse_187(); } static void OnFailureCallback_188(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_188(status); } - static void OnSuccessCallback_188(void * context, const chip::app::DataModel::Nullable & nullableBitmap16) + static void OnSuccessCallback_188(void * context, const chip::app::DataModel::Nullable & nullableBitmap16) { (static_cast(context))->OnSuccessResponse_188(nullableBitmap16); } - - - static void OnFailureCallback_189(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_189(status); } - static void OnSuccessCallback_189(void * context) - { - (static_cast(context))->OnSuccessResponse_189(); - } - - - + static void OnSuccessCallback_189(void * context) { (static_cast(context))->OnSuccessResponse_189(); } static void OnFailureCallback_190(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_190(status); } - static void OnSuccessCallback_190(void * context, const chip::app::DataModel::Nullable & nullableBitmap16) + static void OnSuccessCallback_190(void * context, const chip::app::DataModel::Nullable & nullableBitmap16) { (static_cast(context))->OnSuccessResponse_190(nullableBitmap16); } - - - static void OnFailureCallback_191(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_191(status); } - static void OnSuccessCallback_191(void * context) - { - (static_cast(context))->OnSuccessResponse_191(); - } - - - + static void OnSuccessCallback_191(void * context) { (static_cast(context))->OnSuccessResponse_191(); } static void OnFailureCallback_192(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_192(status); } - static void OnSuccessCallback_192(void * context, const chip::app::DataModel::Nullable & nullableBitmap16) + static void OnSuccessCallback_192(void * context, const chip::app::DataModel::Nullable & nullableBitmap16) { (static_cast(context))->OnSuccessResponse_192(nullableBitmap16); } - - - static void OnFailureCallback_193(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_193(status); } - static void OnSuccessCallback_193(void * context) - { - (static_cast(context))->OnSuccessResponse_193(); - } - - - + static void OnSuccessCallback_193(void * context) { (static_cast(context))->OnSuccessResponse_193(); } static void OnFailureCallback_194(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_194(status); } - static void OnSuccessCallback_194(void * context, const chip::app::DataModel::Nullable & nullableBitmap32) + static void OnSuccessCallback_194(void * context, const chip::app::DataModel::Nullable & nullableBitmap32) { (static_cast(context))->OnSuccessResponse_194(nullableBitmap32); } - - - static void OnFailureCallback_195(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_195(status); } - static void OnSuccessCallback_195(void * context) - { - (static_cast(context))->OnSuccessResponse_195(); - } - - - + static void OnSuccessCallback_195(void * context) { (static_cast(context))->OnSuccessResponse_195(); } static void OnFailureCallback_196(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_196(status); } - static void OnSuccessCallback_196(void * context, const chip::app::DataModel::Nullable & nullableBitmap32) + static void OnSuccessCallback_196(void * context, const chip::app::DataModel::Nullable & nullableBitmap32) { (static_cast(context))->OnSuccessResponse_196(nullableBitmap32); } - - - static void OnFailureCallback_197(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_197(status); } - static void OnSuccessCallback_197(void * context) - { - (static_cast(context))->OnSuccessResponse_197(); - } - - - + static void OnSuccessCallback_197(void * context) { (static_cast(context))->OnSuccessResponse_197(); } static void OnFailureCallback_198(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_198(status); } - static void OnSuccessCallback_198(void * context, const chip::app::DataModel::Nullable & nullableBitmap32) + static void OnSuccessCallback_198(void * context, const chip::app::DataModel::Nullable & nullableBitmap32) { (static_cast(context))->OnSuccessResponse_198(nullableBitmap32); } - - - static void OnFailureCallback_199(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_199(status); } - static void OnSuccessCallback_199(void * context) - { - (static_cast(context))->OnSuccessResponse_199(); - } - - - + static void OnSuccessCallback_199(void * context) { (static_cast(context))->OnSuccessResponse_199(); } static void OnFailureCallback_200(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_200(status); } - static void OnSuccessCallback_200(void * context, const chip::app::DataModel::Nullable & nullableBitmap64) + static void OnSuccessCallback_200(void * context, const chip::app::DataModel::Nullable & nullableBitmap64) { (static_cast(context))->OnSuccessResponse_200(nullableBitmap64); } - - - static void OnFailureCallback_201(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_201(status); } - static void OnSuccessCallback_201(void * context) - { - (static_cast(context))->OnSuccessResponse_201(); - } - - - + static void OnSuccessCallback_201(void * context) { (static_cast(context))->OnSuccessResponse_201(); } static void OnFailureCallback_202(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_202(status); } - static void OnSuccessCallback_202(void * context, const chip::app::DataModel::Nullable & nullableBitmap64) + static void OnSuccessCallback_202(void * context, const chip::app::DataModel::Nullable & nullableBitmap64) { (static_cast(context))->OnSuccessResponse_202(nullableBitmap64); } - - - static void OnFailureCallback_203(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_203(status); } - static void OnSuccessCallback_203(void * context) - { - (static_cast(context))->OnSuccessResponse_203(); - } - - - + static void OnSuccessCallback_203(void * context) { (static_cast(context))->OnSuccessResponse_203(); } static void OnFailureCallback_204(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_204(status); } - static void OnSuccessCallback_204(void * context, const chip::app::DataModel::Nullable & nullableBitmap64) + static void OnSuccessCallback_204(void * context, const chip::app::DataModel::Nullable & nullableBitmap64) { (static_cast(context))->OnSuccessResponse_204(nullableBitmap64); } - - - static void OnFailureCallback_205(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_205(status); } - static void OnSuccessCallback_205(void * context) - { - (static_cast(context))->OnSuccessResponse_205(); - } - - - + static void OnSuccessCallback_205(void * context) { (static_cast(context))->OnSuccessResponse_205(); } static void OnFailureCallback_206(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_206(status); } - static void OnSuccessCallback_206(void * context, const chip::app::DataModel::Nullable & nullableInt8u) + static void OnSuccessCallback_206(void * context, const chip::app::DataModel::Nullable & nullableInt8u) { (static_cast(context))->OnSuccessResponse_206(nullableInt8u); } - - - static void OnFailureCallback_207(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_207(status); } - static void OnSuccessCallback_207(void * context) - { - (static_cast(context))->OnSuccessResponse_207(); - } - - - + static void OnSuccessCallback_207(void * context) { (static_cast(context))->OnSuccessResponse_207(); } static void OnFailureCallback_208(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_208(status); } - static void OnSuccessCallback_208(void * context, const chip::app::DataModel::Nullable & nullableInt8u) + static void OnSuccessCallback_208(void * context, const chip::app::DataModel::Nullable & nullableInt8u) { (static_cast(context))->OnSuccessResponse_208(nullableInt8u); } - - - static void OnFailureCallback_209(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_209(status); } - static void OnSuccessCallback_209(void * context) - { - (static_cast(context))->OnSuccessResponse_209(); - } - - - + static void OnSuccessCallback_209(void * context) { (static_cast(context))->OnSuccessResponse_209(); } static void OnFailureCallback_210(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_210(status); } - static void OnSuccessCallback_210(void * context, const chip::app::DataModel::Nullable & nullableInt8u) + static void OnSuccessCallback_210(void * context, const chip::app::DataModel::Nullable & nullableInt8u) { (static_cast(context))->OnSuccessResponse_210(nullableInt8u); } - - - static void OnFailureCallback_211(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_211(status); } - static void OnSuccessCallback_211(void * context, const chip::app::DataModel::Nullable & nullableInt8u) + static void OnSuccessCallback_211(void * context, const chip::app::DataModel::Nullable & nullableInt8u) { (static_cast(context))->OnSuccessResponse_211(nullableInt8u); } - - - static void OnFailureCallback_212(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_212(status); } - static void OnSuccessCallback_212(void * context) - { - (static_cast(context))->OnSuccessResponse_212(); - } - - - + static void OnSuccessCallback_212(void * context) { (static_cast(context))->OnSuccessResponse_212(); } static void OnFailureCallback_213(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_213(status); } - static void OnSuccessCallback_213(void * context, const chip::app::DataModel::Nullable & nullableInt8u) + static void OnSuccessCallback_213(void * context, const chip::app::DataModel::Nullable & nullableInt8u) { (static_cast(context))->OnSuccessResponse_213(nullableInt8u); } - - - static void OnFailureCallback_214(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_214(status); } - static void OnSuccessCallback_214(void * context, const chip::app::DataModel::Nullable & nullableInt8u) + static void OnSuccessCallback_214(void * context, const chip::app::DataModel::Nullable & nullableInt8u) { (static_cast(context))->OnSuccessResponse_214(nullableInt8u); } - - - static void OnFailureCallback_215(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_215(status); } - static void OnSuccessCallback_215(void * context, const chip::app::DataModel::Nullable & nullableInt8u) + static void OnSuccessCallback_215(void * context, const chip::app::DataModel::Nullable & nullableInt8u) { (static_cast(context))->OnSuccessResponse_215(nullableInt8u); } - - - static void OnFailureCallback_216(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_216(status); } - static void OnSuccessCallback_216(void * context) - { - (static_cast(context))->OnSuccessResponse_216(); - } - - - + static void OnSuccessCallback_216(void * context) { (static_cast(context))->OnSuccessResponse_216(); } static void OnFailureCallback_217(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_217(status); } - static void OnSuccessCallback_217(void * context, const chip::app::DataModel::Nullable & nullableInt8u) + static void OnSuccessCallback_217(void * context, const chip::app::DataModel::Nullable & nullableInt8u) { (static_cast(context))->OnSuccessResponse_217(nullableInt8u); } - - - static void OnFailureCallback_218(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_218(status); } - static void OnSuccessCallback_218(void * context, const chip::app::DataModel::Nullable & nullableInt8u) + static void OnSuccessCallback_218(void * context, const chip::app::DataModel::Nullable & nullableInt8u) { (static_cast(context))->OnSuccessResponse_218(nullableInt8u); } - - - static void OnFailureCallback_219(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_219(status); } - static void OnSuccessCallback_219(void * context) - { - (static_cast(context))->OnSuccessResponse_219(); - } - - - + static void OnSuccessCallback_219(void * context) { (static_cast(context))->OnSuccessResponse_219(); } static void OnFailureCallback_220(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_220(status); } - static void OnSuccessCallback_220(void * context, const chip::app::DataModel::Nullable & nullableInt16u) + static void OnSuccessCallback_220(void * context, const chip::app::DataModel::Nullable & nullableInt16u) { (static_cast(context))->OnSuccessResponse_220(nullableInt16u); } - - - static void OnFailureCallback_221(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_221(status); } - static void OnSuccessCallback_221(void * context) - { - (static_cast(context))->OnSuccessResponse_221(); - } - - - + static void OnSuccessCallback_221(void * context) { (static_cast(context))->OnSuccessResponse_221(); } static void OnFailureCallback_222(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_222(status); } - static void OnSuccessCallback_222(void * context, const chip::app::DataModel::Nullable & nullableInt16u) + static void OnSuccessCallback_222(void * context, const chip::app::DataModel::Nullable & nullableInt16u) { (static_cast(context))->OnSuccessResponse_222(nullableInt16u); } - - - static void OnFailureCallback_223(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_223(status); } - static void OnSuccessCallback_223(void * context) - { - (static_cast(context))->OnSuccessResponse_223(); - } - - - + static void OnSuccessCallback_223(void * context) { (static_cast(context))->OnSuccessResponse_223(); } static void OnFailureCallback_224(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_224(status); } - static void OnSuccessCallback_224(void * context, const chip::app::DataModel::Nullable & nullableInt16u) + static void OnSuccessCallback_224(void * context, const chip::app::DataModel::Nullable & nullableInt16u) { (static_cast(context))->OnSuccessResponse_224(nullableInt16u); } - - - static void OnFailureCallback_225(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_225(status); } - static void OnSuccessCallback_225(void * context) - { - (static_cast(context))->OnSuccessResponse_225(); - } - - - + static void OnSuccessCallback_225(void * context) { (static_cast(context))->OnSuccessResponse_225(); } static void OnFailureCallback_226(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_226(status); } - static void OnSuccessCallback_226(void * context, const chip::app::DataModel::Nullable & nullableInt16u) + static void OnSuccessCallback_226(void * context, const chip::app::DataModel::Nullable & nullableInt16u) { (static_cast(context))->OnSuccessResponse_226(nullableInt16u); } - - - static void OnFailureCallback_227(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_227(status); } - static void OnSuccessCallback_227(void * context, const chip::app::DataModel::Nullable & nullableInt16u) + static void OnSuccessCallback_227(void * context, const chip::app::DataModel::Nullable & nullableInt16u) { (static_cast(context))->OnSuccessResponse_227(nullableInt16u); } - - - static void OnFailureCallback_228(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_228(status); } - static void OnSuccessCallback_228(void * context, const chip::app::DataModel::Nullable & nullableInt16u) + static void OnSuccessCallback_228(void * context, const chip::app::DataModel::Nullable & nullableInt16u) { (static_cast(context))->OnSuccessResponse_228(nullableInt16u); } - - - static void OnFailureCallback_229(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_229(status); } - static void OnSuccessCallback_229(void * context) - { - (static_cast(context))->OnSuccessResponse_229(); - } - - - + static void OnSuccessCallback_229(void * context) { (static_cast(context))->OnSuccessResponse_229(); } static void OnFailureCallback_230(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_230(status); } - static void OnSuccessCallback_230(void * context, const chip::app::DataModel::Nullable & nullableInt16u) + static void OnSuccessCallback_230(void * context, const chip::app::DataModel::Nullable & nullableInt16u) { (static_cast(context))->OnSuccessResponse_230(nullableInt16u); } - - - static void OnFailureCallback_231(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_231(status); } - static void OnSuccessCallback_231(void * context, const chip::app::DataModel::Nullable & nullableInt16u) + static void OnSuccessCallback_231(void * context, const chip::app::DataModel::Nullable & nullableInt16u) { (static_cast(context))->OnSuccessResponse_231(nullableInt16u); } - - - static void OnFailureCallback_232(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_232(status); } - static void OnSuccessCallback_232(void * context) - { - (static_cast(context))->OnSuccessResponse_232(); - } - - - + static void OnSuccessCallback_232(void * context) { (static_cast(context))->OnSuccessResponse_232(); } static void OnFailureCallback_233(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_233(status); } - static void OnSuccessCallback_233(void * context, const chip::app::DataModel::Nullable & nullableInt32u) + static void OnSuccessCallback_233(void * context, const chip::app::DataModel::Nullable & nullableInt32u) { (static_cast(context))->OnSuccessResponse_233(nullableInt32u); } - - - static void OnFailureCallback_234(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_234(status); } - static void OnSuccessCallback_234(void * context) - { - (static_cast(context))->OnSuccessResponse_234(); - } - - - + static void OnSuccessCallback_234(void * context) { (static_cast(context))->OnSuccessResponse_234(); } static void OnFailureCallback_235(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_235(status); } - static void OnSuccessCallback_235(void * context, const chip::app::DataModel::Nullable & nullableInt32u) + static void OnSuccessCallback_235(void * context, const chip::app::DataModel::Nullable & nullableInt32u) { (static_cast(context))->OnSuccessResponse_235(nullableInt32u); } - - - static void OnFailureCallback_236(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_236(status); } - static void OnSuccessCallback_236(void * context) - { - (static_cast(context))->OnSuccessResponse_236(); - } - - - + static void OnSuccessCallback_236(void * context) { (static_cast(context))->OnSuccessResponse_236(); } static void OnFailureCallback_237(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_237(status); } - static void OnSuccessCallback_237(void * context, const chip::app::DataModel::Nullable & nullableInt32u) + static void OnSuccessCallback_237(void * context, const chip::app::DataModel::Nullable & nullableInt32u) { (static_cast(context))->OnSuccessResponse_237(nullableInt32u); } - - - static void OnFailureCallback_238(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_238(status); } - static void OnSuccessCallback_238(void * context) - { - (static_cast(context))->OnSuccessResponse_238(); - } - - - + static void OnSuccessCallback_238(void * context) { (static_cast(context))->OnSuccessResponse_238(); } static void OnFailureCallback_239(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_239(status); } - static void OnSuccessCallback_239(void * context, const chip::app::DataModel::Nullable & nullableInt32u) + static void OnSuccessCallback_239(void * context, const chip::app::DataModel::Nullable & nullableInt32u) { (static_cast(context))->OnSuccessResponse_239(nullableInt32u); } - - - static void OnFailureCallback_240(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_240(status); } - static void OnSuccessCallback_240(void * context, const chip::app::DataModel::Nullable & nullableInt32u) + static void OnSuccessCallback_240(void * context, const chip::app::DataModel::Nullable & nullableInt32u) { (static_cast(context))->OnSuccessResponse_240(nullableInt32u); } - - - static void OnFailureCallback_241(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_241(status); } - static void OnSuccessCallback_241(void * context, const chip::app::DataModel::Nullable & nullableInt32u) + static void OnSuccessCallback_241(void * context, const chip::app::DataModel::Nullable & nullableInt32u) { (static_cast(context))->OnSuccessResponse_241(nullableInt32u); } - - - static void OnFailureCallback_242(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_242(status); } - static void OnSuccessCallback_242(void * context) - { - (static_cast(context))->OnSuccessResponse_242(); - } - - - + static void OnSuccessCallback_242(void * context) { (static_cast(context))->OnSuccessResponse_242(); } static void OnFailureCallback_243(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_243(status); } - static void OnSuccessCallback_243(void * context, const chip::app::DataModel::Nullable & nullableInt32u) + static void OnSuccessCallback_243(void * context, const chip::app::DataModel::Nullable & nullableInt32u) { (static_cast(context))->OnSuccessResponse_243(nullableInt32u); } - - - static void OnFailureCallback_244(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_244(status); } - static void OnSuccessCallback_244(void * context, const chip::app::DataModel::Nullable & nullableInt32u) + static void OnSuccessCallback_244(void * context, const chip::app::DataModel::Nullable & nullableInt32u) { (static_cast(context))->OnSuccessResponse_244(nullableInt32u); } - - - static void OnFailureCallback_245(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_245(status); } - static void OnSuccessCallback_245(void * context) - { - (static_cast(context))->OnSuccessResponse_245(); - } - - - + static void OnSuccessCallback_245(void * context) { (static_cast(context))->OnSuccessResponse_245(); } static void OnFailureCallback_246(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_246(status); } - static void OnSuccessCallback_246(void * context, const chip::app::DataModel::Nullable & nullableInt64u) + static void OnSuccessCallback_246(void * context, const chip::app::DataModel::Nullable & nullableInt64u) { (static_cast(context))->OnSuccessResponse_246(nullableInt64u); } - - - static void OnFailureCallback_247(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_247(status); } - static void OnSuccessCallback_247(void * context) - { - (static_cast(context))->OnSuccessResponse_247(); - } - - - + static void OnSuccessCallback_247(void * context) { (static_cast(context))->OnSuccessResponse_247(); } static void OnFailureCallback_248(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_248(status); } - static void OnSuccessCallback_248(void * context, const chip::app::DataModel::Nullable & nullableInt64u) + static void OnSuccessCallback_248(void * context, const chip::app::DataModel::Nullable & nullableInt64u) { (static_cast(context))->OnSuccessResponse_248(nullableInt64u); } - - - static void OnFailureCallback_249(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_249(status); } - static void OnSuccessCallback_249(void * context) - { - (static_cast(context))->OnSuccessResponse_249(); - } - - - + static void OnSuccessCallback_249(void * context) { (static_cast(context))->OnSuccessResponse_249(); } static void OnFailureCallback_250(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_250(status); } - static void OnSuccessCallback_250(void * context, const chip::app::DataModel::Nullable & nullableInt64u) + static void OnSuccessCallback_250(void * context, const chip::app::DataModel::Nullable & nullableInt64u) { (static_cast(context))->OnSuccessResponse_250(nullableInt64u); } - - - static void OnFailureCallback_251(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_251(status); } - static void OnSuccessCallback_251(void * context) - { - (static_cast(context))->OnSuccessResponse_251(); - } - - - + static void OnSuccessCallback_251(void * context) { (static_cast(context))->OnSuccessResponse_251(); } static void OnFailureCallback_252(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_252(status); } - static void OnSuccessCallback_252(void * context, const chip::app::DataModel::Nullable & nullableInt64u) + static void OnSuccessCallback_252(void * context, const chip::app::DataModel::Nullable & nullableInt64u) { (static_cast(context))->OnSuccessResponse_252(nullableInt64u); } - - - static void OnFailureCallback_253(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_253(status); } - static void OnSuccessCallback_253(void * context, const chip::app::DataModel::Nullable & nullableInt64u) + static void OnSuccessCallback_253(void * context, const chip::app::DataModel::Nullable & nullableInt64u) { (static_cast(context))->OnSuccessResponse_253(nullableInt64u); } - - - static void OnFailureCallback_254(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_254(status); } - static void OnSuccessCallback_254(void * context, const chip::app::DataModel::Nullable & nullableInt64u) + static void OnSuccessCallback_254(void * context, const chip::app::DataModel::Nullable & nullableInt64u) { (static_cast(context))->OnSuccessResponse_254(nullableInt64u); } - - - static void OnFailureCallback_255(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_255(status); } - static void OnSuccessCallback_255(void * context) - { - (static_cast(context))->OnSuccessResponse_255(); - } - - - + static void OnSuccessCallback_255(void * context) { (static_cast(context))->OnSuccessResponse_255(); } static void OnFailureCallback_256(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_256(status); } - static void OnSuccessCallback_256(void * context, const chip::app::DataModel::Nullable & nullableInt64u) + static void OnSuccessCallback_256(void * context, const chip::app::DataModel::Nullable & nullableInt64u) { (static_cast(context))->OnSuccessResponse_256(nullableInt64u); } - - - static void OnFailureCallback_257(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_257(status); } - static void OnSuccessCallback_257(void * context, const chip::app::DataModel::Nullable & nullableInt64u) + static void OnSuccessCallback_257(void * context, const chip::app::DataModel::Nullable & nullableInt64u) { (static_cast(context))->OnSuccessResponse_257(nullableInt64u); } - - - static void OnFailureCallback_258(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_258(status); } - static void OnSuccessCallback_258(void * context) - { - (static_cast(context))->OnSuccessResponse_258(); - } - - - + static void OnSuccessCallback_258(void * context) { (static_cast(context))->OnSuccessResponse_258(); } static void OnFailureCallback_259(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_259(status); } - static void OnSuccessCallback_259(void * context, const chip::app::DataModel::Nullable & nullableInt8s) + static void OnSuccessCallback_259(void * context, const chip::app::DataModel::Nullable & nullableInt8s) { (static_cast(context))->OnSuccessResponse_259(nullableInt8s); } - - - static void OnFailureCallback_260(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_260(status); } - static void OnSuccessCallback_260(void * context) - { - (static_cast(context))->OnSuccessResponse_260(); - } - - - + static void OnSuccessCallback_260(void * context) { (static_cast(context))->OnSuccessResponse_260(); } static void OnFailureCallback_261(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_261(status); } - static void OnSuccessCallback_261(void * context, const chip::app::DataModel::Nullable & nullableInt8s) + static void OnSuccessCallback_261(void * context, const chip::app::DataModel::Nullable & nullableInt8s) { (static_cast(context))->OnSuccessResponse_261(nullableInt8s); } - - - static void OnFailureCallback_262(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_262(status); } - static void OnSuccessCallback_262(void * context) - { - (static_cast(context))->OnSuccessResponse_262(); - } - - - + static void OnSuccessCallback_262(void * context) { (static_cast(context))->OnSuccessResponse_262(); } static void OnFailureCallback_263(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_263(status); } - static void OnSuccessCallback_263(void * context, const chip::app::DataModel::Nullable & nullableInt8s) + static void OnSuccessCallback_263(void * context, const chip::app::DataModel::Nullable & nullableInt8s) { (static_cast(context))->OnSuccessResponse_263(nullableInt8s); } - - - static void OnFailureCallback_264(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_264(status); } - static void OnSuccessCallback_264(void * context, const chip::app::DataModel::Nullable & nullableInt8s) + static void OnSuccessCallback_264(void * context, const chip::app::DataModel::Nullable & nullableInt8s) { (static_cast(context))->OnSuccessResponse_264(nullableInt8s); } - - - static void OnFailureCallback_265(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_265(status); } - static void OnSuccessCallback_265(void * context, const chip::app::DataModel::Nullable & nullableInt8s) + static void OnSuccessCallback_265(void * context, const chip::app::DataModel::Nullable & nullableInt8s) { (static_cast(context))->OnSuccessResponse_265(nullableInt8s); } - - - static void OnFailureCallback_266(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_266(status); } - static void OnSuccessCallback_266(void * context) - { - (static_cast(context))->OnSuccessResponse_266(); - } - - - + static void OnSuccessCallback_266(void * context) { (static_cast(context))->OnSuccessResponse_266(); } static void OnFailureCallback_267(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_267(status); } - static void OnSuccessCallback_267(void * context, const chip::app::DataModel::Nullable & nullableInt8s) + static void OnSuccessCallback_267(void * context, const chip::app::DataModel::Nullable & nullableInt8s) { (static_cast(context))->OnSuccessResponse_267(nullableInt8s); } - - - static void OnFailureCallback_268(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_268(status); } - static void OnSuccessCallback_268(void * context, const chip::app::DataModel::Nullable & nullableInt8s) + static void OnSuccessCallback_268(void * context, const chip::app::DataModel::Nullable & nullableInt8s) { (static_cast(context))->OnSuccessResponse_268(nullableInt8s); } - - - static void OnFailureCallback_269(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_269(status); } - static void OnSuccessCallback_269(void * context) - { - (static_cast(context))->OnSuccessResponse_269(); - } - - - + static void OnSuccessCallback_269(void * context) { (static_cast(context))->OnSuccessResponse_269(); } static void OnFailureCallback_270(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_270(status); } - static void OnSuccessCallback_270(void * context, const chip::app::DataModel::Nullable & nullableInt16s) + static void OnSuccessCallback_270(void * context, const chip::app::DataModel::Nullable & nullableInt16s) { (static_cast(context))->OnSuccessResponse_270(nullableInt16s); } - - - static void OnFailureCallback_271(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_271(status); } - static void OnSuccessCallback_271(void * context) - { - (static_cast(context))->OnSuccessResponse_271(); - } - - - + static void OnSuccessCallback_271(void * context) { (static_cast(context))->OnSuccessResponse_271(); } static void OnFailureCallback_272(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_272(status); } - static void OnSuccessCallback_272(void * context, const chip::app::DataModel::Nullable & nullableInt16s) + static void OnSuccessCallback_272(void * context, const chip::app::DataModel::Nullable & nullableInt16s) { (static_cast(context))->OnSuccessResponse_272(nullableInt16s); } - - - static void OnFailureCallback_273(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_273(status); } - static void OnSuccessCallback_273(void * context) - { - (static_cast(context))->OnSuccessResponse_273(); - } - - - + static void OnSuccessCallback_273(void * context) { (static_cast(context))->OnSuccessResponse_273(); } static void OnFailureCallback_274(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_274(status); } - static void OnSuccessCallback_274(void * context, const chip::app::DataModel::Nullable & nullableInt16s) + static void OnSuccessCallback_274(void * context, const chip::app::DataModel::Nullable & nullableInt16s) { (static_cast(context))->OnSuccessResponse_274(nullableInt16s); } - - - static void OnFailureCallback_275(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_275(status); } - static void OnSuccessCallback_275(void * context, const chip::app::DataModel::Nullable & nullableInt16s) + static void OnSuccessCallback_275(void * context, const chip::app::DataModel::Nullable & nullableInt16s) { (static_cast(context))->OnSuccessResponse_275(nullableInt16s); } - - - static void OnFailureCallback_276(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_276(status); } - static void OnSuccessCallback_276(void * context, const chip::app::DataModel::Nullable & nullableInt16s) + static void OnSuccessCallback_276(void * context, const chip::app::DataModel::Nullable & nullableInt16s) { (static_cast(context))->OnSuccessResponse_276(nullableInt16s); } - - - static void OnFailureCallback_277(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_277(status); } - static void OnSuccessCallback_277(void * context) - { - (static_cast(context))->OnSuccessResponse_277(); - } - - - + static void OnSuccessCallback_277(void * context) { (static_cast(context))->OnSuccessResponse_277(); } static void OnFailureCallback_278(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_278(status); } - static void OnSuccessCallback_278(void * context, const chip::app::DataModel::Nullable & nullableInt16s) + static void OnSuccessCallback_278(void * context, const chip::app::DataModel::Nullable & nullableInt16s) { (static_cast(context))->OnSuccessResponse_278(nullableInt16s); } - - - static void OnFailureCallback_279(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_279(status); } - static void OnSuccessCallback_279(void * context, const chip::app::DataModel::Nullable & nullableInt16s) + static void OnSuccessCallback_279(void * context, const chip::app::DataModel::Nullable & nullableInt16s) { (static_cast(context))->OnSuccessResponse_279(nullableInt16s); } - - - static void OnFailureCallback_280(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_280(status); } - static void OnSuccessCallback_280(void * context) - { - (static_cast(context))->OnSuccessResponse_280(); - } - - - + static void OnSuccessCallback_280(void * context) { (static_cast(context))->OnSuccessResponse_280(); } static void OnFailureCallback_281(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_281(status); } - static void OnSuccessCallback_281(void * context, const chip::app::DataModel::Nullable & nullableInt32s) + static void OnSuccessCallback_281(void * context, const chip::app::DataModel::Nullable & nullableInt32s) { (static_cast(context))->OnSuccessResponse_281(nullableInt32s); } - - - static void OnFailureCallback_282(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_282(status); } - static void OnSuccessCallback_282(void * context) - { - (static_cast(context))->OnSuccessResponse_282(); - } - - - + static void OnSuccessCallback_282(void * context) { (static_cast(context))->OnSuccessResponse_282(); } static void OnFailureCallback_283(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_283(status); } - static void OnSuccessCallback_283(void * context, const chip::app::DataModel::Nullable & nullableInt32s) + static void OnSuccessCallback_283(void * context, const chip::app::DataModel::Nullable & nullableInt32s) { (static_cast(context))->OnSuccessResponse_283(nullableInt32s); } - - - static void OnFailureCallback_284(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_284(status); } - static void OnSuccessCallback_284(void * context) - { - (static_cast(context))->OnSuccessResponse_284(); - } - - - + static void OnSuccessCallback_284(void * context) { (static_cast(context))->OnSuccessResponse_284(); } static void OnFailureCallback_285(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_285(status); } - static void OnSuccessCallback_285(void * context, const chip::app::DataModel::Nullable & nullableInt32s) + static void OnSuccessCallback_285(void * context, const chip::app::DataModel::Nullable & nullableInt32s) { (static_cast(context))->OnSuccessResponse_285(nullableInt32s); } - - - static void OnFailureCallback_286(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_286(status); } - static void OnSuccessCallback_286(void * context, const chip::app::DataModel::Nullable & nullableInt32s) + static void OnSuccessCallback_286(void * context, const chip::app::DataModel::Nullable & nullableInt32s) { - (static_cast(context))->OnSuccessResponse_286(nullableInt32s); - } - - - + (static_cast(context))->OnSuccessResponse_286(nullableInt32s); + } static void OnFailureCallback_287(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_287(status); } - static void OnSuccessCallback_287(void * context, const chip::app::DataModel::Nullable & nullableInt32s) + static void OnSuccessCallback_287(void * context, const chip::app::DataModel::Nullable & nullableInt32s) { (static_cast(context))->OnSuccessResponse_287(nullableInt32s); } - - - static void OnFailureCallback_288(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_288(status); } - static void OnSuccessCallback_288(void * context) - { - (static_cast(context))->OnSuccessResponse_288(); - } - - - + static void OnSuccessCallback_288(void * context) { (static_cast(context))->OnSuccessResponse_288(); } static void OnFailureCallback_289(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_289(status); } - static void OnSuccessCallback_289(void * context, const chip::app::DataModel::Nullable & nullableInt32s) + static void OnSuccessCallback_289(void * context, const chip::app::DataModel::Nullable & nullableInt32s) { (static_cast(context))->OnSuccessResponse_289(nullableInt32s); } - - - static void OnFailureCallback_290(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_290(status); } - static void OnSuccessCallback_290(void * context, const chip::app::DataModel::Nullable & nullableInt32s) + static void OnSuccessCallback_290(void * context, const chip::app::DataModel::Nullable & nullableInt32s) { (static_cast(context))->OnSuccessResponse_290(nullableInt32s); } - - - static void OnFailureCallback_291(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_291(status); } - static void OnSuccessCallback_291(void * context) - { - (static_cast(context))->OnSuccessResponse_291(); - } - - - + static void OnSuccessCallback_291(void * context) { (static_cast(context))->OnSuccessResponse_291(); } static void OnFailureCallback_292(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_292(status); } - static void OnSuccessCallback_292(void * context, const chip::app::DataModel::Nullable & nullableInt64s) + static void OnSuccessCallback_292(void * context, const chip::app::DataModel::Nullable & nullableInt64s) { (static_cast(context))->OnSuccessResponse_292(nullableInt64s); } - - - static void OnFailureCallback_293(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_293(status); } - static void OnSuccessCallback_293(void * context) - { - (static_cast(context))->OnSuccessResponse_293(); - } - - - + static void OnSuccessCallback_293(void * context) { (static_cast(context))->OnSuccessResponse_293(); } static void OnFailureCallback_294(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_294(status); } - static void OnSuccessCallback_294(void * context, const chip::app::DataModel::Nullable & nullableInt64s) + static void OnSuccessCallback_294(void * context, const chip::app::DataModel::Nullable & nullableInt64s) { (static_cast(context))->OnSuccessResponse_294(nullableInt64s); } - - - static void OnFailureCallback_295(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_295(status); } - static void OnSuccessCallback_295(void * context) - { - (static_cast(context))->OnSuccessResponse_295(); - } - - - + static void OnSuccessCallback_295(void * context) { (static_cast(context))->OnSuccessResponse_295(); } static void OnFailureCallback_296(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_296(status); } - static void OnSuccessCallback_296(void * context, const chip::app::DataModel::Nullable & nullableInt64s) + static void OnSuccessCallback_296(void * context, const chip::app::DataModel::Nullable & nullableInt64s) { (static_cast(context))->OnSuccessResponse_296(nullableInt64s); } - - - static void OnFailureCallback_297(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_297(status); } - static void OnSuccessCallback_297(void * context, const chip::app::DataModel::Nullable & nullableInt64s) + static void OnSuccessCallback_297(void * context, const chip::app::DataModel::Nullable & nullableInt64s) { (static_cast(context))->OnSuccessResponse_297(nullableInt64s); } - - - static void OnFailureCallback_298(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_298(status); } - static void OnSuccessCallback_298(void * context, const chip::app::DataModel::Nullable & nullableInt64s) + static void OnSuccessCallback_298(void * context, const chip::app::DataModel::Nullable & nullableInt64s) { (static_cast(context))->OnSuccessResponse_298(nullableInt64s); } - - - static void OnFailureCallback_299(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_299(status); } - static void OnSuccessCallback_299(void * context) - { - (static_cast(context))->OnSuccessResponse_299(); - } - - - + static void OnSuccessCallback_299(void * context) { (static_cast(context))->OnSuccessResponse_299(); } static void OnFailureCallback_300(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_300(status); } - static void OnSuccessCallback_300(void * context, const chip::app::DataModel::Nullable & nullableInt64s) + static void OnSuccessCallback_300(void * context, const chip::app::DataModel::Nullable & nullableInt64s) { (static_cast(context))->OnSuccessResponse_300(nullableInt64s); } - - - static void OnFailureCallback_301(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_301(status); } - static void OnSuccessCallback_301(void * context, const chip::app::DataModel::Nullable & nullableInt64s) + static void OnSuccessCallback_301(void * context, const chip::app::DataModel::Nullable & nullableInt64s) { (static_cast(context))->OnSuccessResponse_301(nullableInt64s); } - - - static void OnFailureCallback_302(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_302(status); } - static void OnSuccessCallback_302(void * context) - { - (static_cast(context))->OnSuccessResponse_302(); - } - - - + static void OnSuccessCallback_302(void * context) { (static_cast(context))->OnSuccessResponse_302(); } static void OnFailureCallback_303(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_303(status); } - static void OnSuccessCallback_303(void * context, const chip::app::DataModel::Nullable & nullableFloatSingle) + static void OnSuccessCallback_303(void * context, const chip::app::DataModel::Nullable & nullableFloatSingle) { (static_cast(context))->OnSuccessResponse_303(nullableFloatSingle); } - - - static void OnFailureCallback_304(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_304(status); } - static void OnSuccessCallback_304(void * context) - { - (static_cast(context))->OnSuccessResponse_304(); - } - - - + static void OnSuccessCallback_304(void * context) { (static_cast(context))->OnSuccessResponse_304(); } static void OnFailureCallback_305(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_305(status); } - static void OnSuccessCallback_305(void * context, const chip::app::DataModel::Nullable & nullableFloatSingle) + static void OnSuccessCallback_305(void * context, const chip::app::DataModel::Nullable & nullableFloatSingle) { (static_cast(context))->OnSuccessResponse_305(nullableFloatSingle); } - - - static void OnFailureCallback_306(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_306(status); } - static void OnSuccessCallback_306(void * context) - { - (static_cast(context))->OnSuccessResponse_306(); - } - - - + static void OnSuccessCallback_306(void * context) { (static_cast(context))->OnSuccessResponse_306(); } static void OnFailureCallback_307(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_307(status); } - static void OnSuccessCallback_307(void * context, const chip::app::DataModel::Nullable & nullableFloatSingle) + static void OnSuccessCallback_307(void * context, const chip::app::DataModel::Nullable & nullableFloatSingle) { (static_cast(context))->OnSuccessResponse_307(nullableFloatSingle); } - - - static void OnFailureCallback_308(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_308(status); } - static void OnSuccessCallback_308(void * context) - { - (static_cast(context))->OnSuccessResponse_308(); - } - - - + static void OnSuccessCallback_308(void * context) { (static_cast(context))->OnSuccessResponse_308(); } static void OnFailureCallback_309(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_309(status); } - static void OnSuccessCallback_309(void * context, const chip::app::DataModel::Nullable & nullableFloatSingle) + static void OnSuccessCallback_309(void * context, const chip::app::DataModel::Nullable & nullableFloatSingle) { (static_cast(context))->OnSuccessResponse_309(nullableFloatSingle); } - - - static void OnFailureCallback_310(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_310(status); } - static void OnSuccessCallback_310(void * context) - { - (static_cast(context))->OnSuccessResponse_310(); - } - - - + static void OnSuccessCallback_310(void * context) { (static_cast(context))->OnSuccessResponse_310(); } static void OnFailureCallback_311(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_311(status); } - static void OnSuccessCallback_311(void * context, const chip::app::DataModel::Nullable & nullableFloatSingle) + static void OnSuccessCallback_311(void * context, const chip::app::DataModel::Nullable & nullableFloatSingle) { (static_cast(context))->OnSuccessResponse_311(nullableFloatSingle); } - - - static void OnFailureCallback_312(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_312(status); } - static void OnSuccessCallback_312(void * context) - { - (static_cast(context))->OnSuccessResponse_312(); - } - - - + static void OnSuccessCallback_312(void * context) { (static_cast(context))->OnSuccessResponse_312(); } static void OnFailureCallback_313(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_313(status); } - static void OnSuccessCallback_313(void * context, const chip::app::DataModel::Nullable & nullableFloatDouble) + static void OnSuccessCallback_313(void * context, const chip::app::DataModel::Nullable & nullableFloatDouble) { (static_cast(context))->OnSuccessResponse_313(nullableFloatDouble); } - - - static void OnFailureCallback_314(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_314(status); } - static void OnSuccessCallback_314(void * context) - { - (static_cast(context))->OnSuccessResponse_314(); - } - - - + static void OnSuccessCallback_314(void * context) { (static_cast(context))->OnSuccessResponse_314(); } static void OnFailureCallback_315(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_315(status); } - static void OnSuccessCallback_315(void * context, const chip::app::DataModel::Nullable & nullableFloatDouble) + static void OnSuccessCallback_315(void * context, const chip::app::DataModel::Nullable & nullableFloatDouble) { (static_cast(context))->OnSuccessResponse_315(nullableFloatDouble); } - - - static void OnFailureCallback_316(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_316(status); } - static void OnSuccessCallback_316(void * context) - { - (static_cast(context))->OnSuccessResponse_316(); - } - - - + static void OnSuccessCallback_316(void * context) { (static_cast(context))->OnSuccessResponse_316(); } static void OnFailureCallback_317(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_317(status); } - static void OnSuccessCallback_317(void * context, const chip::app::DataModel::Nullable & nullableFloatDouble) + static void OnSuccessCallback_317(void * context, const chip::app::DataModel::Nullable & nullableFloatDouble) { (static_cast(context))->OnSuccessResponse_317(nullableFloatDouble); } - - - static void OnFailureCallback_318(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_318(status); } - static void OnSuccessCallback_318(void * context) - { - (static_cast(context))->OnSuccessResponse_318(); - } - - - + static void OnSuccessCallback_318(void * context) { (static_cast(context))->OnSuccessResponse_318(); } static void OnFailureCallback_319(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_319(status); } - static void OnSuccessCallback_319(void * context, const chip::app::DataModel::Nullable & nullableFloatDouble) + static void OnSuccessCallback_319(void * context, const chip::app::DataModel::Nullable & nullableFloatDouble) { (static_cast(context))->OnSuccessResponse_319(nullableFloatDouble); } - - - static void OnFailureCallback_320(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_320(status); } - static void OnSuccessCallback_320(void * context) - { - (static_cast(context))->OnSuccessResponse_320(); - } - - - + static void OnSuccessCallback_320(void * context) { (static_cast(context))->OnSuccessResponse_320(); } static void OnFailureCallback_321(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_321(status); } - static void OnSuccessCallback_321(void * context, const chip::app::DataModel::Nullable & nullableFloatDouble) + static void OnSuccessCallback_321(void * context, const chip::app::DataModel::Nullable & nullableFloatDouble) { (static_cast(context))->OnSuccessResponse_321(nullableFloatDouble); } - - - static void OnFailureCallback_322(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_322(status); } - static void OnSuccessCallback_322(void * context) - { - (static_cast(context))->OnSuccessResponse_322(); - } - - - + static void OnSuccessCallback_322(void * context) { (static_cast(context))->OnSuccessResponse_322(); } static void OnFailureCallback_323(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_323(status); } - static void OnSuccessCallback_323(void * context, const chip::app::DataModel::Nullable & nullableEnum8) + static void OnSuccessCallback_323(void * context, const chip::app::DataModel::Nullable & nullableEnum8) { (static_cast(context))->OnSuccessResponse_323(nullableEnum8); } - - - static void OnFailureCallback_324(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_324(status); } - static void OnSuccessCallback_324(void * context) - { - (static_cast(context))->OnSuccessResponse_324(); - } - - - + static void OnSuccessCallback_324(void * context) { (static_cast(context))->OnSuccessResponse_324(); } static void OnFailureCallback_325(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_325(status); } - static void OnSuccessCallback_325(void * context, const chip::app::DataModel::Nullable & nullableEnum8) + static void OnSuccessCallback_325(void * context, const chip::app::DataModel::Nullable & nullableEnum8) { (static_cast(context))->OnSuccessResponse_325(nullableEnum8); } - - - static void OnFailureCallback_326(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_326(status); } - static void OnSuccessCallback_326(void * context) - { - (static_cast(context))->OnSuccessResponse_326(); - } - - - + static void OnSuccessCallback_326(void * context) { (static_cast(context))->OnSuccessResponse_326(); } static void OnFailureCallback_327(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_327(status); } - static void OnSuccessCallback_327(void * context, const chip::app::DataModel::Nullable & nullableEnum8) + static void OnSuccessCallback_327(void * context, const chip::app::DataModel::Nullable & nullableEnum8) { (static_cast(context))->OnSuccessResponse_327(nullableEnum8); } - - - static void OnFailureCallback_328(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_328(status); } - static void OnSuccessCallback_328(void * context) - { - (static_cast(context))->OnSuccessResponse_328(); - } - - - + static void OnSuccessCallback_328(void * context) { (static_cast(context))->OnSuccessResponse_328(); } static void OnFailureCallback_329(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_329(status); } - static void OnSuccessCallback_329(void * context, const chip::app::DataModel::Nullable & nullableEnum8) + static void OnSuccessCallback_329(void * context, const chip::app::DataModel::Nullable & nullableEnum8) { (static_cast(context))->OnSuccessResponse_329(nullableEnum8); } - - - static void OnFailureCallback_330(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_330(status); } - static void OnSuccessCallback_330(void * context) - { - (static_cast(context))->OnSuccessResponse_330(); - } - - - + static void OnSuccessCallback_330(void * context) { (static_cast(context))->OnSuccessResponse_330(); } static void OnFailureCallback_331(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_331(status); } - static void OnSuccessCallback_331(void * context, const chip::app::DataModel::Nullable & nullableEnum16) + static void OnSuccessCallback_331(void * context, const chip::app::DataModel::Nullable & nullableEnum16) { (static_cast(context))->OnSuccessResponse_331(nullableEnum16); } - - - static void OnFailureCallback_332(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_332(status); } - static void OnSuccessCallback_332(void * context) - { - (static_cast(context))->OnSuccessResponse_332(); - } - - - + static void OnSuccessCallback_332(void * context) { (static_cast(context))->OnSuccessResponse_332(); } static void OnFailureCallback_333(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_333(status); } - static void OnSuccessCallback_333(void * context, const chip::app::DataModel::Nullable & nullableEnum16) + static void OnSuccessCallback_333(void * context, const chip::app::DataModel::Nullable & nullableEnum16) { (static_cast(context))->OnSuccessResponse_333(nullableEnum16); } - - - static void OnFailureCallback_334(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_334(status); } - static void OnSuccessCallback_334(void * context) - { - (static_cast(context))->OnSuccessResponse_334(); - } - - - + static void OnSuccessCallback_334(void * context) { (static_cast(context))->OnSuccessResponse_334(); } static void OnFailureCallback_335(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_335(status); } - static void OnSuccessCallback_335(void * context, const chip::app::DataModel::Nullable & nullableEnum16) + static void OnSuccessCallback_335(void * context, const chip::app::DataModel::Nullable & nullableEnum16) { (static_cast(context))->OnSuccessResponse_335(nullableEnum16); } - - - static void OnFailureCallback_336(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_336(status); } - static void OnSuccessCallback_336(void * context) - { - (static_cast(context))->OnSuccessResponse_336(); - } - - - + static void OnSuccessCallback_336(void * context) { (static_cast(context))->OnSuccessResponse_336(); } static void OnFailureCallback_337(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_337(status); } - static void OnSuccessCallback_337(void * context, const chip::app::DataModel::Nullable & nullableEnum16) + static void OnSuccessCallback_337(void * context, const chip::app::DataModel::Nullable & nullableEnum16) { (static_cast(context))->OnSuccessResponse_337(nullableEnum16); } - - - static void OnFailureCallback_338(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_338(status); } - static void OnSuccessCallback_338(void * context) - { - (static_cast(context))->OnSuccessResponse_338(); - } - - - + static void OnSuccessCallback_338(void * context) { (static_cast(context))->OnSuccessResponse_338(); } static void OnFailureCallback_339(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_339(status); } - static void OnSuccessCallback_339(void * context, const chip::app::DataModel::Nullable & nullableEnumAttr) + static void + OnSuccessCallback_339(void * context, + const chip::app::DataModel::Nullable & nullableEnumAttr) { (static_cast(context))->OnSuccessResponse_339(nullableEnumAttr); } - - - static void OnFailureCallback_340(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_340(status); } - static void OnSuccessCallback_340(void * context) - { - (static_cast(context))->OnSuccessResponse_340(); - } - - - + static void OnSuccessCallback_340(void * context) { (static_cast(context))->OnSuccessResponse_340(); } static void OnFailureCallback_341(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_341(status); } - static void OnSuccessCallback_341(void * context, const chip::app::DataModel::Nullable & nullableEnumAttr) + static void + OnSuccessCallback_341(void * context, + const chip::app::DataModel::Nullable & nullableEnumAttr) { (static_cast(context))->OnSuccessResponse_341(nullableEnumAttr); } - - - static void OnFailureCallback_342(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_342(status); } - static void OnSuccessCallback_342(void * context) - { - (static_cast(context))->OnSuccessResponse_342(); - } - - - + static void OnSuccessCallback_342(void * context) { (static_cast(context))->OnSuccessResponse_342(); } static void OnFailureCallback_343(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_343(status); } - static void OnSuccessCallback_343(void * context, const chip::app::DataModel::Nullable & nullableEnumAttr) + static void + OnSuccessCallback_343(void * context, + const chip::app::DataModel::Nullable & nullableEnumAttr) { (static_cast(context))->OnSuccessResponse_343(nullableEnumAttr); } - - - static void OnFailureCallback_344(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_344(status); } - static void OnSuccessCallback_344(void * context) - { - (static_cast(context))->OnSuccessResponse_344(); - } - - - + static void OnSuccessCallback_344(void * context) { (static_cast(context))->OnSuccessResponse_344(); } static void OnFailureCallback_345(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_345(status); } - static void OnSuccessCallback_345(void * context, const chip::app::DataModel::Nullable & nullableEnumAttr) + static void + OnSuccessCallback_345(void * context, + const chip::app::DataModel::Nullable & nullableEnumAttr) { (static_cast(context))->OnSuccessResponse_345(nullableEnumAttr); } - - - static void OnFailureCallback_346(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_346(status); } - static void OnSuccessCallback_346(void * context, const chip::app::DataModel::Nullable & nullableOctetString) + static void OnSuccessCallback_346(void * context, const chip::app::DataModel::Nullable & nullableOctetString) { (static_cast(context))->OnSuccessResponse_346(nullableOctetString); } - - - static void OnFailureCallback_347(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_347(status); } - static void OnSuccessCallback_347(void * context) - { - (static_cast(context))->OnSuccessResponse_347(); - } - - - + static void OnSuccessCallback_347(void * context) { (static_cast(context))->OnSuccessResponse_347(); } static void OnFailureCallback_348(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_348(status); } - static void OnSuccessCallback_348(void * context, const chip::app::DataModel::Nullable & nullableOctetString) + static void OnSuccessCallback_348(void * context, const chip::app::DataModel::Nullable & nullableOctetString) { (static_cast(context))->OnSuccessResponse_348(nullableOctetString); } - - - static void OnFailureCallback_349(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_349(status); } - static void OnSuccessCallback_349(void * context) - { - (static_cast(context))->OnSuccessResponse_349(); - } - - - + static void OnSuccessCallback_349(void * context) { (static_cast(context))->OnSuccessResponse_349(); } static void OnFailureCallback_350(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_350(status); } - static void OnSuccessCallback_350(void * context, const chip::app::DataModel::Nullable & nullableOctetString) + static void OnSuccessCallback_350(void * context, const chip::app::DataModel::Nullable & nullableOctetString) { (static_cast(context))->OnSuccessResponse_350(nullableOctetString); } - - - static void OnFailureCallback_351(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_351(status); } - static void OnSuccessCallback_351(void * context) - { - (static_cast(context))->OnSuccessResponse_351(); - } - - - + static void OnSuccessCallback_351(void * context) { (static_cast(context))->OnSuccessResponse_351(); } static void OnFailureCallback_352(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_352(status); } - static void OnSuccessCallback_352(void * context, const chip::app::DataModel::Nullable & nullableOctetString) + static void OnSuccessCallback_352(void * context, const chip::app::DataModel::Nullable & nullableOctetString) { (static_cast(context))->OnSuccessResponse_352(nullableOctetString); } - - - static void OnFailureCallback_353(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_353(status); } - static void OnSuccessCallback_353(void * context, const chip::app::DataModel::Nullable & nullableCharString) + static void OnSuccessCallback_353(void * context, const chip::app::DataModel::Nullable & nullableCharString) { (static_cast(context))->OnSuccessResponse_353(nullableCharString); } - - - static void OnFailureCallback_354(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_354(status); } - static void OnSuccessCallback_354(void * context) - { - (static_cast(context))->OnSuccessResponse_354(); - } - - - + static void OnSuccessCallback_354(void * context) { (static_cast(context))->OnSuccessResponse_354(); } static void OnFailureCallback_355(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_355(status); } - static void OnSuccessCallback_355(void * context, const chip::app::DataModel::Nullable & nullableCharString) + static void OnSuccessCallback_355(void * context, const chip::app::DataModel::Nullable & nullableCharString) { (static_cast(context))->OnSuccessResponse_355(nullableCharString); } - - - static void OnFailureCallback_356(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_356(status); } - static void OnSuccessCallback_356(void * context) - { - (static_cast(context))->OnSuccessResponse_356(); - } - - - + static void OnSuccessCallback_356(void * context) { (static_cast(context))->OnSuccessResponse_356(); } static void OnFailureCallback_357(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_357(status); } - static void OnSuccessCallback_357(void * context, const chip::app::DataModel::Nullable & nullableCharString) + static void OnSuccessCallback_357(void * context, const chip::app::DataModel::Nullable & nullableCharString) { (static_cast(context))->OnSuccessResponse_357(nullableCharString); } - - - static void OnFailureCallback_358(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_358(status); } - static void OnSuccessCallback_358(void * context) - { - (static_cast(context))->OnSuccessResponse_358(); - } - - - + static void OnSuccessCallback_358(void * context) { (static_cast(context))->OnSuccessResponse_358(); } static void OnFailureCallback_359(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_359(status); } - static void OnSuccessCallback_359(void * context, const chip::app::DataModel::Nullable & nullableCharString) + static void OnSuccessCallback_359(void * context, const chip::app::DataModel::Nullable & nullableCharString) { (static_cast(context))->OnSuccessResponse_359(nullableCharString); } - - - static void OnFailureCallback_360(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_360(status); } - static void OnSuccessCallback_360(void * context, const chip::app::DataModel::DecodableList & listInt8u) + static void OnSuccessCallback_360(void * context, const chip::app::DataModel::DecodableList & listInt8u) { (static_cast(context))->OnSuccessResponse_360(listInt8u); } - - - static void OnFailureCallback_361(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_361(status); } - static void OnSuccessCallback_361(void * context, const chip::app::DataModel::DecodableList & listInt8u) + static void OnSuccessCallback_361(void * context, const chip::app::DataModel::DecodableList & listInt8u) { (static_cast(context))->OnSuccessResponse_361(listInt8u); } - - - static void OnFailureCallback_364(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_364(status); } - static void OnSuccessCallback_364(void * context, const chip::app::DataModel::DecodableList & listInt8u) + static void OnSuccessCallback_364(void * context, const chip::app::DataModel::DecodableList & listInt8u) { (static_cast(context))->OnSuccessResponse_364(listInt8u); } - bool mReceivedReport_364 = false; - static void OnFailureCallback_365(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_365(status); } - static void OnSuccessCallback_365(void * context, const chip::app::DataModel::DecodableList & listInt8u) + static void OnSuccessCallback_365(void * context, const chip::app::DataModel::DecodableList & listInt8u) { (static_cast(context))->OnSuccessResponse_365(listInt8u); } @@ -61367,1404 +47061,905 @@ class TestCluster: public TestCommand (static_cast(context))->OnSubscriptionEstablishedResponse_365(); } - - static void OnFailureCallback_366(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_366(status); } - static void OnSuccessCallback_366(void * context) - { - (static_cast(context))->OnSuccessResponse_366(); - } - - - + static void OnSuccessCallback_366(void * context) { (static_cast(context))->OnSuccessResponse_366(); } static void OnFailureCallback_367(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_367(status); } - static void OnSuccessCallback_367(void * context, const chip::app::DataModel::DecodableList & listInt8u) + static void OnSuccessCallback_367(void * context, const chip::app::DataModel::DecodableList & listInt8u) { (static_cast(context))->OnSuccessResponse_367(listInt8u); } - bool mReceivedReport_367 = false; - static void OnFailureCallback_368(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_368(status); } - static void OnSuccessCallback_368(void * context, uint8_t rangeRestrictedInt8u) + static void OnSuccessCallback_368(void * context, uint8_t rangeRestrictedInt8u) { (static_cast(context))->OnSuccessResponse_368(rangeRestrictedInt8u); } - - - static void OnFailureCallback_369(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_369(status); } - static void OnSuccessCallback_369(void * context) - { - (static_cast(context))->OnSuccessResponse_369(); - } - - - + static void OnSuccessCallback_369(void * context) { (static_cast(context))->OnSuccessResponse_369(); } static void OnFailureCallback_370(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_370(status); } - static void OnSuccessCallback_370(void * context) - { - (static_cast(context))->OnSuccessResponse_370(); - } - - - + static void OnSuccessCallback_370(void * context) { (static_cast(context))->OnSuccessResponse_370(); } static void OnFailureCallback_371(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_371(status); } - static void OnSuccessCallback_371(void * context) - { - (static_cast(context))->OnSuccessResponse_371(); - } - - - + static void OnSuccessCallback_371(void * context) { (static_cast(context))->OnSuccessResponse_371(); } static void OnFailureCallback_372(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_372(status); } - static void OnSuccessCallback_372(void * context) - { - (static_cast(context))->OnSuccessResponse_372(); - } - - - + static void OnSuccessCallback_372(void * context) { (static_cast(context))->OnSuccessResponse_372(); } static void OnFailureCallback_373(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_373(status); } - static void OnSuccessCallback_373(void * context, uint8_t rangeRestrictedInt8u) + static void OnSuccessCallback_373(void * context, uint8_t rangeRestrictedInt8u) { (static_cast(context))->OnSuccessResponse_373(rangeRestrictedInt8u); } - - - static void OnFailureCallback_374(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_374(status); } - static void OnSuccessCallback_374(void * context) - { - (static_cast(context))->OnSuccessResponse_374(); - } - - - + static void OnSuccessCallback_374(void * context) { (static_cast(context))->OnSuccessResponse_374(); } static void OnFailureCallback_375(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_375(status); } - static void OnSuccessCallback_375(void * context, uint8_t rangeRestrictedInt8u) + static void OnSuccessCallback_375(void * context, uint8_t rangeRestrictedInt8u) { (static_cast(context))->OnSuccessResponse_375(rangeRestrictedInt8u); } - - - static void OnFailureCallback_376(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_376(status); } - static void OnSuccessCallback_376(void * context) - { - (static_cast(context))->OnSuccessResponse_376(); - } - - - + static void OnSuccessCallback_376(void * context) { (static_cast(context))->OnSuccessResponse_376(); } static void OnFailureCallback_377(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_377(status); } - static void OnSuccessCallback_377(void * context, uint8_t rangeRestrictedInt8u) + static void OnSuccessCallback_377(void * context, uint8_t rangeRestrictedInt8u) { (static_cast(context))->OnSuccessResponse_377(rangeRestrictedInt8u); } - - - static void OnFailureCallback_378(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_378(status); } - static void OnSuccessCallback_378(void * context) - { - (static_cast(context))->OnSuccessResponse_378(); - } - - - + static void OnSuccessCallback_378(void * context) { (static_cast(context))->OnSuccessResponse_378(); } static void OnFailureCallback_379(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_379(status); } - static void OnSuccessCallback_379(void * context, uint8_t rangeRestrictedInt8u) + static void OnSuccessCallback_379(void * context, uint8_t rangeRestrictedInt8u) { (static_cast(context))->OnSuccessResponse_379(rangeRestrictedInt8u); } - - - static void OnFailureCallback_380(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_380(status); } - static void OnSuccessCallback_380(void * context, uint16_t rangeRestrictedInt16u) + static void OnSuccessCallback_380(void * context, uint16_t rangeRestrictedInt16u) { (static_cast(context))->OnSuccessResponse_380(rangeRestrictedInt16u); } - - - static void OnFailureCallback_381(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_381(status); } - static void OnSuccessCallback_381(void * context) - { - (static_cast(context))->OnSuccessResponse_381(); - } - - - + static void OnSuccessCallback_381(void * context) { (static_cast(context))->OnSuccessResponse_381(); } static void OnFailureCallback_382(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_382(status); } - static void OnSuccessCallback_382(void * context) - { - (static_cast(context))->OnSuccessResponse_382(); - } - - - + static void OnSuccessCallback_382(void * context) { (static_cast(context))->OnSuccessResponse_382(); } static void OnFailureCallback_383(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_383(status); } - static void OnSuccessCallback_383(void * context) - { - (static_cast(context))->OnSuccessResponse_383(); - } - - - + static void OnSuccessCallback_383(void * context) { (static_cast(context))->OnSuccessResponse_383(); } static void OnFailureCallback_384(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_384(status); } - static void OnSuccessCallback_384(void * context) - { - (static_cast(context))->OnSuccessResponse_384(); - } - - - + static void OnSuccessCallback_384(void * context) { (static_cast(context))->OnSuccessResponse_384(); } static void OnFailureCallback_385(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_385(status); } - static void OnSuccessCallback_385(void * context, uint16_t rangeRestrictedInt16u) + static void OnSuccessCallback_385(void * context, uint16_t rangeRestrictedInt16u) { (static_cast(context))->OnSuccessResponse_385(rangeRestrictedInt16u); } - - - static void OnFailureCallback_386(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_386(status); } - static void OnSuccessCallback_386(void * context) - { - (static_cast(context))->OnSuccessResponse_386(); - } - - - + static void OnSuccessCallback_386(void * context) { (static_cast(context))->OnSuccessResponse_386(); } static void OnFailureCallback_387(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_387(status); } - static void OnSuccessCallback_387(void * context, uint16_t rangeRestrictedInt16u) + static void OnSuccessCallback_387(void * context, uint16_t rangeRestrictedInt16u) { (static_cast(context))->OnSuccessResponse_387(rangeRestrictedInt16u); } - - - static void OnFailureCallback_388(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_388(status); } - static void OnSuccessCallback_388(void * context) - { - (static_cast(context))->OnSuccessResponse_388(); - } - - - + static void OnSuccessCallback_388(void * context) { (static_cast(context))->OnSuccessResponse_388(); } static void OnFailureCallback_389(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_389(status); } - static void OnSuccessCallback_389(void * context, uint16_t rangeRestrictedInt16u) + static void OnSuccessCallback_389(void * context, uint16_t rangeRestrictedInt16u) { (static_cast(context))->OnSuccessResponse_389(rangeRestrictedInt16u); } - - - static void OnFailureCallback_390(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_390(status); } - static void OnSuccessCallback_390(void * context) - { - (static_cast(context))->OnSuccessResponse_390(); - } - - - + static void OnSuccessCallback_390(void * context) { (static_cast(context))->OnSuccessResponse_390(); } static void OnFailureCallback_391(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_391(status); } - static void OnSuccessCallback_391(void * context, uint16_t rangeRestrictedInt16u) + static void OnSuccessCallback_391(void * context, uint16_t rangeRestrictedInt16u) { (static_cast(context))->OnSuccessResponse_391(rangeRestrictedInt16u); } - - - static void OnFailureCallback_392(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_392(status); } - static void OnSuccessCallback_392(void * context, int8_t rangeRestrictedInt8s) + static void OnSuccessCallback_392(void * context, int8_t rangeRestrictedInt8s) { (static_cast(context))->OnSuccessResponse_392(rangeRestrictedInt8s); } - - - static void OnFailureCallback_393(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_393(status); } - static void OnSuccessCallback_393(void * context) - { - (static_cast(context))->OnSuccessResponse_393(); - } - - - + static void OnSuccessCallback_393(void * context) { (static_cast(context))->OnSuccessResponse_393(); } static void OnFailureCallback_394(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_394(status); } - static void OnSuccessCallback_394(void * context) - { - (static_cast(context))->OnSuccessResponse_394(); - } - - - + static void OnSuccessCallback_394(void * context) { (static_cast(context))->OnSuccessResponse_394(); } static void OnFailureCallback_395(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_395(status); } - static void OnSuccessCallback_395(void * context) - { - (static_cast(context))->OnSuccessResponse_395(); - } - - - + static void OnSuccessCallback_395(void * context) { (static_cast(context))->OnSuccessResponse_395(); } static void OnFailureCallback_396(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_396(status); } - static void OnSuccessCallback_396(void * context) - { - (static_cast(context))->OnSuccessResponse_396(); - } - - - + static void OnSuccessCallback_396(void * context) { (static_cast(context))->OnSuccessResponse_396(); } static void OnFailureCallback_397(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_397(status); } - static void OnSuccessCallback_397(void * context, int8_t rangeRestrictedInt8s) + static void OnSuccessCallback_397(void * context, int8_t rangeRestrictedInt8s) { (static_cast(context))->OnSuccessResponse_397(rangeRestrictedInt8s); } - - - static void OnFailureCallback_398(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_398(status); } - static void OnSuccessCallback_398(void * context) - { - (static_cast(context))->OnSuccessResponse_398(); - } - - - + static void OnSuccessCallback_398(void * context) { (static_cast(context))->OnSuccessResponse_398(); } static void OnFailureCallback_399(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_399(status); } - static void OnSuccessCallback_399(void * context, int8_t rangeRestrictedInt8s) + static void OnSuccessCallback_399(void * context, int8_t rangeRestrictedInt8s) { (static_cast(context))->OnSuccessResponse_399(rangeRestrictedInt8s); } - - - static void OnFailureCallback_400(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_400(status); } - static void OnSuccessCallback_400(void * context) - { - (static_cast(context))->OnSuccessResponse_400(); - } - - - + static void OnSuccessCallback_400(void * context) { (static_cast(context))->OnSuccessResponse_400(); } static void OnFailureCallback_401(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_401(status); } - static void OnSuccessCallback_401(void * context, int8_t rangeRestrictedInt8s) + static void OnSuccessCallback_401(void * context, int8_t rangeRestrictedInt8s) { (static_cast(context))->OnSuccessResponse_401(rangeRestrictedInt8s); } - - - static void OnFailureCallback_402(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_402(status); } - static void OnSuccessCallback_402(void * context) - { - (static_cast(context))->OnSuccessResponse_402(); - } - - - + static void OnSuccessCallback_402(void * context) { (static_cast(context))->OnSuccessResponse_402(); } static void OnFailureCallback_403(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_403(status); } - static void OnSuccessCallback_403(void * context, int8_t rangeRestrictedInt8s) + static void OnSuccessCallback_403(void * context, int8_t rangeRestrictedInt8s) { (static_cast(context))->OnSuccessResponse_403(rangeRestrictedInt8s); } - - - static void OnFailureCallback_404(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_404(status); } - static void OnSuccessCallback_404(void * context, int16_t rangeRestrictedInt16s) + static void OnSuccessCallback_404(void * context, int16_t rangeRestrictedInt16s) { (static_cast(context))->OnSuccessResponse_404(rangeRestrictedInt16s); } - - - static void OnFailureCallback_405(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_405(status); } - static void OnSuccessCallback_405(void * context) - { - (static_cast(context))->OnSuccessResponse_405(); - } - - - + static void OnSuccessCallback_405(void * context) { (static_cast(context))->OnSuccessResponse_405(); } static void OnFailureCallback_406(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_406(status); } - static void OnSuccessCallback_406(void * context) - { - (static_cast(context))->OnSuccessResponse_406(); - } - - - + static void OnSuccessCallback_406(void * context) { (static_cast(context))->OnSuccessResponse_406(); } static void OnFailureCallback_407(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_407(status); } - static void OnSuccessCallback_407(void * context) - { - (static_cast(context))->OnSuccessResponse_407(); - } - - - + static void OnSuccessCallback_407(void * context) { (static_cast(context))->OnSuccessResponse_407(); } static void OnFailureCallback_408(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_408(status); } - static void OnSuccessCallback_408(void * context) - { - (static_cast(context))->OnSuccessResponse_408(); - } - - - + static void OnSuccessCallback_408(void * context) { (static_cast(context))->OnSuccessResponse_408(); } static void OnFailureCallback_409(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_409(status); } - static void OnSuccessCallback_409(void * context, int16_t rangeRestrictedInt16s) + static void OnSuccessCallback_409(void * context, int16_t rangeRestrictedInt16s) { (static_cast(context))->OnSuccessResponse_409(rangeRestrictedInt16s); } - - - static void OnFailureCallback_410(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_410(status); } - static void OnSuccessCallback_410(void * context) - { - (static_cast(context))->OnSuccessResponse_410(); - } - - - + static void OnSuccessCallback_410(void * context) { (static_cast(context))->OnSuccessResponse_410(); } static void OnFailureCallback_411(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_411(status); } - static void OnSuccessCallback_411(void * context, int16_t rangeRestrictedInt16s) + static void OnSuccessCallback_411(void * context, int16_t rangeRestrictedInt16s) { (static_cast(context))->OnSuccessResponse_411(rangeRestrictedInt16s); } - - - static void OnFailureCallback_412(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_412(status); } - static void OnSuccessCallback_412(void * context) - { - (static_cast(context))->OnSuccessResponse_412(); - } - - - + static void OnSuccessCallback_412(void * context) { (static_cast(context))->OnSuccessResponse_412(); } static void OnFailureCallback_413(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_413(status); } - static void OnSuccessCallback_413(void * context, int16_t rangeRestrictedInt16s) + static void OnSuccessCallback_413(void * context, int16_t rangeRestrictedInt16s) { (static_cast(context))->OnSuccessResponse_413(rangeRestrictedInt16s); } - - - static void OnFailureCallback_414(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_414(status); } - static void OnSuccessCallback_414(void * context) - { - (static_cast(context))->OnSuccessResponse_414(); - } - - - + static void OnSuccessCallback_414(void * context) { (static_cast(context))->OnSuccessResponse_414(); } static void OnFailureCallback_415(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_415(status); } - static void OnSuccessCallback_415(void * context, int16_t rangeRestrictedInt16s) + static void OnSuccessCallback_415(void * context, int16_t rangeRestrictedInt16s) { (static_cast(context))->OnSuccessResponse_415(rangeRestrictedInt16s); } - - - static void OnFailureCallback_416(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_416(status); } - static void OnSuccessCallback_416(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) + static void OnSuccessCallback_416(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) { (static_cast(context))->OnSuccessResponse_416(nullableRangeRestrictedInt8u); } - - - static void OnFailureCallback_417(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_417(status); } - static void OnSuccessCallback_417(void * context) - { - (static_cast(context))->OnSuccessResponse_417(); - } - - - + static void OnSuccessCallback_417(void * context) { (static_cast(context))->OnSuccessResponse_417(); } static void OnFailureCallback_418(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_418(status); } - static void OnSuccessCallback_418(void * context) - { - (static_cast(context))->OnSuccessResponse_418(); - } - - - + static void OnSuccessCallback_418(void * context) { (static_cast(context))->OnSuccessResponse_418(); } static void OnFailureCallback_419(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_419(status); } - static void OnSuccessCallback_419(void * context) - { - (static_cast(context))->OnSuccessResponse_419(); - } - - - + static void OnSuccessCallback_419(void * context) { (static_cast(context))->OnSuccessResponse_419(); } static void OnFailureCallback_420(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_420(status); } - static void OnSuccessCallback_420(void * context) - { - (static_cast(context))->OnSuccessResponse_420(); - } - - - + static void OnSuccessCallback_420(void * context) { (static_cast(context))->OnSuccessResponse_420(); } static void OnFailureCallback_421(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_421(status); } - static void OnSuccessCallback_421(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) + static void OnSuccessCallback_421(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) { (static_cast(context))->OnSuccessResponse_421(nullableRangeRestrictedInt8u); } - - - static void OnFailureCallback_422(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_422(status); } - static void OnSuccessCallback_422(void * context) - { - (static_cast(context))->OnSuccessResponse_422(); - } - - - + static void OnSuccessCallback_422(void * context) { (static_cast(context))->OnSuccessResponse_422(); } static void OnFailureCallback_423(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_423(status); } - static void OnSuccessCallback_423(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) + static void OnSuccessCallback_423(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) { (static_cast(context))->OnSuccessResponse_423(nullableRangeRestrictedInt8u); } - - - static void OnFailureCallback_424(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_424(status); } - static void OnSuccessCallback_424(void * context) - { - (static_cast(context))->OnSuccessResponse_424(); - } - - - + static void OnSuccessCallback_424(void * context) { (static_cast(context))->OnSuccessResponse_424(); } static void OnFailureCallback_425(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_425(status); } - static void OnSuccessCallback_425(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) + static void OnSuccessCallback_425(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) { (static_cast(context))->OnSuccessResponse_425(nullableRangeRestrictedInt8u); } - - - static void OnFailureCallback_426(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_426(status); } - static void OnSuccessCallback_426(void * context) - { - (static_cast(context))->OnSuccessResponse_426(); - } - - - + static void OnSuccessCallback_426(void * context) { (static_cast(context))->OnSuccessResponse_426(); } static void OnFailureCallback_427(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_427(status); } - static void OnSuccessCallback_427(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) + static void OnSuccessCallback_427(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) { (static_cast(context))->OnSuccessResponse_427(nullableRangeRestrictedInt8u); } - - - static void OnFailureCallback_428(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_428(status); } - static void OnSuccessCallback_428(void * context) - { - (static_cast(context))->OnSuccessResponse_428(); - } - - - + static void OnSuccessCallback_428(void * context) { (static_cast(context))->OnSuccessResponse_428(); } static void OnFailureCallback_429(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_429(status); } - static void OnSuccessCallback_429(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) + static void OnSuccessCallback_429(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) { (static_cast(context))->OnSuccessResponse_429(nullableRangeRestrictedInt8u); } - - - static void OnFailureCallback_430(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_430(status); } - static void OnSuccessCallback_430(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) + static void OnSuccessCallback_430(void * context, + const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) { (static_cast(context))->OnSuccessResponse_430(nullableRangeRestrictedInt16u); } - - - static void OnFailureCallback_431(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_431(status); } - static void OnSuccessCallback_431(void * context) - { - (static_cast(context))->OnSuccessResponse_431(); - } - - - + static void OnSuccessCallback_431(void * context) { (static_cast(context))->OnSuccessResponse_431(); } static void OnFailureCallback_432(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_432(status); } - static void OnSuccessCallback_432(void * context) - { - (static_cast(context))->OnSuccessResponse_432(); - } - - - + static void OnSuccessCallback_432(void * context) { (static_cast(context))->OnSuccessResponse_432(); } static void OnFailureCallback_433(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_433(status); } - static void OnSuccessCallback_433(void * context) - { - (static_cast(context))->OnSuccessResponse_433(); - } - - - + static void OnSuccessCallback_433(void * context) { (static_cast(context))->OnSuccessResponse_433(); } static void OnFailureCallback_434(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_434(status); } - static void OnSuccessCallback_434(void * context) - { - (static_cast(context))->OnSuccessResponse_434(); - } - - - + static void OnSuccessCallback_434(void * context) { (static_cast(context))->OnSuccessResponse_434(); } static void OnFailureCallback_435(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_435(status); } - static void OnSuccessCallback_435(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) + static void OnSuccessCallback_435(void * context, + const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) { (static_cast(context))->OnSuccessResponse_435(nullableRangeRestrictedInt16u); } - - - static void OnFailureCallback_436(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_436(status); } - static void OnSuccessCallback_436(void * context) - { - (static_cast(context))->OnSuccessResponse_436(); - } - - - + static void OnSuccessCallback_436(void * context) { (static_cast(context))->OnSuccessResponse_436(); } static void OnFailureCallback_437(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_437(status); } - static void OnSuccessCallback_437(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) + static void OnSuccessCallback_437(void * context, + const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) { (static_cast(context))->OnSuccessResponse_437(nullableRangeRestrictedInt16u); } - - - static void OnFailureCallback_438(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_438(status); } - static void OnSuccessCallback_438(void * context) - { - (static_cast(context))->OnSuccessResponse_438(); - } - - - + static void OnSuccessCallback_438(void * context) { (static_cast(context))->OnSuccessResponse_438(); } static void OnFailureCallback_439(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_439(status); } - static void OnSuccessCallback_439(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) + static void OnSuccessCallback_439(void * context, + const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) { (static_cast(context))->OnSuccessResponse_439(nullableRangeRestrictedInt16u); } - - - static void OnFailureCallback_440(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_440(status); } - static void OnSuccessCallback_440(void * context) - { - (static_cast(context))->OnSuccessResponse_440(); - } - - - + static void OnSuccessCallback_440(void * context) { (static_cast(context))->OnSuccessResponse_440(); } static void OnFailureCallback_441(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_441(status); } - static void OnSuccessCallback_441(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) + static void OnSuccessCallback_441(void * context, + const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) { (static_cast(context))->OnSuccessResponse_441(nullableRangeRestrictedInt16u); } - - - static void OnFailureCallback_442(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_442(status); } - static void OnSuccessCallback_442(void * context) - { - (static_cast(context))->OnSuccessResponse_442(); - } - - - + static void OnSuccessCallback_442(void * context) { (static_cast(context))->OnSuccessResponse_442(); } static void OnFailureCallback_443(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_443(status); } - static void OnSuccessCallback_443(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) + static void OnSuccessCallback_443(void * context, + const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) { (static_cast(context))->OnSuccessResponse_443(nullableRangeRestrictedInt16u); } - - - static void OnFailureCallback_444(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_444(status); } - static void OnSuccessCallback_444(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) + static void OnSuccessCallback_444(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) { (static_cast(context))->OnSuccessResponse_444(nullableRangeRestrictedInt8s); } - - - static void OnFailureCallback_445(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_445(status); } - static void OnSuccessCallback_445(void * context) - { - (static_cast(context))->OnSuccessResponse_445(); - } - - - + static void OnSuccessCallback_445(void * context) { (static_cast(context))->OnSuccessResponse_445(); } static void OnFailureCallback_446(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_446(status); } - static void OnSuccessCallback_446(void * context) - { - (static_cast(context))->OnSuccessResponse_446(); - } - - - + static void OnSuccessCallback_446(void * context) { (static_cast(context))->OnSuccessResponse_446(); } static void OnFailureCallback_447(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_447(status); } - static void OnSuccessCallback_447(void * context) - { - (static_cast(context))->OnSuccessResponse_447(); - } - - - + static void OnSuccessCallback_447(void * context) { (static_cast(context))->OnSuccessResponse_447(); } static void OnFailureCallback_448(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_448(status); } - static void OnSuccessCallback_448(void * context) - { - (static_cast(context))->OnSuccessResponse_448(); - } - - - + static void OnSuccessCallback_448(void * context) { (static_cast(context))->OnSuccessResponse_448(); } static void OnFailureCallback_449(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_449(status); } - static void OnSuccessCallback_449(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) + static void OnSuccessCallback_449(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) { (static_cast(context))->OnSuccessResponse_449(nullableRangeRestrictedInt8s); } - - - static void OnFailureCallback_450(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_450(status); } - static void OnSuccessCallback_450(void * context) - { - (static_cast(context))->OnSuccessResponse_450(); - } - - - + static void OnSuccessCallback_450(void * context) { (static_cast(context))->OnSuccessResponse_450(); } static void OnFailureCallback_451(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_451(status); } - static void OnSuccessCallback_451(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) + static void OnSuccessCallback_451(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) { (static_cast(context))->OnSuccessResponse_451(nullableRangeRestrictedInt8s); } - - - static void OnFailureCallback_452(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_452(status); } - static void OnSuccessCallback_452(void * context) - { - (static_cast(context))->OnSuccessResponse_452(); - } - - - + static void OnSuccessCallback_452(void * context) { (static_cast(context))->OnSuccessResponse_452(); } static void OnFailureCallback_453(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_453(status); } - static void OnSuccessCallback_453(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) + static void OnSuccessCallback_453(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) { (static_cast(context))->OnSuccessResponse_453(nullableRangeRestrictedInt8s); } - - - static void OnFailureCallback_454(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_454(status); } - static void OnSuccessCallback_454(void * context) - { - (static_cast(context))->OnSuccessResponse_454(); - } - - - + static void OnSuccessCallback_454(void * context) { (static_cast(context))->OnSuccessResponse_454(); } static void OnFailureCallback_455(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_455(status); } - static void OnSuccessCallback_455(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) + static void OnSuccessCallback_455(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) { (static_cast(context))->OnSuccessResponse_455(nullableRangeRestrictedInt8s); } - - - static void OnFailureCallback_456(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_456(status); } - static void OnSuccessCallback_456(void * context) - { - (static_cast(context))->OnSuccessResponse_456(); - } - - - + static void OnSuccessCallback_456(void * context) { (static_cast(context))->OnSuccessResponse_456(); } static void OnFailureCallback_457(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_457(status); } - static void OnSuccessCallback_457(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) + static void OnSuccessCallback_457(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) { (static_cast(context))->OnSuccessResponse_457(nullableRangeRestrictedInt8s); } - - - static void OnFailureCallback_458(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_458(status); } - static void OnSuccessCallback_458(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) + static void OnSuccessCallback_458(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) { (static_cast(context))->OnSuccessResponse_458(nullableRangeRestrictedInt16s); } - - - static void OnFailureCallback_459(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_459(status); } - static void OnSuccessCallback_459(void * context) - { - (static_cast(context))->OnSuccessResponse_459(); - } - - - + static void OnSuccessCallback_459(void * context) { (static_cast(context))->OnSuccessResponse_459(); } static void OnFailureCallback_460(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_460(status); } - static void OnSuccessCallback_460(void * context) - { - (static_cast(context))->OnSuccessResponse_460(); - } - - - + static void OnSuccessCallback_460(void * context) { (static_cast(context))->OnSuccessResponse_460(); } static void OnFailureCallback_461(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_461(status); } - static void OnSuccessCallback_461(void * context) - { - (static_cast(context))->OnSuccessResponse_461(); - } - - - + static void OnSuccessCallback_461(void * context) { (static_cast(context))->OnSuccessResponse_461(); } static void OnFailureCallback_462(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_462(status); } - static void OnSuccessCallback_462(void * context) - { - (static_cast(context))->OnSuccessResponse_462(); - } - - - + static void OnSuccessCallback_462(void * context) { (static_cast(context))->OnSuccessResponse_462(); } static void OnFailureCallback_463(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_463(status); } - static void OnSuccessCallback_463(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) + static void OnSuccessCallback_463(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) { (static_cast(context))->OnSuccessResponse_463(nullableRangeRestrictedInt16s); } - - - static void OnFailureCallback_464(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_464(status); } - static void OnSuccessCallback_464(void * context) - { - (static_cast(context))->OnSuccessResponse_464(); - } - - - + static void OnSuccessCallback_464(void * context) { (static_cast(context))->OnSuccessResponse_464(); } static void OnFailureCallback_465(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_465(status); } - static void OnSuccessCallback_465(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) + static void OnSuccessCallback_465(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) { (static_cast(context))->OnSuccessResponse_465(nullableRangeRestrictedInt16s); } - - - static void OnFailureCallback_466(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_466(status); } - static void OnSuccessCallback_466(void * context) - { - (static_cast(context))->OnSuccessResponse_466(); - } - - - + static void OnSuccessCallback_466(void * context) { (static_cast(context))->OnSuccessResponse_466(); } static void OnFailureCallback_467(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_467(status); } - static void OnSuccessCallback_467(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) + static void OnSuccessCallback_467(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) { (static_cast(context))->OnSuccessResponse_467(nullableRangeRestrictedInt16s); } - - - static void OnFailureCallback_468(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_468(status); } - static void OnSuccessCallback_468(void * context) - { - (static_cast(context))->OnSuccessResponse_468(); - } - - - + static void OnSuccessCallback_468(void * context) { (static_cast(context))->OnSuccessResponse_468(); } static void OnFailureCallback_469(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_469(status); } - static void OnSuccessCallback_469(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) + static void OnSuccessCallback_469(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) { (static_cast(context))->OnSuccessResponse_469(nullableRangeRestrictedInt16s); } - - - static void OnFailureCallback_470(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_470(status); } - static void OnSuccessCallback_470(void * context) - { - (static_cast(context))->OnSuccessResponse_470(); - } - - - + static void OnSuccessCallback_470(void * context) { (static_cast(context))->OnSuccessResponse_470(); } static void OnFailureCallback_471(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_471(status); } - static void OnSuccessCallback_471(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) + static void OnSuccessCallback_471(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) { (static_cast(context))->OnSuccessResponse_471(nullableRangeRestrictedInt16s); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestSendTestCommand_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::Test::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::Test::Type; RequestType request; @@ -62776,30 +47971,18 @@ class TestCluster: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_1() - { NextTest(); - } - + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestSendTestNotHandledCommand_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestNotHandled::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestNotHandled::Type; RequestType request; @@ -62811,31 +47994,22 @@ class TestCluster: public TestCommand (static_cast(context))->OnFailureResponse_2(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - } - - void OnSuccessResponse_2() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); } + void OnSuccessResponse_2() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestSendTestSpecificCommand_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestSpecific::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestSpecific::Type; RequestType request; @@ -62847,39 +48021,28 @@ class TestCluster: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( uint8_t returnValue) + void OnSuccessResponse_3(uint8_t returnValue) { - VerifyOrReturn(CheckValue("returnValue", returnValue,7 - )); + VerifyOrReturn(CheckValue("returnValue", returnValue, 7)); NextTest(); - } - - - + } - CHIP_ERROR TestSendTestAddArgumentsCommand_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type; RequestType request; - request.arg1 = 3; - request.arg2 = 17; - + request.arg1 = 3; + request.arg2 = 17; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_4(data.returnValue); }; @@ -62888,39 +48051,28 @@ class TestCluster: public TestCommand (static_cast(context))->OnFailureResponse_4(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( uint8_t returnValue) + void OnSuccessResponse_4(uint8_t returnValue) { - VerifyOrReturn(CheckValue("returnValue", returnValue,20 - )); + VerifyOrReturn(CheckValue("returnValue", returnValue, 20)); NextTest(); - } - - - + } - CHIP_ERROR TestSendFailingTestAddArgumentsCommand_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type; RequestType request; - request.arg1 = 250; - request.arg2 = 6; - + request.arg1 = 250; + request.arg2 = 6; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_5(data.returnValue); }; @@ -62929,55 +48081,38 @@ class TestCluster: public TestCommand (static_cast(context))->OnFailureResponse_5(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_5(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - } - - void OnSuccessResponse_5( uint8_t returnValue) - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); } + void OnSuccessResponse_5(uint8_t returnValue) { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadAttributeBooleanDefaultValue_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( bool boolean) + void OnSuccessResponse_6(bool boolean) { - VerifyOrReturn(CheckValue("boolean", boolean,0 - )); + VerifyOrReturn(CheckValue("boolean", boolean, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeBooleanTrue_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -62985,53 +48120,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); bool booleanArgument; - booleanArgument = 1; - - ReturnErrorOnFailure(cluster.WriteAttribute(booleanArgument, this, OnSuccessCallback_7, OnFailureCallback_7)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } + booleanArgument = 1; - void OnSuccessResponse_7() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + booleanArgument, this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_7() { NextTest(); } - CHIP_ERROR TestReadAttributeBooleanTrue_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_8, OnFailureCallback_8)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_8, OnFailureCallback_8)); + return CHIP_NO_ERROR; } - void OnFailureResponse_8(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_8( bool boolean) + void OnSuccessResponse_8(bool boolean) { - VerifyOrReturn(CheckValue("boolean", boolean,1 - )); + VerifyOrReturn(CheckValue("boolean", boolean, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeBooleanFalse_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -63039,81 +48158,57 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); bool booleanArgument; - booleanArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(booleanArgument, this, OnSuccessCallback_9, OnFailureCallback_9)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } + booleanArgument = 0; - void OnSuccessResponse_9() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + booleanArgument, this, OnSuccessCallback_9, OnFailureCallback_9)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_9() { NextTest(); } - CHIP_ERROR TestReadAttributeBooleanFalse_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_10, OnFailureCallback_10)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_10, OnFailureCallback_10)); + return CHIP_NO_ERROR; } - void OnFailureResponse_10(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_10( bool boolean) + void OnSuccessResponse_10(bool boolean) { - VerifyOrReturn(CheckValue("boolean", boolean,0 - )); + VerifyOrReturn(CheckValue("boolean", boolean, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeBitmap8DefaultValue_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_11, OnFailureCallback_11)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_11, OnFailureCallback_11)); + return CHIP_NO_ERROR; } - void OnFailureResponse_11(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_11( uint8_t bitmap8) + void OnSuccessResponse_11(uint8_t bitmap8) { - VerifyOrReturn(CheckValue("bitmap8", bitmap8,0 - )); + VerifyOrReturn(CheckValue("bitmap8", bitmap8, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeBitmap8MaxValue_12() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -63121,53 +48216,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t bitmap8Argument; - bitmap8Argument = 255; - - ReturnErrorOnFailure(cluster.WriteAttribute(bitmap8Argument, this, OnSuccessCallback_12, OnFailureCallback_12)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_12(EmberAfStatus status) - { - ThrowFailureResponse(); - } + bitmap8Argument = 255; - void OnSuccessResponse_12() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + bitmap8Argument, this, OnSuccessCallback_12, OnFailureCallback_12)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_12() { NextTest(); } - CHIP_ERROR TestReadAttributeBitmap8MaxValue_13() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_13, OnFailureCallback_13)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_13, OnFailureCallback_13)); + return CHIP_NO_ERROR; } - void OnFailureResponse_13(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_13(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_13( uint8_t bitmap8) + void OnSuccessResponse_13(uint8_t bitmap8) { - VerifyOrReturn(CheckValue("bitmap8", bitmap8,255 - )); + VerifyOrReturn(CheckValue("bitmap8", bitmap8, 255)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeBitmap8MinValue_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -63175,81 +48254,57 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t bitmap8Argument; - bitmap8Argument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(bitmap8Argument, this, OnSuccessCallback_14, OnFailureCallback_14)); - return CHIP_NO_ERROR; - } + bitmap8Argument = 0; - void OnFailureResponse_14(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_14() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + bitmap8Argument, this, OnSuccessCallback_14, OnFailureCallback_14)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_14() { NextTest(); } - CHIP_ERROR TestReadAttributeBitmap8MinValue_15() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_15, OnFailureCallback_15)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_15, OnFailureCallback_15)); + return CHIP_NO_ERROR; } - void OnFailureResponse_15(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_15(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_15( uint8_t bitmap8) + void OnSuccessResponse_15(uint8_t bitmap8) { - VerifyOrReturn(CheckValue("bitmap8", bitmap8,0 - )); + VerifyOrReturn(CheckValue("bitmap8", bitmap8, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeBitmap16DefaultValue_16() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_16, OnFailureCallback_16)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_16, OnFailureCallback_16)); + return CHIP_NO_ERROR; } - void OnFailureResponse_16(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_16(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_16( uint16_t bitmap16) + void OnSuccessResponse_16(uint16_t bitmap16) { - VerifyOrReturn(CheckValue("bitmap16", bitmap16,0U - )); + VerifyOrReturn(CheckValue("bitmap16", bitmap16, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeBitmap16MaxValue_17() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -63257,53 +48312,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t bitmap16Argument; - bitmap16Argument = 65535U; - - ReturnErrorOnFailure(cluster.WriteAttribute(bitmap16Argument, this, OnSuccessCallback_17, OnFailureCallback_17)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_17(EmberAfStatus status) - { - ThrowFailureResponse(); - } + bitmap16Argument = 65535U; - void OnSuccessResponse_17() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + bitmap16Argument, this, OnSuccessCallback_17, OnFailureCallback_17)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_17(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_17() { NextTest(); } - CHIP_ERROR TestReadAttributeBitmap16MaxValue_18() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_18, OnFailureCallback_18)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_18, OnFailureCallback_18)); + return CHIP_NO_ERROR; } - void OnFailureResponse_18(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_18(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_18( uint16_t bitmap16) + void OnSuccessResponse_18(uint16_t bitmap16) { - VerifyOrReturn(CheckValue("bitmap16", bitmap16,65535U - )); + VerifyOrReturn(CheckValue("bitmap16", bitmap16, 65535U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeBitmap16MinValue_19() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -63311,81 +48350,57 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t bitmap16Argument; - bitmap16Argument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(bitmap16Argument, this, OnSuccessCallback_19, OnFailureCallback_19)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_19(EmberAfStatus status) - { - ThrowFailureResponse(); - } + bitmap16Argument = 0U; - void OnSuccessResponse_19() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + bitmap16Argument, this, OnSuccessCallback_19, OnFailureCallback_19)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_19(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_19() { NextTest(); } - CHIP_ERROR TestReadAttributeBitmap16MinValue_20() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_20, OnFailureCallback_20)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_20, OnFailureCallback_20)); + return CHIP_NO_ERROR; } - void OnFailureResponse_20(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_20(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_20( uint16_t bitmap16) + void OnSuccessResponse_20(uint16_t bitmap16) { - VerifyOrReturn(CheckValue("bitmap16", bitmap16,0U - )); + VerifyOrReturn(CheckValue("bitmap16", bitmap16, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeBitmap32DefaultValue_21() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_21, OnFailureCallback_21)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_21, OnFailureCallback_21)); + return CHIP_NO_ERROR; } - void OnFailureResponse_21(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_21(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_21( uint32_t bitmap32) + void OnSuccessResponse_21(uint32_t bitmap32) { - VerifyOrReturn(CheckValue("bitmap32", bitmap32,0UL - )); + VerifyOrReturn(CheckValue("bitmap32", bitmap32, 0UL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeBitmap32MaxValue_22() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -63393,53 +48408,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint32_t bitmap32Argument; - bitmap32Argument = 4294967295UL; - - ReturnErrorOnFailure(cluster.WriteAttribute(bitmap32Argument, this, OnSuccessCallback_22, OnFailureCallback_22)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_22(EmberAfStatus status) - { - ThrowFailureResponse(); - } + bitmap32Argument = 4294967295UL; - void OnSuccessResponse_22() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + bitmap32Argument, this, OnSuccessCallback_22, OnFailureCallback_22)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_22(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_22() { NextTest(); } - CHIP_ERROR TestReadAttributeBitmap32MaxValue_23() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_23, OnFailureCallback_23)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_23, OnFailureCallback_23)); + return CHIP_NO_ERROR; } - void OnFailureResponse_23(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_23(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_23( uint32_t bitmap32) + void OnSuccessResponse_23(uint32_t bitmap32) { - VerifyOrReturn(CheckValue("bitmap32", bitmap32,4294967295UL - )); + VerifyOrReturn(CheckValue("bitmap32", bitmap32, 4294967295UL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeBitmap32MinValue_24() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -63447,81 +48446,57 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint32_t bitmap32Argument; - bitmap32Argument = 0UL; - - ReturnErrorOnFailure(cluster.WriteAttribute(bitmap32Argument, this, OnSuccessCallback_24, OnFailureCallback_24)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_24(EmberAfStatus status) - { - ThrowFailureResponse(); - } + bitmap32Argument = 0UL; - void OnSuccessResponse_24() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + bitmap32Argument, this, OnSuccessCallback_24, OnFailureCallback_24)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_24(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_24() { NextTest(); } - CHIP_ERROR TestReadAttributeBitmap32MinValue_25() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_25, OnFailureCallback_25)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_25, OnFailureCallback_25)); + return CHIP_NO_ERROR; } - void OnFailureResponse_25(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_25(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_25( uint32_t bitmap32) + void OnSuccessResponse_25(uint32_t bitmap32) { - VerifyOrReturn(CheckValue("bitmap32", bitmap32,0UL - )); + VerifyOrReturn(CheckValue("bitmap32", bitmap32, 0UL)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeBitmap64DefaultValue_26() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_26, OnFailureCallback_26)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_26, OnFailureCallback_26)); + return CHIP_NO_ERROR; } - void OnFailureResponse_26(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_26(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_26( uint64_t bitmap64) + void OnSuccessResponse_26(uint64_t bitmap64) { - VerifyOrReturn(CheckValue("bitmap64", bitmap64,0ULL - )); + VerifyOrReturn(CheckValue("bitmap64", bitmap64, 0ULL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeBitmap64MaxValue_27() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -63529,53 +48504,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint64_t bitmap64Argument; - bitmap64Argument = 18446744073709551615ULL; - - ReturnErrorOnFailure(cluster.WriteAttribute(bitmap64Argument, this, OnSuccessCallback_27, OnFailureCallback_27)); - return CHIP_NO_ERROR; - } + bitmap64Argument = 18446744073709551615ULL; - void OnFailureResponse_27(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_27() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + bitmap64Argument, this, OnSuccessCallback_27, OnFailureCallback_27)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_27(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_27() { NextTest(); } - CHIP_ERROR TestReadAttributeBitmap64MaxValue_28() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_28, OnFailureCallback_28)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_28, OnFailureCallback_28)); + return CHIP_NO_ERROR; } - void OnFailureResponse_28(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_28(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_28( uint64_t bitmap64) + void OnSuccessResponse_28(uint64_t bitmap64) { - VerifyOrReturn(CheckValue("bitmap64", bitmap64,18446744073709551615ULL - )); + VerifyOrReturn(CheckValue("bitmap64", bitmap64, 18446744073709551615ULL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeBitmap64MinValue_29() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -63583,81 +48542,57 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint64_t bitmap64Argument; - bitmap64Argument = 0ULL; - - ReturnErrorOnFailure(cluster.WriteAttribute(bitmap64Argument, this, OnSuccessCallback_29, OnFailureCallback_29)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_29(EmberAfStatus status) - { - ThrowFailureResponse(); - } + bitmap64Argument = 0ULL; - void OnSuccessResponse_29() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + bitmap64Argument, this, OnSuccessCallback_29, OnFailureCallback_29)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_29(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_29() { NextTest(); } - CHIP_ERROR TestReadAttributeBitmap64MinValue_30() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_30, OnFailureCallback_30)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_30, OnFailureCallback_30)); + return CHIP_NO_ERROR; } - void OnFailureResponse_30(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_30(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_30( uint64_t bitmap64) + void OnSuccessResponse_30(uint64_t bitmap64) { - VerifyOrReturn(CheckValue("bitmap64", bitmap64,0ULL - )); + VerifyOrReturn(CheckValue("bitmap64", bitmap64, 0ULL)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeInt8uDefaultValue_31() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_31, OnFailureCallback_31)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_31, OnFailureCallback_31)); + return CHIP_NO_ERROR; } - void OnFailureResponse_31(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_31(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_31( uint8_t int8u) + void OnSuccessResponse_31(uint8_t int8u) { - VerifyOrReturn(CheckValue("int8u", int8u,0 - )); + VerifyOrReturn(CheckValue("int8u", int8u, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt8uMaxValue_32() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -63665,53 +48600,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t int8uArgument; - int8uArgument = 255; - - ReturnErrorOnFailure(cluster.WriteAttribute(int8uArgument, this, OnSuccessCallback_32, OnFailureCallback_32)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_32(EmberAfStatus status) - { - ThrowFailureResponse(); - } + int8uArgument = 255; - void OnSuccessResponse_32() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + int8uArgument, this, OnSuccessCallback_32, OnFailureCallback_32)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_32(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_32() { NextTest(); } - CHIP_ERROR TestReadAttributeInt8uMaxValue_33() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_33, OnFailureCallback_33)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_33, OnFailureCallback_33)); + return CHIP_NO_ERROR; } - void OnFailureResponse_33(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_33(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_33( uint8_t int8u) + void OnSuccessResponse_33(uint8_t int8u) { - VerifyOrReturn(CheckValue("int8u", int8u,255 - )); + VerifyOrReturn(CheckValue("int8u", int8u, 255)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt8uMinValue_34() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -63719,81 +48638,57 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t int8uArgument; - int8uArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(int8uArgument, this, OnSuccessCallback_34, OnFailureCallback_34)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_34(EmberAfStatus status) - { - ThrowFailureResponse(); - } + int8uArgument = 0; - void OnSuccessResponse_34() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + int8uArgument, this, OnSuccessCallback_34, OnFailureCallback_34)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_34(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_34() { NextTest(); } - CHIP_ERROR TestReadAttributeInt8uMinValue_35() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_35, OnFailureCallback_35)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_35, OnFailureCallback_35)); + return CHIP_NO_ERROR; } - void OnFailureResponse_35(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_35(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_35( uint8_t int8u) + void OnSuccessResponse_35(uint8_t int8u) { - VerifyOrReturn(CheckValue("int8u", int8u,0 - )); + VerifyOrReturn(CheckValue("int8u", int8u, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeInt16uDefaultValue_36() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_36, OnFailureCallback_36)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_36, OnFailureCallback_36)); + return CHIP_NO_ERROR; } - void OnFailureResponse_36(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_36(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_36( uint16_t int16u) + void OnSuccessResponse_36(uint16_t int16u) { - VerifyOrReturn(CheckValue("int16u", int16u,0U - )); + VerifyOrReturn(CheckValue("int16u", int16u, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt16uMaxValue_37() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -63801,53 +48696,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t int16uArgument; - int16uArgument = 65535U; - - ReturnErrorOnFailure(cluster.WriteAttribute(int16uArgument, this, OnSuccessCallback_37, OnFailureCallback_37)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_37(EmberAfStatus status) - { - ThrowFailureResponse(); - } + int16uArgument = 65535U; - void OnSuccessResponse_37() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + int16uArgument, this, OnSuccessCallback_37, OnFailureCallback_37)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_37(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_37() { NextTest(); } - CHIP_ERROR TestReadAttributeInt16uMaxValue_38() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_38, OnFailureCallback_38)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_38, OnFailureCallback_38)); + return CHIP_NO_ERROR; } - void OnFailureResponse_38(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_38(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_38( uint16_t int16u) + void OnSuccessResponse_38(uint16_t int16u) { - VerifyOrReturn(CheckValue("int16u", int16u,65535U - )); + VerifyOrReturn(CheckValue("int16u", int16u, 65535U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt16uMinValue_39() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -63855,81 +48734,57 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t int16uArgument; - int16uArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(int16uArgument, this, OnSuccessCallback_39, OnFailureCallback_39)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_39(EmberAfStatus status) - { - ThrowFailureResponse(); - } + int16uArgument = 0U; - void OnSuccessResponse_39() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + int16uArgument, this, OnSuccessCallback_39, OnFailureCallback_39)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_39(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_39() { NextTest(); } - CHIP_ERROR TestReadAttributeInt16uMinValue_40() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_40, OnFailureCallback_40)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_40, OnFailureCallback_40)); + return CHIP_NO_ERROR; } - void OnFailureResponse_40(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_40(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_40( uint16_t int16u) + void OnSuccessResponse_40(uint16_t int16u) { - VerifyOrReturn(CheckValue("int16u", int16u,0U - )); + VerifyOrReturn(CheckValue("int16u", int16u, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeInt32uDefaultValue_41() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_41, OnFailureCallback_41)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_41, OnFailureCallback_41)); + return CHIP_NO_ERROR; } - void OnFailureResponse_41(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_41(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_41( uint32_t int32u) + void OnSuccessResponse_41(uint32_t int32u) { - VerifyOrReturn(CheckValue("int32u", int32u,0UL - )); + VerifyOrReturn(CheckValue("int32u", int32u, 0UL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt32uMaxValue_42() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -63937,53 +48792,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint32_t int32uArgument; - int32uArgument = 4294967295UL; - - ReturnErrorOnFailure(cluster.WriteAttribute(int32uArgument, this, OnSuccessCallback_42, OnFailureCallback_42)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_42(EmberAfStatus status) - { - ThrowFailureResponse(); - } + int32uArgument = 4294967295UL; - void OnSuccessResponse_42() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + int32uArgument, this, OnSuccessCallback_42, OnFailureCallback_42)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_42(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_42() { NextTest(); } - CHIP_ERROR TestReadAttributeInt32uMaxValue_43() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_43, OnFailureCallback_43)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_43, OnFailureCallback_43)); + return CHIP_NO_ERROR; } - void OnFailureResponse_43(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_43(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_43( uint32_t int32u) + void OnSuccessResponse_43(uint32_t int32u) { - VerifyOrReturn(CheckValue("int32u", int32u,4294967295UL - )); + VerifyOrReturn(CheckValue("int32u", int32u, 4294967295UL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt32uMinValue_44() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -63991,81 +48830,57 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint32_t int32uArgument; - int32uArgument = 0UL; - - ReturnErrorOnFailure(cluster.WriteAttribute(int32uArgument, this, OnSuccessCallback_44, OnFailureCallback_44)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_44(EmberAfStatus status) - { - ThrowFailureResponse(); - } + int32uArgument = 0UL; - void OnSuccessResponse_44() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + int32uArgument, this, OnSuccessCallback_44, OnFailureCallback_44)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_44(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_44() { NextTest(); } - CHIP_ERROR TestReadAttributeInt32uMinValue_45() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_45, OnFailureCallback_45)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_45, OnFailureCallback_45)); + return CHIP_NO_ERROR; } - void OnFailureResponse_45(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_45(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_45( uint32_t int32u) + void OnSuccessResponse_45(uint32_t int32u) { - VerifyOrReturn(CheckValue("int32u", int32u,0UL - )); + VerifyOrReturn(CheckValue("int32u", int32u, 0UL)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeInt64uDefaultValue_46() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_46, OnFailureCallback_46)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_46, OnFailureCallback_46)); + return CHIP_NO_ERROR; } - void OnFailureResponse_46(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_46(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_46( uint64_t int64u) + void OnSuccessResponse_46(uint64_t int64u) { - VerifyOrReturn(CheckValue("int64u", int64u,0ULL - )); + VerifyOrReturn(CheckValue("int64u", int64u, 0ULL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt64uMaxValue_47() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -64073,53 +48888,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint64_t int64uArgument; - int64uArgument = 18446744073709551615ULL; - - ReturnErrorOnFailure(cluster.WriteAttribute(int64uArgument, this, OnSuccessCallback_47, OnFailureCallback_47)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_47(EmberAfStatus status) - { - ThrowFailureResponse(); - } + int64uArgument = 18446744073709551615ULL; - void OnSuccessResponse_47() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + int64uArgument, this, OnSuccessCallback_47, OnFailureCallback_47)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_47(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_47() { NextTest(); } - CHIP_ERROR TestReadAttributeInt64uMaxValue_48() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_48, OnFailureCallback_48)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_48, OnFailureCallback_48)); + return CHIP_NO_ERROR; } - void OnFailureResponse_48(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_48(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_48( uint64_t int64u) + void OnSuccessResponse_48(uint64_t int64u) { - VerifyOrReturn(CheckValue("int64u", int64u,18446744073709551615ULL - )); + VerifyOrReturn(CheckValue("int64u", int64u, 18446744073709551615ULL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt64uMinValue_49() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -64127,81 +48926,57 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint64_t int64uArgument; - int64uArgument = 0ULL; - - ReturnErrorOnFailure(cluster.WriteAttribute(int64uArgument, this, OnSuccessCallback_49, OnFailureCallback_49)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_49(EmberAfStatus status) - { - ThrowFailureResponse(); - } + int64uArgument = 0ULL; - void OnSuccessResponse_49() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + int64uArgument, this, OnSuccessCallback_49, OnFailureCallback_49)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_49(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_49() { NextTest(); } - CHIP_ERROR TestReadAttributeInt64uMinValue_50() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_50, OnFailureCallback_50)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_50, OnFailureCallback_50)); + return CHIP_NO_ERROR; } - void OnFailureResponse_50(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_50(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_50( uint64_t int64u) + void OnSuccessResponse_50(uint64_t int64u) { - VerifyOrReturn(CheckValue("int64u", int64u,0ULL - )); + VerifyOrReturn(CheckValue("int64u", int64u, 0ULL)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeInt8sDefaultValue_51() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_51, OnFailureCallback_51)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_51, OnFailureCallback_51)); + return CHIP_NO_ERROR; } - void OnFailureResponse_51(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_51(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_51( int8_t int8s) + void OnSuccessResponse_51(int8_t int8s) { - VerifyOrReturn(CheckValue("int8s", int8s,0 - )); + VerifyOrReturn(CheckValue("int8s", int8s, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt8sMaxValue_52() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -64209,53 +48984,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int8_t int8sArgument; - int8sArgument = 127; - - ReturnErrorOnFailure(cluster.WriteAttribute(int8sArgument, this, OnSuccessCallback_52, OnFailureCallback_52)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_52(EmberAfStatus status) - { - ThrowFailureResponse(); - } + int8sArgument = 127; - void OnSuccessResponse_52() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + int8sArgument, this, OnSuccessCallback_52, OnFailureCallback_52)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_52(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_52() { NextTest(); } - CHIP_ERROR TestReadAttributeInt8sMaxValue_53() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_53, OnFailureCallback_53)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_53, OnFailureCallback_53)); + return CHIP_NO_ERROR; } - void OnFailureResponse_53(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_53(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_53( int8_t int8s) + void OnSuccessResponse_53(int8_t int8s) { - VerifyOrReturn(CheckValue("int8s", int8s,127 - )); + VerifyOrReturn(CheckValue("int8s", int8s, 127)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt8sMinValue_54() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -64263,53 +49022,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int8_t int8sArgument; - int8sArgument = -128; - - ReturnErrorOnFailure(cluster.WriteAttribute(int8sArgument, this, OnSuccessCallback_54, OnFailureCallback_54)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_54(EmberAfStatus status) - { - ThrowFailureResponse(); - } + int8sArgument = -128; - void OnSuccessResponse_54() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + int8sArgument, this, OnSuccessCallback_54, OnFailureCallback_54)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_54(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_54() { NextTest(); } - CHIP_ERROR TestReadAttributeInt8sMinValue_55() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_55, OnFailureCallback_55)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_55, OnFailureCallback_55)); + return CHIP_NO_ERROR; } - void OnFailureResponse_55(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_55(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_55( int8_t int8s) + void OnSuccessResponse_55(int8_t int8s) { - VerifyOrReturn(CheckValue("int8s", int8s,-128 - )); + VerifyOrReturn(CheckValue("int8s", int8s, -128)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt8sDefaultValue_56() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -64317,81 +49060,57 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int8_t int8sArgument; - int8sArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(int8sArgument, this, OnSuccessCallback_56, OnFailureCallback_56)); - return CHIP_NO_ERROR; - } + int8sArgument = 0; - void OnFailureResponse_56(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_56() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + int8sArgument, this, OnSuccessCallback_56, OnFailureCallback_56)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_56(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_56() { NextTest(); } - CHIP_ERROR TestReadAttributeInt8sDefaultValue_57() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_57, OnFailureCallback_57)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_57, OnFailureCallback_57)); + return CHIP_NO_ERROR; } - void OnFailureResponse_57(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_57(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_57( int8_t int8s) + void OnSuccessResponse_57(int8_t int8s) { - VerifyOrReturn(CheckValue("int8s", int8s,0 - )); + VerifyOrReturn(CheckValue("int8s", int8s, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeInt16sDefaultValue_58() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_58, OnFailureCallback_58)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_58, OnFailureCallback_58)); + return CHIP_NO_ERROR; } - void OnFailureResponse_58(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_58(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_58( int16_t int16s) + void OnSuccessResponse_58(int16_t int16s) { - VerifyOrReturn(CheckValue("int16s", int16s,0 - )); + VerifyOrReturn(CheckValue("int16s", int16s, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt16sMaxValue_59() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -64399,53 +49118,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t int16sArgument; - int16sArgument = 32767; - - ReturnErrorOnFailure(cluster.WriteAttribute(int16sArgument, this, OnSuccessCallback_59, OnFailureCallback_59)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_59(EmberAfStatus status) - { - ThrowFailureResponse(); - } + int16sArgument = 32767; - void OnSuccessResponse_59() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + int16sArgument, this, OnSuccessCallback_59, OnFailureCallback_59)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_59(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_59() { NextTest(); } - CHIP_ERROR TestReadAttributeInt16sMaxValue_60() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_60, OnFailureCallback_60)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_60, OnFailureCallback_60)); + return CHIP_NO_ERROR; } - void OnFailureResponse_60(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_60(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_60( int16_t int16s) + void OnSuccessResponse_60(int16_t int16s) { - VerifyOrReturn(CheckValue("int16s", int16s,32767 - )); + VerifyOrReturn(CheckValue("int16s", int16s, 32767)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt16sMinValue_61() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -64453,53 +49156,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t int16sArgument; - int16sArgument = -32768; - - ReturnErrorOnFailure(cluster.WriteAttribute(int16sArgument, this, OnSuccessCallback_61, OnFailureCallback_61)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_61(EmberAfStatus status) - { - ThrowFailureResponse(); - } + int16sArgument = -32768; - void OnSuccessResponse_61() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + int16sArgument, this, OnSuccessCallback_61, OnFailureCallback_61)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_61(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_61() { NextTest(); } - CHIP_ERROR TestReadAttributeInt16sMinValue_62() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_62, OnFailureCallback_62)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_62, OnFailureCallback_62)); + return CHIP_NO_ERROR; } - void OnFailureResponse_62(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_62(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_62( int16_t int16s) + void OnSuccessResponse_62(int16_t int16s) { - VerifyOrReturn(CheckValue("int16s", int16s,-32768 - )); + VerifyOrReturn(CheckValue("int16s", int16s, -32768)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt16sDefaultValue_63() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -64507,81 +49194,57 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t int16sArgument; - int16sArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(int16sArgument, this, OnSuccessCallback_63, OnFailureCallback_63)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_63(EmberAfStatus status) - { - ThrowFailureResponse(); - } + int16sArgument = 0; - void OnSuccessResponse_63() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + int16sArgument, this, OnSuccessCallback_63, OnFailureCallback_63)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_63(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_63() { NextTest(); } - CHIP_ERROR TestReadAttributeInt16sDefaultValue_64() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_64, OnFailureCallback_64)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_64, OnFailureCallback_64)); + return CHIP_NO_ERROR; } - void OnFailureResponse_64(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_64(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_64( int16_t int16s) + void OnSuccessResponse_64(int16_t int16s) { - VerifyOrReturn(CheckValue("int16s", int16s,0 - )); + VerifyOrReturn(CheckValue("int16s", int16s, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeInt32sDefaultValue_65() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_65, OnFailureCallback_65)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_65, OnFailureCallback_65)); + return CHIP_NO_ERROR; } - void OnFailureResponse_65(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_65(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_65( int32_t int32s) + void OnSuccessResponse_65(int32_t int32s) { - VerifyOrReturn(CheckValue("int32s", int32s,0L - )); + VerifyOrReturn(CheckValue("int32s", int32s, 0L)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt32sMaxValue_66() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -64589,53 +49252,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int32_t int32sArgument; - int32sArgument = 2147483647L; - - ReturnErrorOnFailure(cluster.WriteAttribute(int32sArgument, this, OnSuccessCallback_66, OnFailureCallback_66)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_66(EmberAfStatus status) - { - ThrowFailureResponse(); - } + int32sArgument = 2147483647L; - void OnSuccessResponse_66() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + int32sArgument, this, OnSuccessCallback_66, OnFailureCallback_66)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_66(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_66() { NextTest(); } - CHIP_ERROR TestReadAttributeInt32sMaxValue_67() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_67, OnFailureCallback_67)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_67, OnFailureCallback_67)); + return CHIP_NO_ERROR; } - void OnFailureResponse_67(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_67(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_67( int32_t int32s) + void OnSuccessResponse_67(int32_t int32s) { - VerifyOrReturn(CheckValue("int32s", int32s,2147483647L - )); + VerifyOrReturn(CheckValue("int32s", int32s, 2147483647L)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt32sMinValue_68() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -64643,53 +49290,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int32_t int32sArgument; - int32sArgument = -2147483648L; - - ReturnErrorOnFailure(cluster.WriteAttribute(int32sArgument, this, OnSuccessCallback_68, OnFailureCallback_68)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_68(EmberAfStatus status) - { - ThrowFailureResponse(); - } + int32sArgument = -2147483648L; - void OnSuccessResponse_68() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + int32sArgument, this, OnSuccessCallback_68, OnFailureCallback_68)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_68(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_68() { NextTest(); } - CHIP_ERROR TestReadAttributeInt32sMinValue_69() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_69, OnFailureCallback_69)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_69, OnFailureCallback_69)); + return CHIP_NO_ERROR; } - void OnFailureResponse_69(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_69(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_69( int32_t int32s) + void OnSuccessResponse_69(int32_t int32s) { - VerifyOrReturn(CheckValue("int32s", int32s,-2147483648L - )); + VerifyOrReturn(CheckValue("int32s", int32s, -2147483648L)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt32sDefaultValue_70() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -64697,81 +49328,57 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int32_t int32sArgument; - int32sArgument = 0L; - - ReturnErrorOnFailure(cluster.WriteAttribute(int32sArgument, this, OnSuccessCallback_70, OnFailureCallback_70)); - return CHIP_NO_ERROR; - } + int32sArgument = 0L; - void OnFailureResponse_70(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_70() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + int32sArgument, this, OnSuccessCallback_70, OnFailureCallback_70)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_70(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_70() { NextTest(); } - CHIP_ERROR TestReadAttributeInt32sDefaultValue_71() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_71, OnFailureCallback_71)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_71, OnFailureCallback_71)); + return CHIP_NO_ERROR; } - void OnFailureResponse_71(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_71(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_71( int32_t int32s) + void OnSuccessResponse_71(int32_t int32s) { - VerifyOrReturn(CheckValue("int32s", int32s,0L - )); + VerifyOrReturn(CheckValue("int32s", int32s, 0L)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeInt64sDefaultValue_72() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_72, OnFailureCallback_72)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_72, OnFailureCallback_72)); + return CHIP_NO_ERROR; } - void OnFailureResponse_72(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_72(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_72( int64_t int64s) + void OnSuccessResponse_72(int64_t int64s) { - VerifyOrReturn(CheckValue("int64s", int64s,0LL - )); + VerifyOrReturn(CheckValue("int64s", int64s, 0LL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt64sMaxValue_73() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -64779,53 +49386,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int64_t int64sArgument; - int64sArgument = 9223372036854775807LL; - - ReturnErrorOnFailure(cluster.WriteAttribute(int64sArgument, this, OnSuccessCallback_73, OnFailureCallback_73)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_73(EmberAfStatus status) - { - ThrowFailureResponse(); - } + int64sArgument = 9223372036854775807LL; - void OnSuccessResponse_73() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + int64sArgument, this, OnSuccessCallback_73, OnFailureCallback_73)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_73(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_73() { NextTest(); } - CHIP_ERROR TestReadAttributeInt64sMaxValue_74() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_74, OnFailureCallback_74)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_74, OnFailureCallback_74)); + return CHIP_NO_ERROR; } - void OnFailureResponse_74(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_74(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_74( int64_t int64s) + void OnSuccessResponse_74(int64_t int64s) { - VerifyOrReturn(CheckValue("int64s", int64s,9223372036854775807LL - )); + VerifyOrReturn(CheckValue("int64s", int64s, 9223372036854775807LL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt64sMinValue_75() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -64833,53 +49424,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int64_t int64sArgument; - int64sArgument = -9223372036854775807LL; - - ReturnErrorOnFailure(cluster.WriteAttribute(int64sArgument, this, OnSuccessCallback_75, OnFailureCallback_75)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_75(EmberAfStatus status) - { - ThrowFailureResponse(); - } + int64sArgument = -9223372036854775807LL; - void OnSuccessResponse_75() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + int64sArgument, this, OnSuccessCallback_75, OnFailureCallback_75)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_75(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_75() { NextTest(); } - CHIP_ERROR TestReadAttributeInt64sMinValue_76() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_76, OnFailureCallback_76)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_76, OnFailureCallback_76)); + return CHIP_NO_ERROR; } - void OnFailureResponse_76(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_76(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_76( int64_t int64s) + void OnSuccessResponse_76(int64_t int64s) { - VerifyOrReturn(CheckValue("int64s", int64s,-9223372036854775807LL - )); + VerifyOrReturn(CheckValue("int64s", int64s, -9223372036854775807LL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt64sDefaultValue_77() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -64887,81 +49462,57 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int64_t int64sArgument; - int64sArgument = 0LL; - - ReturnErrorOnFailure(cluster.WriteAttribute(int64sArgument, this, OnSuccessCallback_77, OnFailureCallback_77)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_77(EmberAfStatus status) - { - ThrowFailureResponse(); - } + int64sArgument = 0LL; - void OnSuccessResponse_77() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + int64sArgument, this, OnSuccessCallback_77, OnFailureCallback_77)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_77(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_77() { NextTest(); } - CHIP_ERROR TestReadAttributeInt64sDefaultValue_78() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_78, OnFailureCallback_78)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_78, OnFailureCallback_78)); + return CHIP_NO_ERROR; } - void OnFailureResponse_78(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_78(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_78( int64_t int64s) + void OnSuccessResponse_78(int64_t int64s) { - VerifyOrReturn(CheckValue("int64s", int64s,0LL - )); + VerifyOrReturn(CheckValue("int64s", int64s, 0LL)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeSingleDefaultValue_79() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_79, OnFailureCallback_79)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_79, OnFailureCallback_79)); + return CHIP_NO_ERROR; } - void OnFailureResponse_79(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_79(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_79( float floatSingle) + void OnSuccessResponse_79(float floatSingle) { - VerifyOrReturn(CheckValue("floatSingle", floatSingle,0.0f - )); + VerifyOrReturn(CheckValue("floatSingle", floatSingle, 0.0f)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeSingleMediumValue_80() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -64969,53 +49520,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); float floatSingleArgument; - floatSingleArgument = 0.1f; - - ReturnErrorOnFailure(cluster.WriteAttribute(floatSingleArgument, this, OnSuccessCallback_80, OnFailureCallback_80)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_80(EmberAfStatus status) - { - ThrowFailureResponse(); - } + floatSingleArgument = 0.1f; - void OnSuccessResponse_80() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + floatSingleArgument, this, OnSuccessCallback_80, OnFailureCallback_80)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_80(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_80() { NextTest(); } - CHIP_ERROR TestReadAttributeSingleMediumValue_81() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_81, OnFailureCallback_81)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_81, OnFailureCallback_81)); + return CHIP_NO_ERROR; } - void OnFailureResponse_81(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_81(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_81( float floatSingle) + void OnSuccessResponse_81(float floatSingle) { - VerifyOrReturn(CheckValue("floatSingle", floatSingle,0.1f - )); + VerifyOrReturn(CheckValue("floatSingle", floatSingle, 0.1f)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeSingleLargeValue_82() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -65023,53 +49558,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); float floatSingleArgument; - floatSingleArgument = 17000000000.0f; - - ReturnErrorOnFailure(cluster.WriteAttribute(floatSingleArgument, this, OnSuccessCallback_82, OnFailureCallback_82)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_82(EmberAfStatus status) - { - ThrowFailureResponse(); - } + floatSingleArgument = 17000000000.0f; - void OnSuccessResponse_82() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + floatSingleArgument, this, OnSuccessCallback_82, OnFailureCallback_82)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_82(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_82() { NextTest(); } - CHIP_ERROR TestReadAttributeSingleLargeValue_83() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_83, OnFailureCallback_83)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_83, OnFailureCallback_83)); + return CHIP_NO_ERROR; } - void OnFailureResponse_83(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_83(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_83( float floatSingle) + void OnSuccessResponse_83(float floatSingle) { - VerifyOrReturn(CheckValue("floatSingle", floatSingle,17000000000.0f - )); + VerifyOrReturn(CheckValue("floatSingle", floatSingle, 17000000000.0f)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeSingleSmallValue_84() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -65077,53 +49596,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); float floatSingleArgument; - floatSingleArgument = 1.7e-10f; - - ReturnErrorOnFailure(cluster.WriteAttribute(floatSingleArgument, this, OnSuccessCallback_84, OnFailureCallback_84)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_84(EmberAfStatus status) - { - ThrowFailureResponse(); - } + floatSingleArgument = 1.7e-10f; - void OnSuccessResponse_84() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + floatSingleArgument, this, OnSuccessCallback_84, OnFailureCallback_84)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_84(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_84() { NextTest(); } - CHIP_ERROR TestReadAttributeSingleSmallValue_85() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_85, OnFailureCallback_85)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_85, OnFailureCallback_85)); + return CHIP_NO_ERROR; } - void OnFailureResponse_85(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_85(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_85( float floatSingle) + void OnSuccessResponse_85(float floatSingle) { - VerifyOrReturn(CheckValue("floatSingle", floatSingle,1.7e-10f - )); + VerifyOrReturn(CheckValue("floatSingle", floatSingle, 1.7e-10f)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeSingleDefaultValue_86() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -65131,81 +49634,57 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); float floatSingleArgument; - floatSingleArgument = 0.0f; - - ReturnErrorOnFailure(cluster.WriteAttribute(floatSingleArgument, this, OnSuccessCallback_86, OnFailureCallback_86)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_86(EmberAfStatus status) - { - ThrowFailureResponse(); - } + floatSingleArgument = 0.0f; - void OnSuccessResponse_86() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + floatSingleArgument, this, OnSuccessCallback_86, OnFailureCallback_86)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_86(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_86() { NextTest(); } - CHIP_ERROR TestReadAttributeSingleDefaultValue_87() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_87, OnFailureCallback_87)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_87, OnFailureCallback_87)); + return CHIP_NO_ERROR; } - void OnFailureResponse_87(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_87(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_87( float floatSingle) + void OnSuccessResponse_87(float floatSingle) { - VerifyOrReturn(CheckValue("floatSingle", floatSingle,0.0f - )); + VerifyOrReturn(CheckValue("floatSingle", floatSingle, 0.0f)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeDoubleDefaultValue_88() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_88, OnFailureCallback_88)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_88, OnFailureCallback_88)); + return CHIP_NO_ERROR; } - void OnFailureResponse_88(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_88(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_88( double floatDouble) + void OnSuccessResponse_88(double floatDouble) { - VerifyOrReturn(CheckValue("floatDouble", floatDouble,0 - )); + VerifyOrReturn(CheckValue("floatDouble", floatDouble, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeDoubleMediumValue_89() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -65213,53 +49692,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); double floatDoubleArgument; - floatDoubleArgument = 0.1234567890123; - - ReturnErrorOnFailure(cluster.WriteAttribute(floatDoubleArgument, this, OnSuccessCallback_89, OnFailureCallback_89)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_89(EmberAfStatus status) - { - ThrowFailureResponse(); - } + floatDoubleArgument = 0.1234567890123; - void OnSuccessResponse_89() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + floatDoubleArgument, this, OnSuccessCallback_89, OnFailureCallback_89)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_89(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_89() { NextTest(); } - CHIP_ERROR TestReadAttributeDoubleMediumValue_90() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_90, OnFailureCallback_90)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_90, OnFailureCallback_90)); + return CHIP_NO_ERROR; } - void OnFailureResponse_90(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_90(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_90( double floatDouble) + void OnSuccessResponse_90(double floatDouble) { - VerifyOrReturn(CheckValue("floatDouble", floatDouble,0.1234567890123 - )); + VerifyOrReturn(CheckValue("floatDouble", floatDouble, 0.1234567890123)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeDoubleLargeValue_91() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -65267,53 +49730,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); double floatDoubleArgument; - floatDoubleArgument = 1.7e+200; - - ReturnErrorOnFailure(cluster.WriteAttribute(floatDoubleArgument, this, OnSuccessCallback_91, OnFailureCallback_91)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_91(EmberAfStatus status) - { - ThrowFailureResponse(); - } + floatDoubleArgument = 1.7e+200; - void OnSuccessResponse_91() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + floatDoubleArgument, this, OnSuccessCallback_91, OnFailureCallback_91)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_91(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_91() { NextTest(); } - CHIP_ERROR TestReadAttributeDoubleLargeValue_92() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_92, OnFailureCallback_92)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_92, OnFailureCallback_92)); + return CHIP_NO_ERROR; } - void OnFailureResponse_92(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_92(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_92( double floatDouble) + void OnSuccessResponse_92(double floatDouble) { - VerifyOrReturn(CheckValue("floatDouble", floatDouble,1.7e+200 - )); + VerifyOrReturn(CheckValue("floatDouble", floatDouble, 1.7e+200)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeDoubleSmallValue_93() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -65321,53 +49768,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); double floatDoubleArgument; - floatDoubleArgument = 1.7e-200; - - ReturnErrorOnFailure(cluster.WriteAttribute(floatDoubleArgument, this, OnSuccessCallback_93, OnFailureCallback_93)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_93(EmberAfStatus status) - { - ThrowFailureResponse(); - } + floatDoubleArgument = 1.7e-200; - void OnSuccessResponse_93() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + floatDoubleArgument, this, OnSuccessCallback_93, OnFailureCallback_93)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_93(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_93() { NextTest(); } - CHIP_ERROR TestReadAttributeDoubleSmallValue_94() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_94, OnFailureCallback_94)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_94, OnFailureCallback_94)); + return CHIP_NO_ERROR; } - void OnFailureResponse_94(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_94(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_94( double floatDouble) + void OnSuccessResponse_94(double floatDouble) { - VerifyOrReturn(CheckValue("floatDouble", floatDouble,1.7e-200 - )); + VerifyOrReturn(CheckValue("floatDouble", floatDouble, 1.7e-200)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeDoubleDefaultValue_95() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -65375,81 +49806,57 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); double floatDoubleArgument; - floatDoubleArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(floatDoubleArgument, this, OnSuccessCallback_95, OnFailureCallback_95)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_95(EmberAfStatus status) - { - ThrowFailureResponse(); - } + floatDoubleArgument = 0; - void OnSuccessResponse_95() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + floatDoubleArgument, this, OnSuccessCallback_95, OnFailureCallback_95)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_95(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_95() { NextTest(); } - CHIP_ERROR TestReadAttributeDoubleDefaultValue_96() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_96, OnFailureCallback_96)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_96, OnFailureCallback_96)); + return CHIP_NO_ERROR; } - void OnFailureResponse_96(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_96( double floatDouble) - { - VerifyOrReturn(CheckValue("floatDouble", floatDouble,0 - )); - - NextTest(); - } + void OnFailureResponse_96(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_96(double floatDouble) + { + VerifyOrReturn(CheckValue("floatDouble", floatDouble, 0)); - + NextTest(); + } - CHIP_ERROR TestReadAttributeEnum8DefaultValue_97() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_97, OnFailureCallback_97)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_97, OnFailureCallback_97)); + return CHIP_NO_ERROR; } - void OnFailureResponse_97(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_97(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_97( uint8_t enum8) + void OnSuccessResponse_97(uint8_t enum8) { - VerifyOrReturn(CheckValue("enum8", enum8,0 - )); + VerifyOrReturn(CheckValue("enum8", enum8, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeEnum8MaxValue_98() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -65457,53 +49864,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t enum8Argument; - enum8Argument = 255; - - ReturnErrorOnFailure(cluster.WriteAttribute(enum8Argument, this, OnSuccessCallback_98, OnFailureCallback_98)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_98(EmberAfStatus status) - { - ThrowFailureResponse(); - } + enum8Argument = 255; - void OnSuccessResponse_98() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + enum8Argument, this, OnSuccessCallback_98, OnFailureCallback_98)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_98(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_98() { NextTest(); } - CHIP_ERROR TestReadAttributeEnum8MaxValue_99() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_99, OnFailureCallback_99)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_99, OnFailureCallback_99)); + return CHIP_NO_ERROR; } - void OnFailureResponse_99(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_99(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_99( uint8_t enum8) + void OnSuccessResponse_99(uint8_t enum8) { - VerifyOrReturn(CheckValue("enum8", enum8,255 - )); + VerifyOrReturn(CheckValue("enum8", enum8, 255)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeEnum8MinValue_100() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -65511,81 +49902,57 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t enum8Argument; - enum8Argument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(enum8Argument, this, OnSuccessCallback_100, OnFailureCallback_100)); - return CHIP_NO_ERROR; - } + enum8Argument = 0; - void OnFailureResponse_100(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_100() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + enum8Argument, this, OnSuccessCallback_100, OnFailureCallback_100)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_100(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_100() { NextTest(); } - CHIP_ERROR TestReadAttributeEnum8MinValue_101() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_101, OnFailureCallback_101)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_101, OnFailureCallback_101)); + return CHIP_NO_ERROR; } - void OnFailureResponse_101(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_101(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_101( uint8_t enum8) + void OnSuccessResponse_101(uint8_t enum8) { - VerifyOrReturn(CheckValue("enum8", enum8,0 - )); + VerifyOrReturn(CheckValue("enum8", enum8, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeEnum16DefaultValue_102() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_102, OnFailureCallback_102)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_102, OnFailureCallback_102)); + return CHIP_NO_ERROR; } - void OnFailureResponse_102(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_102(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_102( uint16_t enum16) + void OnSuccessResponse_102(uint16_t enum16) { - VerifyOrReturn(CheckValue("enum16", enum16,0U - )); + VerifyOrReturn(CheckValue("enum16", enum16, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeEnum16MaxValue_103() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -65593,53 +49960,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t enum16Argument; - enum16Argument = 65535U; - - ReturnErrorOnFailure(cluster.WriteAttribute(enum16Argument, this, OnSuccessCallback_103, OnFailureCallback_103)); - return CHIP_NO_ERROR; - } + enum16Argument = 65535U; - void OnFailureResponse_103(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_103() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + enum16Argument, this, OnSuccessCallback_103, OnFailureCallback_103)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_103(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_103() { NextTest(); } - CHIP_ERROR TestReadAttributeEnum16MaxValue_104() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_104, OnFailureCallback_104)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_104, OnFailureCallback_104)); + return CHIP_NO_ERROR; } - void OnFailureResponse_104(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_104(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_104( uint16_t enum16) + void OnSuccessResponse_104(uint16_t enum16) { - VerifyOrReturn(CheckValue("enum16", enum16,65535U - )); + VerifyOrReturn(CheckValue("enum16", enum16, 65535U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeEnum16MinValue_105() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -65647,81 +49998,57 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t enum16Argument; - enum16Argument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(enum16Argument, this, OnSuccessCallback_105, OnFailureCallback_105)); - return CHIP_NO_ERROR; - } + enum16Argument = 0U; - void OnFailureResponse_105(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_105() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + enum16Argument, this, OnSuccessCallback_105, OnFailureCallback_105)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_105(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_105() { NextTest(); } - CHIP_ERROR TestReadAttributeEnum16MinValue_106() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_106, OnFailureCallback_106)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_106, OnFailureCallback_106)); + return CHIP_NO_ERROR; } - void OnFailureResponse_106(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_106(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_106( uint16_t enum16) + void OnSuccessResponse_106(uint16_t enum16) { - VerifyOrReturn(CheckValue("enum16", enum16,0U - )); + VerifyOrReturn(CheckValue("enum16", enum16, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeOctetStringDefaultValue_107() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_107, OnFailureCallback_107)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_107, OnFailureCallback_107)); + return CHIP_NO_ERROR; } - void OnFailureResponse_107(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_107(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_107( chip::ByteSpan octetString) + void OnSuccessResponse_107(chip::ByteSpan octetString) { - VerifyOrReturn(CheckValueAsString("octetString", octetString,chip::ByteSpan(chip::Uint8::from_const_char(""), 0) - )); + VerifyOrReturn(CheckValueAsString("octetString", octetString, chip::ByteSpan(chip::Uint8::from_const_char(""), 0))); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeOctetStringWithEmbeddedNull_108() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -65729,53 +50056,38 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::ByteSpan octetStringArgument; - octetStringArgument = chip::ByteSpan(chip::Uint8::from_const_char("Tes\x00ti\x00nggarbage: not in length on purpose"), 9); + octetStringArgument = chip::ByteSpan(chip::Uint8::from_const_char("Tes\x00ti\x00nggarbage: not in length on purpose"), 9); - ReturnErrorOnFailure(cluster.WriteAttribute(octetStringArgument, this, OnSuccessCallback_108, OnFailureCallback_108)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + octetStringArgument, this, OnSuccessCallback_108, OnFailureCallback_108)); + return CHIP_NO_ERROR; } - void OnFailureResponse_108(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_108() - { NextTest(); - } - + void OnFailureResponse_108(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_108() { NextTest(); } - CHIP_ERROR TestReadAttributeOctetStringWithEmbeddedNull_109() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_109, OnFailureCallback_109)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_109, OnFailureCallback_109)); + return CHIP_NO_ERROR; } - void OnFailureResponse_109(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_109(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_109( chip::ByteSpan octetString) + void OnSuccessResponse_109(chip::ByteSpan octetString) { - VerifyOrReturn(CheckValueAsString("octetString", octetString,chip::ByteSpan(chip::Uint8::from_const_char("Tes\x00ti\x00ng"), 9) - )); + VerifyOrReturn( + CheckValueAsString("octetString", octetString, chip::ByteSpan(chip::Uint8::from_const_char("Tes\x00ti\x00ng"), 9))); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeOctetStringWithWeirdChars_110() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -65783,53 +50095,39 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::ByteSpan octetStringArgument; - octetStringArgument = chip::ByteSpan(chip::Uint8::from_const_char("\x0d\x0a\xff\x22\xa0garbage: not in length on purpose"), 5); + octetStringArgument = + chip::ByteSpan(chip::Uint8::from_const_char("\x0d\x0a\xff\x22\xa0garbage: not in length on purpose"), 5); - ReturnErrorOnFailure(cluster.WriteAttribute(octetStringArgument, this, OnSuccessCallback_110, OnFailureCallback_110)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + octetStringArgument, this, OnSuccessCallback_110, OnFailureCallback_110)); + return CHIP_NO_ERROR; } - void OnFailureResponse_110(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_110() - { NextTest(); - } - + void OnFailureResponse_110(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_110() { NextTest(); } - CHIP_ERROR TestReadAttributeOctetStringWithWeirdChars_111() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_111, OnFailureCallback_111)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_111, OnFailureCallback_111)); + return CHIP_NO_ERROR; } - void OnFailureResponse_111(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_111(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_111( chip::ByteSpan octetString) + void OnSuccessResponse_111(chip::ByteSpan octetString) { - VerifyOrReturn(CheckValueAsString("octetString", octetString,chip::ByteSpan(chip::Uint8::from_const_char("\x0d\x0a\xff\x22\xa0"), 5) - )); + VerifyOrReturn(CheckValueAsString("octetString", octetString, + chip::ByteSpan(chip::Uint8::from_const_char("\x0d\x0a\xff\x22\xa0"), 5))); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeOctetString_112() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -65837,53 +50135,38 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::ByteSpan octetStringArgument; - octetStringArgument = chip::ByteSpan(chip::Uint8::from_const_char("TestValuegarbage: not in length on purpose"), 9); + octetStringArgument = chip::ByteSpan(chip::Uint8::from_const_char("TestValuegarbage: not in length on purpose"), 9); - ReturnErrorOnFailure(cluster.WriteAttribute(octetStringArgument, this, OnSuccessCallback_112, OnFailureCallback_112)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + octetStringArgument, this, OnSuccessCallback_112, OnFailureCallback_112)); + return CHIP_NO_ERROR; } - void OnFailureResponse_112(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_112() - { NextTest(); - } - + void OnFailureResponse_112(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_112() { NextTest(); } - CHIP_ERROR TestReadAttributeOctetString_113() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_113, OnFailureCallback_113)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_113, OnFailureCallback_113)); + return CHIP_NO_ERROR; } - void OnFailureResponse_113(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_113(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_113( chip::ByteSpan octetString) + void OnSuccessResponse_113(chip::ByteSpan octetString) { - VerifyOrReturn(CheckValueAsString("octetString", octetString,chip::ByteSpan(chip::Uint8::from_const_char("TestValue"), 9) - )); + VerifyOrReturn( + CheckValueAsString("octetString", octetString, chip::ByteSpan(chip::Uint8::from_const_char("TestValue"), 9))); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeOctetString_114() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -65891,54 +50174,43 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::ByteSpan octetStringArgument; - octetStringArgument = chip::ByteSpan(chip::Uint8::from_const_char("TestValueLongerThan10garbage: not in length on purpose"), 21); + octetStringArgument = + chip::ByteSpan(chip::Uint8::from_const_char("TestValueLongerThan10garbage: not in length on purpose"), 21); - ReturnErrorOnFailure(cluster.WriteAttribute(octetStringArgument, this, OnSuccessCallback_114, OnFailureCallback_114)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + octetStringArgument, this, OnSuccessCallback_114, OnFailureCallback_114)); + return CHIP_NO_ERROR; } void OnFailureResponse_114(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_114() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_114() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadAttributeOctetString_115() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_115, OnFailureCallback_115)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_115, OnFailureCallback_115)); + return CHIP_NO_ERROR; } - void OnFailureResponse_115(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_115(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_115( chip::ByteSpan octetString) + void OnSuccessResponse_115(chip::ByteSpan octetString) { - VerifyOrReturn(CheckValueAsString("octetString", octetString,chip::ByteSpan(chip::Uint8::from_const_char("TestValue"), 9) - )); + VerifyOrReturn( + CheckValueAsString("octetString", octetString, chip::ByteSpan(chip::Uint8::from_const_char("TestValue"), 9))); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeOctetString_116() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -65946,53 +50218,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::ByteSpan octetStringArgument; - octetStringArgument = chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0); + octetStringArgument = chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0); - ReturnErrorOnFailure(cluster.WriteAttribute(octetStringArgument, this, OnSuccessCallback_116, OnFailureCallback_116)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + octetStringArgument, this, OnSuccessCallback_116, OnFailureCallback_116)); + return CHIP_NO_ERROR; } - void OnFailureResponse_116(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_116() - { NextTest(); - } - + void OnFailureResponse_116(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_116() { NextTest(); } - CHIP_ERROR TestReadAttributeLongOctetStringDefaultValue_117() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_117, OnFailureCallback_117)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_117, OnFailureCallback_117)); + return CHIP_NO_ERROR; } - void OnFailureResponse_117(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_117(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_117( chip::ByteSpan longOctetString) + void OnSuccessResponse_117(chip::ByteSpan longOctetString) { - VerifyOrReturn(CheckValueAsString("longOctetString", longOctetString,chip::ByteSpan(chip::Uint8::from_const_char(""), 0) - )); + VerifyOrReturn(CheckValueAsString("longOctetString", longOctetString, chip::ByteSpan(chip::Uint8::from_const_char(""), 0))); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeLongOctetString_118() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -66000,53 +50256,49 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::ByteSpan longOctetStringArgument; - longOctetStringArgument = chip::ByteSpan(chip::Uint8::from_const_char("111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111garbage: not in length on purpose"), 300); - - ReturnErrorOnFailure(cluster.WriteAttribute(longOctetStringArgument, this, OnSuccessCallback_118, OnFailureCallback_118)); - return CHIP_NO_ERROR; + longOctetStringArgument = chip::ByteSpan( + chip::Uint8::from_const_char( + "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" + "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" + "111111111111111111111111111111111111111111111111111111111111111111111111garbage: not in length on purpose"), + 300); + + ReturnErrorOnFailure(cluster.WriteAttribute( + longOctetStringArgument, this, OnSuccessCallback_118, OnFailureCallback_118)); + return CHIP_NO_ERROR; } - void OnFailureResponse_118(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_118() - { NextTest(); - } - + void OnFailureResponse_118(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_118() { NextTest(); } - CHIP_ERROR TestReadAttributeLongOctetString_119() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_119, OnFailureCallback_119)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_119, OnFailureCallback_119)); + return CHIP_NO_ERROR; } - void OnFailureResponse_119(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_119(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_119( chip::ByteSpan longOctetString) + void OnSuccessResponse_119(chip::ByteSpan longOctetString) { - VerifyOrReturn(CheckValueAsString("longOctetString", longOctetString,chip::ByteSpan(chip::Uint8::from_const_char("111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"), 300) - )); + VerifyOrReturn(CheckValueAsString( + "longOctetString", longOctetString, + chip::ByteSpan( + chip::Uint8::from_const_char( + "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" + "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" + "11111111111111111111111111111111111111111111111111111111111111111111111111111111"), + 300))); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeLongOctetString_120() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -66054,53 +50306,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::ByteSpan longOctetStringArgument; - longOctetStringArgument = chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0); + longOctetStringArgument = chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0); - ReturnErrorOnFailure(cluster.WriteAttribute(longOctetStringArgument, this, OnSuccessCallback_120, OnFailureCallback_120)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + longOctetStringArgument, this, OnSuccessCallback_120, OnFailureCallback_120)); + return CHIP_NO_ERROR; } - void OnFailureResponse_120(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_120() - { NextTest(); - } - + void OnFailureResponse_120(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_120() { NextTest(); } - CHIP_ERROR TestReadAttributeCharStringDefaultValue_121() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_121, OnFailureCallback_121)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_121, OnFailureCallback_121)); + return CHIP_NO_ERROR; } - void OnFailureResponse_121(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_121(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_121( chip::CharSpan charString) + void OnSuccessResponse_121(chip::CharSpan charString) { - VerifyOrReturn(CheckValueAsString("charString", charString,chip::CharSpan("", 0) - )); + VerifyOrReturn(CheckValueAsString("charString", charString, chip::CharSpan("", 0))); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeCharString_122() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -66108,53 +50344,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::CharSpan charStringArgument; - charStringArgument = chip::Span("☉T☉garbage: not in length on purpose", 7); + charStringArgument = chip::Span("☉T☉garbage: not in length on purpose", 7); - ReturnErrorOnFailure(cluster.WriteAttribute(charStringArgument, this, OnSuccessCallback_122, OnFailureCallback_122)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + charStringArgument, this, OnSuccessCallback_122, OnFailureCallback_122)); + return CHIP_NO_ERROR; } - void OnFailureResponse_122(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_122() - { NextTest(); - } - + void OnFailureResponse_122(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_122() { NextTest(); } - CHIP_ERROR TestReadAttributeCharString_123() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_123, OnFailureCallback_123)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_123, OnFailureCallback_123)); + return CHIP_NO_ERROR; } - void OnFailureResponse_123(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_123(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_123( chip::CharSpan charString) + void OnSuccessResponse_123(chip::CharSpan charString) { - VerifyOrReturn(CheckValueAsString("charString", charString,chip::CharSpan("☉T☉", 7) - )); + VerifyOrReturn(CheckValueAsString("charString", charString, chip::CharSpan("☉T☉", 7))); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeCharStringValueTooLong_124() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -66162,54 +50382,41 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::CharSpan charStringArgument; - charStringArgument = chip::Span("☉TestValueLongerThan10☉garbage: not in length on purpose", 27); + charStringArgument = chip::Span("☉TestValueLongerThan10☉garbage: not in length on purpose", 27); - ReturnErrorOnFailure(cluster.WriteAttribute(charStringArgument, this, OnSuccessCallback_124, OnFailureCallback_124)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + charStringArgument, this, OnSuccessCallback_124, OnFailureCallback_124)); + return CHIP_NO_ERROR; } void OnFailureResponse_124(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_124() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_124() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadAttributeCharString_125() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_125, OnFailureCallback_125)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_125, OnFailureCallback_125)); + return CHIP_NO_ERROR; } - void OnFailureResponse_125(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_125(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_125( chip::CharSpan charString) + void OnSuccessResponse_125(chip::CharSpan charString) { - VerifyOrReturn(CheckValueAsString("charString", charString,chip::CharSpan("☉T☉", 7) - )); + VerifyOrReturn(CheckValueAsString("charString", charString, chip::CharSpan("☉T☉", 7))); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeCharStringEmpty_126() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -66217,53 +50424,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::CharSpan charStringArgument; - charStringArgument = chip::Span("garbage: not in length on purpose", 0); + charStringArgument = chip::Span("garbage: not in length on purpose", 0); - ReturnErrorOnFailure(cluster.WriteAttribute(charStringArgument, this, OnSuccessCallback_126, OnFailureCallback_126)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + charStringArgument, this, OnSuccessCallback_126, OnFailureCallback_126)); + return CHIP_NO_ERROR; } - void OnFailureResponse_126(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_126() - { NextTest(); - } - + void OnFailureResponse_126(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_126() { NextTest(); } - CHIP_ERROR TestReadAttributeLongCharStringDefaultValue_127() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_127, OnFailureCallback_127)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_127, OnFailureCallback_127)); + return CHIP_NO_ERROR; } - void OnFailureResponse_127(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_127(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_127( chip::CharSpan longCharString) + void OnSuccessResponse_127(chip::CharSpan longCharString) { - VerifyOrReturn(CheckValueAsString("longCharString", longCharString,chip::CharSpan("", 0) - )); + VerifyOrReturn(CheckValueAsString("longCharString", longCharString, chip::CharSpan("", 0))); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeLongCharString_128() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -66271,53 +50462,46 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::CharSpan longCharStringArgument; - longCharStringArgument = chip::Span("☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉garbage: not in length on purpose", 900); - - ReturnErrorOnFailure(cluster.WriteAttribute(longCharStringArgument, this, OnSuccessCallback_128, OnFailureCallback_128)); - return CHIP_NO_ERROR; + longCharStringArgument = chip::Span( + "☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉" + "☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉" + "☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉garbage: not in length on purpose", + 900); + + ReturnErrorOnFailure(cluster.WriteAttribute( + longCharStringArgument, this, OnSuccessCallback_128, OnFailureCallback_128)); + return CHIP_NO_ERROR; } - void OnFailureResponse_128(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_128() - { NextTest(); - } - + void OnFailureResponse_128(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_128() { NextTest(); } - CHIP_ERROR TestReadAttributeLongCharString_129() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_129, OnFailureCallback_129)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_129, OnFailureCallback_129)); + return CHIP_NO_ERROR; } - void OnFailureResponse_129(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_129(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_129( chip::CharSpan longCharString) + void OnSuccessResponse_129(chip::CharSpan longCharString) { - VerifyOrReturn(CheckValueAsString("longCharString", longCharString,chip::CharSpan("☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉", 900) - )); + VerifyOrReturn(CheckValueAsString( + "longCharString", longCharString, + chip::CharSpan("☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉" + "☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉" + "☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉", + 900))); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeLongCharString_130() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -66325,95 +50509,104 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::CharSpan longCharStringArgument; - longCharStringArgument = chip::Span("garbage: not in length on purpose", 0); + longCharStringArgument = chip::Span("garbage: not in length on purpose", 0); - ReturnErrorOnFailure(cluster.WriteAttribute(longCharStringArgument, this, OnSuccessCallback_130, OnFailureCallback_130)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + longCharStringArgument, this, OnSuccessCallback_130, OnFailureCallback_130)); + return CHIP_NO_ERROR; } - void OnFailureResponse_130(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_130() - { NextTest(); - } - + void OnFailureResponse_130(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_130() { NextTest(); } - CHIP_ERROR TestReadAttributeListLongOctetString_131() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_131, OnFailureCallback_131)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_131, OnFailureCallback_131)); + return CHIP_NO_ERROR; } - void OnFailureResponse_131(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_131(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_131( const chip::app::DataModel::DecodableList & listLongOctetString) - { - { - auto iter_0 = listLongOctetString.begin(); - VerifyOrReturn(CheckNextListItemDecodes("listLongOctetString", iter_0, 0)); - VerifyOrReturn(CheckValueAsString("listLongOctetString[0]", iter_0.GetValue(),chip::ByteSpan(chip::Uint8::from_const_char("0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"), 512) - )); - VerifyOrReturn(CheckNextListItemDecodes("listLongOctetString", iter_0, 1)); - VerifyOrReturn(CheckValueAsString("listLongOctetString[1]", iter_0.GetValue(),chip::ByteSpan(chip::Uint8::from_const_char("0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"), 512) - )); - VerifyOrReturn(CheckNextListItemDecodes("listLongOctetString", iter_0, 2)); - VerifyOrReturn(CheckValueAsString("listLongOctetString[2]", iter_0.GetValue(),chip::ByteSpan(chip::Uint8::from_const_char("0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"), 512) - )); - VerifyOrReturn(CheckNextListItemDecodes("listLongOctetString", iter_0, 3)); - VerifyOrReturn(CheckValueAsString("listLongOctetString[3]", iter_0.GetValue(),chip::ByteSpan(chip::Uint8::from_const_char("0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"), 512) - )); - VerifyOrReturn(CheckNoMoreListItems("listLongOctetString", iter_0, 4)); - } + void OnSuccessResponse_131(const chip::app::DataModel::DecodableList & listLongOctetString) + { + { + auto iter_0 = listLongOctetString.begin(); + VerifyOrReturn(CheckNextListItemDecodes("listLongOctetString", iter_0, 0)); + VerifyOrReturn(CheckValueAsString( + "listLongOctetString[0]", iter_0.GetValue(), + chip::ByteSpan( + chip::Uint8::from_const_char( + "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789" + "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123" + "456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" + "ef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567" + "89abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"), + 512))); + VerifyOrReturn(CheckNextListItemDecodes("listLongOctetString", iter_0, 1)); + VerifyOrReturn(CheckValueAsString( + "listLongOctetString[1]", iter_0.GetValue(), + chip::ByteSpan( + chip::Uint8::from_const_char( + "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789" + "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123" + "456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" + "ef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567" + "89abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"), + 512))); + VerifyOrReturn(CheckNextListItemDecodes("listLongOctetString", iter_0, 2)); + VerifyOrReturn(CheckValueAsString( + "listLongOctetString[2]", iter_0.GetValue(), + chip::ByteSpan( + chip::Uint8::from_const_char( + "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789" + "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123" + "456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" + "ef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567" + "89abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"), + 512))); + VerifyOrReturn(CheckNextListItemDecodes("listLongOctetString", iter_0, 3)); + VerifyOrReturn(CheckValueAsString( + "listLongOctetString[3]", iter_0.GetValue(), + chip::ByteSpan( + chip::Uint8::from_const_char( + "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789" + "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123" + "456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" + "ef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567" + "89abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"), + 512))); + VerifyOrReturn(CheckNoMoreListItems("listLongOctetString", iter_0, 4)); + } NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeEpochUsDefaultValue_132() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_132, OnFailureCallback_132)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_132, OnFailureCallback_132)); + return CHIP_NO_ERROR; } - void OnFailureResponse_132(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_132(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_132( uint64_t epochUs) + void OnSuccessResponse_132(uint64_t epochUs) { - VerifyOrReturn(CheckValue("epochUs", epochUs,0ULL - )); + VerifyOrReturn(CheckValue("epochUs", epochUs, 0ULL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeEpochUsMaxValue_133() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -66421,53 +50614,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint64_t epochUsArgument; - epochUsArgument = 18446744073709551615ULL; - - ReturnErrorOnFailure(cluster.WriteAttribute(epochUsArgument, this, OnSuccessCallback_133, OnFailureCallback_133)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_133(EmberAfStatus status) - { - ThrowFailureResponse(); - } + epochUsArgument = 18446744073709551615ULL; - void OnSuccessResponse_133() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + epochUsArgument, this, OnSuccessCallback_133, OnFailureCallback_133)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_133(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_133() { NextTest(); } - CHIP_ERROR TestReadAttributeEpochUsMaxValue_134() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_134, OnFailureCallback_134)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_134, OnFailureCallback_134)); + return CHIP_NO_ERROR; } - void OnFailureResponse_134(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_134(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_134( uint64_t epochUs) + void OnSuccessResponse_134(uint64_t epochUs) { - VerifyOrReturn(CheckValue("epochUs", epochUs,18446744073709551615ULL - )); + VerifyOrReturn(CheckValue("epochUs", epochUs, 18446744073709551615ULL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeEpochUsMinValue_135() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -66475,81 +50652,57 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint64_t epochUsArgument; - epochUsArgument = 0ULL; - - ReturnErrorOnFailure(cluster.WriteAttribute(epochUsArgument, this, OnSuccessCallback_135, OnFailureCallback_135)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_135(EmberAfStatus status) - { - ThrowFailureResponse(); - } + epochUsArgument = 0ULL; - void OnSuccessResponse_135() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + epochUsArgument, this, OnSuccessCallback_135, OnFailureCallback_135)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_135(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_135() { NextTest(); } - CHIP_ERROR TestReadAttributeEpochUsMinValue_136() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_136, OnFailureCallback_136)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_136, OnFailureCallback_136)); + return CHIP_NO_ERROR; } - void OnFailureResponse_136(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_136(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_136( uint64_t epochUs) + void OnSuccessResponse_136(uint64_t epochUs) { - VerifyOrReturn(CheckValue("epochUs", epochUs,0ULL - )); + VerifyOrReturn(CheckValue("epochUs", epochUs, 0ULL)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeEpochSDefaultValue_137() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_137, OnFailureCallback_137)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_137, OnFailureCallback_137)); + return CHIP_NO_ERROR; } - void OnFailureResponse_137(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_137(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_137( uint32_t epochS) + void OnSuccessResponse_137(uint32_t epochS) { - VerifyOrReturn(CheckValue("epochS", epochS,0UL - )); + VerifyOrReturn(CheckValue("epochS", epochS, 0UL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeEpochSMaxValue_138() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -66557,53 +50710,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint32_t epochSArgument; - epochSArgument = 4294967295UL; - - ReturnErrorOnFailure(cluster.WriteAttribute(epochSArgument, this, OnSuccessCallback_138, OnFailureCallback_138)); - return CHIP_NO_ERROR; - } + epochSArgument = 4294967295UL; - void OnFailureResponse_138(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_138() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + epochSArgument, this, OnSuccessCallback_138, OnFailureCallback_138)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_138(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_138() { NextTest(); } - CHIP_ERROR TestReadAttributeEpochSMaxValue_139() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_139, OnFailureCallback_139)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_139, OnFailureCallback_139)); + return CHIP_NO_ERROR; } - void OnFailureResponse_139(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_139(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_139( uint32_t epochS) + void OnSuccessResponse_139(uint32_t epochS) { - VerifyOrReturn(CheckValue("epochS", epochS,4294967295UL - )); + VerifyOrReturn(CheckValue("epochS", epochS, 4294967295UL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeEpochSMinValue_140() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -66611,81 +50748,60 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint32_t epochSArgument; - epochSArgument = 0UL; - - ReturnErrorOnFailure(cluster.WriteAttribute(epochSArgument, this, OnSuccessCallback_140, OnFailureCallback_140)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_140(EmberAfStatus status) - { - ThrowFailureResponse(); - } + epochSArgument = 0UL; - void OnSuccessResponse_140() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + epochSArgument, this, OnSuccessCallback_140, OnFailureCallback_140)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_140(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_140() { NextTest(); } - CHIP_ERROR TestReadAttributeEpochSMinValue_141() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_141, OnFailureCallback_141)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_141, OnFailureCallback_141)); + return CHIP_NO_ERROR; } - void OnFailureResponse_141(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_141(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_141( uint32_t epochS) + void OnSuccessResponse_141(uint32_t epochS) { - VerifyOrReturn(CheckValue("epochS", epochS,0UL - )); + VerifyOrReturn(CheckValue("epochS", epochS, 0UL)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeUnsupported_142() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_142, OnFailureCallback_142)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_142, OnFailureCallback_142)); + return CHIP_NO_ERROR; } void OnFailureResponse_142(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_142( bool unsupported) + void OnSuccessResponse_142(bool unsupported) { - VerifyOrReturn(CheckValue("unsupported", unsupported,0 - )); + VerifyOrReturn(CheckValue("unsupported", unsupported, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteattributeUnsupported_143() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -66693,29 +50809,24 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); bool unsupportedArgument; - unsupportedArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(unsupportedArgument, this, OnSuccessCallback_143, OnFailureCallback_143)); - return CHIP_NO_ERROR; + unsupportedArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + unsupportedArgument, this, OnSuccessCallback_143, OnFailureCallback_143)); + return CHIP_NO_ERROR; } void OnFailureResponse_143(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } - - void OnSuccessResponse_143() - { NextTest(); - } - + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - + void OnSuccessResponse_143() { NextTest(); } - CHIP_ERROR TestSendTestCommandToUnsupportedEndpoint_144() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 200; - using RequestType = chip::app::Clusters::TestCluster::Commands::Test::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::Test::Type; RequestType request; @@ -66727,31 +50838,22 @@ class TestCluster: public TestCommand (static_cast(context))->OnFailureResponse_144(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_144(EmberAfStatus status) { - VerifyOrReturn(CheckConstraintNotValue("status", status, 0)); - NextTest(); - } - - void OnSuccessResponse_144() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckConstraintNotValue("status", status, 0)); + NextTest(); } + void OnSuccessResponse_144() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestSendTestCommandToUnsupportedCluster_145() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; - using RequestType = chip::app::Clusters::TestCluster::Commands::Test::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::Test::Type; RequestType request; @@ -66763,55 +50865,38 @@ class TestCluster: public TestCommand (static_cast(context))->OnFailureResponse_145(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_145(EmberAfStatus status) { - VerifyOrReturn(CheckConstraintNotValue("status", status, 0)); - NextTest(); - } - - void OnSuccessResponse_145() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckConstraintNotValue("status", status, 0)); + NextTest(); } + void OnSuccessResponse_145() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadAttributeVendorIdDefaultValue_146() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_146, OnFailureCallback_146)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_146, OnFailureCallback_146)); + return CHIP_NO_ERROR; } - void OnFailureResponse_146(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_146(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_146( chip::VendorId vendorId) + void OnSuccessResponse_146(chip::VendorId vendorId) { - VerifyOrReturn(CheckValue("vendorId", vendorId,0U - )); + VerifyOrReturn(CheckValue("vendorId", vendorId, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeVendorId_147() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -66819,53 +50904,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::VendorId vendorIdArgument; - vendorIdArgument =static_cast(17); + vendorIdArgument = static_cast(17); - ReturnErrorOnFailure(cluster.WriteAttribute(vendorIdArgument, this, OnSuccessCallback_147, OnFailureCallback_147)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + vendorIdArgument, this, OnSuccessCallback_147, OnFailureCallback_147)); + return CHIP_NO_ERROR; } - void OnFailureResponse_147(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_147() - { NextTest(); - } - + void OnFailureResponse_147(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_147() { NextTest(); } - CHIP_ERROR TestReadAttributeVendorId_148() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_148, OnFailureCallback_148)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_148, OnFailureCallback_148)); + return CHIP_NO_ERROR; } - void OnFailureResponse_148(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_148(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_148( chip::VendorId vendorId) + void OnSuccessResponse_148(chip::VendorId vendorId) { - VerifyOrReturn(CheckValue("vendorId", vendorId,17U - )); + VerifyOrReturn(CheckValue("vendorId", vendorId, 17U)); NextTest(); - } - - - + } - CHIP_ERROR TestRestoreAttributeVendorId_149() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -66873,33 +50942,25 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::VendorId vendorIdArgument; - vendorIdArgument =static_cast(0); + vendorIdArgument = static_cast(0); - ReturnErrorOnFailure(cluster.WriteAttribute(vendorIdArgument, this, OnSuccessCallback_149, OnFailureCallback_149)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + vendorIdArgument, this, OnSuccessCallback_149, OnFailureCallback_149)); + return CHIP_NO_ERROR; } - void OnFailureResponse_149(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_149() - { NextTest(); - } - + void OnFailureResponse_149(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_149() { NextTest(); } - CHIP_ERROR TestSendACommandWithAVendorIdAndEnum_150() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestEnumsRequest::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestEnumsRequest::Type; RequestType request; - request.arg1 =static_cast(20003); - request.arg2 =static_cast(101); + request.arg1 = static_cast(20003); + request.arg2 = static_cast(101); auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_150(data.arg1, data.arg2); @@ -66909,50 +50970,36 @@ class TestCluster: public TestCommand (static_cast(context))->OnFailureResponse_150(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_150(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_150(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_150( chip::VendorId arg1, chip::app::Clusters::TestCluster::SimpleEnum arg2) + void OnSuccessResponse_150(chip::VendorId arg1, chip::app::Clusters::TestCluster::SimpleEnum arg2) { - VerifyOrReturn(CheckValue("arg1", arg1,20003U - )); + VerifyOrReturn(CheckValue("arg1", arg1, 20003U)); - - VerifyOrReturn(CheckValue("arg2", arg2,101 - )); + VerifyOrReturn(CheckValue("arg2", arg2, 101)); NextTest(); - } - - - + } - CHIP_ERROR TestSendTestCommandWithStructArgumentAndArg1bIsTrue_151() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type; RequestType request; - - request.arg1.a = 0; - request.arg1.b = true; - request.arg1.c =static_cast(2); - request.arg1.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); - request.arg1.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - request.arg1.f = static_cast>(1); - request.arg1.g = 0.0f; - request.arg1.h = 0; - + + request.arg1.a = 0; + request.arg1.b = true; + request.arg1.c = static_cast(2); + request.arg1.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); + request.arg1.e = chip::Span("char_stringgarbage: not in length on purpose", 11); + request.arg1.f = static_cast>(1); + request.arg1.g = 0.0f; + request.arg1.h = 0; auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_151(data.value); @@ -66962,46 +51009,34 @@ class TestCluster: public TestCommand (static_cast(context))->OnFailureResponse_151(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_151(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_151(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_151( bool value) + void OnSuccessResponse_151(bool value) { - VerifyOrReturn(CheckValue("value", value,true - )); + VerifyOrReturn(CheckValue("value", value, true)); NextTest(); - } - - - + } - CHIP_ERROR TestSendTestCommandWithStructArgumentAndArg1bIsFalse_152() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type; RequestType request; - - request.arg1.a = 0; - request.arg1.b = false; - request.arg1.c =static_cast(2); - request.arg1.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); - request.arg1.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - request.arg1.f = static_cast>(1); - request.arg1.g = 0.0f; - request.arg1.h = 0; - + + request.arg1.a = 0; + request.arg1.b = false; + request.arg1.c = static_cast(2); + request.arg1.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); + request.arg1.e = chip::Span("char_stringgarbage: not in length on purpose", 11); + request.arg1.f = static_cast>(1); + request.arg1.g = 0.0f; + request.arg1.h = 0; auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_152(data.value); @@ -67011,50 +51046,37 @@ class TestCluster: public TestCommand (static_cast(context))->OnFailureResponse_152(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_152(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_152(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_152( bool value) + void OnSuccessResponse_152(bool value) { - VerifyOrReturn(CheckValue("value", value,false - )); + VerifyOrReturn(CheckValue("value", value, false)); NextTest(); - } - - - + } - CHIP_ERROR TestSendTestCommandWithNestedStructArgumentAndArg1cbIsTrue_153() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestNestedStructArgumentRequest::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestNestedStructArgumentRequest::Type; RequestType request; - - request.arg1.a = 0; - request.arg1.b = true; - - request.arg1.c.a = 0; - request.arg1.c.b = true; - request.arg1.c.c =static_cast(2); - request.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); - request.arg1.c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - request.arg1.c.f = static_cast>(1); - request.arg1.c.g = 0.0f; - request.arg1.c.h = 0; - + request.arg1.a = 0; + request.arg1.b = true; + + request.arg1.c.a = 0; + request.arg1.c.b = true; + request.arg1.c.c = static_cast(2); + request.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); + request.arg1.c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); + request.arg1.c.f = static_cast>(1); + request.arg1.c.g = 0.0f; + request.arg1.c.h = 0; auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_153(data.value); @@ -67064,50 +51086,37 @@ class TestCluster: public TestCommand (static_cast(context))->OnFailureResponse_153(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_153(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_153(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_153( bool value) + void OnSuccessResponse_153(bool value) { - VerifyOrReturn(CheckValue("value", value,true - )); + VerifyOrReturn(CheckValue("value", value, true)); NextTest(); - } - - - + } - CHIP_ERROR TestSendTestCommandWithNestedStructArgumentArg1cbIsFalse_154() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestNestedStructArgumentRequest::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestNestedStructArgumentRequest::Type; RequestType request; - - request.arg1.a = 0; - request.arg1.b = true; - - request.arg1.c.a = 0; - request.arg1.c.b = false; - request.arg1.c.c =static_cast(2); - request.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); - request.arg1.c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - request.arg1.c.f = static_cast>(1); - request.arg1.c.g = 0.0f; - request.arg1.c.h = 0; - + request.arg1.a = 0; + request.arg1.b = true; + + request.arg1.c.a = 0; + request.arg1.c.b = false; + request.arg1.c.c = static_cast(2); + request.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); + request.arg1.c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); + request.arg1.c.f = static_cast>(1); + request.arg1.c.g = 0.0f; + request.arg1.c.h = 0; auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_154(data.value); @@ -67117,90 +51126,76 @@ class TestCluster: public TestCommand (static_cast(context))->OnFailureResponse_154(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_154(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_154(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_154( bool value) + void OnSuccessResponse_154(bool value) { - VerifyOrReturn(CheckValue("value", value,false - )); + VerifyOrReturn(CheckValue("value", value, false)); NextTest(); - } - - - + } - CHIP_ERROR TestSendTestCommandWithNestedStructListArgumentAndAllFieldsBOfArg1dAreTrue_155() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestNestedStructListArgumentRequest::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestNestedStructListArgumentRequest::Type; RequestType request; - - request.arg1.a = 0; - request.arg1.b = true; - - request.arg1.c.a = 0; - request.arg1.c.b = true; - request.arg1.c.c =static_cast(2); - request.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); - request.arg1.c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - request.arg1.c.f = static_cast>(1); - request.arg1.c.g = 0.0f; - request.arg1.c.h = 0; - - - chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type dList_1[2]; - - dList_1[0].a = 1; - dList_1[0].b = true; - dList_1[0].c =static_cast(3); - dList_1[0].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); - dList_1[0].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - dList_1[0].f = static_cast>(1); - dList_1[0].g = 0.0f; - dList_1[0].h = 0; - - - dList_1[1].a = 2; - dList_1[1].b = true; - dList_1[1].c =static_cast(3); - dList_1[1].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); - dList_1[1].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - dList_1[1].f = static_cast>(1); - dList_1[1].g = 0.0f; - dList_1[1].h = 0; - - request.arg1.d = dList_1; - - uint32_t eList_1[3]; - eList_1[0] = 1UL; - eList_1[1] = 2UL; - eList_1[2] = 3UL; - request.arg1.e = eList_1; - - chip::ByteSpan fList_1[3]; - fList_1[0] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_1garbage: not in length on purpose"), 14); - fList_1[1] = chip::ByteSpan(chip::Uint8::from_const_char("octect_string_2garbage: not in length on purpose"), 15); - fList_1[2] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_3garbage: not in length on purpose"), 14); - request.arg1.f = fList_1; - - uint8_t gList_1[2]; - gList_1[0] = 0; - gList_1[1] = 255; - request.arg1.g = gList_1; + request.arg1.a = 0; + request.arg1.b = true; + + request.arg1.c.a = 0; + request.arg1.c.b = true; + request.arg1.c.c = static_cast(2); + request.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); + request.arg1.c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); + request.arg1.c.f = static_cast>(1); + request.arg1.c.g = 0.0f; + request.arg1.c.h = 0; + + chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type dList_1[2]; + + dList_1[0].a = 1; + dList_1[0].b = true; + dList_1[0].c = static_cast(3); + dList_1[0].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); + dList_1[0].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); + dList_1[0].f = static_cast>(1); + dList_1[0].g = 0.0f; + dList_1[0].h = 0; + + dList_1[1].a = 2; + dList_1[1].b = true; + dList_1[1].c = static_cast(3); + dList_1[1].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); + dList_1[1].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); + dList_1[1].f = static_cast>(1); + dList_1[1].g = 0.0f; + dList_1[1].h = 0; + + request.arg1.d = dList_1; + + uint32_t eList_1[3]; + eList_1[0] = 1UL; + eList_1[1] = 2UL; + eList_1[2] = 3UL; + request.arg1.e = eList_1; + + chip::ByteSpan fList_1[3]; + fList_1[0] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_1garbage: not in length on purpose"), 14); + fList_1[1] = chip::ByteSpan(chip::Uint8::from_const_char("octect_string_2garbage: not in length on purpose"), 15); + fList_1[2] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_3garbage: not in length on purpose"), 14); + request.arg1.f = fList_1; + + uint8_t gList_1[2]; + gList_1[0] = 0; + gList_1[1] = 255; + request.arg1.g = gList_1; auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_155(data.value); @@ -67210,90 +51205,76 @@ class TestCluster: public TestCommand (static_cast(context))->OnFailureResponse_155(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_155(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_155(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_155( bool value) + void OnSuccessResponse_155(bool value) { - VerifyOrReturn(CheckValue("value", value,true - )); + VerifyOrReturn(CheckValue("value", value, true)); NextTest(); - } - - - + } - CHIP_ERROR TestSendTestCommandWithNestedStructListArgumentAndSomeFieldsBOfArg1dAreFalse_156() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestNestedStructListArgumentRequest::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestNestedStructListArgumentRequest::Type; RequestType request; - - request.arg1.a = 0; - request.arg1.b = true; - - request.arg1.c.a = 0; - request.arg1.c.b = true; - request.arg1.c.c =static_cast(2); - request.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); - request.arg1.c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - request.arg1.c.f = static_cast>(1); - request.arg1.c.g = 0.0f; - request.arg1.c.h = 0; - - - chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type dList_1[2]; - - dList_1[0].a = 1; - dList_1[0].b = true; - dList_1[0].c =static_cast(3); - dList_1[0].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); - dList_1[0].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - dList_1[0].f = static_cast>(1); - dList_1[0].g = 0.0f; - dList_1[0].h = 0; - - - dList_1[1].a = 2; - dList_1[1].b = false; - dList_1[1].c =static_cast(3); - dList_1[1].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); - dList_1[1].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - dList_1[1].f = static_cast>(1); - dList_1[1].g = 0.0f; - dList_1[1].h = 0; - - request.arg1.d = dList_1; - - uint32_t eList_1[3]; - eList_1[0] = 1UL; - eList_1[1] = 2UL; - eList_1[2] = 3UL; - request.arg1.e = eList_1; - - chip::ByteSpan fList_1[3]; - fList_1[0] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_1garbage: not in length on purpose"), 14); - fList_1[1] = chip::ByteSpan(chip::Uint8::from_const_char("octect_string_2garbage: not in length on purpose"), 15); - fList_1[2] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_3garbage: not in length on purpose"), 14); - request.arg1.f = fList_1; - - uint8_t gList_1[2]; - gList_1[0] = 0; - gList_1[1] = 255; - request.arg1.g = gList_1; + request.arg1.a = 0; + request.arg1.b = true; + + request.arg1.c.a = 0; + request.arg1.c.b = true; + request.arg1.c.c = static_cast(2); + request.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); + request.arg1.c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); + request.arg1.c.f = static_cast>(1); + request.arg1.c.g = 0.0f; + request.arg1.c.h = 0; + + chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type dList_1[2]; + + dList_1[0].a = 1; + dList_1[0].b = true; + dList_1[0].c = static_cast(3); + dList_1[0].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); + dList_1[0].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); + dList_1[0].f = static_cast>(1); + dList_1[0].g = 0.0f; + dList_1[0].h = 0; + + dList_1[1].a = 2; + dList_1[1].b = false; + dList_1[1].c = static_cast(3); + dList_1[1].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); + dList_1[1].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); + dList_1[1].f = static_cast>(1); + dList_1[1].g = 0.0f; + dList_1[1].h = 0; + + request.arg1.d = dList_1; + + uint32_t eList_1[3]; + eList_1[0] = 1UL; + eList_1[1] = 2UL; + eList_1[2] = 3UL; + request.arg1.e = eList_1; + + chip::ByteSpan fList_1[3]; + fList_1[0] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_1garbage: not in length on purpose"), 14); + fList_1[1] = chip::ByteSpan(chip::Uint8::from_const_char("octect_string_2garbage: not in length on purpose"), 15); + fList_1[2] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_3garbage: not in length on purpose"), 14); + request.arg1.f = fList_1; + + uint8_t gList_1[2]; + gList_1[0] = 0; + gList_1[1] = 255; + request.arg1.g = gList_1; auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_156(data.value); @@ -67303,46 +51284,34 @@ class TestCluster: public TestCommand (static_cast(context))->OnFailureResponse_156(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_156(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_156(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_156( bool value) + void OnSuccessResponse_156(bool value) { - VerifyOrReturn(CheckValue("value", value,false - )); + VerifyOrReturn(CheckValue("value", value, false)); NextTest(); - } - - - + } - CHIP_ERROR TestSendTestCommandWithStructArgumentAndSeeWhatWeGetBack_157() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::SimpleStructEchoRequest::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::SimpleStructEchoRequest::Type; RequestType request; - - request.arg1.a = 17; - request.arg1.b = false; - request.arg1.c =static_cast(2); - request.arg1.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); - request.arg1.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - request.arg1.f = static_cast>(1); - request.arg1.g = 0.1f; - request.arg1.h = 0.1; - + + request.arg1.a = 17; + request.arg1.b = false; + request.arg1.c = static_cast(2); + request.arg1.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); + request.arg1.e = chip::Span("char_stringgarbage: not in length on purpose", 11); + request.arg1.f = static_cast>(1); + request.arg1.g = 0.1f; + request.arg1.h = 0.1; auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_157(data.arg1); @@ -67352,62 +51321,44 @@ class TestCluster: public TestCommand (static_cast(context))->OnFailureResponse_157(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_157(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_157(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_157( const chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType & arg1) - { - VerifyOrReturn(CheckValue("arg1.a", arg1.a,17 - )); - VerifyOrReturn(CheckValue("arg1.b", arg1.b,false - )); - VerifyOrReturn(CheckValue("arg1.c", arg1.c,2 - )); - VerifyOrReturn(CheckValueAsString("arg1.d", arg1.d,chip::ByteSpan(chip::Uint8::from_const_char("octet_string"), 12) - )); - VerifyOrReturn(CheckValueAsString("arg1.e", arg1.e,chip::CharSpan("char_string", 11) - )); - VerifyOrReturn(CheckValue("arg1.f", arg1.f,1 - )); - VerifyOrReturn(CheckValue("arg1.g", arg1.g,0.1f - )); - VerifyOrReturn(CheckValue("arg1.h", arg1.h,0.1 - )); + void OnSuccessResponse_157(const chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType & arg1) + { + VerifyOrReturn(CheckValue("arg1.a", arg1.a, 17)); + VerifyOrReturn(CheckValue("arg1.b", arg1.b, false)); + VerifyOrReturn(CheckValue("arg1.c", arg1.c, 2)); + VerifyOrReturn(CheckValueAsString("arg1.d", arg1.d, chip::ByteSpan(chip::Uint8::from_const_char("octet_string"), 12))); + VerifyOrReturn(CheckValueAsString("arg1.e", arg1.e, chip::CharSpan("char_string", 11))); + VerifyOrReturn(CheckValue("arg1.f", arg1.f, 1)); + VerifyOrReturn(CheckValue("arg1.g", arg1.g, 0.1f)); + VerifyOrReturn(CheckValue("arg1.h", arg1.h, 0.1)); NextTest(); - } - - - + } - CHIP_ERROR TestSendTestCommandWithListOfInt8uAndNoneOfThemIsSetTo0_158() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type; RequestType request; - - uint8_t arg1List_0[9]; - arg1List_0[0] = 1; - arg1List_0[1] = 2; - arg1List_0[2] = 3; - arg1List_0[3] = 4; - arg1List_0[4] = 5; - arg1List_0[5] = 6; - arg1List_0[6] = 7; - arg1List_0[7] = 8; - arg1List_0[8] = 9; - request.arg1 = arg1List_0; + + uint8_t arg1List_0[9]; + arg1List_0[0] = 1; + arg1List_0[1] = 2; + arg1List_0[2] = 3; + arg1List_0[3] = 4; + arg1List_0[4] = 5; + arg1List_0[5] = 6; + arg1List_0[6] = 7; + arg1List_0[7] = 8; + arg1List_0[8] = 9; + request.arg1 = arg1List_0; auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_158(data.value); @@ -67417,49 +51368,38 @@ class TestCluster: public TestCommand (static_cast(context))->OnFailureResponse_158(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_158(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_158(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_158( bool value) + void OnSuccessResponse_158(bool value) { - VerifyOrReturn(CheckValue("value", value,true - )); + VerifyOrReturn(CheckValue("value", value, true)); NextTest(); - } - - - + } - CHIP_ERROR TestSendTestCommandWithListOfInt8uAndOneOfThemIsSetTo0_159() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type; RequestType request; - - uint8_t arg1List_0[10]; - arg1List_0[0] = 1; - arg1List_0[1] = 2; - arg1List_0[2] = 3; - arg1List_0[3] = 4; - arg1List_0[4] = 5; - arg1List_0[5] = 6; - arg1List_0[6] = 7; - arg1List_0[7] = 8; - arg1List_0[8] = 9; - arg1List_0[9] = 0; - request.arg1 = arg1List_0; + + uint8_t arg1List_0[10]; + arg1List_0[0] = 1; + arg1List_0[1] = 2; + arg1List_0[2] = 3; + arg1List_0[3] = 4; + arg1List_0[4] = 5; + arg1List_0[5] = 6; + arg1List_0[6] = 7; + arg1List_0[7] = 8; + arg1List_0[8] = 9; + arg1List_0[9] = 0; + request.arg1 = arg1List_0; auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_159(data.value); @@ -67469,48 +51409,37 @@ class TestCluster: public TestCommand (static_cast(context))->OnFailureResponse_159(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_159(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_159(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_159( bool value) + void OnSuccessResponse_159(bool value) { - VerifyOrReturn(CheckValue("value", value,false - )); + VerifyOrReturn(CheckValue("value", value, false)); NextTest(); - } - - - + } - CHIP_ERROR TestSendTestCommandWithListOfInt8uAndGetItReversed_160() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type; RequestType request; - - uint8_t arg1List_0[9]; - arg1List_0[0] = 1; - arg1List_0[1] = 2; - arg1List_0[2] = 3; - arg1List_0[3] = 4; - arg1List_0[4] = 5; - arg1List_0[5] = 6; - arg1List_0[6] = 7; - arg1List_0[7] = 8; - arg1List_0[8] = 9; - request.arg1 = arg1List_0; + + uint8_t arg1List_0[9]; + arg1List_0[0] = 1; + arg1List_0[1] = 2; + arg1List_0[2] = 3; + arg1List_0[3] = 4; + arg1List_0[4] = 5; + arg1List_0[5] = 6; + arg1List_0[6] = 7; + arg1List_0[7] = 8; + arg1List_0[8] = 9; + request.arg1 = arg1List_0; auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_160(data.arg1); @@ -67520,67 +51449,48 @@ class TestCluster: public TestCommand (static_cast(context))->OnFailureResponse_160(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_160(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_160( const chip::app::DataModel::DecodableList & arg1) - { - { - auto iter_0 = arg1.begin(); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 0)); - VerifyOrReturn(CheckValue("arg1[0]", iter_0.GetValue(),9 - )); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 1)); - VerifyOrReturn(CheckValue("arg1[1]", iter_0.GetValue(),8 - )); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 2)); - VerifyOrReturn(CheckValue("arg1[2]", iter_0.GetValue(),7 - )); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 3)); - VerifyOrReturn(CheckValue("arg1[3]", iter_0.GetValue(),6 - )); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 4)); - VerifyOrReturn(CheckValue("arg1[4]", iter_0.GetValue(),5 - )); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 5)); - VerifyOrReturn(CheckValue("arg1[5]", iter_0.GetValue(),4 - )); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 6)); - VerifyOrReturn(CheckValue("arg1[6]", iter_0.GetValue(),3 - )); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 7)); - VerifyOrReturn(CheckValue("arg1[7]", iter_0.GetValue(),2 - )); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 8)); - VerifyOrReturn(CheckValue("arg1[8]", iter_0.GetValue(),1 - )); - VerifyOrReturn(CheckNoMoreListItems("arg1", iter_0, 9)); - } - - NextTest(); - } + void OnFailureResponse_160(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_160(const chip::app::DataModel::DecodableList & arg1) + { + { + auto iter_0 = arg1.begin(); + VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 0)); + VerifyOrReturn(CheckValue("arg1[0]", iter_0.GetValue(), 9)); + VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 1)); + VerifyOrReturn(CheckValue("arg1[1]", iter_0.GetValue(), 8)); + VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 2)); + VerifyOrReturn(CheckValue("arg1[2]", iter_0.GetValue(), 7)); + VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 3)); + VerifyOrReturn(CheckValue("arg1[3]", iter_0.GetValue(), 6)); + VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 4)); + VerifyOrReturn(CheckValue("arg1[4]", iter_0.GetValue(), 5)); + VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 5)); + VerifyOrReturn(CheckValue("arg1[5]", iter_0.GetValue(), 4)); + VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 6)); + VerifyOrReturn(CheckValue("arg1[6]", iter_0.GetValue(), 3)); + VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 7)); + VerifyOrReturn(CheckValue("arg1[7]", iter_0.GetValue(), 2)); + VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 8)); + VerifyOrReturn(CheckValue("arg1[8]", iter_0.GetValue(), 1)); + VerifyOrReturn(CheckNoMoreListItems("arg1", iter_0, 9)); + } - + NextTest(); + } - CHIP_ERROR TestSendTestCommandWithEmptyListOfInt8uAndGetAnEmptyListBack_161() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type; RequestType request; - - request.arg1 = chip::app::DataModel::List(); + + request.arg1 = chip::app::DataModel::List(); auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_161(data.arg1); @@ -67590,61 +51500,50 @@ class TestCluster: public TestCommand (static_cast(context))->OnFailureResponse_161(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_161(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_161(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_161( const chip::app::DataModel::DecodableList & arg1) + void OnSuccessResponse_161(const chip::app::DataModel::DecodableList & arg1) { - { - auto iter_0 = arg1.begin(); - VerifyOrReturn(CheckNoMoreListItems("arg1", iter_0, 0)); - } + { + auto iter_0 = arg1.begin(); + VerifyOrReturn(CheckNoMoreListItems("arg1", iter_0, 0)); + } NextTest(); - } - - - + } - CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsTrue_162() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type; RequestType request; - - chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type arg1List_0[2]; - - arg1List_0[0].a = 0; - arg1List_0[0].b = true; - arg1List_0[0].c =static_cast(2); - arg1List_0[0].d = chip::ByteSpan(chip::Uint8::from_const_char("first_octet_stringgarbage: not in length on purpose"), 18); - arg1List_0[0].e = chip::Span("first_char_stringgarbage: not in length on purpose", 17); - arg1List_0[0].f = static_cast>(1); - arg1List_0[0].g = 0.0f; - arg1List_0[0].h = 0; - - - arg1List_0[1].a = 1; - arg1List_0[1].b = true; - arg1List_0[1].c =static_cast(3); - arg1List_0[1].d = chip::ByteSpan(chip::Uint8::from_const_char("second_octet_stringgarbage: not in length on purpose"), 19); - arg1List_0[1].e = chip::Span("second_char_stringgarbage: not in length on purpose", 18); - arg1List_0[1].f = static_cast>(1); - arg1List_0[1].g = 0.0f; - arg1List_0[1].h = 0; - - request.arg1 = arg1List_0; + + chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type arg1List_0[2]; + + arg1List_0[0].a = 0; + arg1List_0[0].b = true; + arg1List_0[0].c = static_cast(2); + arg1List_0[0].d = chip::ByteSpan(chip::Uint8::from_const_char("first_octet_stringgarbage: not in length on purpose"), 18); + arg1List_0[0].e = chip::Span("first_char_stringgarbage: not in length on purpose", 17); + arg1List_0[0].f = static_cast>(1); + arg1List_0[0].g = 0.0f; + arg1List_0[0].h = 0; + + arg1List_0[1].a = 1; + arg1List_0[1].b = true; + arg1List_0[1].c = static_cast(3); + arg1List_0[1].d = chip::ByteSpan(chip::Uint8::from_const_char("second_octet_stringgarbage: not in length on purpose"), 19); + arg1List_0[1].e = chip::Span("second_char_stringgarbage: not in length on purpose", 18); + arg1List_0[1].f = static_cast>(1); + arg1List_0[1].g = 0.0f; + arg1List_0[1].h = 0; + + request.arg1 = arg1List_0; auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_162(data.value); @@ -67654,59 +51553,47 @@ class TestCluster: public TestCommand (static_cast(context))->OnFailureResponse_162(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_162(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_162(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_162( bool value) + void OnSuccessResponse_162(bool value) { - VerifyOrReturn(CheckValue("value", value,true - )); + VerifyOrReturn(CheckValue("value", value, true)); NextTest(); - } - - - + } - CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsFalse_163() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type; RequestType request; - - chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type arg1List_0[2]; - - arg1List_0[0].a = 1; - arg1List_0[0].b = true; - arg1List_0[0].c =static_cast(3); - arg1List_0[0].d = chip::ByteSpan(chip::Uint8::from_const_char("second_octet_stringgarbage: not in length on purpose"), 19); - arg1List_0[0].e = chip::Span("second_char_stringgarbage: not in length on purpose", 18); - arg1List_0[0].f = static_cast>(1); - arg1List_0[0].g = 0.0f; - arg1List_0[0].h = 0; - - - arg1List_0[1].a = 0; - arg1List_0[1].b = false; - arg1List_0[1].c =static_cast(2); - arg1List_0[1].d = chip::ByteSpan(chip::Uint8::from_const_char("first_octet_stringgarbage: not in length on purpose"), 18); - arg1List_0[1].e = chip::Span("first_char_stringgarbage: not in length on purpose", 17); - arg1List_0[1].f = static_cast>(1); - arg1List_0[1].g = 0.0f; - arg1List_0[1].h = 0; - - request.arg1 = arg1List_0; + + chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type arg1List_0[2]; + + arg1List_0[0].a = 1; + arg1List_0[0].b = true; + arg1List_0[0].c = static_cast(3); + arg1List_0[0].d = chip::ByteSpan(chip::Uint8::from_const_char("second_octet_stringgarbage: not in length on purpose"), 19); + arg1List_0[0].e = chip::Span("second_char_stringgarbage: not in length on purpose", 18); + arg1List_0[0].f = static_cast>(1); + arg1List_0[0].g = 0.0f; + arg1List_0[0].h = 0; + + arg1List_0[1].a = 0; + arg1List_0[1].b = false; + arg1List_0[1].c = static_cast(2); + arg1List_0[1].d = chip::ByteSpan(chip::Uint8::from_const_char("first_octet_stringgarbage: not in length on purpose"), 18); + arg1List_0[1].e = chip::Span("first_char_stringgarbage: not in length on purpose", 17); + arg1List_0[1].f = static_cast>(1); + arg1List_0[1].g = 0.0f; + arg1List_0[1].h = 0; + + request.arg1 = arg1List_0; auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_163(data.value); @@ -67716,93 +51603,80 @@ class TestCluster: public TestCommand (static_cast(context))->OnFailureResponse_163(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_163(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_163(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_163( bool value) + void OnSuccessResponse_163(bool value) { - VerifyOrReturn(CheckValue("value", value,false - )); + VerifyOrReturn(CheckValue("value", value, false)); NextTest(); - } - - - + } - CHIP_ERROR TestSendTestCommandWithListOfNestedStructListArgumentAndAllFieldsBOfElementsOfArg1dAreTrue_164() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestListNestedStructListArgumentRequest::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestListNestedStructListArgumentRequest::Type; RequestType request; - - chip::app::Clusters::TestCluster::Structs::NestedStructList::Type arg1List_0[1]; - - arg1List_0[0].a = 0; - arg1List_0[0].b = true; - - arg1List_0[0].c.a = 0; - arg1List_0[0].c.b = true; - arg1List_0[0].c.c =static_cast(2); - arg1List_0[0].c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); - arg1List_0[0].c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - arg1List_0[0].c.f = static_cast>(1); - arg1List_0[0].c.g = 0.0f; - arg1List_0[0].c.h = 0; - - - chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type dList_2[2]; - - dList_2[0].a = 1; - dList_2[0].b = true; - dList_2[0].c =static_cast(3); - dList_2[0].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); - dList_2[0].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - dList_2[0].f = static_cast>(1); - dList_2[0].g = 0.0f; - dList_2[0].h = 0; - - - dList_2[1].a = 2; - dList_2[1].b = true; - dList_2[1].c =static_cast(3); - dList_2[1].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); - dList_2[1].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - dList_2[1].f = static_cast>(1); - dList_2[1].g = 0.0f; - dList_2[1].h = 0; - - arg1List_0[0].d = dList_2; - - uint32_t eList_2[3]; - eList_2[0] = 1UL; - eList_2[1] = 2UL; - eList_2[2] = 3UL; - arg1List_0[0].e = eList_2; - - chip::ByteSpan fList_2[3]; - fList_2[0] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_1garbage: not in length on purpose"), 14); - fList_2[1] = chip::ByteSpan(chip::Uint8::from_const_char("octect_string_2garbage: not in length on purpose"), 15); - fList_2[2] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_3garbage: not in length on purpose"), 14); - arg1List_0[0].f = fList_2; - - uint8_t gList_2[2]; - gList_2[0] = 0; - gList_2[1] = 255; - arg1List_0[0].g = gList_2; - - request.arg1 = arg1List_0; + + chip::app::Clusters::TestCluster::Structs::NestedStructList::Type arg1List_0[1]; + + arg1List_0[0].a = 0; + arg1List_0[0].b = true; + + arg1List_0[0].c.a = 0; + arg1List_0[0].c.b = true; + arg1List_0[0].c.c = static_cast(2); + arg1List_0[0].c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); + arg1List_0[0].c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); + arg1List_0[0].c.f = static_cast>(1); + arg1List_0[0].c.g = 0.0f; + arg1List_0[0].c.h = 0; + + chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type dList_2[2]; + + dList_2[0].a = 1; + dList_2[0].b = true; + dList_2[0].c = static_cast(3); + dList_2[0].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); + dList_2[0].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); + dList_2[0].f = static_cast>(1); + dList_2[0].g = 0.0f; + dList_2[0].h = 0; + + dList_2[1].a = 2; + dList_2[1].b = true; + dList_2[1].c = static_cast(3); + dList_2[1].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); + dList_2[1].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); + dList_2[1].f = static_cast>(1); + dList_2[1].g = 0.0f; + dList_2[1].h = 0; + + arg1List_0[0].d = dList_2; + + uint32_t eList_2[3]; + eList_2[0] = 1UL; + eList_2[1] = 2UL; + eList_2[2] = 3UL; + arg1List_0[0].e = eList_2; + + chip::ByteSpan fList_2[3]; + fList_2[0] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_1garbage: not in length on purpose"), 14); + fList_2[1] = chip::ByteSpan(chip::Uint8::from_const_char("octect_string_2garbage: not in length on purpose"), 15); + fList_2[2] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_3garbage: not in length on purpose"), 14); + arg1List_0[0].f = fList_2; + + uint8_t gList_2[2]; + gList_2[0] = 0; + gList_2[1] = 255; + arg1List_0[0].g = gList_2; + + request.arg1 = arg1List_0; auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_164(data.value); @@ -67812,93 +51686,80 @@ class TestCluster: public TestCommand (static_cast(context))->OnFailureResponse_164(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_164(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_164(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_164( bool value) + void OnSuccessResponse_164(bool value) { - VerifyOrReturn(CheckValue("value", value,true - )); + VerifyOrReturn(CheckValue("value", value, true)); NextTest(); - } - - - + } - CHIP_ERROR TestSendTestCommandWithNestedStructListArgumentAndSomeFieldsBOfElementsOfArg1dAreFalse_165() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestListNestedStructListArgumentRequest::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestListNestedStructListArgumentRequest::Type; RequestType request; - - chip::app::Clusters::TestCluster::Structs::NestedStructList::Type arg1List_0[1]; - - arg1List_0[0].a = 0; - arg1List_0[0].b = true; - - arg1List_0[0].c.a = 0; - arg1List_0[0].c.b = true; - arg1List_0[0].c.c =static_cast(2); - arg1List_0[0].c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); - arg1List_0[0].c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - arg1List_0[0].c.f = static_cast>(1); - arg1List_0[0].c.g = 0.0f; - arg1List_0[0].c.h = 0; - - - chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type dList_2[2]; - - dList_2[0].a = 1; - dList_2[0].b = true; - dList_2[0].c =static_cast(3); - dList_2[0].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); - dList_2[0].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - dList_2[0].f = static_cast>(1); - dList_2[0].g = 0.0f; - dList_2[0].h = 0; - - - dList_2[1].a = 2; - dList_2[1].b = false; - dList_2[1].c =static_cast(3); - dList_2[1].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); - dList_2[1].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - dList_2[1].f = static_cast>(1); - dList_2[1].g = 0.0f; - dList_2[1].h = 0; - - arg1List_0[0].d = dList_2; - - uint32_t eList_2[3]; - eList_2[0] = 1UL; - eList_2[1] = 2UL; - eList_2[2] = 3UL; - arg1List_0[0].e = eList_2; - - chip::ByteSpan fList_2[3]; - fList_2[0] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_1garbage: not in length on purpose"), 14); - fList_2[1] = chip::ByteSpan(chip::Uint8::from_const_char("octect_string_2garbage: not in length on purpose"), 15); - fList_2[2] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_3garbage: not in length on purpose"), 14); - arg1List_0[0].f = fList_2; - - uint8_t gList_2[2]; - gList_2[0] = 0; - gList_2[1] = 255; - arg1List_0[0].g = gList_2; - - request.arg1 = arg1List_0; + + chip::app::Clusters::TestCluster::Structs::NestedStructList::Type arg1List_0[1]; + + arg1List_0[0].a = 0; + arg1List_0[0].b = true; + + arg1List_0[0].c.a = 0; + arg1List_0[0].c.b = true; + arg1List_0[0].c.c = static_cast(2); + arg1List_0[0].c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); + arg1List_0[0].c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); + arg1List_0[0].c.f = static_cast>(1); + arg1List_0[0].c.g = 0.0f; + arg1List_0[0].c.h = 0; + + chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type dList_2[2]; + + dList_2[0].a = 1; + dList_2[0].b = true; + dList_2[0].c = static_cast(3); + dList_2[0].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); + dList_2[0].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); + dList_2[0].f = static_cast>(1); + dList_2[0].g = 0.0f; + dList_2[0].h = 0; + + dList_2[1].a = 2; + dList_2[1].b = false; + dList_2[1].c = static_cast(3); + dList_2[1].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); + dList_2[1].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); + dList_2[1].f = static_cast>(1); + dList_2[1].g = 0.0f; + dList_2[1].h = 0; + + arg1List_0[0].d = dList_2; + + uint32_t eList_2[3]; + eList_2[0] = 1UL; + eList_2[1] = 2UL; + eList_2[2] = 3UL; + arg1List_0[0].e = eList_2; + + chip::ByteSpan fList_2[3]; + fList_2[0] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_1garbage: not in length on purpose"), 14); + fList_2[1] = chip::ByteSpan(chip::Uint8::from_const_char("octect_string_2garbage: not in length on purpose"), 15); + fList_2[2] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_3garbage: not in length on purpose"), 14); + arg1List_0[0].f = fList_2; + + uint8_t gList_2[2]; + gList_2[0] = 0; + gList_2[1] = 255; + arg1List_0[0].g = gList_2; + + request.arg1 = arg1List_0; auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_165(data.value); @@ -67908,30 +51769,19 @@ class TestCluster: public TestCommand (static_cast(context))->OnFailureResponse_165(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_165(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_165(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_165( bool value) + void OnSuccessResponse_165(bool value) { - VerifyOrReturn(CheckValue("value", value,false - )); + VerifyOrReturn(CheckValue("value", value, false)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeListWithListOfInt8uAndNoneOfThemIsSetTo0_166() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -67939,73 +51789,54 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::List listInt8uArgument; - - uint8_t listInt8uList_0[4]; - listInt8uList_0[0] = 1; - listInt8uList_0[1] = 2; - listInt8uList_0[2] = 3; - listInt8uList_0[3] = 4; - listInt8uArgument = listInt8uList_0; - - ReturnErrorOnFailure(cluster.WriteAttribute(listInt8uArgument, this, OnSuccessCallback_166, OnFailureCallback_166)); - return CHIP_NO_ERROR; - } - void OnFailureResponse_166(EmberAfStatus status) - { - ThrowFailureResponse(); - } + uint8_t listInt8uList_0[4]; + listInt8uList_0[0] = 1; + listInt8uList_0[1] = 2; + listInt8uList_0[2] = 3; + listInt8uList_0[3] = 4; + listInt8uArgument = listInt8uList_0; - void OnSuccessResponse_166() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + listInt8uArgument, this, OnSuccessCallback_166, OnFailureCallback_166)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_166(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_166() { NextTest(); } - CHIP_ERROR TestReadAttributeListWithListOfInt8u_167() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_167, OnFailureCallback_167)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_167, OnFailureCallback_167)); + return CHIP_NO_ERROR; } - void OnFailureResponse_167(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_167(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_167( const chip::app::DataModel::DecodableList & listInt8u) - { - { - auto iter_0 = listInt8u.begin(); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 0)); - VerifyOrReturn(CheckValue("listInt8u[0]", iter_0.GetValue(),1 - )); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 1)); - VerifyOrReturn(CheckValue("listInt8u[1]", iter_0.GetValue(),2 - )); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 2)); - VerifyOrReturn(CheckValue("listInt8u[2]", iter_0.GetValue(),3 - )); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 3)); - VerifyOrReturn(CheckValue("listInt8u[3]", iter_0.GetValue(),4 - )); - VerifyOrReturn(CheckNoMoreListItems("listInt8u", iter_0, 4)); - } + void OnSuccessResponse_167(const chip::app::DataModel::DecodableList & listInt8u) + { + { + auto iter_0 = listInt8u.begin(); + VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 0)); + VerifyOrReturn(CheckValue("listInt8u[0]", iter_0.GetValue(), 1)); + VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 1)); + VerifyOrReturn(CheckValue("listInt8u[1]", iter_0.GetValue(), 2)); + VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 2)); + VerifyOrReturn(CheckValue("listInt8u[2]", iter_0.GetValue(), 3)); + VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 3)); + VerifyOrReturn(CheckValue("listInt8u[3]", iter_0.GetValue(), 4)); + VerifyOrReturn(CheckNoMoreListItems("listInt8u", iter_0, 4)); + } NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeListWithListOfOctetString_168() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -68013,389 +51844,320 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::List listOctetStringArgument; - - chip::ByteSpan listOctetStringList_0[4]; - listOctetStringList_0[0] = chip::ByteSpan(chip::Uint8::from_const_char("Test0garbage: not in length on purpose"), 5); - listOctetStringList_0[1] = chip::ByteSpan(chip::Uint8::from_const_char("Test1garbage: not in length on purpose"), 5); - listOctetStringList_0[2] = chip::ByteSpan(chip::Uint8::from_const_char("Test2garbage: not in length on purpose"), 5); - listOctetStringList_0[3] = chip::ByteSpan(chip::Uint8::from_const_char("Test3garbage: not in length on purpose"), 5); - listOctetStringArgument = listOctetStringList_0; - ReturnErrorOnFailure(cluster.WriteAttribute(listOctetStringArgument, this, OnSuccessCallback_168, OnFailureCallback_168)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_168(EmberAfStatus status) - { - ThrowFailureResponse(); - } + chip::ByteSpan listOctetStringList_0[4]; + listOctetStringList_0[0] = chip::ByteSpan(chip::Uint8::from_const_char("Test0garbage: not in length on purpose"), 5); + listOctetStringList_0[1] = chip::ByteSpan(chip::Uint8::from_const_char("Test1garbage: not in length on purpose"), 5); + listOctetStringList_0[2] = chip::ByteSpan(chip::Uint8::from_const_char("Test2garbage: not in length on purpose"), 5); + listOctetStringList_0[3] = chip::ByteSpan(chip::Uint8::from_const_char("Test3garbage: not in length on purpose"), 5); + listOctetStringArgument = listOctetStringList_0; - void OnSuccessResponse_168() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + listOctetStringArgument, this, OnSuccessCallback_168, OnFailureCallback_168)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_168(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_168() { NextTest(); } - CHIP_ERROR TestReadAttributeListWithListOfOctetString_169() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_169, OnFailureCallback_169)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_169, OnFailureCallback_169)); + return CHIP_NO_ERROR; } - void OnFailureResponse_169(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_169(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_169( const chip::app::DataModel::DecodableList & listOctetString) - { - { - auto iter_0 = listOctetString.begin(); - VerifyOrReturn(CheckNextListItemDecodes("listOctetString", iter_0, 0)); - VerifyOrReturn(CheckValueAsString("listOctetString[0]", iter_0.GetValue(),chip::ByteSpan(chip::Uint8::from_const_char("Test0"), 5) - )); - VerifyOrReturn(CheckNextListItemDecodes("listOctetString", iter_0, 1)); - VerifyOrReturn(CheckValueAsString("listOctetString[1]", iter_0.GetValue(),chip::ByteSpan(chip::Uint8::from_const_char("Test1"), 5) - )); - VerifyOrReturn(CheckNextListItemDecodes("listOctetString", iter_0, 2)); - VerifyOrReturn(CheckValueAsString("listOctetString[2]", iter_0.GetValue(),chip::ByteSpan(chip::Uint8::from_const_char("Test2"), 5) - )); - VerifyOrReturn(CheckNextListItemDecodes("listOctetString", iter_0, 3)); - VerifyOrReturn(CheckValueAsString("listOctetString[3]", iter_0.GetValue(),chip::ByteSpan(chip::Uint8::from_const_char("Test3"), 5) - )); - VerifyOrReturn(CheckNoMoreListItems("listOctetString", iter_0, 4)); - } + void OnSuccessResponse_169(const chip::app::DataModel::DecodableList & listOctetString) + { + { + auto iter_0 = listOctetString.begin(); + VerifyOrReturn(CheckNextListItemDecodes("listOctetString", iter_0, 0)); + VerifyOrReturn(CheckValueAsString("listOctetString[0]", iter_0.GetValue(), + chip::ByteSpan(chip::Uint8::from_const_char("Test0"), 5))); + VerifyOrReturn(CheckNextListItemDecodes("listOctetString", iter_0, 1)); + VerifyOrReturn(CheckValueAsString("listOctetString[1]", iter_0.GetValue(), + chip::ByteSpan(chip::Uint8::from_const_char("Test1"), 5))); + VerifyOrReturn(CheckNextListItemDecodes("listOctetString", iter_0, 2)); + VerifyOrReturn(CheckValueAsString("listOctetString[2]", iter_0.GetValue(), + chip::ByteSpan(chip::Uint8::from_const_char("Test2"), 5))); + VerifyOrReturn(CheckNextListItemDecodes("listOctetString", iter_0, 3)); + VerifyOrReturn(CheckValueAsString("listOctetString[3]", iter_0.GetValue(), + chip::ByteSpan(chip::Uint8::from_const_char("Test3"), 5))); + VerifyOrReturn(CheckNoMoreListItems("listOctetString", iter_0, 4)); + } NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeListWithListOfListStructOctetString_170() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::List listStructOctetStringArgument; - - chip::app::Clusters::TestCluster::Structs::TestListStructOctet::Type listStructOctetStringList_0[4]; - - listStructOctetStringList_0[0].fabricIndex = 0ULL; - listStructOctetStringList_0[0].operationalCert = chip::ByteSpan(chip::Uint8::from_const_char("Test0garbage: not in length on purpose"), 5); + chip::app::DataModel::List + listStructOctetStringArgument; - - listStructOctetStringList_0[1].fabricIndex = 1ULL; - listStructOctetStringList_0[1].operationalCert = chip::ByteSpan(chip::Uint8::from_const_char("Test1garbage: not in length on purpose"), 5); + chip::app::Clusters::TestCluster::Structs::TestListStructOctet::Type listStructOctetStringList_0[4]; - - listStructOctetStringList_0[2].fabricIndex = 2ULL; - listStructOctetStringList_0[2].operationalCert = chip::ByteSpan(chip::Uint8::from_const_char("Test2garbage: not in length on purpose"), 5); + listStructOctetStringList_0[0].fabricIndex = 0ULL; + listStructOctetStringList_0[0].operationalCert = + chip::ByteSpan(chip::Uint8::from_const_char("Test0garbage: not in length on purpose"), 5); - - listStructOctetStringList_0[3].fabricIndex = 3ULL; - listStructOctetStringList_0[3].operationalCert = chip::ByteSpan(chip::Uint8::from_const_char("Test3garbage: not in length on purpose"), 5); + listStructOctetStringList_0[1].fabricIndex = 1ULL; + listStructOctetStringList_0[1].operationalCert = + chip::ByteSpan(chip::Uint8::from_const_char("Test1garbage: not in length on purpose"), 5); - listStructOctetStringArgument = listStructOctetStringList_0; + listStructOctetStringList_0[2].fabricIndex = 2ULL; + listStructOctetStringList_0[2].operationalCert = + chip::ByteSpan(chip::Uint8::from_const_char("Test2garbage: not in length on purpose"), 5); - ReturnErrorOnFailure(cluster.WriteAttribute(listStructOctetStringArgument, this, OnSuccessCallback_170, OnFailureCallback_170)); - return CHIP_NO_ERROR; - } + listStructOctetStringList_0[3].fabricIndex = 3ULL; + listStructOctetStringList_0[3].operationalCert = + chip::ByteSpan(chip::Uint8::from_const_char("Test3garbage: not in length on purpose"), 5); - void OnFailureResponse_170(EmberAfStatus status) - { - ThrowFailureResponse(); - } + listStructOctetStringArgument = listStructOctetStringList_0; - void OnSuccessResponse_170() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + listStructOctetStringArgument, this, OnSuccessCallback_170, OnFailureCallback_170)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_170(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_170() { NextTest(); } - CHIP_ERROR TestReadAttributeListWithListOfListStructOctetString_171() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_171, OnFailureCallback_171)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_171, OnFailureCallback_171)); + return CHIP_NO_ERROR; } - void OnFailureResponse_171(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_171(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_171( const chip::app::DataModel::DecodableList & listStructOctetString) - { - { - auto iter_0 = listStructOctetString.begin(); - VerifyOrReturn(CheckNextListItemDecodes("listStructOctetString", iter_0, 0)); - VerifyOrReturn(CheckValue("listStructOctetString[0].fabricIndex", iter_0.GetValue().fabricIndex,0ULL - )); - VerifyOrReturn(CheckValueAsString("listStructOctetString[0].operationalCert", iter_0.GetValue().operationalCert,chip::ByteSpan(chip::Uint8::from_const_char("Test0"), 5) - )); - VerifyOrReturn(CheckNextListItemDecodes("listStructOctetString", iter_0, 1)); - VerifyOrReturn(CheckValue("listStructOctetString[1].fabricIndex", iter_0.GetValue().fabricIndex,1ULL - )); - VerifyOrReturn(CheckValueAsString("listStructOctetString[1].operationalCert", iter_0.GetValue().operationalCert,chip::ByteSpan(chip::Uint8::from_const_char("Test1"), 5) - )); - VerifyOrReturn(CheckNextListItemDecodes("listStructOctetString", iter_0, 2)); - VerifyOrReturn(CheckValue("listStructOctetString[2].fabricIndex", iter_0.GetValue().fabricIndex,2ULL - )); - VerifyOrReturn(CheckValueAsString("listStructOctetString[2].operationalCert", iter_0.GetValue().operationalCert,chip::ByteSpan(chip::Uint8::from_const_char("Test2"), 5) - )); - VerifyOrReturn(CheckNextListItemDecodes("listStructOctetString", iter_0, 3)); - VerifyOrReturn(CheckValue("listStructOctetString[3].fabricIndex", iter_0.GetValue().fabricIndex,3ULL - )); - VerifyOrReturn(CheckValueAsString("listStructOctetString[3].operationalCert", iter_0.GetValue().operationalCert,chip::ByteSpan(chip::Uint8::from_const_char("Test3"), 5) - )); - VerifyOrReturn(CheckNoMoreListItems("listStructOctetString", iter_0, 4)); - } + void OnSuccessResponse_171( + const chip::app::DataModel::DecodableList & + listStructOctetString) + { + { + auto iter_0 = listStructOctetString.begin(); + VerifyOrReturn(CheckNextListItemDecodes("listStructOctetString", iter_0, 0)); + VerifyOrReturn(CheckValue("listStructOctetString[0].fabricIndex", iter_0.GetValue().fabricIndex, 0ULL)); + VerifyOrReturn(CheckValueAsString("listStructOctetString[0].operationalCert", iter_0.GetValue().operationalCert, + chip::ByteSpan(chip::Uint8::from_const_char("Test0"), 5))); + VerifyOrReturn(CheckNextListItemDecodes("listStructOctetString", iter_0, 1)); + VerifyOrReturn(CheckValue("listStructOctetString[1].fabricIndex", iter_0.GetValue().fabricIndex, 1ULL)); + VerifyOrReturn(CheckValueAsString("listStructOctetString[1].operationalCert", iter_0.GetValue().operationalCert, + chip::ByteSpan(chip::Uint8::from_const_char("Test1"), 5))); + VerifyOrReturn(CheckNextListItemDecodes("listStructOctetString", iter_0, 2)); + VerifyOrReturn(CheckValue("listStructOctetString[2].fabricIndex", iter_0.GetValue().fabricIndex, 2ULL)); + VerifyOrReturn(CheckValueAsString("listStructOctetString[2].operationalCert", iter_0.GetValue().operationalCert, + chip::ByteSpan(chip::Uint8::from_const_char("Test2"), 5))); + VerifyOrReturn(CheckNextListItemDecodes("listStructOctetString", iter_0, 3)); + VerifyOrReturn(CheckValue("listStructOctetString[3].fabricIndex", iter_0.GetValue().fabricIndex, 3ULL)); + VerifyOrReturn(CheckValueAsString("listStructOctetString[3].operationalCert", iter_0.GetValue().operationalCert, + chip::ByteSpan(chip::Uint8::from_const_char("Test3"), 5))); + VerifyOrReturn(CheckNoMoreListItems("listStructOctetString", iter_0, 4)); + } NextTest(); - } - - - + } - CHIP_ERROR TestSendTestCommandWithOptionalArgSet_172() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type; RequestType request; - request.arg1.Emplace(); - request.arg1.Value().SetNonNull(); - request.arg1.Value().Value() = 5; - + request.arg1.Emplace(); + request.arg1.Value().SetNonNull(); + request.arg1.Value().Value() = 5; + auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_172(data.wasPresent, data.wasNull, data.value, data.originalValue); + (static_cast(context)) + ->OnSuccessResponse_172(data.wasPresent, data.wasNull, data.value, data.originalValue); }; auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_172(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_172(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_172(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_172( bool wasPresent, const chip::Optional & wasNull, const chip::Optional & value, const chip::Optional> & originalValue) + void OnSuccessResponse_172(bool wasPresent, const chip::Optional & wasNull, const chip::Optional & value, + const chip::Optional> & originalValue) { - VerifyOrReturn(CheckValue("wasPresent", wasPresent,true - )); - + VerifyOrReturn(CheckValue("wasPresent", wasPresent, true)); - VerifyOrReturn(CheckValuePresent("wasNull", wasNull)); - VerifyOrReturn(CheckValue("wasNull.Value()", wasNull.Value(),false - )); + VerifyOrReturn(CheckValuePresent("wasNull", wasNull)); + VerifyOrReturn(CheckValue("wasNull.Value()", wasNull.Value(), false)); + VerifyOrReturn(CheckValuePresent("value", value)); + VerifyOrReturn(CheckValue("value.Value()", value.Value(), 5)); - VerifyOrReturn(CheckValuePresent("value", value)); - VerifyOrReturn(CheckValue("value.Value()", value.Value(),5 - )); - - - VerifyOrReturn(CheckValuePresent("originalValue", originalValue)); - VerifyOrReturn(CheckValueNonNull("originalValue.Value()", originalValue.Value())); - VerifyOrReturn(CheckValue("originalValue.Value().Value()", originalValue.Value().Value(),5 - )); + VerifyOrReturn(CheckValuePresent("originalValue", originalValue)); + VerifyOrReturn(CheckValueNonNull("originalValue.Value()", originalValue.Value())); + VerifyOrReturn(CheckValue("originalValue.Value().Value()", originalValue.Value().Value(), 5)); NextTest(); - } - - - + } - CHIP_ERROR TestSendTestCommandWithoutItsOptionalArg_173() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type; RequestType request; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_173(data.wasPresent, data.wasNull, data.value, data.originalValue); + (static_cast(context)) + ->OnSuccessResponse_173(data.wasPresent, data.wasNull, data.value, data.originalValue); }; auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_173(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_173(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_173(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_173( bool wasPresent, const chip::Optional & wasNull, const chip::Optional & value, const chip::Optional> & originalValue) + void OnSuccessResponse_173(bool wasPresent, const chip::Optional & wasNull, const chip::Optional & value, + const chip::Optional> & originalValue) { - VerifyOrReturn(CheckValue("wasPresent", wasPresent,false - )); - - - - - - + VerifyOrReturn(CheckValue("wasPresent", wasPresent, false)); NextTest(); - } - - - + } - CHIP_ERROR TestReadListOfStructsContainingNullablesAndOptionals_174() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_174, OnFailureCallback_174)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_174, OnFailureCallback_174)); + return CHIP_NO_ERROR; } - void OnFailureResponse_174(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_174(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_174( const chip::app::DataModel::DecodableList & listNullablesAndOptionalsStruct) + void OnSuccessResponse_174(const chip::app::DataModel::DecodableList< + chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::DecodableType> & + listNullablesAndOptionalsStruct) { - { - auto iter_0 = listNullablesAndOptionalsStruct.begin(); - VerifyOrReturn(CheckNextListItemDecodes("listNullablesAndOptionalsStruct", iter_0, 0)); - VerifyOrReturn(CheckValueNull("listNullablesAndOptionalsStruct[0].nullableInt", iter_0.GetValue().nullableInt)); + { + auto iter_0 = listNullablesAndOptionalsStruct.begin(); + VerifyOrReturn( + CheckNextListItemDecodes("listNullablesAndOptionalsStruct", iter_0, 0)); + VerifyOrReturn(CheckValueNull("listNullablesAndOptionalsStruct[0].nullableInt", iter_0.GetValue().nullableInt)); VerifyOrReturn(CheckValueNull("listNullablesAndOptionalsStruct[0].nullableString", iter_0.GetValue().nullableString)); VerifyOrReturn(CheckValueNull("listNullablesAndOptionalsStruct[0].nullableStruct", iter_0.GetValue().nullableStruct)); VerifyOrReturn(CheckValueNull("listNullablesAndOptionalsStruct[0].nullableList", iter_0.GetValue().nullableList)); - VerifyOrReturn(CheckNoMoreListItems("listNullablesAndOptionalsStruct", iter_0, 1)); - } + VerifyOrReturn( + CheckNoMoreListItems("listNullablesAndOptionalsStruct", iter_0, 1)); + } NextTest(); - } - - - + } - CHIP_ERROR TestWriteListOfStructsContainingNullablesAndOptionals_175() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::List listNullablesAndOptionalsStructArgument; - - chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::Type listNullablesAndOptionalsStructList_0[1]; - - listNullablesAndOptionalsStructList_0[0].nullableInt.SetNull(); - listNullablesAndOptionalsStructList_0[0].nullableString.SetNull(); - listNullablesAndOptionalsStructList_0[0].nullableStruct.SetNull(); - listNullablesAndOptionalsStructList_0[0].nullableList.SetNonNull(); - - chip::app::Clusters::TestCluster::SimpleEnum nullableListList_3[2]; - nullableListList_3[0] =static_cast(1); - nullableListList_3[1] =static_cast(2); - listNullablesAndOptionalsStructList_0[0].nullableList.Value() = nullableListList_3; + chip::app::DataModel::List + listNullablesAndOptionalsStructArgument; - listNullablesAndOptionalsStructArgument = listNullablesAndOptionalsStructList_0; + chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::Type listNullablesAndOptionalsStructList_0[1]; - ReturnErrorOnFailure(cluster.WriteAttribute(listNullablesAndOptionalsStructArgument, this, OnSuccessCallback_175, OnFailureCallback_175)); - return CHIP_NO_ERROR; - } + listNullablesAndOptionalsStructList_0[0].nullableInt.SetNull(); + listNullablesAndOptionalsStructList_0[0].nullableString.SetNull(); + listNullablesAndOptionalsStructList_0[0].nullableStruct.SetNull(); + listNullablesAndOptionalsStructList_0[0].nullableList.SetNonNull(); - void OnFailureResponse_175(EmberAfStatus status) - { - ThrowFailureResponse(); - } + chip::app::Clusters::TestCluster::SimpleEnum nullableListList_3[2]; + nullableListList_3[0] = static_cast(1); + nullableListList_3[1] = static_cast(2); + listNullablesAndOptionalsStructList_0[0].nullableList.Value() = nullableListList_3; - void OnSuccessResponse_175() - { NextTest(); - } + listNullablesAndOptionalsStructArgument = listNullablesAndOptionalsStructList_0; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + listNullablesAndOptionalsStructArgument, this, OnSuccessCallback_175, OnFailureCallback_175)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_175(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_175() { NextTest(); } - CHIP_ERROR TestReadListOfStructsContainingNullablesAndOptionalsAfterWriting_176() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_176, OnFailureCallback_176)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_176, OnFailureCallback_176)); + return CHIP_NO_ERROR; } - void OnFailureResponse_176(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_176(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_176( const chip::app::DataModel::DecodableList & listNullablesAndOptionalsStruct) + void OnSuccessResponse_176(const chip::app::DataModel::DecodableList< + chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::DecodableType> & + listNullablesAndOptionalsStruct) { - { - auto iter_0 = listNullablesAndOptionalsStruct.begin(); - VerifyOrReturn(CheckNextListItemDecodes("listNullablesAndOptionalsStruct", iter_0, 0)); - VerifyOrReturn(CheckValueNull("listNullablesAndOptionalsStruct[0].nullableInt", iter_0.GetValue().nullableInt)); + { + auto iter_0 = listNullablesAndOptionalsStruct.begin(); + VerifyOrReturn( + CheckNextListItemDecodes("listNullablesAndOptionalsStruct", iter_0, 0)); + VerifyOrReturn(CheckValueNull("listNullablesAndOptionalsStruct[0].nullableInt", iter_0.GetValue().nullableInt)); VerifyOrReturn(CheckValueNull("listNullablesAndOptionalsStruct[0].nullableString", iter_0.GetValue().nullableString)); VerifyOrReturn(CheckValueNull("listNullablesAndOptionalsStruct[0].nullableStruct", iter_0.GetValue().nullableStruct)); VerifyOrReturn(CheckValueNonNull("listNullablesAndOptionalsStruct[0].nullableList", iter_0.GetValue().nullableList)); - { - auto iter_NaN = iter_0.GetValue().nullableList.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes("listNullablesAndOptionalsStruct[0].nullableList.Value()", iter_NaN, 0)); - VerifyOrReturn(CheckValue("listNullablesAndOptionalsStruct[0].nullableList.Value()[0]", iter_NaN.GetValue(),1 - )); - VerifyOrReturn(CheckNextListItemDecodes("listNullablesAndOptionalsStruct[0].nullableList.Value()", iter_NaN, 1)); - VerifyOrReturn(CheckValue("listNullablesAndOptionalsStruct[0].nullableList.Value()[1]", iter_NaN.GetValue(),2 - )); - VerifyOrReturn(CheckNoMoreListItems("listNullablesAndOptionalsStruct[0].nullableList.Value()", iter_NaN, 2)); - } - VerifyOrReturn(CheckNoMoreListItems("listNullablesAndOptionalsStruct", iter_0, 1)); - } + { + auto iter_NaN = iter_0.GetValue().nullableList.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "listNullablesAndOptionalsStruct[0].nullableList.Value()", iter_NaN, 0)); + VerifyOrReturn(CheckValue("listNullablesAndOptionalsStruct[0].nullableList.Value()[0]", iter_NaN.GetValue(), 1)); + VerifyOrReturn(CheckNextListItemDecodes( + "listNullablesAndOptionalsStruct[0].nullableList.Value()", iter_NaN, 1)); + VerifyOrReturn(CheckValue("listNullablesAndOptionalsStruct[0].nullableList.Value()[1]", iter_NaN.GetValue(), 2)); + VerifyOrReturn(CheckNoMoreListItems( + "listNullablesAndOptionalsStruct[0].nullableList.Value()", iter_NaN, 2)); + } + VerifyOrReturn( + CheckNoMoreListItems("listNullablesAndOptionalsStruct", iter_0, 1)); + } NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableBooleanNull_177() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -68403,52 +52165,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableBooleanArgument; - nullableBooleanArgument.SetNull(); + nullableBooleanArgument.SetNull(); - ReturnErrorOnFailure(cluster.WriteAttribute(nullableBooleanArgument, this, OnSuccessCallback_177, OnFailureCallback_177)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableBooleanArgument, this, OnSuccessCallback_177, OnFailureCallback_177)); + return CHIP_NO_ERROR; } - void OnFailureResponse_177(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_177() - { NextTest(); - } - + void OnFailureResponse_177(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_177() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBooleanNull_178() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_178, OnFailureCallback_178)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_178, OnFailureCallback_178)); + return CHIP_NO_ERROR; } - void OnFailureResponse_178(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_178(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_178( const chip::app::DataModel::Nullable & nullableBoolean) + void OnSuccessResponse_178(const chip::app::DataModel::Nullable & nullableBoolean) { - VerifyOrReturn(CheckValueNull("nullableBoolean", nullableBoolean)); + VerifyOrReturn(CheckValueNull("nullableBoolean", nullableBoolean)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableBooleanTrue_179() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -68456,55 +52203,39 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableBooleanArgument; - nullableBooleanArgument.SetNonNull(); - nullableBooleanArgument.Value() = true; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableBooleanArgument, this, OnSuccessCallback_179, OnFailureCallback_179)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_179(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableBooleanArgument.SetNonNull(); + nullableBooleanArgument.Value() = true; - void OnSuccessResponse_179() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableBooleanArgument, this, OnSuccessCallback_179, OnFailureCallback_179)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_179(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_179() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBooleanTrue_180() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_180, OnFailureCallback_180)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_180, OnFailureCallback_180)); + return CHIP_NO_ERROR; } - void OnFailureResponse_180(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_180(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_180( const chip::app::DataModel::Nullable & nullableBoolean) + void OnSuccessResponse_180(const chip::app::DataModel::Nullable & nullableBoolean) { - VerifyOrReturn(CheckValueNonNull("nullableBoolean", nullableBoolean)); - VerifyOrReturn(CheckValue("nullableBoolean.Value()", nullableBoolean.Value(),true - )); + VerifyOrReturn(CheckValueNonNull("nullableBoolean", nullableBoolean)); + VerifyOrReturn(CheckValue("nullableBoolean.Value()", nullableBoolean.Value(), true)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableBitmap8MaxValue_181() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -68512,55 +52243,39 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableBitmap8Argument; - nullableBitmap8Argument.SetNonNull(); - nullableBitmap8Argument.Value() = 254; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableBitmap8Argument, this, OnSuccessCallback_181, OnFailureCallback_181)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_181(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableBitmap8Argument.SetNonNull(); + nullableBitmap8Argument.Value() = 254; - void OnSuccessResponse_181() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableBitmap8Argument, this, OnSuccessCallback_181, OnFailureCallback_181)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_181(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_181() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap8MaxValue_182() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_182, OnFailureCallback_182)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_182, OnFailureCallback_182)); + return CHIP_NO_ERROR; } - void OnFailureResponse_182(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_182(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_182( const chip::app::DataModel::Nullable & nullableBitmap8) + void OnSuccessResponse_182(const chip::app::DataModel::Nullable & nullableBitmap8) { - VerifyOrReturn(CheckValueNonNull("nullableBitmap8", nullableBitmap8)); - VerifyOrReturn(CheckValue("nullableBitmap8.Value()", nullableBitmap8.Value(),254 - )); + VerifyOrReturn(CheckValueNonNull("nullableBitmap8", nullableBitmap8)); + VerifyOrReturn(CheckValue("nullableBitmap8.Value()", nullableBitmap8.Value(), 254)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableBitmap8InvalidValue_183() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -68568,56 +52283,43 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableBitmap8Argument; - nullableBitmap8Argument.SetNonNull(); - nullableBitmap8Argument.Value() = 255; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableBitmap8Argument, this, OnSuccessCallback_183, OnFailureCallback_183)); - return CHIP_NO_ERROR; + nullableBitmap8Argument.SetNonNull(); + nullableBitmap8Argument.Value() = 255; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableBitmap8Argument, this, OnSuccessCallback_183, OnFailureCallback_183)); + return CHIP_NO_ERROR; } void OnFailureResponse_183(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_183() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_183() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadAttributeNullableBitmap8UnchangedValue_184() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_184, OnFailureCallback_184)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_184, OnFailureCallback_184)); + return CHIP_NO_ERROR; } - void OnFailureResponse_184(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_184(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_184( const chip::app::DataModel::Nullable & nullableBitmap8) + void OnSuccessResponse_184(const chip::app::DataModel::Nullable & nullableBitmap8) { - VerifyOrReturn(CheckValueNonNull("nullableBitmap8", nullableBitmap8)); - VerifyOrReturn(CheckValue("nullableBitmap8.Value()", nullableBitmap8.Value(),254 - )); + VerifyOrReturn(CheckValueNonNull("nullableBitmap8", nullableBitmap8)); + VerifyOrReturn(CheckValue("nullableBitmap8.Value()", nullableBitmap8.Value(), 254)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableBitmap8NullValue_185() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -68625,52 +52327,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableBitmap8Argument; - nullableBitmap8Argument.SetNull(); + nullableBitmap8Argument.SetNull(); - ReturnErrorOnFailure(cluster.WriteAttribute(nullableBitmap8Argument, this, OnSuccessCallback_185, OnFailureCallback_185)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableBitmap8Argument, this, OnSuccessCallback_185, OnFailureCallback_185)); + return CHIP_NO_ERROR; } - void OnFailureResponse_185(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_185() - { NextTest(); - } - + void OnFailureResponse_185(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_185() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap8NullValue_186() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_186, OnFailureCallback_186)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_186, OnFailureCallback_186)); + return CHIP_NO_ERROR; } - void OnFailureResponse_186(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_186(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_186( const chip::app::DataModel::Nullable & nullableBitmap8) + void OnSuccessResponse_186(const chip::app::DataModel::Nullable & nullableBitmap8) { - VerifyOrReturn(CheckValueNull("nullableBitmap8", nullableBitmap8)); + VerifyOrReturn(CheckValueNull("nullableBitmap8", nullableBitmap8)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableBitmap16MaxValue_187() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -68678,55 +52365,39 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableBitmap16Argument; - nullableBitmap16Argument.SetNonNull(); - nullableBitmap16Argument.Value() = 65534U; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableBitmap16Argument, this, OnSuccessCallback_187, OnFailureCallback_187)); - return CHIP_NO_ERROR; - } + nullableBitmap16Argument.SetNonNull(); + nullableBitmap16Argument.Value() = 65534U; - void OnFailureResponse_187(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_187() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableBitmap16Argument, this, OnSuccessCallback_187, OnFailureCallback_187)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_187(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_187() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap16MaxValue_188() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_188, OnFailureCallback_188)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_188, OnFailureCallback_188)); + return CHIP_NO_ERROR; } - void OnFailureResponse_188(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_188(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_188( const chip::app::DataModel::Nullable & nullableBitmap16) + void OnSuccessResponse_188(const chip::app::DataModel::Nullable & nullableBitmap16) { - VerifyOrReturn(CheckValueNonNull("nullableBitmap16", nullableBitmap16)); - VerifyOrReturn(CheckValue("nullableBitmap16.Value()", nullableBitmap16.Value(),65534U - )); + VerifyOrReturn(CheckValueNonNull("nullableBitmap16", nullableBitmap16)); + VerifyOrReturn(CheckValue("nullableBitmap16.Value()", nullableBitmap16.Value(), 65534U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableBitmap16InvalidValue_189() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -68734,56 +52405,43 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableBitmap16Argument; - nullableBitmap16Argument.SetNonNull(); - nullableBitmap16Argument.Value() = 65535U; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableBitmap16Argument, this, OnSuccessCallback_189, OnFailureCallback_189)); - return CHIP_NO_ERROR; + nullableBitmap16Argument.SetNonNull(); + nullableBitmap16Argument.Value() = 65535U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableBitmap16Argument, this, OnSuccessCallback_189, OnFailureCallback_189)); + return CHIP_NO_ERROR; } void OnFailureResponse_189(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_189() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_189() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadAttributeNullableBitmap16UnchangedValue_190() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_190, OnFailureCallback_190)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_190, OnFailureCallback_190)); + return CHIP_NO_ERROR; } - void OnFailureResponse_190(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_190(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_190( const chip::app::DataModel::Nullable & nullableBitmap16) + void OnSuccessResponse_190(const chip::app::DataModel::Nullable & nullableBitmap16) { - VerifyOrReturn(CheckValueNonNull("nullableBitmap16", nullableBitmap16)); - VerifyOrReturn(CheckValue("nullableBitmap16.Value()", nullableBitmap16.Value(),65534U - )); + VerifyOrReturn(CheckValueNonNull("nullableBitmap16", nullableBitmap16)); + VerifyOrReturn(CheckValue("nullableBitmap16.Value()", nullableBitmap16.Value(), 65534U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableBitmap16NullValue_191() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -68791,52 +52449,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableBitmap16Argument; - nullableBitmap16Argument.SetNull(); + nullableBitmap16Argument.SetNull(); - ReturnErrorOnFailure(cluster.WriteAttribute(nullableBitmap16Argument, this, OnSuccessCallback_191, OnFailureCallback_191)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableBitmap16Argument, this, OnSuccessCallback_191, OnFailureCallback_191)); + return CHIP_NO_ERROR; } - void OnFailureResponse_191(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_191() - { NextTest(); - } - + void OnFailureResponse_191(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_191() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap16NullValue_192() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_192, OnFailureCallback_192)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_192, OnFailureCallback_192)); + return CHIP_NO_ERROR; } - void OnFailureResponse_192(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_192(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_192( const chip::app::DataModel::Nullable & nullableBitmap16) + void OnSuccessResponse_192(const chip::app::DataModel::Nullable & nullableBitmap16) { - VerifyOrReturn(CheckValueNull("nullableBitmap16", nullableBitmap16)); + VerifyOrReturn(CheckValueNull("nullableBitmap16", nullableBitmap16)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableBitmap32MaxValue_193() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -68844,55 +52487,39 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableBitmap32Argument; - nullableBitmap32Argument.SetNonNull(); - nullableBitmap32Argument.Value() = 4294967294UL; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableBitmap32Argument, this, OnSuccessCallback_193, OnFailureCallback_193)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_193(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableBitmap32Argument.SetNonNull(); + nullableBitmap32Argument.Value() = 4294967294UL; - void OnSuccessResponse_193() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableBitmap32Argument, this, OnSuccessCallback_193, OnFailureCallback_193)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_193(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_193() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap32MaxValue_194() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_194, OnFailureCallback_194)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_194, OnFailureCallback_194)); + return CHIP_NO_ERROR; } - void OnFailureResponse_194(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_194(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_194( const chip::app::DataModel::Nullable & nullableBitmap32) + void OnSuccessResponse_194(const chip::app::DataModel::Nullable & nullableBitmap32) { - VerifyOrReturn(CheckValueNonNull("nullableBitmap32", nullableBitmap32)); - VerifyOrReturn(CheckValue("nullableBitmap32.Value()", nullableBitmap32.Value(),4294967294UL - )); + VerifyOrReturn(CheckValueNonNull("nullableBitmap32", nullableBitmap32)); + VerifyOrReturn(CheckValue("nullableBitmap32.Value()", nullableBitmap32.Value(), 4294967294UL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableBitmap32InvalidValue_195() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -68900,56 +52527,43 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableBitmap32Argument; - nullableBitmap32Argument.SetNonNull(); - nullableBitmap32Argument.Value() = 4294967295UL; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableBitmap32Argument, this, OnSuccessCallback_195, OnFailureCallback_195)); - return CHIP_NO_ERROR; + nullableBitmap32Argument.SetNonNull(); + nullableBitmap32Argument.Value() = 4294967295UL; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableBitmap32Argument, this, OnSuccessCallback_195, OnFailureCallback_195)); + return CHIP_NO_ERROR; } void OnFailureResponse_195(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_195() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_195() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadAttributeNullableBitmap32UnchangedValue_196() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_196, OnFailureCallback_196)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_196, OnFailureCallback_196)); + return CHIP_NO_ERROR; } - void OnFailureResponse_196(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_196(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_196( const chip::app::DataModel::Nullable & nullableBitmap32) + void OnSuccessResponse_196(const chip::app::DataModel::Nullable & nullableBitmap32) { - VerifyOrReturn(CheckValueNonNull("nullableBitmap32", nullableBitmap32)); - VerifyOrReturn(CheckValue("nullableBitmap32.Value()", nullableBitmap32.Value(),4294967294UL - )); + VerifyOrReturn(CheckValueNonNull("nullableBitmap32", nullableBitmap32)); + VerifyOrReturn(CheckValue("nullableBitmap32.Value()", nullableBitmap32.Value(), 4294967294UL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableBitmap32NullValue_197() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -68957,52 +52571,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableBitmap32Argument; - nullableBitmap32Argument.SetNull(); + nullableBitmap32Argument.SetNull(); - ReturnErrorOnFailure(cluster.WriteAttribute(nullableBitmap32Argument, this, OnSuccessCallback_197, OnFailureCallback_197)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableBitmap32Argument, this, OnSuccessCallback_197, OnFailureCallback_197)); + return CHIP_NO_ERROR; } - void OnFailureResponse_197(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_197() - { NextTest(); - } - + void OnFailureResponse_197(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_197() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap32NullValue_198() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_198, OnFailureCallback_198)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_198, OnFailureCallback_198)); + return CHIP_NO_ERROR; } - void OnFailureResponse_198(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_198(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_198( const chip::app::DataModel::Nullable & nullableBitmap32) + void OnSuccessResponse_198(const chip::app::DataModel::Nullable & nullableBitmap32) { - VerifyOrReturn(CheckValueNull("nullableBitmap32", nullableBitmap32)); + VerifyOrReturn(CheckValueNull("nullableBitmap32", nullableBitmap32)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableBitmap64MaxValue_199() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -69010,55 +52609,39 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableBitmap64Argument; - nullableBitmap64Argument.SetNonNull(); - nullableBitmap64Argument.Value() = 18446744073709551614ULL; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableBitmap64Argument, this, OnSuccessCallback_199, OnFailureCallback_199)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_199(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableBitmap64Argument.SetNonNull(); + nullableBitmap64Argument.Value() = 18446744073709551614ULL; - void OnSuccessResponse_199() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableBitmap64Argument, this, OnSuccessCallback_199, OnFailureCallback_199)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_199(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_199() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap64MaxValue_200() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_200, OnFailureCallback_200)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_200, OnFailureCallback_200)); + return CHIP_NO_ERROR; } - void OnFailureResponse_200(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_200(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_200( const chip::app::DataModel::Nullable & nullableBitmap64) + void OnSuccessResponse_200(const chip::app::DataModel::Nullable & nullableBitmap64) { - VerifyOrReturn(CheckValueNonNull("nullableBitmap64", nullableBitmap64)); - VerifyOrReturn(CheckValue("nullableBitmap64.Value()", nullableBitmap64.Value(),18446744073709551614ULL - )); + VerifyOrReturn(CheckValueNonNull("nullableBitmap64", nullableBitmap64)); + VerifyOrReturn(CheckValue("nullableBitmap64.Value()", nullableBitmap64.Value(), 18446744073709551614ULL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableBitmap64InvalidValue_201() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -69066,56 +52649,43 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableBitmap64Argument; - nullableBitmap64Argument.SetNonNull(); - nullableBitmap64Argument.Value() = 18446744073709551615ULL; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableBitmap64Argument, this, OnSuccessCallback_201, OnFailureCallback_201)); - return CHIP_NO_ERROR; + nullableBitmap64Argument.SetNonNull(); + nullableBitmap64Argument.Value() = 18446744073709551615ULL; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableBitmap64Argument, this, OnSuccessCallback_201, OnFailureCallback_201)); + return CHIP_NO_ERROR; } void OnFailureResponse_201(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_201() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_201() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadAttributeNullableBitmap64UnchangedValue_202() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_202, OnFailureCallback_202)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_202, OnFailureCallback_202)); + return CHIP_NO_ERROR; } - void OnFailureResponse_202(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_202(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_202( const chip::app::DataModel::Nullable & nullableBitmap64) + void OnSuccessResponse_202(const chip::app::DataModel::Nullable & nullableBitmap64) { - VerifyOrReturn(CheckValueNonNull("nullableBitmap64", nullableBitmap64)); - VerifyOrReturn(CheckValue("nullableBitmap64.Value()", nullableBitmap64.Value(),18446744073709551614ULL - )); + VerifyOrReturn(CheckValueNonNull("nullableBitmap64", nullableBitmap64)); + VerifyOrReturn(CheckValue("nullableBitmap64.Value()", nullableBitmap64.Value(), 18446744073709551614ULL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableBitmap64NullValue_203() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -69123,52 +52693,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableBitmap64Argument; - nullableBitmap64Argument.SetNull(); + nullableBitmap64Argument.SetNull(); - ReturnErrorOnFailure(cluster.WriteAttribute(nullableBitmap64Argument, this, OnSuccessCallback_203, OnFailureCallback_203)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableBitmap64Argument, this, OnSuccessCallback_203, OnFailureCallback_203)); + return CHIP_NO_ERROR; } - void OnFailureResponse_203(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_203() - { NextTest(); - } - + void OnFailureResponse_203(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_203() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap64NullValue_204() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_204, OnFailureCallback_204)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_204, OnFailureCallback_204)); + return CHIP_NO_ERROR; } - void OnFailureResponse_204(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_204(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_204( const chip::app::DataModel::Nullable & nullableBitmap64) + void OnSuccessResponse_204(const chip::app::DataModel::Nullable & nullableBitmap64) { - VerifyOrReturn(CheckValueNull("nullableBitmap64", nullableBitmap64)); + VerifyOrReturn(CheckValueNull("nullableBitmap64", nullableBitmap64)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt8uMinValue_205() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -69176,55 +52731,39 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt8uArgument; - nullableInt8uArgument.SetNonNull(); - nullableInt8uArgument.Value() = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt8uArgument, this, OnSuccessCallback_205, OnFailureCallback_205)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_205(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableInt8uArgument.SetNonNull(); + nullableInt8uArgument.Value() = 0; - void OnSuccessResponse_205() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt8uArgument, this, OnSuccessCallback_205, OnFailureCallback_205)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_205(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_205() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt8uMinValue_206() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_206, OnFailureCallback_206)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_206, OnFailureCallback_206)); + return CHIP_NO_ERROR; } - void OnFailureResponse_206(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_206(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_206( const chip::app::DataModel::Nullable & nullableInt8u) + void OnSuccessResponse_206(const chip::app::DataModel::Nullable & nullableInt8u) { - VerifyOrReturn(CheckValueNonNull("nullableInt8u", nullableInt8u)); - VerifyOrReturn(CheckValue("nullableInt8u.Value()", nullableInt8u.Value(),0 - )); + VerifyOrReturn(CheckValueNonNull("nullableInt8u", nullableInt8u)); + VerifyOrReturn(CheckValue("nullableInt8u.Value()", nullableInt8u.Value(), 0)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt8uMaxValue_207() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -69232,55 +52771,39 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt8uArgument; - nullableInt8uArgument.SetNonNull(); - nullableInt8uArgument.Value() = 254; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt8uArgument, this, OnSuccessCallback_207, OnFailureCallback_207)); - return CHIP_NO_ERROR; - } + nullableInt8uArgument.SetNonNull(); + nullableInt8uArgument.Value() = 254; - void OnFailureResponse_207(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_207() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt8uArgument, this, OnSuccessCallback_207, OnFailureCallback_207)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_207(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_207() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt8uMaxValue_208() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_208, OnFailureCallback_208)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_208, OnFailureCallback_208)); + return CHIP_NO_ERROR; } - void OnFailureResponse_208(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_208(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_208( const chip::app::DataModel::Nullable & nullableInt8u) + void OnSuccessResponse_208(const chip::app::DataModel::Nullable & nullableInt8u) { - VerifyOrReturn(CheckValueNonNull("nullableInt8u", nullableInt8u)); - VerifyOrReturn(CheckValue("nullableInt8u.Value()", nullableInt8u.Value(),254 - )); + VerifyOrReturn(CheckValueNonNull("nullableInt8u", nullableInt8u)); + VerifyOrReturn(CheckValue("nullableInt8u.Value()", nullableInt8u.Value(), 254)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt8uInvalidValue_209() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -69288,83 +52811,63 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt8uArgument; - nullableInt8uArgument.SetNonNull(); - nullableInt8uArgument.Value() = 255; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt8uArgument, this, OnSuccessCallback_209, OnFailureCallback_209)); - return CHIP_NO_ERROR; + nullableInt8uArgument.SetNonNull(); + nullableInt8uArgument.Value() = 255; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt8uArgument, this, OnSuccessCallback_209, OnFailureCallback_209)); + return CHIP_NO_ERROR; } void OnFailureResponse_209(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_209() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_209() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadAttributeNullableInt8uUnchangedValue_210() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_210, OnFailureCallback_210)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_210, OnFailureCallback_210)); + return CHIP_NO_ERROR; } - void OnFailureResponse_210(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_210(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_210( const chip::app::DataModel::Nullable & nullableInt8u) + void OnSuccessResponse_210(const chip::app::DataModel::Nullable & nullableInt8u) { - VerifyOrReturn(CheckValueNonNull("nullableInt8u", nullableInt8u)); - VerifyOrReturn(CheckValue("nullableInt8u.Value()", nullableInt8u.Value(),254 - )); + VerifyOrReturn(CheckValueNonNull("nullableInt8u", nullableInt8u)); + VerifyOrReturn(CheckValue("nullableInt8u.Value()", nullableInt8u.Value(), 254)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeNullableInt8uUnchangedValueWithConstraint_211() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_211, OnFailureCallback_211)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_211, OnFailureCallback_211)); + return CHIP_NO_ERROR; } - void OnFailureResponse_211(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_211(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_211( const chip::app::DataModel::Nullable & nullableInt8u) + void OnSuccessResponse_211(const chip::app::DataModel::Nullable & nullableInt8u) { - VerifyOrReturn(CheckValueNonNull("nullableInt8u", nullableInt8u)); + VerifyOrReturn(CheckValueNonNull("nullableInt8u", nullableInt8u)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt8uNullValue_212() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -69372,105 +52875,77 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt8uArgument; - nullableInt8uArgument.SetNull(); + nullableInt8uArgument.SetNull(); - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt8uArgument, this, OnSuccessCallback_212, OnFailureCallback_212)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt8uArgument, this, OnSuccessCallback_212, OnFailureCallback_212)); + return CHIP_NO_ERROR; } - void OnFailureResponse_212(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_212() - { NextTest(); - } - + void OnFailureResponse_212(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_212() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt8uNullValue_213() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_213, OnFailureCallback_213)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_213, OnFailureCallback_213)); + return CHIP_NO_ERROR; } - void OnFailureResponse_213(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_213(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_213( const chip::app::DataModel::Nullable & nullableInt8u) + void OnSuccessResponse_213(const chip::app::DataModel::Nullable & nullableInt8u) { - VerifyOrReturn(CheckValueNull("nullableInt8u", nullableInt8u)); + VerifyOrReturn(CheckValueNull("nullableInt8u", nullableInt8u)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeNullableInt8uNullValueRange_214() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_214, OnFailureCallback_214)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_214, OnFailureCallback_214)); + return CHIP_NO_ERROR; } - void OnFailureResponse_214(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_214(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_214( const chip::app::DataModel::Nullable & nullableInt8u) + void OnSuccessResponse_214(const chip::app::DataModel::Nullable & nullableInt8u) { - VerifyOrReturn(CheckConstraintMinValue("nullableInt8u", nullableInt8u, 0));VerifyOrReturn(CheckConstraintMaxValue("nullableInt8u", nullableInt8u, 254)); + VerifyOrReturn(CheckConstraintMinValue("nullableInt8u", nullableInt8u, 0)); + VerifyOrReturn(CheckConstraintMaxValue("nullableInt8u", nullableInt8u, 254)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeNullableInt8uNullValueNot_215() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_215, OnFailureCallback_215)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_215, OnFailureCallback_215)); + return CHIP_NO_ERROR; } - void OnFailureResponse_215(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_215(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_215( const chip::app::DataModel::Nullable & nullableInt8u) + void OnSuccessResponse_215(const chip::app::DataModel::Nullable & nullableInt8u) { - VerifyOrReturn(CheckConstraintNotValue("nullableInt8u", nullableInt8u, 254)); + VerifyOrReturn(CheckConstraintNotValue("nullableInt8u", nullableInt8u, 254)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt8uValue_216() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -69478,79 +52953,58 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt8uArgument; - nullableInt8uArgument.SetNonNull(); - nullableInt8uArgument.Value() = 128; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt8uArgument, this, OnSuccessCallback_216, OnFailureCallback_216)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_216(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableInt8uArgument.SetNonNull(); + nullableInt8uArgument.Value() = 128; - void OnSuccessResponse_216() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt8uArgument, this, OnSuccessCallback_216, OnFailureCallback_216)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_216(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_216() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt8uValueInRange_217() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_217, OnFailureCallback_217)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_217, OnFailureCallback_217)); + return CHIP_NO_ERROR; } - void OnFailureResponse_217(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_217(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_217( const chip::app::DataModel::Nullable & nullableInt8u) + void OnSuccessResponse_217(const chip::app::DataModel::Nullable & nullableInt8u) { - VerifyOrReturn(CheckConstraintMinValue("nullableInt8u", nullableInt8u, 0));VerifyOrReturn(CheckConstraintMaxValue("nullableInt8u", nullableInt8u, 254)); + VerifyOrReturn(CheckConstraintMinValue("nullableInt8u", nullableInt8u, 0)); + VerifyOrReturn(CheckConstraintMaxValue("nullableInt8u", nullableInt8u, 254)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeNullableInt8uNotValueOk_218() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_218, OnFailureCallback_218)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_218, OnFailureCallback_218)); + return CHIP_NO_ERROR; } - void OnFailureResponse_218(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_218(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_218( const chip::app::DataModel::Nullable & nullableInt8u) + void OnSuccessResponse_218(const chip::app::DataModel::Nullable & nullableInt8u) { - VerifyOrReturn(CheckConstraintNotValue("nullableInt8u", nullableInt8u, 129)); + VerifyOrReturn(CheckConstraintNotValue("nullableInt8u", nullableInt8u, 129)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt16uMinValue_219() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -69558,55 +53012,39 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt16uArgument; - nullableInt16uArgument.SetNonNull(); - nullableInt16uArgument.Value() = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt16uArgument, this, OnSuccessCallback_219, OnFailureCallback_219)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_219(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableInt16uArgument.SetNonNull(); + nullableInt16uArgument.Value() = 0U; - void OnSuccessResponse_219() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt16uArgument, this, OnSuccessCallback_219, OnFailureCallback_219)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_219(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_219() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt16uMinValue_220() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_220, OnFailureCallback_220)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_220, OnFailureCallback_220)); + return CHIP_NO_ERROR; } - void OnFailureResponse_220(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_220(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_220( const chip::app::DataModel::Nullable & nullableInt16u) + void OnSuccessResponse_220(const chip::app::DataModel::Nullable & nullableInt16u) { - VerifyOrReturn(CheckValueNonNull("nullableInt16u", nullableInt16u)); - VerifyOrReturn(CheckValue("nullableInt16u.Value()", nullableInt16u.Value(),0U - )); + VerifyOrReturn(CheckValueNonNull("nullableInt16u", nullableInt16u)); + VerifyOrReturn(CheckValue("nullableInt16u.Value()", nullableInt16u.Value(), 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt16uMaxValue_221() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -69614,55 +53052,39 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt16uArgument; - nullableInt16uArgument.SetNonNull(); - nullableInt16uArgument.Value() = 65534U; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt16uArgument, this, OnSuccessCallback_221, OnFailureCallback_221)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_221(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableInt16uArgument.SetNonNull(); + nullableInt16uArgument.Value() = 65534U; - void OnSuccessResponse_221() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt16uArgument, this, OnSuccessCallback_221, OnFailureCallback_221)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_221(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_221() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt16uMaxValue_222() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_222, OnFailureCallback_222)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_222, OnFailureCallback_222)); + return CHIP_NO_ERROR; } - void OnFailureResponse_222(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_222(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_222( const chip::app::DataModel::Nullable & nullableInt16u) + void OnSuccessResponse_222(const chip::app::DataModel::Nullable & nullableInt16u) { - VerifyOrReturn(CheckValueNonNull("nullableInt16u", nullableInt16u)); - VerifyOrReturn(CheckValue("nullableInt16u.Value()", nullableInt16u.Value(),65534U - )); + VerifyOrReturn(CheckValueNonNull("nullableInt16u", nullableInt16u)); + VerifyOrReturn(CheckValue("nullableInt16u.Value()", nullableInt16u.Value(), 65534U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt16uInvalidValue_223() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -69670,162 +53092,121 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt16uArgument; - nullableInt16uArgument.SetNonNull(); - nullableInt16uArgument.Value() = 65535U; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt16uArgument, this, OnSuccessCallback_223, OnFailureCallback_223)); - return CHIP_NO_ERROR; + nullableInt16uArgument.SetNonNull(); + nullableInt16uArgument.Value() = 65535U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt16uArgument, this, OnSuccessCallback_223, OnFailureCallback_223)); + return CHIP_NO_ERROR; } void OnFailureResponse_223(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_223() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_223() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadAttributeNullableInt16uUnchangedValue_224() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_224, OnFailureCallback_224)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_224, OnFailureCallback_224)); + return CHIP_NO_ERROR; } - void OnFailureResponse_224(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_224(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_224( const chip::app::DataModel::Nullable & nullableInt16u) + void OnSuccessResponse_224(const chip::app::DataModel::Nullable & nullableInt16u) { - VerifyOrReturn(CheckValueNonNull("nullableInt16u", nullableInt16u)); - VerifyOrReturn(CheckValue("nullableInt16u.Value()", nullableInt16u.Value(),65534U - )); + VerifyOrReturn(CheckValueNonNull("nullableInt16u", nullableInt16u)); + VerifyOrReturn(CheckValue("nullableInt16u.Value()", nullableInt16u.Value(), 65534U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt16uNullValue_225() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableInt16uArgument; - nullableInt16uArgument.SetNull(); - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt16uArgument, this, OnSuccessCallback_225, OnFailureCallback_225)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_225(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_225() - { NextTest(); - } + chip::app::DataModel::Nullable nullableInt16uArgument; + nullableInt16uArgument.SetNull(); + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt16uArgument, this, OnSuccessCallback_225, OnFailureCallback_225)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_225(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_225() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt16uNullValue_226() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_226, OnFailureCallback_226)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_226, OnFailureCallback_226)); + return CHIP_NO_ERROR; } - void OnFailureResponse_226(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_226(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_226( const chip::app::DataModel::Nullable & nullableInt16u) + void OnSuccessResponse_226(const chip::app::DataModel::Nullable & nullableInt16u) { - VerifyOrReturn(CheckValueNull("nullableInt16u", nullableInt16u)); + VerifyOrReturn(CheckValueNull("nullableInt16u", nullableInt16u)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeNullableInt16uNullValueRange_227() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_227, OnFailureCallback_227)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_227, OnFailureCallback_227)); + return CHIP_NO_ERROR; } - void OnFailureResponse_227(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_227(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_227( const chip::app::DataModel::Nullable & nullableInt16u) + void OnSuccessResponse_227(const chip::app::DataModel::Nullable & nullableInt16u) { - VerifyOrReturn(CheckConstraintMinValue("nullableInt16u", nullableInt16u, 0U));VerifyOrReturn(CheckConstraintMaxValue("nullableInt16u", nullableInt16u, 65534U)); + VerifyOrReturn(CheckConstraintMinValue("nullableInt16u", nullableInt16u, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("nullableInt16u", nullableInt16u, 65534U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeNullableInt16uNullValueNot_228() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_228, OnFailureCallback_228)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_228, OnFailureCallback_228)); + return CHIP_NO_ERROR; } - void OnFailureResponse_228(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_228(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_228( const chip::app::DataModel::Nullable & nullableInt16u) + void OnSuccessResponse_228(const chip::app::DataModel::Nullable & nullableInt16u) { - VerifyOrReturn(CheckConstraintNotValue("nullableInt16u", nullableInt16u, 65534U)); + VerifyOrReturn(CheckConstraintNotValue("nullableInt16u", nullableInt16u, 65534U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt16uValue_229() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -69833,79 +53214,58 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt16uArgument; - nullableInt16uArgument.SetNonNull(); - nullableInt16uArgument.Value() = 32000U; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt16uArgument, this, OnSuccessCallback_229, OnFailureCallback_229)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_229(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableInt16uArgument.SetNonNull(); + nullableInt16uArgument.Value() = 32000U; - void OnSuccessResponse_229() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt16uArgument, this, OnSuccessCallback_229, OnFailureCallback_229)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_229(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_229() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt16uValueInRange_230() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_230, OnFailureCallback_230)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_230, OnFailureCallback_230)); + return CHIP_NO_ERROR; } - void OnFailureResponse_230(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_230(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_230( const chip::app::DataModel::Nullable & nullableInt16u) + void OnSuccessResponse_230(const chip::app::DataModel::Nullable & nullableInt16u) { - VerifyOrReturn(CheckConstraintMinValue("nullableInt16u", nullableInt16u, 0U));VerifyOrReturn(CheckConstraintMaxValue("nullableInt16u", nullableInt16u, 65534U)); + VerifyOrReturn(CheckConstraintMinValue("nullableInt16u", nullableInt16u, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("nullableInt16u", nullableInt16u, 65534U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeNullableInt16uNotValueOk_231() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_231, OnFailureCallback_231)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_231, OnFailureCallback_231)); + return CHIP_NO_ERROR; } - void OnFailureResponse_231(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_231(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_231( const chip::app::DataModel::Nullable & nullableInt16u) + void OnSuccessResponse_231(const chip::app::DataModel::Nullable & nullableInt16u) { - VerifyOrReturn(CheckConstraintNotValue("nullableInt16u", nullableInt16u, 32001U)); + VerifyOrReturn(CheckConstraintNotValue("nullableInt16u", nullableInt16u, 32001U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt32uMinValue_232() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -69913,55 +53273,39 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt32uArgument; - nullableInt32uArgument.SetNonNull(); - nullableInt32uArgument.Value() = 0UL; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt32uArgument, this, OnSuccessCallback_232, OnFailureCallback_232)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_232(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableInt32uArgument.SetNonNull(); + nullableInt32uArgument.Value() = 0UL; - void OnSuccessResponse_232() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt32uArgument, this, OnSuccessCallback_232, OnFailureCallback_232)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_232(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_232() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt32uMinValue_233() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_233, OnFailureCallback_233)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_233, OnFailureCallback_233)); + return CHIP_NO_ERROR; } - void OnFailureResponse_233(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_233(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_233( const chip::app::DataModel::Nullable & nullableInt32u) + void OnSuccessResponse_233(const chip::app::DataModel::Nullable & nullableInt32u) { - VerifyOrReturn(CheckValueNonNull("nullableInt32u", nullableInt32u)); - VerifyOrReturn(CheckValue("nullableInt32u.Value()", nullableInt32u.Value(),0UL - )); + VerifyOrReturn(CheckValueNonNull("nullableInt32u", nullableInt32u)); + VerifyOrReturn(CheckValue("nullableInt32u.Value()", nullableInt32u.Value(), 0UL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt32uMaxValue_234() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -69969,55 +53313,39 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt32uArgument; - nullableInt32uArgument.SetNonNull(); - nullableInt32uArgument.Value() = 4294967294UL; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt32uArgument, this, OnSuccessCallback_234, OnFailureCallback_234)); - return CHIP_NO_ERROR; - } + nullableInt32uArgument.SetNonNull(); + nullableInt32uArgument.Value() = 4294967294UL; - void OnFailureResponse_234(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_234() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt32uArgument, this, OnSuccessCallback_234, OnFailureCallback_234)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_234(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_234() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt32uMaxValue_235() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_235, OnFailureCallback_235)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_235, OnFailureCallback_235)); + return CHIP_NO_ERROR; } - void OnFailureResponse_235(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_235(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_235( const chip::app::DataModel::Nullable & nullableInt32u) + void OnSuccessResponse_235(const chip::app::DataModel::Nullable & nullableInt32u) { - VerifyOrReturn(CheckValueNonNull("nullableInt32u", nullableInt32u)); - VerifyOrReturn(CheckValue("nullableInt32u.Value()", nullableInt32u.Value(),4294967294UL - )); + VerifyOrReturn(CheckValueNonNull("nullableInt32u", nullableInt32u)); + VerifyOrReturn(CheckValue("nullableInt32u.Value()", nullableInt32u.Value(), 4294967294UL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt32uInvalidValue_236() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -70025,56 +53353,43 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt32uArgument; - nullableInt32uArgument.SetNonNull(); - nullableInt32uArgument.Value() = 4294967295UL; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt32uArgument, this, OnSuccessCallback_236, OnFailureCallback_236)); - return CHIP_NO_ERROR; + nullableInt32uArgument.SetNonNull(); + nullableInt32uArgument.Value() = 4294967295UL; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt32uArgument, this, OnSuccessCallback_236, OnFailureCallback_236)); + return CHIP_NO_ERROR; } void OnFailureResponse_236(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_236() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_236() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadAttributeNullableInt32uUnchangedValue_237() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_237, OnFailureCallback_237)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_237, OnFailureCallback_237)); + return CHIP_NO_ERROR; } - void OnFailureResponse_237(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_237(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_237( const chip::app::DataModel::Nullable & nullableInt32u) + void OnSuccessResponse_237(const chip::app::DataModel::Nullable & nullableInt32u) { - VerifyOrReturn(CheckValueNonNull("nullableInt32u", nullableInt32u)); - VerifyOrReturn(CheckValue("nullableInt32u.Value()", nullableInt32u.Value(),4294967294UL - )); + VerifyOrReturn(CheckValueNonNull("nullableInt32u", nullableInt32u)); + VerifyOrReturn(CheckValue("nullableInt32u.Value()", nullableInt32u.Value(), 4294967294UL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt32uNullValue_238() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -70082,105 +53397,77 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt32uArgument; - nullableInt32uArgument.SetNull(); + nullableInt32uArgument.SetNull(); - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt32uArgument, this, OnSuccessCallback_238, OnFailureCallback_238)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt32uArgument, this, OnSuccessCallback_238, OnFailureCallback_238)); + return CHIP_NO_ERROR; } - void OnFailureResponse_238(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_238() - { NextTest(); - } - + void OnFailureResponse_238(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_238() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt32uNullValue_239() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_239, OnFailureCallback_239)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_239, OnFailureCallback_239)); + return CHIP_NO_ERROR; } - void OnFailureResponse_239(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_239(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_239( const chip::app::DataModel::Nullable & nullableInt32u) + void OnSuccessResponse_239(const chip::app::DataModel::Nullable & nullableInt32u) { - VerifyOrReturn(CheckValueNull("nullableInt32u", nullableInt32u)); + VerifyOrReturn(CheckValueNull("nullableInt32u", nullableInt32u)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeNullableInt32uNullValueRange_240() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_240, OnFailureCallback_240)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_240, OnFailureCallback_240)); + return CHIP_NO_ERROR; } - void OnFailureResponse_240(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_240(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_240( const chip::app::DataModel::Nullable & nullableInt32u) + void OnSuccessResponse_240(const chip::app::DataModel::Nullable & nullableInt32u) { - VerifyOrReturn(CheckConstraintMinValue("nullableInt32u", nullableInt32u, 0UL));VerifyOrReturn(CheckConstraintMaxValue("nullableInt32u", nullableInt32u, 4294967294UL)); + VerifyOrReturn(CheckConstraintMinValue("nullableInt32u", nullableInt32u, 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("nullableInt32u", nullableInt32u, 4294967294UL)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeNullableInt32uNullValueNot_241() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_241, OnFailureCallback_241)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_241, OnFailureCallback_241)); + return CHIP_NO_ERROR; } - void OnFailureResponse_241(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_241(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_241( const chip::app::DataModel::Nullable & nullableInt32u) + void OnSuccessResponse_241(const chip::app::DataModel::Nullable & nullableInt32u) { - VerifyOrReturn(CheckConstraintNotValue("nullableInt32u", nullableInt32u, 4294967294UL)); + VerifyOrReturn(CheckConstraintNotValue("nullableInt32u", nullableInt32u, 4294967294UL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt32uValue_242() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -70188,79 +53475,58 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt32uArgument; - nullableInt32uArgument.SetNonNull(); - nullableInt32uArgument.Value() = 2147483647UL; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt32uArgument, this, OnSuccessCallback_242, OnFailureCallback_242)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_242(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableInt32uArgument.SetNonNull(); + nullableInt32uArgument.Value() = 2147483647UL; - void OnSuccessResponse_242() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt32uArgument, this, OnSuccessCallback_242, OnFailureCallback_242)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_242(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_242() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt32uValueInRange_243() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_243, OnFailureCallback_243)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_243, OnFailureCallback_243)); + return CHIP_NO_ERROR; } - void OnFailureResponse_243(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_243(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_243( const chip::app::DataModel::Nullable & nullableInt32u) + void OnSuccessResponse_243(const chip::app::DataModel::Nullable & nullableInt32u) { - VerifyOrReturn(CheckConstraintMinValue("nullableInt32u", nullableInt32u, 0UL));VerifyOrReturn(CheckConstraintMaxValue("nullableInt32u", nullableInt32u, 4294967294UL)); + VerifyOrReturn(CheckConstraintMinValue("nullableInt32u", nullableInt32u, 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("nullableInt32u", nullableInt32u, 4294967294UL)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeNullableInt32uNotValueOk_244() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_244, OnFailureCallback_244)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_244, OnFailureCallback_244)); + return CHIP_NO_ERROR; } - void OnFailureResponse_244(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_244(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_244( const chip::app::DataModel::Nullable & nullableInt32u) + void OnSuccessResponse_244(const chip::app::DataModel::Nullable & nullableInt32u) { - VerifyOrReturn(CheckConstraintNotValue("nullableInt32u", nullableInt32u, 2147483648UL)); + VerifyOrReturn(CheckConstraintNotValue("nullableInt32u", nullableInt32u, 2147483648UL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt64uMinValue_245() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -70268,55 +53534,39 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt64uArgument; - nullableInt64uArgument.SetNonNull(); - nullableInt64uArgument.Value() = 0ULL; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt64uArgument, this, OnSuccessCallback_245, OnFailureCallback_245)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_245(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableInt64uArgument.SetNonNull(); + nullableInt64uArgument.Value() = 0ULL; - void OnSuccessResponse_245() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt64uArgument, this, OnSuccessCallback_245, OnFailureCallback_245)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_245(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_245() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt64uMinValue_246() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_246, OnFailureCallback_246)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_246, OnFailureCallback_246)); + return CHIP_NO_ERROR; } - void OnFailureResponse_246(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_246(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_246( const chip::app::DataModel::Nullable & nullableInt64u) + void OnSuccessResponse_246(const chip::app::DataModel::Nullable & nullableInt64u) { - VerifyOrReturn(CheckValueNonNull("nullableInt64u", nullableInt64u)); - VerifyOrReturn(CheckValue("nullableInt64u.Value()", nullableInt64u.Value(),0ULL - )); + VerifyOrReturn(CheckValueNonNull("nullableInt64u", nullableInt64u)); + VerifyOrReturn(CheckValue("nullableInt64u.Value()", nullableInt64u.Value(), 0ULL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt64uMaxValue_247() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -70324,55 +53574,39 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt64uArgument; - nullableInt64uArgument.SetNonNull(); - nullableInt64uArgument.Value() = 18446744073709551614ULL; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt64uArgument, this, OnSuccessCallback_247, OnFailureCallback_247)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_247(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableInt64uArgument.SetNonNull(); + nullableInt64uArgument.Value() = 18446744073709551614ULL; - void OnSuccessResponse_247() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt64uArgument, this, OnSuccessCallback_247, OnFailureCallback_247)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_247(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_247() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt64uMaxValue_248() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_248, OnFailureCallback_248)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_248, OnFailureCallback_248)); + return CHIP_NO_ERROR; } - void OnFailureResponse_248(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_248(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_248( const chip::app::DataModel::Nullable & nullableInt64u) + void OnSuccessResponse_248(const chip::app::DataModel::Nullable & nullableInt64u) { - VerifyOrReturn(CheckValueNonNull("nullableInt64u", nullableInt64u)); - VerifyOrReturn(CheckValue("nullableInt64u.Value()", nullableInt64u.Value(),18446744073709551614ULL - )); + VerifyOrReturn(CheckValueNonNull("nullableInt64u", nullableInt64u)); + VerifyOrReturn(CheckValue("nullableInt64u.Value()", nullableInt64u.Value(), 18446744073709551614ULL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt64uInvalidValue_249() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -70380,56 +53614,43 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt64uArgument; - nullableInt64uArgument.SetNonNull(); - nullableInt64uArgument.Value() = 18446744073709551615ULL; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt64uArgument, this, OnSuccessCallback_249, OnFailureCallback_249)); - return CHIP_NO_ERROR; + nullableInt64uArgument.SetNonNull(); + nullableInt64uArgument.Value() = 18446744073709551615ULL; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt64uArgument, this, OnSuccessCallback_249, OnFailureCallback_249)); + return CHIP_NO_ERROR; } void OnFailureResponse_249(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_249() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_249() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadAttributeNullableInt64uUnchangedValue_250() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_250, OnFailureCallback_250)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_250, OnFailureCallback_250)); + return CHIP_NO_ERROR; } - void OnFailureResponse_250(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_250(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_250( const chip::app::DataModel::Nullable & nullableInt64u) + void OnSuccessResponse_250(const chip::app::DataModel::Nullable & nullableInt64u) { - VerifyOrReturn(CheckValueNonNull("nullableInt64u", nullableInt64u)); - VerifyOrReturn(CheckValue("nullableInt64u.Value()", nullableInt64u.Value(),18446744073709551614ULL - )); + VerifyOrReturn(CheckValueNonNull("nullableInt64u", nullableInt64u)); + VerifyOrReturn(CheckValue("nullableInt64u.Value()", nullableInt64u.Value(), 18446744073709551614ULL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt64uNullValue_251() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -70437,105 +53658,77 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt64uArgument; - nullableInt64uArgument.SetNull(); + nullableInt64uArgument.SetNull(); - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt64uArgument, this, OnSuccessCallback_251, OnFailureCallback_251)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt64uArgument, this, OnSuccessCallback_251, OnFailureCallback_251)); + return CHIP_NO_ERROR; } - void OnFailureResponse_251(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_251() - { NextTest(); - } - + void OnFailureResponse_251(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_251() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt64uNullValue_252() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_252, OnFailureCallback_252)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_252, OnFailureCallback_252)); + return CHIP_NO_ERROR; } - void OnFailureResponse_252(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_252(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_252( const chip::app::DataModel::Nullable & nullableInt64u) + void OnSuccessResponse_252(const chip::app::DataModel::Nullable & nullableInt64u) { - VerifyOrReturn(CheckValueNull("nullableInt64u", nullableInt64u)); + VerifyOrReturn(CheckValueNull("nullableInt64u", nullableInt64u)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeNullableInt64uNullValueRange_253() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_253, OnFailureCallback_253)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_253, OnFailureCallback_253)); + return CHIP_NO_ERROR; } - void OnFailureResponse_253(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_253(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_253( const chip::app::DataModel::Nullable & nullableInt64u) + void OnSuccessResponse_253(const chip::app::DataModel::Nullable & nullableInt64u) { - VerifyOrReturn(CheckConstraintMinValue("nullableInt64u", nullableInt64u, 0ULL));VerifyOrReturn(CheckConstraintMaxValue("nullableInt64u", nullableInt64u, 18446744073709551614ULL)); + VerifyOrReturn(CheckConstraintMinValue("nullableInt64u", nullableInt64u, 0ULL)); + VerifyOrReturn(CheckConstraintMaxValue("nullableInt64u", nullableInt64u, 18446744073709551614ULL)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeNullableInt64uNullValueNot_254() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_254, OnFailureCallback_254)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_254, OnFailureCallback_254)); + return CHIP_NO_ERROR; } - void OnFailureResponse_254(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_254(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_254( const chip::app::DataModel::Nullable & nullableInt64u) + void OnSuccessResponse_254(const chip::app::DataModel::Nullable & nullableInt64u) { - VerifyOrReturn(CheckConstraintNotValue("nullableInt64u", nullableInt64u, 18446744073709551614ULL)); + VerifyOrReturn(CheckConstraintNotValue("nullableInt64u", nullableInt64u, 18446744073709551614ULL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt64uValue_255() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -70543,79 +53736,58 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt64uArgument; - nullableInt64uArgument.SetNonNull(); - nullableInt64uArgument.Value() = 18000000000000000000ULL; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt64uArgument, this, OnSuccessCallback_255, OnFailureCallback_255)); - return CHIP_NO_ERROR; - } + nullableInt64uArgument.SetNonNull(); + nullableInt64uArgument.Value() = 18000000000000000000ULL; - void OnFailureResponse_255(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_255() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt64uArgument, this, OnSuccessCallback_255, OnFailureCallback_255)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_255(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_255() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt64uValueInRange_256() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_256, OnFailureCallback_256)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_256, OnFailureCallback_256)); + return CHIP_NO_ERROR; } - void OnFailureResponse_256(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_256(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_256( const chip::app::DataModel::Nullable & nullableInt64u) + void OnSuccessResponse_256(const chip::app::DataModel::Nullable & nullableInt64u) { - VerifyOrReturn(CheckConstraintMinValue("nullableInt64u", nullableInt64u, 0ULL));VerifyOrReturn(CheckConstraintMaxValue("nullableInt64u", nullableInt64u, 18446744073709551614ULL)); + VerifyOrReturn(CheckConstraintMinValue("nullableInt64u", nullableInt64u, 0ULL)); + VerifyOrReturn(CheckConstraintMaxValue("nullableInt64u", nullableInt64u, 18446744073709551614ULL)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeNullableInt64uNotValueOk_257() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_257, OnFailureCallback_257)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_257, OnFailureCallback_257)); + return CHIP_NO_ERROR; } - void OnFailureResponse_257(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_257(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_257( const chip::app::DataModel::Nullable & nullableInt64u) + void OnSuccessResponse_257(const chip::app::DataModel::Nullable & nullableInt64u) { - VerifyOrReturn(CheckConstraintNotValue("nullableInt64u", nullableInt64u, 18000000000000000001ULL)); + VerifyOrReturn(CheckConstraintNotValue("nullableInt64u", nullableInt64u, 18000000000000000001ULL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt8sMinValue_258() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -70623,55 +53795,39 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt8sArgument; - nullableInt8sArgument.SetNonNull(); - nullableInt8sArgument.Value() = -127; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt8sArgument, this, OnSuccessCallback_258, OnFailureCallback_258)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_258(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableInt8sArgument.SetNonNull(); + nullableInt8sArgument.Value() = -127; - void OnSuccessResponse_258() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt8sArgument, this, OnSuccessCallback_258, OnFailureCallback_258)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_258(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_258() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt8sMinValue_259() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_259, OnFailureCallback_259)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_259, OnFailureCallback_259)); + return CHIP_NO_ERROR; } - void OnFailureResponse_259(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_259(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_259( const chip::app::DataModel::Nullable & nullableInt8s) + void OnSuccessResponse_259(const chip::app::DataModel::Nullable & nullableInt8s) { - VerifyOrReturn(CheckValueNonNull("nullableInt8s", nullableInt8s)); - VerifyOrReturn(CheckValue("nullableInt8s.Value()", nullableInt8s.Value(),-127 - )); + VerifyOrReturn(CheckValueNonNull("nullableInt8s", nullableInt8s)); + VerifyOrReturn(CheckValue("nullableInt8s.Value()", nullableInt8s.Value(), -127)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt8sInvalidValue_260() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -70679,56 +53835,43 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt8sArgument; - nullableInt8sArgument.SetNonNull(); - nullableInt8sArgument.Value() = -128; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt8sArgument, this, OnSuccessCallback_260, OnFailureCallback_260)); - return CHIP_NO_ERROR; + nullableInt8sArgument.SetNonNull(); + nullableInt8sArgument.Value() = -128; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt8sArgument, this, OnSuccessCallback_260, OnFailureCallback_260)); + return CHIP_NO_ERROR; } void OnFailureResponse_260(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_260() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_260() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadAttributeNullableInt8sUnchangedValue_261() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_261, OnFailureCallback_261)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_261, OnFailureCallback_261)); + return CHIP_NO_ERROR; } - void OnFailureResponse_261(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_261(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_261( const chip::app::DataModel::Nullable & nullableInt8s) + void OnSuccessResponse_261(const chip::app::DataModel::Nullable & nullableInt8s) { - VerifyOrReturn(CheckValueNonNull("nullableInt8s", nullableInt8s)); - VerifyOrReturn(CheckValue("nullableInt8s.Value()", nullableInt8s.Value(),-127 - )); + VerifyOrReturn(CheckValueNonNull("nullableInt8s", nullableInt8s)); + VerifyOrReturn(CheckValue("nullableInt8s.Value()", nullableInt8s.Value(), -127)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt8sNullValue_262() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -70736,105 +53879,77 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt8sArgument; - nullableInt8sArgument.SetNull(); + nullableInt8sArgument.SetNull(); - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt8sArgument, this, OnSuccessCallback_262, OnFailureCallback_262)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt8sArgument, this, OnSuccessCallback_262, OnFailureCallback_262)); + return CHIP_NO_ERROR; } - void OnFailureResponse_262(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_262() - { NextTest(); - } - + void OnFailureResponse_262(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_262() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt8sNullValue_263() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_263, OnFailureCallback_263)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_263, OnFailureCallback_263)); + return CHIP_NO_ERROR; } - void OnFailureResponse_263(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_263(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_263( const chip::app::DataModel::Nullable & nullableInt8s) + void OnSuccessResponse_263(const chip::app::DataModel::Nullable & nullableInt8s) { - VerifyOrReturn(CheckValueNull("nullableInt8s", nullableInt8s)); + VerifyOrReturn(CheckValueNull("nullableInt8s", nullableInt8s)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeNullableInt8sNullValueRange_264() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_264, OnFailureCallback_264)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_264, OnFailureCallback_264)); + return CHIP_NO_ERROR; } - void OnFailureResponse_264(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_264(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_264( const chip::app::DataModel::Nullable & nullableInt8s) + void OnSuccessResponse_264(const chip::app::DataModel::Nullable & nullableInt8s) { - VerifyOrReturn(CheckConstraintMinValue("nullableInt8s", nullableInt8s, -127));VerifyOrReturn(CheckConstraintMaxValue("nullableInt8s", nullableInt8s, 127)); + VerifyOrReturn(CheckConstraintMinValue("nullableInt8s", nullableInt8s, -127)); + VerifyOrReturn(CheckConstraintMaxValue("nullableInt8s", nullableInt8s, 127)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeNullableInt8sNullValueNot_265() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_265, OnFailureCallback_265)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_265, OnFailureCallback_265)); + return CHIP_NO_ERROR; } - void OnFailureResponse_265(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_265(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_265( const chip::app::DataModel::Nullable & nullableInt8s) + void OnSuccessResponse_265(const chip::app::DataModel::Nullable & nullableInt8s) { - VerifyOrReturn(CheckConstraintNotValue("nullableInt8s", nullableInt8s, -127)); + VerifyOrReturn(CheckConstraintNotValue("nullableInt8s", nullableInt8s, -127)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt8sValue_266() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -70842,79 +53957,58 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt8sArgument; - nullableInt8sArgument.SetNonNull(); - nullableInt8sArgument.Value() = -127; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt8sArgument, this, OnSuccessCallback_266, OnFailureCallback_266)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_266(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableInt8sArgument.SetNonNull(); + nullableInt8sArgument.Value() = -127; - void OnSuccessResponse_266() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt8sArgument, this, OnSuccessCallback_266, OnFailureCallback_266)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_266(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_266() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt8sValueInRange_267() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_267, OnFailureCallback_267)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_267, OnFailureCallback_267)); + return CHIP_NO_ERROR; } - void OnFailureResponse_267(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_267(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_267( const chip::app::DataModel::Nullable & nullableInt8s) + void OnSuccessResponse_267(const chip::app::DataModel::Nullable & nullableInt8s) { - VerifyOrReturn(CheckConstraintMinValue("nullableInt8s", nullableInt8s, -127));VerifyOrReturn(CheckConstraintMaxValue("nullableInt8s", nullableInt8s, 127)); + VerifyOrReturn(CheckConstraintMinValue("nullableInt8s", nullableInt8s, -127)); + VerifyOrReturn(CheckConstraintMaxValue("nullableInt8s", nullableInt8s, 127)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeNullableInt8sNotValueOk_268() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_268, OnFailureCallback_268)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_268, OnFailureCallback_268)); + return CHIP_NO_ERROR; } - void OnFailureResponse_268(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_268(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_268( const chip::app::DataModel::Nullable & nullableInt8s) + void OnSuccessResponse_268(const chip::app::DataModel::Nullable & nullableInt8s) { - VerifyOrReturn(CheckConstraintNotValue("nullableInt8s", nullableInt8s, -126)); + VerifyOrReturn(CheckConstraintNotValue("nullableInt8s", nullableInt8s, -126)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt16sMinValue_269() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -70922,55 +54016,39 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt16sArgument; - nullableInt16sArgument.SetNonNull(); - nullableInt16sArgument.Value() = -32767; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt16sArgument, this, OnSuccessCallback_269, OnFailureCallback_269)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_269(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableInt16sArgument.SetNonNull(); + nullableInt16sArgument.Value() = -32767; - void OnSuccessResponse_269() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt16sArgument, this, OnSuccessCallback_269, OnFailureCallback_269)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_269(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_269() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt16sMinValue_270() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_270, OnFailureCallback_270)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_270, OnFailureCallback_270)); + return CHIP_NO_ERROR; } - void OnFailureResponse_270(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_270(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_270( const chip::app::DataModel::Nullable & nullableInt16s) + void OnSuccessResponse_270(const chip::app::DataModel::Nullable & nullableInt16s) { - VerifyOrReturn(CheckValueNonNull("nullableInt16s", nullableInt16s)); - VerifyOrReturn(CheckValue("nullableInt16s.Value()", nullableInt16s.Value(),-32767 - )); + VerifyOrReturn(CheckValueNonNull("nullableInt16s", nullableInt16s)); + VerifyOrReturn(CheckValue("nullableInt16s.Value()", nullableInt16s.Value(), -32767)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt16sInvalidValue_271() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -70978,56 +54056,43 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt16sArgument; - nullableInt16sArgument.SetNonNull(); - nullableInt16sArgument.Value() = -32768; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt16sArgument, this, OnSuccessCallback_271, OnFailureCallback_271)); - return CHIP_NO_ERROR; + nullableInt16sArgument.SetNonNull(); + nullableInt16sArgument.Value() = -32768; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt16sArgument, this, OnSuccessCallback_271, OnFailureCallback_271)); + return CHIP_NO_ERROR; } void OnFailureResponse_271(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_271() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_271() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadAttributeNullableInt16sUnchangedValue_272() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_272, OnFailureCallback_272)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_272, OnFailureCallback_272)); + return CHIP_NO_ERROR; } - void OnFailureResponse_272(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_272(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_272( const chip::app::DataModel::Nullable & nullableInt16s) + void OnSuccessResponse_272(const chip::app::DataModel::Nullable & nullableInt16s) { - VerifyOrReturn(CheckValueNonNull("nullableInt16s", nullableInt16s)); - VerifyOrReturn(CheckValue("nullableInt16s.Value()", nullableInt16s.Value(),-32767 - )); + VerifyOrReturn(CheckValueNonNull("nullableInt16s", nullableInt16s)); + VerifyOrReturn(CheckValue("nullableInt16s.Value()", nullableInt16s.Value(), -32767)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt16sNullValue_273() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -71035,105 +54100,77 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt16sArgument; - nullableInt16sArgument.SetNull(); + nullableInt16sArgument.SetNull(); - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt16sArgument, this, OnSuccessCallback_273, OnFailureCallback_273)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt16sArgument, this, OnSuccessCallback_273, OnFailureCallback_273)); + return CHIP_NO_ERROR; } - void OnFailureResponse_273(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_273() - { NextTest(); - } - + void OnFailureResponse_273(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_273() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt16sNullValue_274() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_274, OnFailureCallback_274)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_274, OnFailureCallback_274)); + return CHIP_NO_ERROR; } - void OnFailureResponse_274(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_274(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_274( const chip::app::DataModel::Nullable & nullableInt16s) + void OnSuccessResponse_274(const chip::app::DataModel::Nullable & nullableInt16s) { - VerifyOrReturn(CheckValueNull("nullableInt16s", nullableInt16s)); + VerifyOrReturn(CheckValueNull("nullableInt16s", nullableInt16s)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeNullableInt16sNullValueRange_275() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_275, OnFailureCallback_275)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_275, OnFailureCallback_275)); + return CHIP_NO_ERROR; } - void OnFailureResponse_275(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_275(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_275( const chip::app::DataModel::Nullable & nullableInt16s) + void OnSuccessResponse_275(const chip::app::DataModel::Nullable & nullableInt16s) { - VerifyOrReturn(CheckConstraintMinValue("nullableInt16s", nullableInt16s, -32767));VerifyOrReturn(CheckConstraintMaxValue("nullableInt16s", nullableInt16s, 32767)); + VerifyOrReturn(CheckConstraintMinValue("nullableInt16s", nullableInt16s, -32767)); + VerifyOrReturn(CheckConstraintMaxValue("nullableInt16s", nullableInt16s, 32767)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeNullableInt16sNullValueNot_276() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_276, OnFailureCallback_276)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_276, OnFailureCallback_276)); + return CHIP_NO_ERROR; } - void OnFailureResponse_276(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_276(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_276( const chip::app::DataModel::Nullable & nullableInt16s) + void OnSuccessResponse_276(const chip::app::DataModel::Nullable & nullableInt16s) { - VerifyOrReturn(CheckConstraintNotValue("nullableInt16s", nullableInt16s, -32767)); + VerifyOrReturn(CheckConstraintNotValue("nullableInt16s", nullableInt16s, -32767)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt16sValue_277() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -71141,79 +54178,58 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt16sArgument; - nullableInt16sArgument.SetNonNull(); - nullableInt16sArgument.Value() = -32767; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt16sArgument, this, OnSuccessCallback_277, OnFailureCallback_277)); - return CHIP_NO_ERROR; - } + nullableInt16sArgument.SetNonNull(); + nullableInt16sArgument.Value() = -32767; - void OnFailureResponse_277(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_277() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt16sArgument, this, OnSuccessCallback_277, OnFailureCallback_277)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_277(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_277() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt16sValueInRange_278() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_278, OnFailureCallback_278)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_278, OnFailureCallback_278)); + return CHIP_NO_ERROR; } - void OnFailureResponse_278(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_278(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_278( const chip::app::DataModel::Nullable & nullableInt16s) + void OnSuccessResponse_278(const chip::app::DataModel::Nullable & nullableInt16s) { - VerifyOrReturn(CheckConstraintMinValue("nullableInt16s", nullableInt16s, -32767));VerifyOrReturn(CheckConstraintMaxValue("nullableInt16s", nullableInt16s, 32767)); + VerifyOrReturn(CheckConstraintMinValue("nullableInt16s", nullableInt16s, -32767)); + VerifyOrReturn(CheckConstraintMaxValue("nullableInt16s", nullableInt16s, 32767)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeNullableInt16sNotValueOk_279() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_279, OnFailureCallback_279)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_279, OnFailureCallback_279)); + return CHIP_NO_ERROR; } - void OnFailureResponse_279(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_279(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_279( const chip::app::DataModel::Nullable & nullableInt16s) + void OnSuccessResponse_279(const chip::app::DataModel::Nullable & nullableInt16s) { - VerifyOrReturn(CheckConstraintNotValue("nullableInt16s", nullableInt16s, -32766)); + VerifyOrReturn(CheckConstraintNotValue("nullableInt16s", nullableInt16s, -32766)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt32sMinValue_280() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -71221,55 +54237,39 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt32sArgument; - nullableInt32sArgument.SetNonNull(); - nullableInt32sArgument.Value() = -2147483647L; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt32sArgument, this, OnSuccessCallback_280, OnFailureCallback_280)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_280(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableInt32sArgument.SetNonNull(); + nullableInt32sArgument.Value() = -2147483647L; - void OnSuccessResponse_280() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt32sArgument, this, OnSuccessCallback_280, OnFailureCallback_280)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_280(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_280() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt32sMinValue_281() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_281, OnFailureCallback_281)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_281, OnFailureCallback_281)); + return CHIP_NO_ERROR; } - void OnFailureResponse_281(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_281(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_281( const chip::app::DataModel::Nullable & nullableInt32s) + void OnSuccessResponse_281(const chip::app::DataModel::Nullable & nullableInt32s) { - VerifyOrReturn(CheckValueNonNull("nullableInt32s", nullableInt32s)); - VerifyOrReturn(CheckValue("nullableInt32s.Value()", nullableInt32s.Value(),-2147483647L - )); + VerifyOrReturn(CheckValueNonNull("nullableInt32s", nullableInt32s)); + VerifyOrReturn(CheckValue("nullableInt32s.Value()", nullableInt32s.Value(), -2147483647L)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt32sInvalidValue_282() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -71277,56 +54277,43 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt32sArgument; - nullableInt32sArgument.SetNonNull(); - nullableInt32sArgument.Value() = -2147483648L; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt32sArgument, this, OnSuccessCallback_282, OnFailureCallback_282)); - return CHIP_NO_ERROR; + nullableInt32sArgument.SetNonNull(); + nullableInt32sArgument.Value() = -2147483648L; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt32sArgument, this, OnSuccessCallback_282, OnFailureCallback_282)); + return CHIP_NO_ERROR; } void OnFailureResponse_282(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_282() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_282() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadAttributeNullableInt32sUnchangedValue_283() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_283, OnFailureCallback_283)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_283, OnFailureCallback_283)); + return CHIP_NO_ERROR; } - void OnFailureResponse_283(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_283(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_283( const chip::app::DataModel::Nullable & nullableInt32s) + void OnSuccessResponse_283(const chip::app::DataModel::Nullable & nullableInt32s) { - VerifyOrReturn(CheckValueNonNull("nullableInt32s", nullableInt32s)); - VerifyOrReturn(CheckValue("nullableInt32s.Value()", nullableInt32s.Value(),-2147483647L - )); + VerifyOrReturn(CheckValueNonNull("nullableInt32s", nullableInt32s)); + VerifyOrReturn(CheckValue("nullableInt32s.Value()", nullableInt32s.Value(), -2147483647L)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt32sNullValue_284() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -71334,105 +54321,77 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt32sArgument; - nullableInt32sArgument.SetNull(); + nullableInt32sArgument.SetNull(); - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt32sArgument, this, OnSuccessCallback_284, OnFailureCallback_284)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt32sArgument, this, OnSuccessCallback_284, OnFailureCallback_284)); + return CHIP_NO_ERROR; } - void OnFailureResponse_284(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_284() - { NextTest(); - } + void OnFailureResponse_284(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_284() { NextTest(); } - - - CHIP_ERROR TestReadAttributeNullableInt32sNullValue_285() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_285, OnFailureCallback_285)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_285, OnFailureCallback_285)); + return CHIP_NO_ERROR; } - void OnFailureResponse_285(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_285(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_285( const chip::app::DataModel::Nullable & nullableInt32s) + void OnSuccessResponse_285(const chip::app::DataModel::Nullable & nullableInt32s) { - VerifyOrReturn(CheckValueNull("nullableInt32s", nullableInt32s)); + VerifyOrReturn(CheckValueNull("nullableInt32s", nullableInt32s)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeNullableInt32sNullValueRange_286() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_286, OnFailureCallback_286)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_286, OnFailureCallback_286)); + return CHIP_NO_ERROR; } - void OnFailureResponse_286(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_286(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_286( const chip::app::DataModel::Nullable & nullableInt32s) + void OnSuccessResponse_286(const chip::app::DataModel::Nullable & nullableInt32s) { - VerifyOrReturn(CheckConstraintMinValue("nullableInt32s", nullableInt32s, -2147483647L));VerifyOrReturn(CheckConstraintMaxValue("nullableInt32s", nullableInt32s, 2147483647L)); + VerifyOrReturn(CheckConstraintMinValue("nullableInt32s", nullableInt32s, -2147483647L)); + VerifyOrReturn(CheckConstraintMaxValue("nullableInt32s", nullableInt32s, 2147483647L)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeNullableInt32sNullValueNot_287() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_287, OnFailureCallback_287)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_287, OnFailureCallback_287)); + return CHIP_NO_ERROR; } - void OnFailureResponse_287(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_287(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_287( const chip::app::DataModel::Nullable & nullableInt32s) + void OnSuccessResponse_287(const chip::app::DataModel::Nullable & nullableInt32s) { - VerifyOrReturn(CheckConstraintNotValue("nullableInt32s", nullableInt32s, -2147483647L)); + VerifyOrReturn(CheckConstraintNotValue("nullableInt32s", nullableInt32s, -2147483647L)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt32sValue_288() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -71440,79 +54399,58 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt32sArgument; - nullableInt32sArgument.SetNonNull(); - nullableInt32sArgument.Value() = -2147483647L; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt32sArgument, this, OnSuccessCallback_288, OnFailureCallback_288)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_288(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableInt32sArgument.SetNonNull(); + nullableInt32sArgument.Value() = -2147483647L; - void OnSuccessResponse_288() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt32sArgument, this, OnSuccessCallback_288, OnFailureCallback_288)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_288(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_288() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt32sValueInRange_289() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_289, OnFailureCallback_289)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_289, OnFailureCallback_289)); + return CHIP_NO_ERROR; } - void OnFailureResponse_289(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_289(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_289( const chip::app::DataModel::Nullable & nullableInt32s) + void OnSuccessResponse_289(const chip::app::DataModel::Nullable & nullableInt32s) { - VerifyOrReturn(CheckConstraintMinValue("nullableInt32s", nullableInt32s, -2147483647L));VerifyOrReturn(CheckConstraintMaxValue("nullableInt32s", nullableInt32s, 2147483647L)); + VerifyOrReturn(CheckConstraintMinValue("nullableInt32s", nullableInt32s, -2147483647L)); + VerifyOrReturn(CheckConstraintMaxValue("nullableInt32s", nullableInt32s, 2147483647L)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeNullableInt32sNotValueOk_290() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_290, OnFailureCallback_290)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_290, OnFailureCallback_290)); + return CHIP_NO_ERROR; } - void OnFailureResponse_290(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_290(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_290( const chip::app::DataModel::Nullable & nullableInt32s) + void OnSuccessResponse_290(const chip::app::DataModel::Nullable & nullableInt32s) { - VerifyOrReturn(CheckConstraintNotValue("nullableInt32s", nullableInt32s, -2147483646L)); + VerifyOrReturn(CheckConstraintNotValue("nullableInt32s", nullableInt32s, -2147483646L)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt64sMinValue_291() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -71520,55 +54458,39 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt64sArgument; - nullableInt64sArgument.SetNonNull(); - nullableInt64sArgument.Value() = -9223372036854775807LL; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt64sArgument, this, OnSuccessCallback_291, OnFailureCallback_291)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_291(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableInt64sArgument.SetNonNull(); + nullableInt64sArgument.Value() = -9223372036854775807LL; - void OnSuccessResponse_291() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt64sArgument, this, OnSuccessCallback_291, OnFailureCallback_291)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_291(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_291() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt64sMinValue_292() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_292, OnFailureCallback_292)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_292, OnFailureCallback_292)); + return CHIP_NO_ERROR; } - void OnFailureResponse_292(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_292(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_292( const chip::app::DataModel::Nullable & nullableInt64s) + void OnSuccessResponse_292(const chip::app::DataModel::Nullable & nullableInt64s) { - VerifyOrReturn(CheckValueNonNull("nullableInt64s", nullableInt64s)); - VerifyOrReturn(CheckValue("nullableInt64s.Value()", nullableInt64s.Value(),-9223372036854775807LL - )); + VerifyOrReturn(CheckValueNonNull("nullableInt64s", nullableInt64s)); + VerifyOrReturn(CheckValue("nullableInt64s.Value()", nullableInt64s.Value(), -9223372036854775807LL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt64sInvalidValue_293() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -71576,56 +54498,43 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt64sArgument; - nullableInt64sArgument.SetNonNull(); - nullableInt64sArgument.Value() = -9223372036854775807LL - 1; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt64sArgument, this, OnSuccessCallback_293, OnFailureCallback_293)); - return CHIP_NO_ERROR; - } + nullableInt64sArgument.SetNonNull(); + nullableInt64sArgument.Value() = -9223372036854775807LL - 1; - void OnFailureResponse_293(EmberAfStatus status) - { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt64sArgument, this, OnSuccessCallback_293, OnFailureCallback_293)); + return CHIP_NO_ERROR; } - void OnSuccessResponse_293() - { ThrowSuccessResponse(); + void OnFailureResponse_293(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_293() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadAttributeNullableInt64sUnchangedValue_294() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_294, OnFailureCallback_294)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_294, OnFailureCallback_294)); + return CHIP_NO_ERROR; } - void OnFailureResponse_294(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_294(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_294( const chip::app::DataModel::Nullable & nullableInt64s) + void OnSuccessResponse_294(const chip::app::DataModel::Nullable & nullableInt64s) { - VerifyOrReturn(CheckValueNonNull("nullableInt64s", nullableInt64s)); - VerifyOrReturn(CheckValue("nullableInt64s.Value()", nullableInt64s.Value(),-9223372036854775807LL - )); + VerifyOrReturn(CheckValueNonNull("nullableInt64s", nullableInt64s)); + VerifyOrReturn(CheckValue("nullableInt64s.Value()", nullableInt64s.Value(), -9223372036854775807LL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt64sNullValue_295() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -71633,105 +54542,77 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt64sArgument; - nullableInt64sArgument.SetNull(); + nullableInt64sArgument.SetNull(); - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt64sArgument, this, OnSuccessCallback_295, OnFailureCallback_295)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt64sArgument, this, OnSuccessCallback_295, OnFailureCallback_295)); + return CHIP_NO_ERROR; } - void OnFailureResponse_295(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_295() - { NextTest(); - } - + void OnFailureResponse_295(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_295() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt64sNullValue_296() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_296, OnFailureCallback_296)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_296, OnFailureCallback_296)); + return CHIP_NO_ERROR; } - void OnFailureResponse_296(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_296(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_296( const chip::app::DataModel::Nullable & nullableInt64s) + void OnSuccessResponse_296(const chip::app::DataModel::Nullable & nullableInt64s) { - VerifyOrReturn(CheckValueNull("nullableInt64s", nullableInt64s)); + VerifyOrReturn(CheckValueNull("nullableInt64s", nullableInt64s)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeNullableInt64sNullValueRange_297() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_297, OnFailureCallback_297)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_297, OnFailureCallback_297)); + return CHIP_NO_ERROR; } - void OnFailureResponse_297(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_297(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_297( const chip::app::DataModel::Nullable & nullableInt64s) + void OnSuccessResponse_297(const chip::app::DataModel::Nullable & nullableInt64s) { - VerifyOrReturn(CheckConstraintMinValue("nullableInt64s", nullableInt64s, -9223372036854775807LL));VerifyOrReturn(CheckConstraintMaxValue("nullableInt64s", nullableInt64s, 9223372036854775807LL)); + VerifyOrReturn(CheckConstraintMinValue("nullableInt64s", nullableInt64s, -9223372036854775807LL)); + VerifyOrReturn(CheckConstraintMaxValue("nullableInt64s", nullableInt64s, 9223372036854775807LL)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeNullableInt64sNullValueNot_298() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_298, OnFailureCallback_298)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_298, OnFailureCallback_298)); + return CHIP_NO_ERROR; } - void OnFailureResponse_298(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_298(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_298( const chip::app::DataModel::Nullable & nullableInt64s) + void OnSuccessResponse_298(const chip::app::DataModel::Nullable & nullableInt64s) { - VerifyOrReturn(CheckConstraintNotValue("nullableInt64s", nullableInt64s, -9223372036854775807LL)); + VerifyOrReturn(CheckConstraintNotValue("nullableInt64s", nullableInt64s, -9223372036854775807LL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableInt64sValue_299() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -71739,79 +54620,58 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableInt64sArgument; - nullableInt64sArgument.SetNonNull(); - nullableInt64sArgument.Value() = -9223372036854775807LL; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableInt64sArgument, this, OnSuccessCallback_299, OnFailureCallback_299)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_299(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableInt64sArgument.SetNonNull(); + nullableInt64sArgument.Value() = -9223372036854775807LL; - void OnSuccessResponse_299() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt64sArgument, this, OnSuccessCallback_299, OnFailureCallback_299)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_299(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_299() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt64sValueInRange_300() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_300, OnFailureCallback_300)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_300, OnFailureCallback_300)); + return CHIP_NO_ERROR; } - void OnFailureResponse_300(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_300(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_300( const chip::app::DataModel::Nullable & nullableInt64s) + void OnSuccessResponse_300(const chip::app::DataModel::Nullable & nullableInt64s) { - VerifyOrReturn(CheckConstraintMinValue("nullableInt64s", nullableInt64s, -9223372036854775807LL));VerifyOrReturn(CheckConstraintMaxValue("nullableInt64s", nullableInt64s, 9223372036854775807LL)); + VerifyOrReturn(CheckConstraintMinValue("nullableInt64s", nullableInt64s, -9223372036854775807LL)); + VerifyOrReturn(CheckConstraintMaxValue("nullableInt64s", nullableInt64s, 9223372036854775807LL)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeNullableInt64sNotValueOk_301() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_301, OnFailureCallback_301)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_301, OnFailureCallback_301)); + return CHIP_NO_ERROR; } - void OnFailureResponse_301(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_301(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_301( const chip::app::DataModel::Nullable & nullableInt64s) + void OnSuccessResponse_301(const chip::app::DataModel::Nullable & nullableInt64s) { - VerifyOrReturn(CheckConstraintNotValue("nullableInt64s", nullableInt64s, -9223372036854775806LL)); + VerifyOrReturn(CheckConstraintNotValue("nullableInt64s", nullableInt64s, -9223372036854775806LL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableSingleMediumValue_302() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -71819,55 +54679,39 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableFloatSingleArgument; - nullableFloatSingleArgument.SetNonNull(); - nullableFloatSingleArgument.Value() = 0.1f; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableFloatSingleArgument, this, OnSuccessCallback_302, OnFailureCallback_302)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_302(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableFloatSingleArgument.SetNonNull(); + nullableFloatSingleArgument.Value() = 0.1f; - void OnSuccessResponse_302() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableFloatSingleArgument, this, OnSuccessCallback_302, OnFailureCallback_302)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_302(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_302() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableSingleMediumValue_303() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_303, OnFailureCallback_303)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_303, OnFailureCallback_303)); + return CHIP_NO_ERROR; } - void OnFailureResponse_303(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_303(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_303( const chip::app::DataModel::Nullable & nullableFloatSingle) + void OnSuccessResponse_303(const chip::app::DataModel::Nullable & nullableFloatSingle) { - VerifyOrReturn(CheckValueNonNull("nullableFloatSingle", nullableFloatSingle)); - VerifyOrReturn(CheckValue("nullableFloatSingle.Value()", nullableFloatSingle.Value(),0.1f - )); + VerifyOrReturn(CheckValueNonNull("nullableFloatSingle", nullableFloatSingle)); + VerifyOrReturn(CheckValue("nullableFloatSingle.Value()", nullableFloatSingle.Value(), 0.1f)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableSingleLargestValue_304() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -71875,55 +54719,39 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableFloatSingleArgument; - nullableFloatSingleArgument.SetNonNull(); - nullableFloatSingleArgument.Value() = INFINITY; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableFloatSingleArgument, this, OnSuccessCallback_304, OnFailureCallback_304)); - return CHIP_NO_ERROR; - } + nullableFloatSingleArgument.SetNonNull(); + nullableFloatSingleArgument.Value() = INFINITY; - void OnFailureResponse_304(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_304() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableFloatSingleArgument, this, OnSuccessCallback_304, OnFailureCallback_304)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_304(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_304() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableSingleLargestValue_305() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_305, OnFailureCallback_305)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_305, OnFailureCallback_305)); + return CHIP_NO_ERROR; } - void OnFailureResponse_305(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_305(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_305( const chip::app::DataModel::Nullable & nullableFloatSingle) + void OnSuccessResponse_305(const chip::app::DataModel::Nullable & nullableFloatSingle) { - VerifyOrReturn(CheckValueNonNull("nullableFloatSingle", nullableFloatSingle)); - VerifyOrReturn(CheckValue("nullableFloatSingle.Value()", nullableFloatSingle.Value(),INFINITY - )); + VerifyOrReturn(CheckValueNonNull("nullableFloatSingle", nullableFloatSingle)); + VerifyOrReturn(CheckValue("nullableFloatSingle.Value()", nullableFloatSingle.Value(), INFINITY)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableSingleSmallestValue_306() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -71931,55 +54759,39 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableFloatSingleArgument; - nullableFloatSingleArgument.SetNonNull(); - nullableFloatSingleArgument.Value() = -INFINITY; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableFloatSingleArgument, this, OnSuccessCallback_306, OnFailureCallback_306)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_306(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableFloatSingleArgument.SetNonNull(); + nullableFloatSingleArgument.Value() = -INFINITY; - void OnSuccessResponse_306() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableFloatSingleArgument, this, OnSuccessCallback_306, OnFailureCallback_306)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_306(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_306() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableSingleSmallestValue_307() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_307, OnFailureCallback_307)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_307, OnFailureCallback_307)); + return CHIP_NO_ERROR; } - void OnFailureResponse_307(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_307(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_307( const chip::app::DataModel::Nullable & nullableFloatSingle) + void OnSuccessResponse_307(const chip::app::DataModel::Nullable & nullableFloatSingle) { - VerifyOrReturn(CheckValueNonNull("nullableFloatSingle", nullableFloatSingle)); - VerifyOrReturn(CheckValue("nullableFloatSingle.Value()", nullableFloatSingle.Value(),-INFINITY - )); + VerifyOrReturn(CheckValueNonNull("nullableFloatSingle", nullableFloatSingle)); + VerifyOrReturn(CheckValue("nullableFloatSingle.Value()", nullableFloatSingle.Value(), -INFINITY)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableSingleNullValue_308() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -71987,52 +54799,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableFloatSingleArgument; - nullableFloatSingleArgument.SetNull(); + nullableFloatSingleArgument.SetNull(); - ReturnErrorOnFailure(cluster.WriteAttribute(nullableFloatSingleArgument, this, OnSuccessCallback_308, OnFailureCallback_308)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableFloatSingleArgument, this, OnSuccessCallback_308, OnFailureCallback_308)); + return CHIP_NO_ERROR; } - void OnFailureResponse_308(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_308() - { NextTest(); - } - + void OnFailureResponse_308(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_308() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableSingleNullValue_309() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_309, OnFailureCallback_309)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_309, OnFailureCallback_309)); + return CHIP_NO_ERROR; } - void OnFailureResponse_309(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_309(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_309( const chip::app::DataModel::Nullable & nullableFloatSingle) + void OnSuccessResponse_309(const chip::app::DataModel::Nullable & nullableFloatSingle) { - VerifyOrReturn(CheckValueNull("nullableFloatSingle", nullableFloatSingle)); + VerifyOrReturn(CheckValueNull("nullableFloatSingle", nullableFloatSingle)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableSingle0Value_310() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -72040,55 +54837,39 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableFloatSingleArgument; - nullableFloatSingleArgument.SetNonNull(); - nullableFloatSingleArgument.Value() = 0.0f; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableFloatSingleArgument, this, OnSuccessCallback_310, OnFailureCallback_310)); - return CHIP_NO_ERROR; - } + nullableFloatSingleArgument.SetNonNull(); + nullableFloatSingleArgument.Value() = 0.0f; - void OnFailureResponse_310(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_310() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableFloatSingleArgument, this, OnSuccessCallback_310, OnFailureCallback_310)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_310(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_310() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableSingle0Value_311() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_311, OnFailureCallback_311)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_311, OnFailureCallback_311)); + return CHIP_NO_ERROR; } - void OnFailureResponse_311(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_311(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_311( const chip::app::DataModel::Nullable & nullableFloatSingle) + void OnSuccessResponse_311(const chip::app::DataModel::Nullable & nullableFloatSingle) { - VerifyOrReturn(CheckValueNonNull("nullableFloatSingle", nullableFloatSingle)); - VerifyOrReturn(CheckValue("nullableFloatSingle.Value()", nullableFloatSingle.Value(),0.0f - )); + VerifyOrReturn(CheckValueNonNull("nullableFloatSingle", nullableFloatSingle)); + VerifyOrReturn(CheckValue("nullableFloatSingle.Value()", nullableFloatSingle.Value(), 0.0f)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableDoubleMediumValue_312() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -72096,55 +54877,39 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableFloatDoubleArgument; - nullableFloatDoubleArgument.SetNonNull(); - nullableFloatDoubleArgument.Value() = 0.1234567890123; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableFloatDoubleArgument, this, OnSuccessCallback_312, OnFailureCallback_312)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_312(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableFloatDoubleArgument.SetNonNull(); + nullableFloatDoubleArgument.Value() = 0.1234567890123; - void OnSuccessResponse_312() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableFloatDoubleArgument, this, OnSuccessCallback_312, OnFailureCallback_312)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_312(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_312() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableDoubleMediumValue_313() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_313, OnFailureCallback_313)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_313, OnFailureCallback_313)); + return CHIP_NO_ERROR; } - void OnFailureResponse_313(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_313(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_313( const chip::app::DataModel::Nullable & nullableFloatDouble) + void OnSuccessResponse_313(const chip::app::DataModel::Nullable & nullableFloatDouble) { - VerifyOrReturn(CheckValueNonNull("nullableFloatDouble", nullableFloatDouble)); - VerifyOrReturn(CheckValue("nullableFloatDouble.Value()", nullableFloatDouble.Value(),0.1234567890123 - )); + VerifyOrReturn(CheckValueNonNull("nullableFloatDouble", nullableFloatDouble)); + VerifyOrReturn(CheckValue("nullableFloatDouble.Value()", nullableFloatDouble.Value(), 0.1234567890123)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableDoubleLargestValue_314() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -72152,55 +54917,39 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableFloatDoubleArgument; - nullableFloatDoubleArgument.SetNonNull(); - nullableFloatDoubleArgument.Value() = INFINITY; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableFloatDoubleArgument, this, OnSuccessCallback_314, OnFailureCallback_314)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_314(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableFloatDoubleArgument.SetNonNull(); + nullableFloatDoubleArgument.Value() = INFINITY; - void OnSuccessResponse_314() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableFloatDoubleArgument, this, OnSuccessCallback_314, OnFailureCallback_314)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_314(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_314() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableDoubleLargestValue_315() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_315, OnFailureCallback_315)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_315, OnFailureCallback_315)); + return CHIP_NO_ERROR; } - void OnFailureResponse_315(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_315(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_315( const chip::app::DataModel::Nullable & nullableFloatDouble) + void OnSuccessResponse_315(const chip::app::DataModel::Nullable & nullableFloatDouble) { - VerifyOrReturn(CheckValueNonNull("nullableFloatDouble", nullableFloatDouble)); - VerifyOrReturn(CheckValue("nullableFloatDouble.Value()", nullableFloatDouble.Value(),INFINITY - )); + VerifyOrReturn(CheckValueNonNull("nullableFloatDouble", nullableFloatDouble)); + VerifyOrReturn(CheckValue("nullableFloatDouble.Value()", nullableFloatDouble.Value(), INFINITY)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableDoubleSmallestValue_316() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -72208,55 +54957,39 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableFloatDoubleArgument; - nullableFloatDoubleArgument.SetNonNull(); - nullableFloatDoubleArgument.Value() = -INFINITY; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableFloatDoubleArgument, this, OnSuccessCallback_316, OnFailureCallback_316)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_316(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableFloatDoubleArgument.SetNonNull(); + nullableFloatDoubleArgument.Value() = -INFINITY; - void OnSuccessResponse_316() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableFloatDoubleArgument, this, OnSuccessCallback_316, OnFailureCallback_316)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_316(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_316() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableDoubleSmallestValue_317() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_317, OnFailureCallback_317)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_317, OnFailureCallback_317)); + return CHIP_NO_ERROR; } - void OnFailureResponse_317(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_317(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_317( const chip::app::DataModel::Nullable & nullableFloatDouble) + void OnSuccessResponse_317(const chip::app::DataModel::Nullable & nullableFloatDouble) { - VerifyOrReturn(CheckValueNonNull("nullableFloatDouble", nullableFloatDouble)); - VerifyOrReturn(CheckValue("nullableFloatDouble.Value()", nullableFloatDouble.Value(),-INFINITY - )); + VerifyOrReturn(CheckValueNonNull("nullableFloatDouble", nullableFloatDouble)); + VerifyOrReturn(CheckValue("nullableFloatDouble.Value()", nullableFloatDouble.Value(), -INFINITY)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableDoubleNullValue_318() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -72264,52 +54997,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableFloatDoubleArgument; - nullableFloatDoubleArgument.SetNull(); + nullableFloatDoubleArgument.SetNull(); - ReturnErrorOnFailure(cluster.WriteAttribute(nullableFloatDoubleArgument, this, OnSuccessCallback_318, OnFailureCallback_318)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableFloatDoubleArgument, this, OnSuccessCallback_318, OnFailureCallback_318)); + return CHIP_NO_ERROR; } - void OnFailureResponse_318(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_318() - { NextTest(); - } + void OnFailureResponse_318(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_318() { NextTest(); } - - - CHIP_ERROR TestReadAttributeNullableDoubleNullValue_319() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_319, OnFailureCallback_319)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_319, OnFailureCallback_319)); + return CHIP_NO_ERROR; } - void OnFailureResponse_319(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_319(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_319( const chip::app::DataModel::Nullable & nullableFloatDouble) + void OnSuccessResponse_319(const chip::app::DataModel::Nullable & nullableFloatDouble) { - VerifyOrReturn(CheckValueNull("nullableFloatDouble", nullableFloatDouble)); + VerifyOrReturn(CheckValueNull("nullableFloatDouble", nullableFloatDouble)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableDouble0Value_320() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -72317,55 +55035,39 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableFloatDoubleArgument; - nullableFloatDoubleArgument.SetNonNull(); - nullableFloatDoubleArgument.Value() = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableFloatDoubleArgument, this, OnSuccessCallback_320, OnFailureCallback_320)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_320(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableFloatDoubleArgument.SetNonNull(); + nullableFloatDoubleArgument.Value() = 0; - void OnSuccessResponse_320() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableFloatDoubleArgument, this, OnSuccessCallback_320, OnFailureCallback_320)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_320(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_320() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableDouble0Value_321() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_321, OnFailureCallback_321)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_321, OnFailureCallback_321)); + return CHIP_NO_ERROR; } - void OnFailureResponse_321(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_321(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_321( const chip::app::DataModel::Nullable & nullableFloatDouble) + void OnSuccessResponse_321(const chip::app::DataModel::Nullable & nullableFloatDouble) { - VerifyOrReturn(CheckValueNonNull("nullableFloatDouble", nullableFloatDouble)); - VerifyOrReturn(CheckValue("nullableFloatDouble.Value()", nullableFloatDouble.Value(),0 - )); + VerifyOrReturn(CheckValueNonNull("nullableFloatDouble", nullableFloatDouble)); + VerifyOrReturn(CheckValue("nullableFloatDouble.Value()", nullableFloatDouble.Value(), 0)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableEnum8MinValue_322() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -72373,55 +55075,39 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableEnum8Argument; - nullableEnum8Argument.SetNonNull(); - nullableEnum8Argument.Value() = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableEnum8Argument, this, OnSuccessCallback_322, OnFailureCallback_322)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_322(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableEnum8Argument.SetNonNull(); + nullableEnum8Argument.Value() = 0; - void OnSuccessResponse_322() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableEnum8Argument, this, OnSuccessCallback_322, OnFailureCallback_322)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_322(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_322() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableEnum8MinValue_323() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_323, OnFailureCallback_323)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_323, OnFailureCallback_323)); + return CHIP_NO_ERROR; } - void OnFailureResponse_323(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_323(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_323( const chip::app::DataModel::Nullable & nullableEnum8) + void OnSuccessResponse_323(const chip::app::DataModel::Nullable & nullableEnum8) { - VerifyOrReturn(CheckValueNonNull("nullableEnum8", nullableEnum8)); - VerifyOrReturn(CheckValue("nullableEnum8.Value()", nullableEnum8.Value(),0 - )); + VerifyOrReturn(CheckValueNonNull("nullableEnum8", nullableEnum8)); + VerifyOrReturn(CheckValue("nullableEnum8.Value()", nullableEnum8.Value(), 0)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableEnum8MaxValue_324() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -72429,55 +55115,39 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableEnum8Argument; - nullableEnum8Argument.SetNonNull(); - nullableEnum8Argument.Value() = 254; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableEnum8Argument, this, OnSuccessCallback_324, OnFailureCallback_324)); - return CHIP_NO_ERROR; - } + nullableEnum8Argument.SetNonNull(); + nullableEnum8Argument.Value() = 254; - void OnFailureResponse_324(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_324() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableEnum8Argument, this, OnSuccessCallback_324, OnFailureCallback_324)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_324(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_324() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableEnum8MaxValue_325() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_325, OnFailureCallback_325)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_325, OnFailureCallback_325)); + return CHIP_NO_ERROR; } - void OnFailureResponse_325(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_325(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_325( const chip::app::DataModel::Nullable & nullableEnum8) + void OnSuccessResponse_325(const chip::app::DataModel::Nullable & nullableEnum8) { - VerifyOrReturn(CheckValueNonNull("nullableEnum8", nullableEnum8)); - VerifyOrReturn(CheckValue("nullableEnum8.Value()", nullableEnum8.Value(),254 - )); + VerifyOrReturn(CheckValueNonNull("nullableEnum8", nullableEnum8)); + VerifyOrReturn(CheckValue("nullableEnum8.Value()", nullableEnum8.Value(), 254)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableEnum8InvalidValue_326() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -72485,56 +55155,43 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableEnum8Argument; - nullableEnum8Argument.SetNonNull(); - nullableEnum8Argument.Value() = 255; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableEnum8Argument, this, OnSuccessCallback_326, OnFailureCallback_326)); - return CHIP_NO_ERROR; + nullableEnum8Argument.SetNonNull(); + nullableEnum8Argument.Value() = 255; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableEnum8Argument, this, OnSuccessCallback_326, OnFailureCallback_326)); + return CHIP_NO_ERROR; } void OnFailureResponse_326(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_326() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_326() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadAttributeNullableEnum8UnchangedValue_327() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_327, OnFailureCallback_327)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_327, OnFailureCallback_327)); + return CHIP_NO_ERROR; } - void OnFailureResponse_327(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_327(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_327( const chip::app::DataModel::Nullable & nullableEnum8) + void OnSuccessResponse_327(const chip::app::DataModel::Nullable & nullableEnum8) { - VerifyOrReturn(CheckValueNonNull("nullableEnum8", nullableEnum8)); - VerifyOrReturn(CheckValue("nullableEnum8.Value()", nullableEnum8.Value(),254 - )); + VerifyOrReturn(CheckValueNonNull("nullableEnum8", nullableEnum8)); + VerifyOrReturn(CheckValue("nullableEnum8.Value()", nullableEnum8.Value(), 254)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableEnum8NullValue_328() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -72542,52 +55199,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableEnum8Argument; - nullableEnum8Argument.SetNull(); + nullableEnum8Argument.SetNull(); - ReturnErrorOnFailure(cluster.WriteAttribute(nullableEnum8Argument, this, OnSuccessCallback_328, OnFailureCallback_328)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableEnum8Argument, this, OnSuccessCallback_328, OnFailureCallback_328)); + return CHIP_NO_ERROR; } - void OnFailureResponse_328(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_328() - { NextTest(); - } - + void OnFailureResponse_328(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_328() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableEnum8NullValue_329() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_329, OnFailureCallback_329)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_329, OnFailureCallback_329)); + return CHIP_NO_ERROR; } - void OnFailureResponse_329(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_329(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_329( const chip::app::DataModel::Nullable & nullableEnum8) + void OnSuccessResponse_329(const chip::app::DataModel::Nullable & nullableEnum8) { - VerifyOrReturn(CheckValueNull("nullableEnum8", nullableEnum8)); + VerifyOrReturn(CheckValueNull("nullableEnum8", nullableEnum8)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableEnum16MinValue_330() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -72595,55 +55237,39 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableEnum16Argument; - nullableEnum16Argument.SetNonNull(); - nullableEnum16Argument.Value() = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableEnum16Argument, this, OnSuccessCallback_330, OnFailureCallback_330)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_330(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableEnum16Argument.SetNonNull(); + nullableEnum16Argument.Value() = 0U; - void OnSuccessResponse_330() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableEnum16Argument, this, OnSuccessCallback_330, OnFailureCallback_330)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_330(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_330() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableEnum16MinValue_331() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_331, OnFailureCallback_331)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_331, OnFailureCallback_331)); + return CHIP_NO_ERROR; } - void OnFailureResponse_331(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_331(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_331( const chip::app::DataModel::Nullable & nullableEnum16) + void OnSuccessResponse_331(const chip::app::DataModel::Nullable & nullableEnum16) { - VerifyOrReturn(CheckValueNonNull("nullableEnum16", nullableEnum16)); - VerifyOrReturn(CheckValue("nullableEnum16.Value()", nullableEnum16.Value(),0U - )); + VerifyOrReturn(CheckValueNonNull("nullableEnum16", nullableEnum16)); + VerifyOrReturn(CheckValue("nullableEnum16.Value()", nullableEnum16.Value(), 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableEnum16MaxValue_332() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -72651,55 +55277,39 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableEnum16Argument; - nullableEnum16Argument.SetNonNull(); - nullableEnum16Argument.Value() = 65534U; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableEnum16Argument, this, OnSuccessCallback_332, OnFailureCallback_332)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_332(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableEnum16Argument.SetNonNull(); + nullableEnum16Argument.Value() = 65534U; - void OnSuccessResponse_332() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableEnum16Argument, this, OnSuccessCallback_332, OnFailureCallback_332)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_332(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_332() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableEnum16MaxValue_333() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_333, OnFailureCallback_333)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_333, OnFailureCallback_333)); + return CHIP_NO_ERROR; } - void OnFailureResponse_333(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_333(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_333( const chip::app::DataModel::Nullable & nullableEnum16) + void OnSuccessResponse_333(const chip::app::DataModel::Nullable & nullableEnum16) { - VerifyOrReturn(CheckValueNonNull("nullableEnum16", nullableEnum16)); - VerifyOrReturn(CheckValue("nullableEnum16.Value()", nullableEnum16.Value(),65534U - )); + VerifyOrReturn(CheckValueNonNull("nullableEnum16", nullableEnum16)); + VerifyOrReturn(CheckValue("nullableEnum16.Value()", nullableEnum16.Value(), 65534U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableEnum16InvalidValue_334() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -72707,56 +55317,43 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableEnum16Argument; - nullableEnum16Argument.SetNonNull(); - nullableEnum16Argument.Value() = 65535U; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableEnum16Argument, this, OnSuccessCallback_334, OnFailureCallback_334)); - return CHIP_NO_ERROR; + nullableEnum16Argument.SetNonNull(); + nullableEnum16Argument.Value() = 65535U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableEnum16Argument, this, OnSuccessCallback_334, OnFailureCallback_334)); + return CHIP_NO_ERROR; } void OnFailureResponse_334(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_334() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_334() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadAttributeNullableEnum16UnchangedValue_335() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_335, OnFailureCallback_335)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_335, OnFailureCallback_335)); + return CHIP_NO_ERROR; } - void OnFailureResponse_335(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_335(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_335( const chip::app::DataModel::Nullable & nullableEnum16) + void OnSuccessResponse_335(const chip::app::DataModel::Nullable & nullableEnum16) { - VerifyOrReturn(CheckValueNonNull("nullableEnum16", nullableEnum16)); - VerifyOrReturn(CheckValue("nullableEnum16.Value()", nullableEnum16.Value(),65534U - )); + VerifyOrReturn(CheckValueNonNull("nullableEnum16", nullableEnum16)); + VerifyOrReturn(CheckValue("nullableEnum16.Value()", nullableEnum16.Value(), 65534U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableEnum16NullValue_336() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -72764,52 +55361,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableEnum16Argument; - nullableEnum16Argument.SetNull(); + nullableEnum16Argument.SetNull(); - ReturnErrorOnFailure(cluster.WriteAttribute(nullableEnum16Argument, this, OnSuccessCallback_336, OnFailureCallback_336)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableEnum16Argument, this, OnSuccessCallback_336, OnFailureCallback_336)); + return CHIP_NO_ERROR; } - void OnFailureResponse_336(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_336() - { NextTest(); - } - + void OnFailureResponse_336(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_336() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableEnum16NullValue_337() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_337, OnFailureCallback_337)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_337, OnFailureCallback_337)); + return CHIP_NO_ERROR; } - void OnFailureResponse_337(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_337(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_337( const chip::app::DataModel::Nullable & nullableEnum16) + void OnSuccessResponse_337(const chip::app::DataModel::Nullable & nullableEnum16) { - VerifyOrReturn(CheckValueNull("nullableEnum16", nullableEnum16)); + VerifyOrReturn(CheckValueNull("nullableEnum16", nullableEnum16)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableSimpleEnumMinValue_338() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -72817,55 +55399,40 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableEnumAttrArgument; - nullableEnumAttrArgument.SetNonNull(); - nullableEnumAttrArgument.Value() =static_cast(0); + nullableEnumAttrArgument.SetNonNull(); + nullableEnumAttrArgument.Value() = static_cast(0); - ReturnErrorOnFailure(cluster.WriteAttribute(nullableEnumAttrArgument, this, OnSuccessCallback_338, OnFailureCallback_338)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableEnumAttrArgument, this, OnSuccessCallback_338, OnFailureCallback_338)); + return CHIP_NO_ERROR; } - void OnFailureResponse_338(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_338() - { NextTest(); - } - + void OnFailureResponse_338(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_338() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableSimpleEnumMinValue_339() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_339, OnFailureCallback_339)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_339, OnFailureCallback_339)); + return CHIP_NO_ERROR; } - void OnFailureResponse_339(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_339(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_339( const chip::app::DataModel::Nullable & nullableEnumAttr) + void + OnSuccessResponse_339(const chip::app::DataModel::Nullable & nullableEnumAttr) { - VerifyOrReturn(CheckValueNonNull("nullableEnumAttr", nullableEnumAttr)); - VerifyOrReturn(CheckValue("nullableEnumAttr.Value()", nullableEnumAttr.Value(),0 - )); + VerifyOrReturn(CheckValueNonNull("nullableEnumAttr", nullableEnumAttr)); + VerifyOrReturn(CheckValue("nullableEnumAttr.Value()", nullableEnumAttr.Value(), 0)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableSimpleEnumMaxValue_340() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -72873,55 +55440,40 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableEnumAttrArgument; - nullableEnumAttrArgument.SetNonNull(); - nullableEnumAttrArgument.Value() =static_cast(254); + nullableEnumAttrArgument.SetNonNull(); + nullableEnumAttrArgument.Value() = static_cast(254); - ReturnErrorOnFailure(cluster.WriteAttribute(nullableEnumAttrArgument, this, OnSuccessCallback_340, OnFailureCallback_340)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableEnumAttrArgument, this, OnSuccessCallback_340, OnFailureCallback_340)); + return CHIP_NO_ERROR; } - void OnFailureResponse_340(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_340() - { NextTest(); - } - + void OnFailureResponse_340(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_340() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableSimpleEnumMaxValue_341() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_341, OnFailureCallback_341)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_341, OnFailureCallback_341)); + return CHIP_NO_ERROR; } - void OnFailureResponse_341(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_341(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_341( const chip::app::DataModel::Nullable & nullableEnumAttr) + void + OnSuccessResponse_341(const chip::app::DataModel::Nullable & nullableEnumAttr) { - VerifyOrReturn(CheckValueNonNull("nullableEnumAttr", nullableEnumAttr)); - VerifyOrReturn(CheckValue("nullableEnumAttr.Value()", nullableEnumAttr.Value(),254 - )); + VerifyOrReturn(CheckValueNonNull("nullableEnumAttr", nullableEnumAttr)); + VerifyOrReturn(CheckValue("nullableEnumAttr.Value()", nullableEnumAttr.Value(), 254)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableSimpleEnumInvalidValue_342() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -72929,56 +55481,44 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableEnumAttrArgument; - nullableEnumAttrArgument.SetNonNull(); - nullableEnumAttrArgument.Value() =static_cast(255); + nullableEnumAttrArgument.SetNonNull(); + nullableEnumAttrArgument.Value() = static_cast(255); - ReturnErrorOnFailure(cluster.WriteAttribute(nullableEnumAttrArgument, this, OnSuccessCallback_342, OnFailureCallback_342)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableEnumAttrArgument, this, OnSuccessCallback_342, OnFailureCallback_342)); + return CHIP_NO_ERROR; } void OnFailureResponse_342(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_342() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_342() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadAttributeNullableSimpleEnumUnchangedValue_343() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_343, OnFailureCallback_343)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_343, OnFailureCallback_343)); + return CHIP_NO_ERROR; } - void OnFailureResponse_343(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_343(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_343( const chip::app::DataModel::Nullable & nullableEnumAttr) + void + OnSuccessResponse_343(const chip::app::DataModel::Nullable & nullableEnumAttr) { - VerifyOrReturn(CheckValueNonNull("nullableEnumAttr", nullableEnumAttr)); - VerifyOrReturn(CheckValue("nullableEnumAttr.Value()", nullableEnumAttr.Value(),254 - )); + VerifyOrReturn(CheckValueNonNull("nullableEnumAttr", nullableEnumAttr)); + VerifyOrReturn(CheckValue("nullableEnumAttr.Value()", nullableEnumAttr.Value(), 254)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableSimpleEnumNullValue_344() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -72986,81 +55526,60 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableEnumAttrArgument; - nullableEnumAttrArgument.SetNull(); + nullableEnumAttrArgument.SetNull(); - ReturnErrorOnFailure(cluster.WriteAttribute(nullableEnumAttrArgument, this, OnSuccessCallback_344, OnFailureCallback_344)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableEnumAttrArgument, this, OnSuccessCallback_344, OnFailureCallback_344)); + return CHIP_NO_ERROR; } - void OnFailureResponse_344(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_344() - { NextTest(); - } - + void OnFailureResponse_344(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_344() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableSimpleEnumNullValue_345() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_345, OnFailureCallback_345)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_345, OnFailureCallback_345)); + return CHIP_NO_ERROR; } - void OnFailureResponse_345(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_345(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_345( const chip::app::DataModel::Nullable & nullableEnumAttr) + void + OnSuccessResponse_345(const chip::app::DataModel::Nullable & nullableEnumAttr) { - VerifyOrReturn(CheckValueNull("nullableEnumAttr", nullableEnumAttr)); + VerifyOrReturn(CheckValueNull("nullableEnumAttr", nullableEnumAttr)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeNullableOctetStringDefaultValue_346() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_346, OnFailureCallback_346)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_346, OnFailureCallback_346)); + return CHIP_NO_ERROR; } - void OnFailureResponse_346(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_346(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_346( const chip::app::DataModel::Nullable & nullableOctetString) + void OnSuccessResponse_346(const chip::app::DataModel::Nullable & nullableOctetString) { - VerifyOrReturn(CheckValueNonNull("nullableOctetString", nullableOctetString)); - VerifyOrReturn(CheckValueAsString("nullableOctetString.Value()", nullableOctetString.Value(),chip::ByteSpan(chip::Uint8::from_const_char(""), 0) - )); + VerifyOrReturn(CheckValueNonNull("nullableOctetString", nullableOctetString)); + VerifyOrReturn(CheckValueAsString("nullableOctetString.Value()", nullableOctetString.Value(), + chip::ByteSpan(chip::Uint8::from_const_char(""), 0))); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableOctetString_347() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -73068,55 +55587,41 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableOctetStringArgument; - nullableOctetStringArgument.SetNonNull(); - nullableOctetStringArgument.Value() = chip::ByteSpan(chip::Uint8::from_const_char("TestValuegarbage: not in length on purpose"), 9); + nullableOctetStringArgument.SetNonNull(); + nullableOctetStringArgument.Value() = + chip::ByteSpan(chip::Uint8::from_const_char("TestValuegarbage: not in length on purpose"), 9); - ReturnErrorOnFailure(cluster.WriteAttribute(nullableOctetStringArgument, this, OnSuccessCallback_347, OnFailureCallback_347)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableOctetStringArgument, this, OnSuccessCallback_347, OnFailureCallback_347)); + return CHIP_NO_ERROR; } - void OnFailureResponse_347(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_347() - { NextTest(); - } + void OnFailureResponse_347(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_347() { NextTest(); } - - - CHIP_ERROR TestReadAttributeNullableOctetString_348() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_348, OnFailureCallback_348)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_348, OnFailureCallback_348)); + return CHIP_NO_ERROR; } - void OnFailureResponse_348(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_348(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_348( const chip::app::DataModel::Nullable & nullableOctetString) + void OnSuccessResponse_348(const chip::app::DataModel::Nullable & nullableOctetString) { - VerifyOrReturn(CheckValueNonNull("nullableOctetString", nullableOctetString)); - VerifyOrReturn(CheckValueAsString("nullableOctetString.Value()", nullableOctetString.Value(),chip::ByteSpan(chip::Uint8::from_const_char("TestValue"), 9) - )); + VerifyOrReturn(CheckValueNonNull("nullableOctetString", nullableOctetString)); + VerifyOrReturn(CheckValueAsString("nullableOctetString.Value()", nullableOctetString.Value(), + chip::ByteSpan(chip::Uint8::from_const_char("TestValue"), 9))); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableOctetString_349() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -73124,52 +55629,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableOctetStringArgument; - nullableOctetStringArgument.SetNull(); + nullableOctetStringArgument.SetNull(); - ReturnErrorOnFailure(cluster.WriteAttribute(nullableOctetStringArgument, this, OnSuccessCallback_349, OnFailureCallback_349)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableOctetStringArgument, this, OnSuccessCallback_349, OnFailureCallback_349)); + return CHIP_NO_ERROR; } - void OnFailureResponse_349(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_349() - { NextTest(); - } - + void OnFailureResponse_349(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_349() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableOctetString_350() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_350, OnFailureCallback_350)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_350, OnFailureCallback_350)); + return CHIP_NO_ERROR; } - void OnFailureResponse_350(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_350(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_350( const chip::app::DataModel::Nullable & nullableOctetString) + void OnSuccessResponse_350(const chip::app::DataModel::Nullable & nullableOctetString) { - VerifyOrReturn(CheckValueNull("nullableOctetString", nullableOctetString)); + VerifyOrReturn(CheckValueNull("nullableOctetString", nullableOctetString)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableOctetString_351() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -73177,84 +55667,61 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableOctetStringArgument; - nullableOctetStringArgument.SetNonNull(); - nullableOctetStringArgument.Value() = chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0); + nullableOctetStringArgument.SetNonNull(); + nullableOctetStringArgument.Value() = chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0); - ReturnErrorOnFailure(cluster.WriteAttribute(nullableOctetStringArgument, this, OnSuccessCallback_351, OnFailureCallback_351)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableOctetStringArgument, this, OnSuccessCallback_351, OnFailureCallback_351)); + return CHIP_NO_ERROR; } - void OnFailureResponse_351(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_351() - { NextTest(); - } - + void OnFailureResponse_351(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_351() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableOctetString_352() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_352, OnFailureCallback_352)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_352, OnFailureCallback_352)); + return CHIP_NO_ERROR; } - void OnFailureResponse_352(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_352(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_352( const chip::app::DataModel::Nullable & nullableOctetString) + void OnSuccessResponse_352(const chip::app::DataModel::Nullable & nullableOctetString) { - VerifyOrReturn(CheckValueNonNull("nullableOctetString", nullableOctetString)); - VerifyOrReturn(CheckValueAsString("nullableOctetString.Value()", nullableOctetString.Value(),chip::ByteSpan(chip::Uint8::from_const_char(""), 0) - )); + VerifyOrReturn(CheckValueNonNull("nullableOctetString", nullableOctetString)); + VerifyOrReturn(CheckValueAsString("nullableOctetString.Value()", nullableOctetString.Value(), + chip::ByteSpan(chip::Uint8::from_const_char(""), 0))); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeNullableCharStringDefaultValue_353() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_353, OnFailureCallback_353)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_353, OnFailureCallback_353)); + return CHIP_NO_ERROR; } - void OnFailureResponse_353(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_353(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_353( const chip::app::DataModel::Nullable & nullableCharString) + void OnSuccessResponse_353(const chip::app::DataModel::Nullable & nullableCharString) { - VerifyOrReturn(CheckValueNonNull("nullableCharString", nullableCharString)); - VerifyOrReturn(CheckValueAsString("nullableCharString.Value()", nullableCharString.Value(),chip::CharSpan("", 0) - )); + VerifyOrReturn(CheckValueNonNull("nullableCharString", nullableCharString)); + VerifyOrReturn(CheckValueAsString("nullableCharString.Value()", nullableCharString.Value(), chip::CharSpan("", 0))); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableCharString_354() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -73262,55 +55729,39 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableCharStringArgument; - nullableCharStringArgument.SetNonNull(); - nullableCharStringArgument.Value() = chip::Span("☉T☉garbage: not in length on purpose", 7); + nullableCharStringArgument.SetNonNull(); + nullableCharStringArgument.Value() = chip::Span("☉T☉garbage: not in length on purpose", 7); - ReturnErrorOnFailure(cluster.WriteAttribute(nullableCharStringArgument, this, OnSuccessCallback_354, OnFailureCallback_354)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableCharStringArgument, this, OnSuccessCallback_354, OnFailureCallback_354)); + return CHIP_NO_ERROR; } - void OnFailureResponse_354(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_354() - { NextTest(); - } - + void OnFailureResponse_354(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_354() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableCharString_355() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_355, OnFailureCallback_355)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_355, OnFailureCallback_355)); + return CHIP_NO_ERROR; } - void OnFailureResponse_355(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_355(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_355( const chip::app::DataModel::Nullable & nullableCharString) + void OnSuccessResponse_355(const chip::app::DataModel::Nullable & nullableCharString) { - VerifyOrReturn(CheckValueNonNull("nullableCharString", nullableCharString)); - VerifyOrReturn(CheckValueAsString("nullableCharString.Value()", nullableCharString.Value(),chip::CharSpan("☉T☉", 7) - )); + VerifyOrReturn(CheckValueNonNull("nullableCharString", nullableCharString)); + VerifyOrReturn(CheckValueAsString("nullableCharString.Value()", nullableCharString.Value(), chip::CharSpan("☉T☉", 7))); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableCharStringValueTooLong_356() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -73318,52 +55769,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableCharStringArgument; - nullableCharStringArgument.SetNull(); + nullableCharStringArgument.SetNull(); - ReturnErrorOnFailure(cluster.WriteAttribute(nullableCharStringArgument, this, OnSuccessCallback_356, OnFailureCallback_356)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableCharStringArgument, this, OnSuccessCallback_356, OnFailureCallback_356)); + return CHIP_NO_ERROR; } - void OnFailureResponse_356(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_356() - { NextTest(); - } + void OnFailureResponse_356(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_356() { NextTest(); } - - - CHIP_ERROR TestReadAttributeNullableCharString_357() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_357, OnFailureCallback_357)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_357, OnFailureCallback_357)); + return CHIP_NO_ERROR; } - void OnFailureResponse_357(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_357(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_357( const chip::app::DataModel::Nullable & nullableCharString) + void OnSuccessResponse_357(const chip::app::DataModel::Nullable & nullableCharString) { - VerifyOrReturn(CheckValueNull("nullableCharString", nullableCharString)); + VerifyOrReturn(CheckValueNull("nullableCharString", nullableCharString)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeNullableCharStringEmpty_358() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -73371,109 +55807,81 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableCharStringArgument; - nullableCharStringArgument.SetNonNull(); - nullableCharStringArgument.Value() = chip::Span("garbage: not in length on purpose", 0); + nullableCharStringArgument.SetNonNull(); + nullableCharStringArgument.Value() = chip::Span("garbage: not in length on purpose", 0); - ReturnErrorOnFailure(cluster.WriteAttribute(nullableCharStringArgument, this, OnSuccessCallback_358, OnFailureCallback_358)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableCharStringArgument, this, OnSuccessCallback_358, OnFailureCallback_358)); + return CHIP_NO_ERROR; } - void OnFailureResponse_358(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_358() - { NextTest(); - } - + void OnFailureResponse_358(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_358() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableCharString_359() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_359, OnFailureCallback_359)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_359, OnFailureCallback_359)); + return CHIP_NO_ERROR; } - void OnFailureResponse_359(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_359(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_359( const chip::app::DataModel::Nullable & nullableCharString) + void OnSuccessResponse_359(const chip::app::DataModel::Nullable & nullableCharString) { - VerifyOrReturn(CheckValueNonNull("nullableCharString", nullableCharString)); - VerifyOrReturn(CheckValueAsString("nullableCharString.Value()", nullableCharString.Value(),chip::CharSpan("", 0) - )); + VerifyOrReturn(CheckValueNonNull("nullableCharString", nullableCharString)); + VerifyOrReturn(CheckValueAsString("nullableCharString.Value()", nullableCharString.Value(), chip::CharSpan("", 0))); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeFromNonexistentEndpoint_360() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 200; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_360, OnFailureCallback_360)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_360, OnFailureCallback_360)); + return CHIP_NO_ERROR; } void OnFailureResponse_360(EmberAfStatus status) { - VerifyOrReturn(CheckConstraintNotValue("status", status, 0)); - NextTest(); - } - - void OnSuccessResponse_360( const chip::app::DataModel::DecodableList & listInt8u) - { ThrowSuccessResponse(); + VerifyOrReturn(CheckConstraintNotValue("status", status, 0)); + NextTest(); } + void OnSuccessResponse_360(const chip::app::DataModel::DecodableList & listInt8u) { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadAttributeFromNonexistentCluster_361() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_361, OnFailureCallback_361)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_361, OnFailureCallback_361)); + return CHIP_NO_ERROR; } void OnFailureResponse_361(EmberAfStatus status) { - VerifyOrReturn(CheckConstraintNotValue("status", status, 0)); - NextTest(); - } - - void OnSuccessResponse_361( const chip::app::DataModel::DecodableList & listInt8u) - { ThrowSuccessResponse(); + VerifyOrReturn(CheckConstraintNotValue("status", status, 0)); + NextTest(); } + void OnSuccessResponse_361(const chip::app::DataModel::DecodableList & listInt8u) { ThrowSuccessResponse(); } - - - CHIP_ERROR TestSendACommandThatTakesAnOptionalParameterButDoNotSetIt_362() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestSimpleOptionalArgumentRequest::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestSimpleOptionalArgumentRequest::Type; RequestType request; @@ -73485,36 +55893,27 @@ class TestCluster: public TestCommand (static_cast(context))->OnFailureResponse_362(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_362(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_INVALID_VALUE)); - NextTest(); - } - - void OnSuccessResponse_362() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_INVALID_VALUE)); + NextTest(); } + void OnSuccessResponse_362() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestSendACommandThatTakesAnOptionalParameterButDoNotSetIt_363() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestSimpleOptionalArgumentRequest::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestSimpleOptionalArgumentRequest::Type; RequestType request; - request.arg1.Emplace(); - request.arg1.Value() = 1; - + request.arg1.Emplace(); + request.arg1.Value() = 1; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_363(); }; @@ -73523,70 +55922,44 @@ class TestCluster: public TestCommand (static_cast(context))->OnFailureResponse_363(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_363(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_363() - { NextTest(); - } - + void OnFailureResponse_363(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_363() { NextTest(); } - CHIP_ERROR TestReportSubscribeToListAttribute_364() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); + mTest_TestCluster_list_int8u_Reported = OnSuccessCallback_364; + return WaitForMs(0); + } - mTest_TestCluster_list_int8u_Reported - = OnSuccessCallback_364; - return WaitForMs(0); - } - - void OnFailureResponse_364(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_364( const chip::app::DataModel::DecodableList & listInt8u) - { mReceivedReport_364 = true; - - { - auto iter_0 = listInt8u.begin(); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 0)); - VerifyOrReturn(CheckValue("listInt8u[0]", iter_0.GetValue(),1 - )); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 1)); - VerifyOrReturn(CheckValue("listInt8u[1]", iter_0.GetValue(),2 - )); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 2)); - VerifyOrReturn(CheckValue("listInt8u[2]", iter_0.GetValue(),3 - )); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 3)); - VerifyOrReturn(CheckValue("listInt8u[3]", iter_0.GetValue(),4 - )); - VerifyOrReturn(CheckNoMoreListItems("listInt8u", iter_0, 4)); - } - - - } + void OnFailureResponse_364(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_364(const chip::app::DataModel::DecodableList & listInt8u) + { + mReceivedReport_364 = true; - + { + auto iter_0 = listInt8u.begin(); + VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 0)); + VerifyOrReturn(CheckValue("listInt8u[0]", iter_0.GetValue(), 1)); + VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 1)); + VerifyOrReturn(CheckValue("listInt8u[1]", iter_0.GetValue(), 2)); + VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 2)); + VerifyOrReturn(CheckValue("listInt8u[2]", iter_0.GetValue(), 3)); + VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 3)); + VerifyOrReturn(CheckValue("listInt8u[3]", iter_0.GetValue(), 4)); + VerifyOrReturn(CheckNoMoreListItems("listInt8u", iter_0, 4)); + } + } - CHIP_ERROR TestSubscribeToListAttribute_365() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -73594,41 +55967,34 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t minIntervalArgument; - minIntervalArgument = 2U; - uint16_t maxIntervalArgument; - maxIntervalArgument = 10U; - - ReturnErrorOnFailure(cluster.SubscribeAttribute(this, OnSuccessCallback_365, OnFailureCallback_365, minIntervalArgument, maxIntervalArgument, OnSubscriptionEstablished_365)); - return CHIP_NO_ERROR; + minIntervalArgument = 2U; + uint16_t maxIntervalArgument; + maxIntervalArgument = 10U; + + ReturnErrorOnFailure(cluster.SubscribeAttribute( + this, OnSuccessCallback_365, OnFailureCallback_365, minIntervalArgument, maxIntervalArgument, + OnSubscriptionEstablished_365)); + return CHIP_NO_ERROR; } - void OnFailureResponse_365(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_365(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_365( const chip::app::DataModel::DecodableList & value) + void OnSuccessResponse_365(const chip::app::DataModel::DecodableList & value) { - if ( mTest_TestCluster_list_int8u_Reported -) { - auto callback = mTest_TestCluster_list_int8u_Reported -; - mTest_TestCluster_list_int8u_Reported - = nullptr; - callback(this, value); - } - } + if (mTest_TestCluster_list_int8u_Reported) + { + auto callback = mTest_TestCluster_list_int8u_Reported; + mTest_TestCluster_list_int8u_Reported = nullptr; + callback(this, value); + } + } void OnSubscriptionEstablishedResponse_365() { - VerifyOrReturn(mReceivedReport_364, Exit("Initial report not received!")); + VerifyOrReturn(mReceivedReport_364, Exit("Initial report not received!")); NextTest(); } - - - - CHIP_ERROR TestWriteSubscribedToListAttribute_366() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -73636,103 +56002,75 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::List listInt8uArgument; - - uint8_t listInt8uList_0[4]; - listInt8uList_0[0] = 5; - listInt8uList_0[1] = 6; - listInt8uList_0[2] = 7; - listInt8uList_0[3] = 8; - listInt8uArgument = listInt8uList_0; - - ReturnErrorOnFailure(cluster.WriteAttribute(listInt8uArgument, this, OnSuccessCallback_366, OnFailureCallback_366)); - return CHIP_NO_ERROR; - } - void OnFailureResponse_366(EmberAfStatus status) - { - ThrowFailureResponse(); - } + uint8_t listInt8uList_0[4]; + listInt8uList_0[0] = 5; + listInt8uList_0[1] = 6; + listInt8uList_0[2] = 7; + listInt8uList_0[3] = 8; + listInt8uArgument = listInt8uList_0; - void OnSuccessResponse_366() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + listInt8uArgument, this, OnSuccessCallback_366, OnFailureCallback_366)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_366(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_366() { NextTest(); } - CHIP_ERROR TestCheckForListAttributeReport_367() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - mTest_TestCluster_list_int8u_Reported - = OnSuccessCallback_367; - return CHIP_NO_ERROR; + mTest_TestCluster_list_int8u_Reported = OnSuccessCallback_367; + return CHIP_NO_ERROR; } - void OnFailureResponse_367(EmberAfStatus status) + void OnFailureResponse_367(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_367(const chip::app::DataModel::DecodableList & listInt8u) { - ThrowFailureResponse(); - } + mReceivedReport_367 = true; - void OnSuccessResponse_367( const chip::app::DataModel::DecodableList & listInt8u) - { mReceivedReport_367 = true; - - { - auto iter_0 = listInt8u.begin(); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 0)); - VerifyOrReturn(CheckValue("listInt8u[0]", iter_0.GetValue(),5 - )); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 1)); - VerifyOrReturn(CheckValue("listInt8u[1]", iter_0.GetValue(),6 - )); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 2)); - VerifyOrReturn(CheckValue("listInt8u[2]", iter_0.GetValue(),7 - )); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 3)); - VerifyOrReturn(CheckValue("listInt8u[3]", iter_0.GetValue(),8 - )); - VerifyOrReturn(CheckNoMoreListItems("listInt8u", iter_0, 4)); - } + { + auto iter_0 = listInt8u.begin(); + VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 0)); + VerifyOrReturn(CheckValue("listInt8u[0]", iter_0.GetValue(), 5)); + VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 1)); + VerifyOrReturn(CheckValue("listInt8u[1]", iter_0.GetValue(), 6)); + VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 2)); + VerifyOrReturn(CheckValue("listInt8u[2]", iter_0.GetValue(), 7)); + VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 3)); + VerifyOrReturn(CheckValue("listInt8u[3]", iter_0.GetValue(), 8)); + VerifyOrReturn(CheckNoMoreListItems("listInt8u", iter_0, 4)); + } NextTest(); - } - - - + } - CHIP_ERROR TestReadRangeRestrictedUnsigned8BitInteger_368() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_368, OnFailureCallback_368)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_368, OnFailureCallback_368)); + return CHIP_NO_ERROR; } - void OnFailureResponse_368(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_368(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_368( uint8_t rangeRestrictedInt8u) + void OnSuccessResponse_368(uint8_t rangeRestrictedInt8u) { - VerifyOrReturn(CheckValue("rangeRestrictedInt8u", rangeRestrictedInt8u,70 - )); + VerifyOrReturn(CheckValue("rangeRestrictedInt8u", rangeRestrictedInt8u, 70)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteMinValueToARangeRestrictedUnsigned8BitInteger_369() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -73740,26 +56078,21 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t rangeRestrictedInt8uArgument; - rangeRestrictedInt8uArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(rangeRestrictedInt8uArgument, this, OnSuccessCallback_369, OnFailureCallback_369)); - return CHIP_NO_ERROR; + rangeRestrictedInt8uArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt8uArgument, this, OnSuccessCallback_369, OnFailureCallback_369)); + return CHIP_NO_ERROR; } void OnFailureResponse_369(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_369() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_369() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestWriteJustBelowRangeValueToARangeRestrictedUnsigned8BitInteger_370() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -73767,26 +56100,21 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t rangeRestrictedInt8uArgument; - rangeRestrictedInt8uArgument = 19; - - ReturnErrorOnFailure(cluster.WriteAttribute(rangeRestrictedInt8uArgument, this, OnSuccessCallback_370, OnFailureCallback_370)); - return CHIP_NO_ERROR; + rangeRestrictedInt8uArgument = 19; + + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt8uArgument, this, OnSuccessCallback_370, OnFailureCallback_370)); + return CHIP_NO_ERROR; } void OnFailureResponse_370(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_370() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_370() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestWriteJustAboveRangeValueToARangeRestrictedUnsigned8BitInteger_371() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -73794,26 +56122,21 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t rangeRestrictedInt8uArgument; - rangeRestrictedInt8uArgument = 101; - - ReturnErrorOnFailure(cluster.WriteAttribute(rangeRestrictedInt8uArgument, this, OnSuccessCallback_371, OnFailureCallback_371)); - return CHIP_NO_ERROR; + rangeRestrictedInt8uArgument = 101; + + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt8uArgument, this, OnSuccessCallback_371, OnFailureCallback_371)); + return CHIP_NO_ERROR; } void OnFailureResponse_371(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_371() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_371() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestWriteMaxValueToARangeRestrictedUnsigned8BitInteger_372() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -73821,54 +56144,41 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t rangeRestrictedInt8uArgument; - rangeRestrictedInt8uArgument = 255; - - ReturnErrorOnFailure(cluster.WriteAttribute(rangeRestrictedInt8uArgument, this, OnSuccessCallback_372, OnFailureCallback_372)); - return CHIP_NO_ERROR; + rangeRestrictedInt8uArgument = 255; + + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt8uArgument, this, OnSuccessCallback_372, OnFailureCallback_372)); + return CHIP_NO_ERROR; } void OnFailureResponse_372(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_372() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_372() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestVerifyRangeRestrictedUnsigned8BitIntegerValueHasNotChanged_373() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_373, OnFailureCallback_373)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_373, OnFailureCallback_373)); + return CHIP_NO_ERROR; } - void OnFailureResponse_373(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_373(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_373( uint8_t rangeRestrictedInt8u) + void OnSuccessResponse_373(uint8_t rangeRestrictedInt8u) { - VerifyOrReturn(CheckValue("rangeRestrictedInt8u", rangeRestrictedInt8u,70 - )); + VerifyOrReturn(CheckValue("rangeRestrictedInt8u", rangeRestrictedInt8u, 70)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteMinValidValueToARangeRestrictedUnsigned8BitInteger_374() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -73876,53 +56186,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t rangeRestrictedInt8uArgument; - rangeRestrictedInt8uArgument = 20; - - ReturnErrorOnFailure(cluster.WriteAttribute(rangeRestrictedInt8uArgument, this, OnSuccessCallback_374, OnFailureCallback_374)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_374(EmberAfStatus status) - { - ThrowFailureResponse(); - } + rangeRestrictedInt8uArgument = 20; - void OnSuccessResponse_374() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt8uArgument, this, OnSuccessCallback_374, OnFailureCallback_374)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_374(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_374() { NextTest(); } - CHIP_ERROR TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMinValid_375() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_375, OnFailureCallback_375)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_375, OnFailureCallback_375)); + return CHIP_NO_ERROR; } - void OnFailureResponse_375(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_375(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_375( uint8_t rangeRestrictedInt8u) + void OnSuccessResponse_375(uint8_t rangeRestrictedInt8u) { - VerifyOrReturn(CheckValue("rangeRestrictedInt8u", rangeRestrictedInt8u,20 - )); + VerifyOrReturn(CheckValue("rangeRestrictedInt8u", rangeRestrictedInt8u, 20)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteMaxValidValueToARangeRestrictedUnsigned8BitInteger_376() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -73930,53 +56224,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t rangeRestrictedInt8uArgument; - rangeRestrictedInt8uArgument = 100; - - ReturnErrorOnFailure(cluster.WriteAttribute(rangeRestrictedInt8uArgument, this, OnSuccessCallback_376, OnFailureCallback_376)); - return CHIP_NO_ERROR; - } + rangeRestrictedInt8uArgument = 100; - void OnFailureResponse_376(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_376() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt8uArgument, this, OnSuccessCallback_376, OnFailureCallback_376)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_376(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_376() { NextTest(); } - CHIP_ERROR TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMaxValid_377() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_377, OnFailureCallback_377)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_377, OnFailureCallback_377)); + return CHIP_NO_ERROR; } - void OnFailureResponse_377(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_377(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_377( uint8_t rangeRestrictedInt8u) + void OnSuccessResponse_377(uint8_t rangeRestrictedInt8u) { - VerifyOrReturn(CheckValue("rangeRestrictedInt8u", rangeRestrictedInt8u,100 - )); + VerifyOrReturn(CheckValue("rangeRestrictedInt8u", rangeRestrictedInt8u, 100)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteMiddleValidValueToARangeRestrictedUnsigned8BitInteger_378() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -73984,81 +56262,57 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t rangeRestrictedInt8uArgument; - rangeRestrictedInt8uArgument = 50; - - ReturnErrorOnFailure(cluster.WriteAttribute(rangeRestrictedInt8uArgument, this, OnSuccessCallback_378, OnFailureCallback_378)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_378(EmberAfStatus status) - { - ThrowFailureResponse(); - } + rangeRestrictedInt8uArgument = 50; - void OnSuccessResponse_378() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt8uArgument, this, OnSuccessCallback_378, OnFailureCallback_378)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_378(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_378() { NextTest(); } - CHIP_ERROR TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMidValid_379() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_379, OnFailureCallback_379)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_379, OnFailureCallback_379)); + return CHIP_NO_ERROR; } - void OnFailureResponse_379(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_379(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_379( uint8_t rangeRestrictedInt8u) + void OnSuccessResponse_379(uint8_t rangeRestrictedInt8u) { - VerifyOrReturn(CheckValue("rangeRestrictedInt8u", rangeRestrictedInt8u,50 - )); + VerifyOrReturn(CheckValue("rangeRestrictedInt8u", rangeRestrictedInt8u, 50)); NextTest(); - } - - - + } - CHIP_ERROR TestReadRangeRestrictedUnsigned16BitInteger_380() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_380, OnFailureCallback_380)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_380, OnFailureCallback_380)); + return CHIP_NO_ERROR; } - void OnFailureResponse_380(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_380(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_380( uint16_t rangeRestrictedInt16u) + void OnSuccessResponse_380(uint16_t rangeRestrictedInt16u) { - VerifyOrReturn(CheckValue("rangeRestrictedInt16u", rangeRestrictedInt16u,200U - )); + VerifyOrReturn(CheckValue("rangeRestrictedInt16u", rangeRestrictedInt16u, 200U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteMinValueToARangeRestrictedUnsigned16BitInteger_381() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -74066,26 +56320,21 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t rangeRestrictedInt16uArgument; - rangeRestrictedInt16uArgument = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(rangeRestrictedInt16uArgument, this, OnSuccessCallback_381, OnFailureCallback_381)); - return CHIP_NO_ERROR; + rangeRestrictedInt16uArgument = 0U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt16uArgument, this, OnSuccessCallback_381, OnFailureCallback_381)); + return CHIP_NO_ERROR; } void OnFailureResponse_381(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_381() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_381() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestWriteJustBelowRangeValueToARangeRestrictedUnsigned16BitInteger_382() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -74093,26 +56342,21 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t rangeRestrictedInt16uArgument; - rangeRestrictedInt16uArgument = 99U; - - ReturnErrorOnFailure(cluster.WriteAttribute(rangeRestrictedInt16uArgument, this, OnSuccessCallback_382, OnFailureCallback_382)); - return CHIP_NO_ERROR; + rangeRestrictedInt16uArgument = 99U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt16uArgument, this, OnSuccessCallback_382, OnFailureCallback_382)); + return CHIP_NO_ERROR; } void OnFailureResponse_382(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_382() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_382() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestWriteJustAboveRangeValueToARangeRestrictedUnsigned16BitInteger_383() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -74120,26 +56364,21 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t rangeRestrictedInt16uArgument; - rangeRestrictedInt16uArgument = 1001U; - - ReturnErrorOnFailure(cluster.WriteAttribute(rangeRestrictedInt16uArgument, this, OnSuccessCallback_383, OnFailureCallback_383)); - return CHIP_NO_ERROR; + rangeRestrictedInt16uArgument = 1001U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt16uArgument, this, OnSuccessCallback_383, OnFailureCallback_383)); + return CHIP_NO_ERROR; } void OnFailureResponse_383(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_383() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_383() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestWriteMaxValueToARangeRestrictedUnsigned16BitInteger_384() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -74147,54 +56386,41 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t rangeRestrictedInt16uArgument; - rangeRestrictedInt16uArgument = 65535U; - - ReturnErrorOnFailure(cluster.WriteAttribute(rangeRestrictedInt16uArgument, this, OnSuccessCallback_384, OnFailureCallback_384)); - return CHIP_NO_ERROR; + rangeRestrictedInt16uArgument = 65535U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt16uArgument, this, OnSuccessCallback_384, OnFailureCallback_384)); + return CHIP_NO_ERROR; } void OnFailureResponse_384(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_384() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_384() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestVerifyRangeRestrictedUnsigned16BitIntegerValueHasNotChanged_385() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_385, OnFailureCallback_385)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_385, OnFailureCallback_385)); + return CHIP_NO_ERROR; } - void OnFailureResponse_385(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_385(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_385( uint16_t rangeRestrictedInt16u) + void OnSuccessResponse_385(uint16_t rangeRestrictedInt16u) { - VerifyOrReturn(CheckValue("rangeRestrictedInt16u", rangeRestrictedInt16u,200U - )); + VerifyOrReturn(CheckValue("rangeRestrictedInt16u", rangeRestrictedInt16u, 200U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteMinValidValueToARangeRestrictedUnsigned16BitInteger_386() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -74202,53 +56428,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t rangeRestrictedInt16uArgument; - rangeRestrictedInt16uArgument = 100U; - - ReturnErrorOnFailure(cluster.WriteAttribute(rangeRestrictedInt16uArgument, this, OnSuccessCallback_386, OnFailureCallback_386)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_386(EmberAfStatus status) - { - ThrowFailureResponse(); - } + rangeRestrictedInt16uArgument = 100U; - void OnSuccessResponse_386() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt16uArgument, this, OnSuccessCallback_386, OnFailureCallback_386)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_386(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_386() { NextTest(); } - CHIP_ERROR TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMinValid_387() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_387, OnFailureCallback_387)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_387, OnFailureCallback_387)); + return CHIP_NO_ERROR; } - void OnFailureResponse_387(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_387(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_387( uint16_t rangeRestrictedInt16u) + void OnSuccessResponse_387(uint16_t rangeRestrictedInt16u) { - VerifyOrReturn(CheckValue("rangeRestrictedInt16u", rangeRestrictedInt16u,100U - )); + VerifyOrReturn(CheckValue("rangeRestrictedInt16u", rangeRestrictedInt16u, 100U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteMaxValidValueToARangeRestrictedUnsigned16BitInteger_388() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -74256,53 +56466,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t rangeRestrictedInt16uArgument; - rangeRestrictedInt16uArgument = 1000U; - - ReturnErrorOnFailure(cluster.WriteAttribute(rangeRestrictedInt16uArgument, this, OnSuccessCallback_388, OnFailureCallback_388)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_388(EmberAfStatus status) - { - ThrowFailureResponse(); - } + rangeRestrictedInt16uArgument = 1000U; - void OnSuccessResponse_388() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt16uArgument, this, OnSuccessCallback_388, OnFailureCallback_388)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_388(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_388() { NextTest(); } - CHIP_ERROR TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMaxValid_389() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_389, OnFailureCallback_389)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_389, OnFailureCallback_389)); + return CHIP_NO_ERROR; } - void OnFailureResponse_389(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_389(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_389( uint16_t rangeRestrictedInt16u) + void OnSuccessResponse_389(uint16_t rangeRestrictedInt16u) { - VerifyOrReturn(CheckValue("rangeRestrictedInt16u", rangeRestrictedInt16u,1000U - )); + VerifyOrReturn(CheckValue("rangeRestrictedInt16u", rangeRestrictedInt16u, 1000U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteMiddleValidValueToARangeRestrictedUnsigned16BitInteger_390() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -74310,81 +56504,57 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t rangeRestrictedInt16uArgument; - rangeRestrictedInt16uArgument = 500U; - - ReturnErrorOnFailure(cluster.WriteAttribute(rangeRestrictedInt16uArgument, this, OnSuccessCallback_390, OnFailureCallback_390)); - return CHIP_NO_ERROR; - } + rangeRestrictedInt16uArgument = 500U; - void OnFailureResponse_390(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_390() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt16uArgument, this, OnSuccessCallback_390, OnFailureCallback_390)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_390(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_390() { NextTest(); } - CHIP_ERROR TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMidValid_391() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_391, OnFailureCallback_391)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_391, OnFailureCallback_391)); + return CHIP_NO_ERROR; } - void OnFailureResponse_391(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_391(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_391( uint16_t rangeRestrictedInt16u) + void OnSuccessResponse_391(uint16_t rangeRestrictedInt16u) { - VerifyOrReturn(CheckValue("rangeRestrictedInt16u", rangeRestrictedInt16u,500U - )); + VerifyOrReturn(CheckValue("rangeRestrictedInt16u", rangeRestrictedInt16u, 500U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadRangeRestrictedSigned8BitInteger_392() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_392, OnFailureCallback_392)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_392, OnFailureCallback_392)); + return CHIP_NO_ERROR; } - void OnFailureResponse_392(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_392(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_392( int8_t rangeRestrictedInt8s) + void OnSuccessResponse_392(int8_t rangeRestrictedInt8s) { - VerifyOrReturn(CheckValue("rangeRestrictedInt8s", rangeRestrictedInt8s,-20 - )); + VerifyOrReturn(CheckValue("rangeRestrictedInt8s", rangeRestrictedInt8s, -20)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteMinValueToARangeRestrictedSigned8BitInteger_393() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -74392,26 +56562,21 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int8_t rangeRestrictedInt8sArgument; - rangeRestrictedInt8sArgument = -128; - - ReturnErrorOnFailure(cluster.WriteAttribute(rangeRestrictedInt8sArgument, this, OnSuccessCallback_393, OnFailureCallback_393)); - return CHIP_NO_ERROR; + rangeRestrictedInt8sArgument = -128; + + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt8sArgument, this, OnSuccessCallback_393, OnFailureCallback_393)); + return CHIP_NO_ERROR; } void OnFailureResponse_393(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_393() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_393() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestWriteJustBelowRangeValueToARangeRestrictedSigned8BitInteger_394() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -74419,26 +56584,21 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int8_t rangeRestrictedInt8sArgument; - rangeRestrictedInt8sArgument = -41; - - ReturnErrorOnFailure(cluster.WriteAttribute(rangeRestrictedInt8sArgument, this, OnSuccessCallback_394, OnFailureCallback_394)); - return CHIP_NO_ERROR; + rangeRestrictedInt8sArgument = -41; + + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt8sArgument, this, OnSuccessCallback_394, OnFailureCallback_394)); + return CHIP_NO_ERROR; } void OnFailureResponse_394(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_394() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_394() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestWriteJustAboveRangeValueToARangeRestrictedSigned8BitInteger_395() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -74446,26 +56606,21 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int8_t rangeRestrictedInt8sArgument; - rangeRestrictedInt8sArgument = 51; - - ReturnErrorOnFailure(cluster.WriteAttribute(rangeRestrictedInt8sArgument, this, OnSuccessCallback_395, OnFailureCallback_395)); - return CHIP_NO_ERROR; + rangeRestrictedInt8sArgument = 51; + + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt8sArgument, this, OnSuccessCallback_395, OnFailureCallback_395)); + return CHIP_NO_ERROR; } void OnFailureResponse_395(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_395() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_395() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestWriteMaxValueToARangeRestrictedSigned8BitInteger_396() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -74473,54 +56628,41 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int8_t rangeRestrictedInt8sArgument; - rangeRestrictedInt8sArgument = 127; - - ReturnErrorOnFailure(cluster.WriteAttribute(rangeRestrictedInt8sArgument, this, OnSuccessCallback_396, OnFailureCallback_396)); - return CHIP_NO_ERROR; + rangeRestrictedInt8sArgument = 127; + + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt8sArgument, this, OnSuccessCallback_396, OnFailureCallback_396)); + return CHIP_NO_ERROR; } void OnFailureResponse_396(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_396() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_396() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestVerifyRangeRestrictedSigned8BitIntegerValueHasNotChanged_397() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_397, OnFailureCallback_397)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_397, OnFailureCallback_397)); + return CHIP_NO_ERROR; } - void OnFailureResponse_397(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_397(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_397( int8_t rangeRestrictedInt8s) + void OnSuccessResponse_397(int8_t rangeRestrictedInt8s) { - VerifyOrReturn(CheckValue("rangeRestrictedInt8s", rangeRestrictedInt8s,-20 - )); + VerifyOrReturn(CheckValue("rangeRestrictedInt8s", rangeRestrictedInt8s, -20)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteMinValidValueToARangeRestrictedSigned8BitInteger_398() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -74528,53 +56670,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int8_t rangeRestrictedInt8sArgument; - rangeRestrictedInt8sArgument = -40; - - ReturnErrorOnFailure(cluster.WriteAttribute(rangeRestrictedInt8sArgument, this, OnSuccessCallback_398, OnFailureCallback_398)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_398(EmberAfStatus status) - { - ThrowFailureResponse(); - } + rangeRestrictedInt8sArgument = -40; - void OnSuccessResponse_398() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt8sArgument, this, OnSuccessCallback_398, OnFailureCallback_398)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_398(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_398() { NextTest(); } - CHIP_ERROR TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMinValid_399() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_399, OnFailureCallback_399)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_399, OnFailureCallback_399)); + return CHIP_NO_ERROR; } - void OnFailureResponse_399(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_399(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_399( int8_t rangeRestrictedInt8s) + void OnSuccessResponse_399(int8_t rangeRestrictedInt8s) { - VerifyOrReturn(CheckValue("rangeRestrictedInt8s", rangeRestrictedInt8s,-40 - )); + VerifyOrReturn(CheckValue("rangeRestrictedInt8s", rangeRestrictedInt8s, -40)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteMaxValidValueToARangeRestrictedSigned8BitInteger_400() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -74582,53 +56708,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int8_t rangeRestrictedInt8sArgument; - rangeRestrictedInt8sArgument = 50; - - ReturnErrorOnFailure(cluster.WriteAttribute(rangeRestrictedInt8sArgument, this, OnSuccessCallback_400, OnFailureCallback_400)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_400(EmberAfStatus status) - { - ThrowFailureResponse(); - } + rangeRestrictedInt8sArgument = 50; - void OnSuccessResponse_400() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt8sArgument, this, OnSuccessCallback_400, OnFailureCallback_400)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_400(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_400() { NextTest(); } - CHIP_ERROR TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMaxValid_401() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_401, OnFailureCallback_401)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_401, OnFailureCallback_401)); + return CHIP_NO_ERROR; } - void OnFailureResponse_401(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_401(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_401( int8_t rangeRestrictedInt8s) + void OnSuccessResponse_401(int8_t rangeRestrictedInt8s) { - VerifyOrReturn(CheckValue("rangeRestrictedInt8s", rangeRestrictedInt8s,50 - )); + VerifyOrReturn(CheckValue("rangeRestrictedInt8s", rangeRestrictedInt8s, 50)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteMiddleValidValueToARangeRestrictedSigned8BitInteger_402() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -74636,81 +56746,57 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int8_t rangeRestrictedInt8sArgument; - rangeRestrictedInt8sArgument = 6; - - ReturnErrorOnFailure(cluster.WriteAttribute(rangeRestrictedInt8sArgument, this, OnSuccessCallback_402, OnFailureCallback_402)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_402(EmberAfStatus status) - { - ThrowFailureResponse(); - } + rangeRestrictedInt8sArgument = 6; - void OnSuccessResponse_402() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt8sArgument, this, OnSuccessCallback_402, OnFailureCallback_402)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_402(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_402() { NextTest(); } - CHIP_ERROR TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMidValid_403() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_403, OnFailureCallback_403)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_403, OnFailureCallback_403)); + return CHIP_NO_ERROR; } - void OnFailureResponse_403(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_403(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_403( int8_t rangeRestrictedInt8s) + void OnSuccessResponse_403(int8_t rangeRestrictedInt8s) { - VerifyOrReturn(CheckValue("rangeRestrictedInt8s", rangeRestrictedInt8s,6 - )); + VerifyOrReturn(CheckValue("rangeRestrictedInt8s", rangeRestrictedInt8s, 6)); NextTest(); - } - - - + } - CHIP_ERROR TestReadRangeRestrictedSigned16BitInteger_404() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_404, OnFailureCallback_404)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_404, OnFailureCallback_404)); + return CHIP_NO_ERROR; } - void OnFailureResponse_404(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_404(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_404( int16_t rangeRestrictedInt16s) + void OnSuccessResponse_404(int16_t rangeRestrictedInt16s) { - VerifyOrReturn(CheckValue("rangeRestrictedInt16s", rangeRestrictedInt16s,-100 - )); + VerifyOrReturn(CheckValue("rangeRestrictedInt16s", rangeRestrictedInt16s, -100)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteMinValueToARangeRestrictedSigned16BitInteger_405() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -74718,26 +56804,21 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t rangeRestrictedInt16sArgument; - rangeRestrictedInt16sArgument = -32768; - - ReturnErrorOnFailure(cluster.WriteAttribute(rangeRestrictedInt16sArgument, this, OnSuccessCallback_405, OnFailureCallback_405)); - return CHIP_NO_ERROR; + rangeRestrictedInt16sArgument = -32768; + + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt16sArgument, this, OnSuccessCallback_405, OnFailureCallback_405)); + return CHIP_NO_ERROR; } void OnFailureResponse_405(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_405() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_405() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestWriteJustBelowRangeValueToARangeRestrictedSigned16BitInteger_406() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -74745,26 +56826,21 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t rangeRestrictedInt16sArgument; - rangeRestrictedInt16sArgument = -151; - - ReturnErrorOnFailure(cluster.WriteAttribute(rangeRestrictedInt16sArgument, this, OnSuccessCallback_406, OnFailureCallback_406)); - return CHIP_NO_ERROR; + rangeRestrictedInt16sArgument = -151; + + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt16sArgument, this, OnSuccessCallback_406, OnFailureCallback_406)); + return CHIP_NO_ERROR; } void OnFailureResponse_406(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_406() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_406() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestWriteJustAboveRangeValueToARangeRestrictedSigned16BitInteger_407() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -74772,26 +56848,21 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t rangeRestrictedInt16sArgument; - rangeRestrictedInt16sArgument = 201; - - ReturnErrorOnFailure(cluster.WriteAttribute(rangeRestrictedInt16sArgument, this, OnSuccessCallback_407, OnFailureCallback_407)); - return CHIP_NO_ERROR; + rangeRestrictedInt16sArgument = 201; + + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt16sArgument, this, OnSuccessCallback_407, OnFailureCallback_407)); + return CHIP_NO_ERROR; } void OnFailureResponse_407(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_407() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_407() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestWriteMaxValueToARangeRestrictedSigned16BitInteger_408() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -74799,54 +56870,41 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t rangeRestrictedInt16sArgument; - rangeRestrictedInt16sArgument = 32767; - - ReturnErrorOnFailure(cluster.WriteAttribute(rangeRestrictedInt16sArgument, this, OnSuccessCallback_408, OnFailureCallback_408)); - return CHIP_NO_ERROR; + rangeRestrictedInt16sArgument = 32767; + + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt16sArgument, this, OnSuccessCallback_408, OnFailureCallback_408)); + return CHIP_NO_ERROR; } void OnFailureResponse_408(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_408() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_408() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestVerifyRangeRestrictedSigned16BitIntegerValueHasNotChanged_409() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_409, OnFailureCallback_409)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_409, OnFailureCallback_409)); + return CHIP_NO_ERROR; } - void OnFailureResponse_409(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_409(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_409( int16_t rangeRestrictedInt16s) + void OnSuccessResponse_409(int16_t rangeRestrictedInt16s) { - VerifyOrReturn(CheckValue("rangeRestrictedInt16s", rangeRestrictedInt16s,-100 - )); + VerifyOrReturn(CheckValue("rangeRestrictedInt16s", rangeRestrictedInt16s, -100)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteMinValidValueToARangeRestrictedSigned16BitInteger_410() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -74854,53 +56912,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t rangeRestrictedInt16sArgument; - rangeRestrictedInt16sArgument = -150; - - ReturnErrorOnFailure(cluster.WriteAttribute(rangeRestrictedInt16sArgument, this, OnSuccessCallback_410, OnFailureCallback_410)); - return CHIP_NO_ERROR; - } + rangeRestrictedInt16sArgument = -150; - void OnFailureResponse_410(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_410() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt16sArgument, this, OnSuccessCallback_410, OnFailureCallback_410)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_410(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_410() { NextTest(); } - CHIP_ERROR TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMinValid_411() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_411, OnFailureCallback_411)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_411, OnFailureCallback_411)); + return CHIP_NO_ERROR; } - void OnFailureResponse_411(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_411(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_411( int16_t rangeRestrictedInt16s) + void OnSuccessResponse_411(int16_t rangeRestrictedInt16s) { - VerifyOrReturn(CheckValue("rangeRestrictedInt16s", rangeRestrictedInt16s,-150 - )); + VerifyOrReturn(CheckValue("rangeRestrictedInt16s", rangeRestrictedInt16s, -150)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteMaxValidValueToARangeRestrictedSigned16BitInteger_412() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -74908,53 +56950,37 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t rangeRestrictedInt16sArgument; - rangeRestrictedInt16sArgument = 200; - - ReturnErrorOnFailure(cluster.WriteAttribute(rangeRestrictedInt16sArgument, this, OnSuccessCallback_412, OnFailureCallback_412)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_412(EmberAfStatus status) - { - ThrowFailureResponse(); - } + rangeRestrictedInt16sArgument = 200; - void OnSuccessResponse_412() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt16sArgument, this, OnSuccessCallback_412, OnFailureCallback_412)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_412(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_412() { NextTest(); } - CHIP_ERROR TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMaxValid_413() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_413, OnFailureCallback_413)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_413, OnFailureCallback_413)); + return CHIP_NO_ERROR; } - void OnFailureResponse_413(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_413(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_413( int16_t rangeRestrictedInt16s) + void OnSuccessResponse_413(int16_t rangeRestrictedInt16s) { - VerifyOrReturn(CheckValue("rangeRestrictedInt16s", rangeRestrictedInt16s,200 - )); + VerifyOrReturn(CheckValue("rangeRestrictedInt16s", rangeRestrictedInt16s, 200)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteMiddleValidValueToARangeRestrictedSigned16BitInteger_414() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -74962,82 +56988,59 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t rangeRestrictedInt16sArgument; - rangeRestrictedInt16sArgument = 7; - - ReturnErrorOnFailure(cluster.WriteAttribute(rangeRestrictedInt16sArgument, this, OnSuccessCallback_414, OnFailureCallback_414)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_414(EmberAfStatus status) - { - ThrowFailureResponse(); - } + rangeRestrictedInt16sArgument = 7; - void OnSuccessResponse_414() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt16sArgument, this, OnSuccessCallback_414, OnFailureCallback_414)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_414(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_414() { NextTest(); } - CHIP_ERROR TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMidValid_415() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_415, OnFailureCallback_415)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_415, OnFailureCallback_415)); + return CHIP_NO_ERROR; } - void OnFailureResponse_415(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_415(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_415( int16_t rangeRestrictedInt16s) + void OnSuccessResponse_415(int16_t rangeRestrictedInt16s) { - VerifyOrReturn(CheckValue("rangeRestrictedInt16s", rangeRestrictedInt16s,7 - )); + VerifyOrReturn(CheckValue("rangeRestrictedInt16s", rangeRestrictedInt16s, 7)); NextTest(); - } - - - + } - CHIP_ERROR TestReadNullableRangeRestrictedUnsigned8BitInteger_416() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_416, OnFailureCallback_416)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_416, OnFailureCallback_416)); + return CHIP_NO_ERROR; } - void OnFailureResponse_416(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_416(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_416( const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) + void OnSuccessResponse_416(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) { - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8u", nullableRangeRestrictedInt8u)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8u.Value()", nullableRangeRestrictedInt8u.Value(),70 - )); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8u", nullableRangeRestrictedInt8u)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8u.Value()", nullableRangeRestrictedInt8u.Value(), 70)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteMinValueToANullableRangeRestrictedUnsigned8BitInteger_417() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -75045,27 +57048,23 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableRangeRestrictedInt8uArgument; - nullableRangeRestrictedInt8uArgument.SetNonNull(); - nullableRangeRestrictedInt8uArgument.Value() = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableRangeRestrictedInt8uArgument, this, OnSuccessCallback_417, OnFailureCallback_417)); - return CHIP_NO_ERROR; + nullableRangeRestrictedInt8uArgument.SetNonNull(); + nullableRangeRestrictedInt8uArgument.Value() = 0; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt8uArgument, this, OnSuccessCallback_417, OnFailureCallback_417)); + return CHIP_NO_ERROR; } void OnFailureResponse_417(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_417() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_417() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestWriteJustBelowRangeValueToANullableRangeRestrictedUnsigned8BitInteger_418() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -75073,27 +57072,23 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableRangeRestrictedInt8uArgument; - nullableRangeRestrictedInt8uArgument.SetNonNull(); - nullableRangeRestrictedInt8uArgument.Value() = 19; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableRangeRestrictedInt8uArgument, this, OnSuccessCallback_418, OnFailureCallback_418)); - return CHIP_NO_ERROR; + nullableRangeRestrictedInt8uArgument.SetNonNull(); + nullableRangeRestrictedInt8uArgument.Value() = 19; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt8uArgument, this, OnSuccessCallback_418, OnFailureCallback_418)); + return CHIP_NO_ERROR; } void OnFailureResponse_418(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_418() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_418() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestWriteJustAboveRangeValueToANullableRangeRestrictedUnsigned8BitInteger_419() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -75101,27 +57096,23 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableRangeRestrictedInt8uArgument; - nullableRangeRestrictedInt8uArgument.SetNonNull(); - nullableRangeRestrictedInt8uArgument.Value() = 101; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableRangeRestrictedInt8uArgument, this, OnSuccessCallback_419, OnFailureCallback_419)); - return CHIP_NO_ERROR; + nullableRangeRestrictedInt8uArgument.SetNonNull(); + nullableRangeRestrictedInt8uArgument.Value() = 101; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt8uArgument, this, OnSuccessCallback_419, OnFailureCallback_419)); + return CHIP_NO_ERROR; } void OnFailureResponse_419(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_419() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_419() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestWriteMaxValueToANullableRangeRestrictedUnsigned8BitInteger_420() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -75129,56 +57120,45 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableRangeRestrictedInt8uArgument; - nullableRangeRestrictedInt8uArgument.SetNonNull(); - nullableRangeRestrictedInt8uArgument.Value() = 254; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableRangeRestrictedInt8uArgument, this, OnSuccessCallback_420, OnFailureCallback_420)); - return CHIP_NO_ERROR; + nullableRangeRestrictedInt8uArgument.SetNonNull(); + nullableRangeRestrictedInt8uArgument.Value() = 254; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt8uArgument, this, OnSuccessCallback_420, OnFailureCallback_420)); + return CHIP_NO_ERROR; } void OnFailureResponse_420(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_420() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_420() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueHasNotChanged_421() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_421, OnFailureCallback_421)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_421, OnFailureCallback_421)); + return CHIP_NO_ERROR; } - void OnFailureResponse_421(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_421(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_421( const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) + void OnSuccessResponse_421(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) { - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8u", nullableRangeRestrictedInt8u)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8u.Value()", nullableRangeRestrictedInt8u.Value(),70 - )); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8u", nullableRangeRestrictedInt8u)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8u.Value()", nullableRangeRestrictedInt8u.Value(), 70)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteMinValidValueToANullableRangeRestrictedUnsigned8BitInteger_422() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -75186,55 +57166,41 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableRangeRestrictedInt8uArgument; - nullableRangeRestrictedInt8uArgument.SetNonNull(); - nullableRangeRestrictedInt8uArgument.Value() = 20; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableRangeRestrictedInt8uArgument, this, OnSuccessCallback_422, OnFailureCallback_422)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_422(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableRangeRestrictedInt8uArgument.SetNonNull(); + nullableRangeRestrictedInt8uArgument.Value() = 20; - void OnSuccessResponse_422() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt8uArgument, this, OnSuccessCallback_422, OnFailureCallback_422)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_422(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_422() { NextTest(); } - CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMinValid_423() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_423, OnFailureCallback_423)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_423, OnFailureCallback_423)); + return CHIP_NO_ERROR; } - void OnFailureResponse_423(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_423(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_423( const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) + void OnSuccessResponse_423(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) { - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8u", nullableRangeRestrictedInt8u)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8u.Value()", nullableRangeRestrictedInt8u.Value(),20 - )); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8u", nullableRangeRestrictedInt8u)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8u.Value()", nullableRangeRestrictedInt8u.Value(), 20)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteMaxValidValueToANullableRangeRestrictedUnsigned8BitInteger_424() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -75242,55 +57208,41 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableRangeRestrictedInt8uArgument; - nullableRangeRestrictedInt8uArgument.SetNonNull(); - nullableRangeRestrictedInt8uArgument.Value() = 100; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableRangeRestrictedInt8uArgument, this, OnSuccessCallback_424, OnFailureCallback_424)); - return CHIP_NO_ERROR; - } + nullableRangeRestrictedInt8uArgument.SetNonNull(); + nullableRangeRestrictedInt8uArgument.Value() = 100; - void OnFailureResponse_424(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_424() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt8uArgument, this, OnSuccessCallback_424, OnFailureCallback_424)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_424(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_424() { NextTest(); } - CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMaxValid_425() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_425, OnFailureCallback_425)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_425, OnFailureCallback_425)); + return CHIP_NO_ERROR; } - void OnFailureResponse_425(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_425(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_425( const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) + void OnSuccessResponse_425(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) { - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8u", nullableRangeRestrictedInt8u)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8u.Value()", nullableRangeRestrictedInt8u.Value(),100 - )); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8u", nullableRangeRestrictedInt8u)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8u.Value()", nullableRangeRestrictedInt8u.Value(), 100)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteMiddleValidValueToANullableRangeRestrictedUnsigned8BitInteger_426() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -75298,55 +57250,41 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableRangeRestrictedInt8uArgument; - nullableRangeRestrictedInt8uArgument.SetNonNull(); - nullableRangeRestrictedInt8uArgument.Value() = 50; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableRangeRestrictedInt8uArgument, this, OnSuccessCallback_426, OnFailureCallback_426)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_426(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableRangeRestrictedInt8uArgument.SetNonNull(); + nullableRangeRestrictedInt8uArgument.Value() = 50; - void OnSuccessResponse_426() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt8uArgument, this, OnSuccessCallback_426, OnFailureCallback_426)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_426(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_426() { NextTest(); } - CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMidValid_427() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_427, OnFailureCallback_427)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_427, OnFailureCallback_427)); + return CHIP_NO_ERROR; } - void OnFailureResponse_427(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_427(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_427( const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) + void OnSuccessResponse_427(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) { - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8u", nullableRangeRestrictedInt8u)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8u.Value()", nullableRangeRestrictedInt8u.Value(),50 - )); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8u", nullableRangeRestrictedInt8u)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8u.Value()", nullableRangeRestrictedInt8u.Value(), 50)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteNullValueToANullableRangeRestrictedUnsigned8BitInteger_428() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -75354,81 +57292,61 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableRangeRestrictedInt8uArgument; - nullableRangeRestrictedInt8uArgument.SetNull(); + nullableRangeRestrictedInt8uArgument.SetNull(); - ReturnErrorOnFailure(cluster.WriteAttribute(nullableRangeRestrictedInt8uArgument, this, OnSuccessCallback_428, OnFailureCallback_428)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt8uArgument, this, OnSuccessCallback_428, OnFailureCallback_428)); + return CHIP_NO_ERROR; } - void OnFailureResponse_428(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_428() - { NextTest(); - } - + void OnFailureResponse_428(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_428() { NextTest(); } - CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsNull_429() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_429, OnFailureCallback_429)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_429, OnFailureCallback_429)); + return CHIP_NO_ERROR; } - void OnFailureResponse_429(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_429(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_429( const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) + void OnSuccessResponse_429(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) { - VerifyOrReturn(CheckValueNull("nullableRangeRestrictedInt8u", nullableRangeRestrictedInt8u)); + VerifyOrReturn(CheckValueNull("nullableRangeRestrictedInt8u", nullableRangeRestrictedInt8u)); NextTest(); - } - - - + } - CHIP_ERROR TestReadNullableRangeRestrictedUnsigned16BitInteger_430() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_430, OnFailureCallback_430)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_430, OnFailureCallback_430)); + return CHIP_NO_ERROR; } - void OnFailureResponse_430(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_430(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_430( const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) + void OnSuccessResponse_430(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) { - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16u", nullableRangeRestrictedInt16u)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16u.Value()", nullableRangeRestrictedInt16u.Value(),200U - )); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16u", nullableRangeRestrictedInt16u)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16u.Value()", nullableRangeRestrictedInt16u.Value(), 200U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteMinValueToANullableRangeRestrictedUnsigned16BitInteger_431() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -75436,27 +57354,23 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableRangeRestrictedInt16uArgument; - nullableRangeRestrictedInt16uArgument.SetNonNull(); - nullableRangeRestrictedInt16uArgument.Value() = 0U; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableRangeRestrictedInt16uArgument, this, OnSuccessCallback_431, OnFailureCallback_431)); - return CHIP_NO_ERROR; + nullableRangeRestrictedInt16uArgument.SetNonNull(); + nullableRangeRestrictedInt16uArgument.Value() = 0U; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt16uArgument, this, OnSuccessCallback_431, OnFailureCallback_431)); + return CHIP_NO_ERROR; } void OnFailureResponse_431(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_431() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_431() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestWriteJustBelowRangeValueToANullableRangeRestrictedUnsigned16BitInteger_432() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -75464,27 +57378,23 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableRangeRestrictedInt16uArgument; - nullableRangeRestrictedInt16uArgument.SetNonNull(); - nullableRangeRestrictedInt16uArgument.Value() = 99U; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableRangeRestrictedInt16uArgument, this, OnSuccessCallback_432, OnFailureCallback_432)); - return CHIP_NO_ERROR; + nullableRangeRestrictedInt16uArgument.SetNonNull(); + nullableRangeRestrictedInt16uArgument.Value() = 99U; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt16uArgument, this, OnSuccessCallback_432, OnFailureCallback_432)); + return CHIP_NO_ERROR; } void OnFailureResponse_432(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_432() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_432() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestWriteJustAboveRangeValueToANullableRangeRestrictedUnsigned16BitInteger_433() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -75492,27 +57402,23 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableRangeRestrictedInt16uArgument; - nullableRangeRestrictedInt16uArgument.SetNonNull(); - nullableRangeRestrictedInt16uArgument.Value() = 1001U; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableRangeRestrictedInt16uArgument, this, OnSuccessCallback_433, OnFailureCallback_433)); - return CHIP_NO_ERROR; + nullableRangeRestrictedInt16uArgument.SetNonNull(); + nullableRangeRestrictedInt16uArgument.Value() = 1001U; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt16uArgument, this, OnSuccessCallback_433, OnFailureCallback_433)); + return CHIP_NO_ERROR; } void OnFailureResponse_433(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_433() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_433() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestWriteMaxValueToANullableRangeRestrictedUnsigned16BitInteger_434() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -75520,56 +57426,45 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableRangeRestrictedInt16uArgument; - nullableRangeRestrictedInt16uArgument.SetNonNull(); - nullableRangeRestrictedInt16uArgument.Value() = 65534U; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableRangeRestrictedInt16uArgument, this, OnSuccessCallback_434, OnFailureCallback_434)); - return CHIP_NO_ERROR; + nullableRangeRestrictedInt16uArgument.SetNonNull(); + nullableRangeRestrictedInt16uArgument.Value() = 65534U; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt16uArgument, this, OnSuccessCallback_434, OnFailureCallback_434)); + return CHIP_NO_ERROR; } void OnFailureResponse_434(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_434() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_434() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueHasNotChanged_435() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_435, OnFailureCallback_435)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_435, OnFailureCallback_435)); + return CHIP_NO_ERROR; } - void OnFailureResponse_435(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_435( const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) - { - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16u", nullableRangeRestrictedInt16u)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16u.Value()", nullableRangeRestrictedInt16u.Value(),200U - )); - - NextTest(); - } + void OnFailureResponse_435(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_435(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) + { + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16u", nullableRangeRestrictedInt16u)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16u.Value()", nullableRangeRestrictedInt16u.Value(), 200U)); - + NextTest(); + } - CHIP_ERROR TestWriteMinValidValueToANullableRangeRestrictedUnsigned16BitInteger_436() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -75577,55 +57472,41 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableRangeRestrictedInt16uArgument; - nullableRangeRestrictedInt16uArgument.SetNonNull(); - nullableRangeRestrictedInt16uArgument.Value() = 100U; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableRangeRestrictedInt16uArgument, this, OnSuccessCallback_436, OnFailureCallback_436)); - return CHIP_NO_ERROR; - } + nullableRangeRestrictedInt16uArgument.SetNonNull(); + nullableRangeRestrictedInt16uArgument.Value() = 100U; - void OnFailureResponse_436(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_436() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt16uArgument, this, OnSuccessCallback_436, OnFailureCallback_436)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_436(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_436() { NextTest(); } - CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMinValid_437() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_437, OnFailureCallback_437)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_437, OnFailureCallback_437)); + return CHIP_NO_ERROR; } - void OnFailureResponse_437(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_437(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_437( const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) + void OnSuccessResponse_437(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) { - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16u", nullableRangeRestrictedInt16u)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16u.Value()", nullableRangeRestrictedInt16u.Value(),100U - )); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16u", nullableRangeRestrictedInt16u)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16u.Value()", nullableRangeRestrictedInt16u.Value(), 100U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteMaxValidValueToANullableRangeRestrictedUnsigned16BitInteger_438() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -75633,55 +57514,41 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableRangeRestrictedInt16uArgument; - nullableRangeRestrictedInt16uArgument.SetNonNull(); - nullableRangeRestrictedInt16uArgument.Value() = 1000U; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableRangeRestrictedInt16uArgument, this, OnSuccessCallback_438, OnFailureCallback_438)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_438(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableRangeRestrictedInt16uArgument.SetNonNull(); + nullableRangeRestrictedInt16uArgument.Value() = 1000U; - void OnSuccessResponse_438() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt16uArgument, this, OnSuccessCallback_438, OnFailureCallback_438)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_438(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_438() { NextTest(); } - CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMaxValid_439() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_439, OnFailureCallback_439)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_439, OnFailureCallback_439)); + return CHIP_NO_ERROR; } - void OnFailureResponse_439(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_439(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_439( const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) + void OnSuccessResponse_439(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) { - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16u", nullableRangeRestrictedInt16u)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16u.Value()", nullableRangeRestrictedInt16u.Value(),1000U - )); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16u", nullableRangeRestrictedInt16u)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16u.Value()", nullableRangeRestrictedInt16u.Value(), 1000U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteMiddleValidValueToANullableRangeRestrictedUnsigned16BitInteger_440() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -75689,55 +57556,41 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableRangeRestrictedInt16uArgument; - nullableRangeRestrictedInt16uArgument.SetNonNull(); - nullableRangeRestrictedInt16uArgument.Value() = 500U; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableRangeRestrictedInt16uArgument, this, OnSuccessCallback_440, OnFailureCallback_440)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_440(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableRangeRestrictedInt16uArgument.SetNonNull(); + nullableRangeRestrictedInt16uArgument.Value() = 500U; - void OnSuccessResponse_440() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt16uArgument, this, OnSuccessCallback_440, OnFailureCallback_440)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_440(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_440() { NextTest(); } - CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMidValid_441() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_441, OnFailureCallback_441)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_441, OnFailureCallback_441)); + return CHIP_NO_ERROR; } - void OnFailureResponse_441(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_441(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_441( const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) + void OnSuccessResponse_441(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) { - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16u", nullableRangeRestrictedInt16u)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16u.Value()", nullableRangeRestrictedInt16u.Value(),500U - )); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16u", nullableRangeRestrictedInt16u)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16u.Value()", nullableRangeRestrictedInt16u.Value(), 500U)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteNullValueToANullableRangeRestrictedUnsigned16BitInteger_442() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -75745,81 +57598,61 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableRangeRestrictedInt16uArgument; - nullableRangeRestrictedInt16uArgument.SetNull(); + nullableRangeRestrictedInt16uArgument.SetNull(); - ReturnErrorOnFailure(cluster.WriteAttribute(nullableRangeRestrictedInt16uArgument, this, OnSuccessCallback_442, OnFailureCallback_442)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt16uArgument, this, OnSuccessCallback_442, OnFailureCallback_442)); + return CHIP_NO_ERROR; } - void OnFailureResponse_442(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_442() - { NextTest(); - } - + void OnFailureResponse_442(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_442() { NextTest(); } - CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsNull_443() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_443, OnFailureCallback_443)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_443, OnFailureCallback_443)); + return CHIP_NO_ERROR; } - void OnFailureResponse_443(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_443(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_443( const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) + void OnSuccessResponse_443(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) { - VerifyOrReturn(CheckValueNull("nullableRangeRestrictedInt16u", nullableRangeRestrictedInt16u)); + VerifyOrReturn(CheckValueNull("nullableRangeRestrictedInt16u", nullableRangeRestrictedInt16u)); NextTest(); - } - - - + } - CHIP_ERROR TestReadNullableRangeRestrictedSigned8BitInteger_444() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_444, OnFailureCallback_444)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_444, OnFailureCallback_444)); + return CHIP_NO_ERROR; } - void OnFailureResponse_444(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_444(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_444( const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) + void OnSuccessResponse_444(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) { - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8s", nullableRangeRestrictedInt8s)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8s.Value()", nullableRangeRestrictedInt8s.Value(),-20 - )); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8s", nullableRangeRestrictedInt8s)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8s.Value()", nullableRangeRestrictedInt8s.Value(), -20)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteMinValueToANullableRangeRestrictedSigned8BitInteger_445() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -75827,27 +57660,23 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableRangeRestrictedInt8sArgument; - nullableRangeRestrictedInt8sArgument.SetNonNull(); - nullableRangeRestrictedInt8sArgument.Value() = -127; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableRangeRestrictedInt8sArgument, this, OnSuccessCallback_445, OnFailureCallback_445)); - return CHIP_NO_ERROR; + nullableRangeRestrictedInt8sArgument.SetNonNull(); + nullableRangeRestrictedInt8sArgument.Value() = -127; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt8sArgument, this, OnSuccessCallback_445, OnFailureCallback_445)); + return CHIP_NO_ERROR; } void OnFailureResponse_445(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_445() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_445() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestWriteJustBelowRangeValueToANullableRangeRestrictedSigned8BitInteger_446() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -75855,27 +57684,23 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableRangeRestrictedInt8sArgument; - nullableRangeRestrictedInt8sArgument.SetNonNull(); - nullableRangeRestrictedInt8sArgument.Value() = -41; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableRangeRestrictedInt8sArgument, this, OnSuccessCallback_446, OnFailureCallback_446)); - return CHIP_NO_ERROR; + nullableRangeRestrictedInt8sArgument.SetNonNull(); + nullableRangeRestrictedInt8sArgument.Value() = -41; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt8sArgument, this, OnSuccessCallback_446, OnFailureCallback_446)); + return CHIP_NO_ERROR; } void OnFailureResponse_446(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_446() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_446() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestWriteJustAboveRangeValueToANullableRangeRestrictedSigned8BitInteger_447() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -75883,27 +57708,23 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableRangeRestrictedInt8sArgument; - nullableRangeRestrictedInt8sArgument.SetNonNull(); - nullableRangeRestrictedInt8sArgument.Value() = 51; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableRangeRestrictedInt8sArgument, this, OnSuccessCallback_447, OnFailureCallback_447)); - return CHIP_NO_ERROR; + nullableRangeRestrictedInt8sArgument.SetNonNull(); + nullableRangeRestrictedInt8sArgument.Value() = 51; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt8sArgument, this, OnSuccessCallback_447, OnFailureCallback_447)); + return CHIP_NO_ERROR; } void OnFailureResponse_447(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_447() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_447() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestWriteMaxValueToANullableRangeRestrictedSigned8BitInteger_448() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -75911,56 +57732,45 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableRangeRestrictedInt8sArgument; - nullableRangeRestrictedInt8sArgument.SetNonNull(); - nullableRangeRestrictedInt8sArgument.Value() = 127; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableRangeRestrictedInt8sArgument, this, OnSuccessCallback_448, OnFailureCallback_448)); - return CHIP_NO_ERROR; + nullableRangeRestrictedInt8sArgument.SetNonNull(); + nullableRangeRestrictedInt8sArgument.Value() = 127; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt8sArgument, this, OnSuccessCallback_448, OnFailureCallback_448)); + return CHIP_NO_ERROR; } void OnFailureResponse_448(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_448() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_448() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueHasNotChanged_449() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_449, OnFailureCallback_449)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_449, OnFailureCallback_449)); + return CHIP_NO_ERROR; } - void OnFailureResponse_449(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_449(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_449( const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) + void OnSuccessResponse_449(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) { - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8s", nullableRangeRestrictedInt8s)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8s.Value()", nullableRangeRestrictedInt8s.Value(),-20 - )); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8s", nullableRangeRestrictedInt8s)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8s.Value()", nullableRangeRestrictedInt8s.Value(), -20)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteMinValidValueToANullableRangeRestrictedSigned8BitInteger_450() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -75968,55 +57778,41 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableRangeRestrictedInt8sArgument; - nullableRangeRestrictedInt8sArgument.SetNonNull(); - nullableRangeRestrictedInt8sArgument.Value() = -40; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableRangeRestrictedInt8sArgument, this, OnSuccessCallback_450, OnFailureCallback_450)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_450(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableRangeRestrictedInt8sArgument.SetNonNull(); + nullableRangeRestrictedInt8sArgument.Value() = -40; - void OnSuccessResponse_450() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt8sArgument, this, OnSuccessCallback_450, OnFailureCallback_450)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_450(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_450() { NextTest(); } - CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMinValid_451() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_451, OnFailureCallback_451)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_451, OnFailureCallback_451)); + return CHIP_NO_ERROR; } - void OnFailureResponse_451(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_451(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_451( const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) + void OnSuccessResponse_451(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) { - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8s", nullableRangeRestrictedInt8s)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8s.Value()", nullableRangeRestrictedInt8s.Value(),-40 - )); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8s", nullableRangeRestrictedInt8s)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8s.Value()", nullableRangeRestrictedInt8s.Value(), -40)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteMaxValidValueToANullableRangeRestrictedSigned8BitInteger_452() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -76024,55 +57820,41 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableRangeRestrictedInt8sArgument; - nullableRangeRestrictedInt8sArgument.SetNonNull(); - nullableRangeRestrictedInt8sArgument.Value() = 50; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableRangeRestrictedInt8sArgument, this, OnSuccessCallback_452, OnFailureCallback_452)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_452(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableRangeRestrictedInt8sArgument.SetNonNull(); + nullableRangeRestrictedInt8sArgument.Value() = 50; - void OnSuccessResponse_452() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt8sArgument, this, OnSuccessCallback_452, OnFailureCallback_452)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_452(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_452() { NextTest(); } - CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMaxValid_453() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_453, OnFailureCallback_453)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_453, OnFailureCallback_453)); + return CHIP_NO_ERROR; } - void OnFailureResponse_453(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_453(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_453( const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) + void OnSuccessResponse_453(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) { - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8s", nullableRangeRestrictedInt8s)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8s.Value()", nullableRangeRestrictedInt8s.Value(),50 - )); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8s", nullableRangeRestrictedInt8s)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8s.Value()", nullableRangeRestrictedInt8s.Value(), 50)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteMiddleValidValueToANullableRangeRestrictedSigned8BitInteger_454() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -76080,55 +57862,41 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableRangeRestrictedInt8sArgument; - nullableRangeRestrictedInt8sArgument.SetNonNull(); - nullableRangeRestrictedInt8sArgument.Value() = 6; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableRangeRestrictedInt8sArgument, this, OnSuccessCallback_454, OnFailureCallback_454)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_454(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableRangeRestrictedInt8sArgument.SetNonNull(); + nullableRangeRestrictedInt8sArgument.Value() = 6; - void OnSuccessResponse_454() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt8sArgument, this, OnSuccessCallback_454, OnFailureCallback_454)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_454(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_454() { NextTest(); } - CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMidValid_455() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_455, OnFailureCallback_455)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_455, OnFailureCallback_455)); + return CHIP_NO_ERROR; } - void OnFailureResponse_455(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_455(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_455( const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) + void OnSuccessResponse_455(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) { - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8s", nullableRangeRestrictedInt8s)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8s.Value()", nullableRangeRestrictedInt8s.Value(),6 - )); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8s", nullableRangeRestrictedInt8s)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8s.Value()", nullableRangeRestrictedInt8s.Value(), 6)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteNullValueToANullableRangeRestrictedSigned8BitInteger_456() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -76136,81 +57904,61 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableRangeRestrictedInt8sArgument; - nullableRangeRestrictedInt8sArgument.SetNull(); + nullableRangeRestrictedInt8sArgument.SetNull(); - ReturnErrorOnFailure(cluster.WriteAttribute(nullableRangeRestrictedInt8sArgument, this, OnSuccessCallback_456, OnFailureCallback_456)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt8sArgument, this, OnSuccessCallback_456, OnFailureCallback_456)); + return CHIP_NO_ERROR; } - void OnFailureResponse_456(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_456() - { NextTest(); - } - + void OnFailureResponse_456(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_456() { NextTest(); } - CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtNull_457() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_457, OnFailureCallback_457)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_457, OnFailureCallback_457)); + return CHIP_NO_ERROR; } - void OnFailureResponse_457(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_457(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_457( const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) + void OnSuccessResponse_457(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) { - VerifyOrReturn(CheckValueNull("nullableRangeRestrictedInt8s", nullableRangeRestrictedInt8s)); + VerifyOrReturn(CheckValueNull("nullableRangeRestrictedInt8s", nullableRangeRestrictedInt8s)); NextTest(); - } - - - + } - CHIP_ERROR TestReadNullableRangeRestrictedSigned16BitInteger_458() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_458, OnFailureCallback_458)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_458, OnFailureCallback_458)); + return CHIP_NO_ERROR; } - void OnFailureResponse_458(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_458(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_458( const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) + void OnSuccessResponse_458(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) { - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16s", nullableRangeRestrictedInt16s)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16s.Value()", nullableRangeRestrictedInt16s.Value(),-100 - )); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16s", nullableRangeRestrictedInt16s)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16s.Value()", nullableRangeRestrictedInt16s.Value(), -100)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteMinValueToANullableRangeRestrictedSigned16BitInteger_459() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -76218,27 +57966,23 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableRangeRestrictedInt16sArgument; - nullableRangeRestrictedInt16sArgument.SetNonNull(); - nullableRangeRestrictedInt16sArgument.Value() = -32767; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableRangeRestrictedInt16sArgument, this, OnSuccessCallback_459, OnFailureCallback_459)); - return CHIP_NO_ERROR; + nullableRangeRestrictedInt16sArgument.SetNonNull(); + nullableRangeRestrictedInt16sArgument.Value() = -32767; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt16sArgument, this, OnSuccessCallback_459, OnFailureCallback_459)); + return CHIP_NO_ERROR; } void OnFailureResponse_459(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_459() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_459() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestWriteJustBelowRangeValueToANullableRangeRestrictedSigned16BitInteger_460() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -76246,27 +57990,23 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableRangeRestrictedInt16sArgument; - nullableRangeRestrictedInt16sArgument.SetNonNull(); - nullableRangeRestrictedInt16sArgument.Value() = -151; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableRangeRestrictedInt16sArgument, this, OnSuccessCallback_460, OnFailureCallback_460)); - return CHIP_NO_ERROR; + nullableRangeRestrictedInt16sArgument.SetNonNull(); + nullableRangeRestrictedInt16sArgument.Value() = -151; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt16sArgument, this, OnSuccessCallback_460, OnFailureCallback_460)); + return CHIP_NO_ERROR; } void OnFailureResponse_460(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_460() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_460() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestWriteJustAboveRangeValueToANullableRangeRestrictedSigned16BitInteger_461() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -76274,27 +58014,23 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableRangeRestrictedInt16sArgument; - nullableRangeRestrictedInt16sArgument.SetNonNull(); - nullableRangeRestrictedInt16sArgument.Value() = 201; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableRangeRestrictedInt16sArgument, this, OnSuccessCallback_461, OnFailureCallback_461)); - return CHIP_NO_ERROR; + nullableRangeRestrictedInt16sArgument.SetNonNull(); + nullableRangeRestrictedInt16sArgument.Value() = 201; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt16sArgument, this, OnSuccessCallback_461, OnFailureCallback_461)); + return CHIP_NO_ERROR; } void OnFailureResponse_461(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_461() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_461() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestWriteMaxValueToANullableRangeRestrictedSigned16BitInteger_462() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -76302,56 +58038,45 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableRangeRestrictedInt16sArgument; - nullableRangeRestrictedInt16sArgument.SetNonNull(); - nullableRangeRestrictedInt16sArgument.Value() = 32767; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableRangeRestrictedInt16sArgument, this, OnSuccessCallback_462, OnFailureCallback_462)); - return CHIP_NO_ERROR; + nullableRangeRestrictedInt16sArgument.SetNonNull(); + nullableRangeRestrictedInt16sArgument.Value() = 32767; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt16sArgument, this, OnSuccessCallback_462, OnFailureCallback_462)); + return CHIP_NO_ERROR; } void OnFailureResponse_462(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_462() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_462() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueHasNotChanged_463() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_463, OnFailureCallback_463)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_463, OnFailureCallback_463)); + return CHIP_NO_ERROR; } - void OnFailureResponse_463(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_463(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_463( const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) + void OnSuccessResponse_463(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) { - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16s", nullableRangeRestrictedInt16s)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16s.Value()", nullableRangeRestrictedInt16s.Value(),-100 - )); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16s", nullableRangeRestrictedInt16s)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16s.Value()", nullableRangeRestrictedInt16s.Value(), -100)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteMinValidValueToANullableRangeRestrictedSigned16BitInteger_464() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -76359,55 +58084,41 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableRangeRestrictedInt16sArgument; - nullableRangeRestrictedInt16sArgument.SetNonNull(); - nullableRangeRestrictedInt16sArgument.Value() = -150; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableRangeRestrictedInt16sArgument, this, OnSuccessCallback_464, OnFailureCallback_464)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_464(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableRangeRestrictedInt16sArgument.SetNonNull(); + nullableRangeRestrictedInt16sArgument.Value() = -150; - void OnSuccessResponse_464() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt16sArgument, this, OnSuccessCallback_464, OnFailureCallback_464)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_464(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_464() { NextTest(); } - CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMinValid_465() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_465, OnFailureCallback_465)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_465, OnFailureCallback_465)); + return CHIP_NO_ERROR; } - void OnFailureResponse_465(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_465(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_465( const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) + void OnSuccessResponse_465(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) { - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16s", nullableRangeRestrictedInt16s)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16s.Value()", nullableRangeRestrictedInt16s.Value(),-150 - )); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16s", nullableRangeRestrictedInt16s)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16s.Value()", nullableRangeRestrictedInt16s.Value(), -150)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteMaxValidValueToANullableRangeRestrictedSigned16BitInteger_466() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -76415,55 +58126,41 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableRangeRestrictedInt16sArgument; - nullableRangeRestrictedInt16sArgument.SetNonNull(); - nullableRangeRestrictedInt16sArgument.Value() = 200; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableRangeRestrictedInt16sArgument, this, OnSuccessCallback_466, OnFailureCallback_466)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_466(EmberAfStatus status) - { - ThrowFailureResponse(); - } + nullableRangeRestrictedInt16sArgument.SetNonNull(); + nullableRangeRestrictedInt16sArgument.Value() = 200; - void OnSuccessResponse_466() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt16sArgument, this, OnSuccessCallback_466, OnFailureCallback_466)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_466(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_466() { NextTest(); } - CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMaxValid_467() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_467, OnFailureCallback_467)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_467, OnFailureCallback_467)); + return CHIP_NO_ERROR; } - void OnFailureResponse_467(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_467(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_467( const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) + void OnSuccessResponse_467(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) { - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16s", nullableRangeRestrictedInt16s)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16s.Value()", nullableRangeRestrictedInt16s.Value(),200 - )); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16s", nullableRangeRestrictedInt16s)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16s.Value()", nullableRangeRestrictedInt16s.Value(), 200)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteMiddleValidValueToANullableRangeRestrictedSigned16BitInteger_468() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -76471,55 +58168,41 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableRangeRestrictedInt16sArgument; - nullableRangeRestrictedInt16sArgument.SetNonNull(); - nullableRangeRestrictedInt16sArgument.Value() = 7; - - ReturnErrorOnFailure(cluster.WriteAttribute(nullableRangeRestrictedInt16sArgument, this, OnSuccessCallback_468, OnFailureCallback_468)); - return CHIP_NO_ERROR; - } + nullableRangeRestrictedInt16sArgument.SetNonNull(); + nullableRangeRestrictedInt16sArgument.Value() = 7; - void OnFailureResponse_468(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_468() - { NextTest(); - } + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt16sArgument, this, OnSuccessCallback_468, OnFailureCallback_468)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_468(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_468() { NextTest(); } - CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMidValid_469() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_469, OnFailureCallback_469)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_469, OnFailureCallback_469)); + return CHIP_NO_ERROR; } - void OnFailureResponse_469(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_469(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_469( const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) + void OnSuccessResponse_469(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) { - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16s", nullableRangeRestrictedInt16s)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16s.Value()", nullableRangeRestrictedInt16s.Value(),7 - )); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16s", nullableRangeRestrictedInt16s)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16s.Value()", nullableRangeRestrictedInt16s.Value(), 7)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteNullValueToANullableRangeRestrictedSigned16BitInteger_470() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -76527,464 +58210,352 @@ class TestCluster: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::app::DataModel::Nullable nullableRangeRestrictedInt16sArgument; - nullableRangeRestrictedInt16sArgument.SetNull(); + nullableRangeRestrictedInt16sArgument.SetNull(); - ReturnErrorOnFailure(cluster.WriteAttribute(nullableRangeRestrictedInt16sArgument, this, OnSuccessCallback_470, OnFailureCallback_470)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt16sArgument, this, OnSuccessCallback_470, OnFailureCallback_470)); + return CHIP_NO_ERROR; } - void OnFailureResponse_470(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_470() - { NextTest(); - } - + void OnFailureResponse_470(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_470() { NextTest(); } - CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsNull_471() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_471, OnFailureCallback_471)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_471, OnFailureCallback_471)); + return CHIP_NO_ERROR; } - void OnFailureResponse_471(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_471(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_471( const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) + void OnSuccessResponse_471(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) { - VerifyOrReturn(CheckValueNull("nullableRangeRestrictedInt16s", nullableRangeRestrictedInt16s)); + VerifyOrReturn(CheckValueNull("nullableRangeRestrictedInt16s", nullableRangeRestrictedInt16s)); NextTest(); - } - - - }; + } +}; -class TestClusterComplexTypes: public TestCommand +class TestClusterComplexTypes : public TestCommand { - public: - TestClusterComplexTypes(): TestCommand("TestClusterComplexTypes"), mTestIndex(0) +public: + TestClusterComplexTypes() : TestCommand("TestClusterComplexTypes"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~TestClusterComplexTypes() - { - } + ~TestClusterComplexTypes() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: TestClusterComplexTypes\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: TestClusterComplexTypes\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: TestClusterComplexTypes\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: TestClusterComplexTypes\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Send Test Command with optional arg set to null.\n"); - err = TestSendTestCommandWithOptionalArgSetToNull_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Send Test Command with optional arg set to null.\n"); + err = TestSendTestCommandWithOptionalArgSetToNull_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Send command that needs timed invoke without a timeout value\n"); - err = TestSendCommandThatNeedsTimedInvokeWithoutATimeoutValue_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Send command that needs timed invoke without a timeout value\n"); + err = TestSendCommandThatNeedsTimedInvokeWithoutATimeoutValue_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Send command that needs timed invoke with a long timeout value\n"); - err = TestSendCommandThatNeedsTimedInvokeWithALongTimeoutValue_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Send command that needs timed invoke with a long timeout value\n"); + err = TestSendCommandThatNeedsTimedInvokeWithALongTimeoutValue_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Send command that needs timed invoke with a too-short timeout value\n"); - err = TestSendCommandThatNeedsTimedInvokeWithATooShortTimeoutValue_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Send command that needs timed invoke with a too-short timeout value\n"); + err = TestSendCommandThatNeedsTimedInvokeWithATooShortTimeoutValue_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Send command that does not need timed invoke with a long timeout value\n"); - err = TestSendCommandThatDoesNotNeedTimedInvokeWithALongTimeoutValue_5(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 5 : Send command that does not need timed invoke with a long timeout value\n"); + err = TestSendCommandThatDoesNotNeedTimedInvokeWithALongTimeoutValue_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Send command that does not need timed invoke with a too-short timeout value\n"); - err = TestSendCommandThatDoesNotNeedTimedInvokeWithATooShortTimeoutValue_6(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 6 : Send command that does not need timed invoke with a too-short timeout value\n"); + err = TestSendCommandThatDoesNotNeedTimedInvokeWithATooShortTimeoutValue_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read attribute that needs timed write initial state\n"); - err = TestReadAttributeThatNeedsTimedWriteInitialState_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : Read attribute that needs timed write initial state\n"); + err = TestReadAttributeThatNeedsTimedWriteInitialState_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Write attribute that needs timed write without a timeout value\n"); - err = TestWriteAttributeThatNeedsTimedWriteWithoutATimeoutValue_8(); - break; + ChipLogProgress(chipTool, " ***** Test Step 8 : Write attribute that needs timed write without a timeout value\n"); + err = TestWriteAttributeThatNeedsTimedWriteWithoutATimeoutValue_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read attribute that needs timed write state unchanged 1\n"); - err = TestReadAttributeThatNeedsTimedWriteStateUnchanged1_9(); - break; + ChipLogProgress(chipTool, " ***** Test Step 9 : Read attribute that needs timed write state unchanged 1\n"); + err = TestReadAttributeThatNeedsTimedWriteStateUnchanged1_9(); + break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Write attribute that needs timed write with a too-short timeout value\n"); - err = TestWriteAttributeThatNeedsTimedWriteWithATooShortTimeoutValue_10(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 10 : Write attribute that needs timed write with a too-short timeout value\n"); + err = TestWriteAttributeThatNeedsTimedWriteWithATooShortTimeoutValue_10(); + break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read attribute that needs timed write state unchanged 2\n"); - err = TestReadAttributeThatNeedsTimedWriteStateUnchanged2_11(); - break; + ChipLogProgress(chipTool, " ***** Test Step 11 : Read attribute that needs timed write state unchanged 2\n"); + err = TestReadAttributeThatNeedsTimedWriteStateUnchanged2_11(); + break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Write attribute that needs timed write with a long timeout value\n"); - err = TestWriteAttributeThatNeedsTimedWriteWithALongTimeoutValue_12(); - break; + ChipLogProgress(chipTool, " ***** Test Step 12 : Write attribute that needs timed write with a long timeout value\n"); + err = TestWriteAttributeThatNeedsTimedWriteWithALongTimeoutValue_12(); + break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read attribute that needs timed write state changed\n"); - err = TestReadAttributeThatNeedsTimedWriteStateChanged_13(); - break; + ChipLogProgress(chipTool, " ***** Test Step 13 : Read attribute that needs timed write state changed\n"); + err = TestReadAttributeThatNeedsTimedWriteStateChanged_13(); + break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Write attribute that needs timed write reset to default\n"); - err = TestWriteAttributeThatNeedsTimedWriteResetToDefault_14(); - break; + ChipLogProgress(chipTool, " ***** Test Step 14 : Write attribute that needs timed write reset to default\n"); + err = TestWriteAttributeThatNeedsTimedWriteResetToDefault_14(); + break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read attribute that does not need timed write initial value\n"); - err = TestReadAttributeThatDoesNotNeedTimedWriteInitialValue_15(); - break; + ChipLogProgress(chipTool, " ***** Test Step 15 : Read attribute that does not need timed write initial value\n"); + err = TestReadAttributeThatDoesNotNeedTimedWriteInitialValue_15(); + break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Write attribute that does not need timed write with a too-short timeout value\n"); - err = TestWriteAttributeThatDoesNotNeedTimedWriteWithATooShortTimeoutValue_16(); - break; + ChipLogProgress( + chipTool, " ***** Test Step 16 : Write attribute that does not need timed write with a too-short timeout value\n"); + err = TestWriteAttributeThatDoesNotNeedTimedWriteWithATooShortTimeoutValue_16(); + break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Read attribute that does not need timed write unchanged value\n"); - err = TestReadAttributeThatDoesNotNeedTimedWriteUnchangedValue_17(); - break; + ChipLogProgress(chipTool, " ***** Test Step 17 : Read attribute that does not need timed write unchanged value\n"); + err = TestReadAttributeThatDoesNotNeedTimedWriteUnchangedValue_17(); + break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Write attribute that does not need timed write with a long timeout value\n"); - err = TestWriteAttributeThatDoesNotNeedTimedWriteWithALongTimeoutValue_18(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 18 : Write attribute that does not need timed write with a long timeout value\n"); + err = TestWriteAttributeThatDoesNotNeedTimedWriteWithALongTimeoutValue_18(); + break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Read attribute that does not need timed write changed value\n"); - err = TestReadAttributeThatDoesNotNeedTimedWriteChangedValue_19(); - break; + ChipLogProgress(chipTool, " ***** Test Step 19 : Read attribute that does not need timed write changed value\n"); + err = TestReadAttributeThatDoesNotNeedTimedWriteChangedValue_19(); + break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Write attribute that does not need timed write reset to default\n"); - err = TestWriteAttributeThatDoesNotNeedTimedWriteResetToDefault_20(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 20 : Write attribute that does not need timed write reset to default\n"); + err = TestWriteAttributeThatDoesNotNeedTimedWriteResetToDefault_20(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 21; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context, bool timedWriteBoolean) + static void OnSuccessCallback_7(void * context, bool timedWriteBoolean) { (static_cast(context))->OnSuccessResponse_7(timedWriteBoolean); } - - - static void OnFailureCallback_8(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context) - { - (static_cast(context))->OnSuccessResponse_8(); - } - - - + static void OnSuccessCallback_8(void * context) { (static_cast(context))->OnSuccessResponse_8(); } static void OnFailureCallback_9(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_9(status); } - static void OnSuccessCallback_9(void * context, bool timedWriteBoolean) + static void OnSuccessCallback_9(void * context, bool timedWriteBoolean) { (static_cast(context))->OnSuccessResponse_9(timedWriteBoolean); } - - - static void OnFailureCallback_10(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_10(status); } - static void OnSuccessCallback_10(void * context) - { - (static_cast(context))->OnSuccessResponse_10(); - } - - - + static void OnSuccessCallback_10(void * context) { (static_cast(context))->OnSuccessResponse_10(); } static void OnFailureCallback_11(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_11(status); } - static void OnSuccessCallback_11(void * context, bool timedWriteBoolean) + static void OnSuccessCallback_11(void * context, bool timedWriteBoolean) { (static_cast(context))->OnSuccessResponse_11(timedWriteBoolean); } - - - static void OnFailureCallback_12(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_12(status); } - static void OnSuccessCallback_12(void * context) - { - (static_cast(context))->OnSuccessResponse_12(); - } - - - + static void OnSuccessCallback_12(void * context) { (static_cast(context))->OnSuccessResponse_12(); } static void OnFailureCallback_13(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_13(status); } - static void OnSuccessCallback_13(void * context, bool timedWriteBoolean) + static void OnSuccessCallback_13(void * context, bool timedWriteBoolean) { (static_cast(context))->OnSuccessResponse_13(timedWriteBoolean); } - - - static void OnFailureCallback_14(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_14(status); } - static void OnSuccessCallback_14(void * context) - { - (static_cast(context))->OnSuccessResponse_14(); - } - - - + static void OnSuccessCallback_14(void * context) { (static_cast(context))->OnSuccessResponse_14(); } static void OnFailureCallback_15(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_15(status); } - static void OnSuccessCallback_15(void * context, bool boolean) + static void OnSuccessCallback_15(void * context, bool boolean) { (static_cast(context))->OnSuccessResponse_15(boolean); } - - - static void OnFailureCallback_16(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_16(status); } - static void OnSuccessCallback_16(void * context) - { - (static_cast(context))->OnSuccessResponse_16(); - } - - - + static void OnSuccessCallback_16(void * context) { (static_cast(context))->OnSuccessResponse_16(); } static void OnFailureCallback_17(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_17(status); } - static void OnSuccessCallback_17(void * context, bool boolean) + static void OnSuccessCallback_17(void * context, bool boolean) { (static_cast(context))->OnSuccessResponse_17(boolean); } - - - static void OnFailureCallback_18(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_18(status); } - static void OnSuccessCallback_18(void * context) - { - (static_cast(context))->OnSuccessResponse_18(); - } - - - + static void OnSuccessCallback_18(void * context) { (static_cast(context))->OnSuccessResponse_18(); } static void OnFailureCallback_19(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_19(status); } - static void OnSuccessCallback_19(void * context, bool boolean) + static void OnSuccessCallback_19(void * context, bool boolean) { (static_cast(context))->OnSuccessResponse_19(boolean); } - - - static void OnFailureCallback_20(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_20(status); } - static void OnSuccessCallback_20(void * context) - { - (static_cast(context))->OnSuccessResponse_20(); - } - - - + static void OnSuccessCallback_20(void * context) { (static_cast(context))->OnSuccessResponse_20(); } // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestSendTestCommandWithOptionalArgSetToNull_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type; RequestType request; - request.arg1.Emplace(); - request.arg1.Value().SetNull(); + request.arg1.Emplace(); + request.arg1.Value().SetNull(); auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_1(data.wasPresent, data.wasNull, data.value, data.originalValue); + (static_cast(context)) + ->OnSuccessResponse_1(data.wasPresent, data.wasNull, data.value, data.originalValue); }; auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( bool wasPresent, const chip::Optional & wasNull, const chip::Optional & value, const chip::Optional> & originalValue) + void OnSuccessResponse_1(bool wasPresent, const chip::Optional & wasNull, const chip::Optional & value, + const chip::Optional> & originalValue) { - VerifyOrReturn(CheckValue("wasPresent", wasPresent,true - )); - - - VerifyOrReturn(CheckValuePresent("wasNull", wasNull)); - VerifyOrReturn(CheckValue("wasNull.Value()", wasNull.Value(),true - )); - + VerifyOrReturn(CheckValue("wasPresent", wasPresent, true)); + VerifyOrReturn(CheckValuePresent("wasNull", wasNull)); + VerifyOrReturn(CheckValue("wasNull.Value()", wasNull.Value(), true)); - - VerifyOrReturn(CheckValuePresent("originalValue", originalValue)); - VerifyOrReturn(CheckValueNull("originalValue.Value()", originalValue.Value())); + VerifyOrReturn(CheckValuePresent("originalValue", originalValue)); + VerifyOrReturn(CheckValueNull("originalValue.Value()", originalValue.Value())); NextTest(); - } - - - + } - CHIP_ERROR TestSendCommandThatNeedsTimedInvokeWithoutATimeoutValue_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TimedInvokeRequest::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TimedInvokeRequest::Type; RequestType request; @@ -76996,32 +58567,23 @@ class TestClusterComplexTypes: public TestCommand (static_cast(context))->OnFailureResponse_2(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - , chip::NullOptional - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request, + chip::NullOptional)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_NEEDS_TIMED_INTERACTION)); - NextTest(); - } - - void OnSuccessResponse_2() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_NEEDS_TIMED_INTERACTION)); + NextTest(); } + void OnSuccessResponse_2() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestSendCommandThatNeedsTimedInvokeWithALongTimeoutValue_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TimedInvokeRequest::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TimedInvokeRequest::Type; RequestType request; @@ -77033,31 +58595,19 @@ class TestClusterComplexTypes: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - , 10000 - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request, 10000)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_3() - { NextTest(); - } - + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_3() { NextTest(); } - CHIP_ERROR TestSendCommandThatNeedsTimedInvokeWithATooShortTimeoutValue_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TimedInvokeRequest::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TimedInvokeRequest::Type; RequestType request; @@ -77069,39 +58619,31 @@ class TestClusterComplexTypes: public TestCommand (static_cast(context))->OnFailureResponse_4(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - , 1 - )); - { - using namespace chip::System::Clock::Literals; - // Busy-wait for 100 milliseconds. - auto & clock = chip::System::SystemClock(); - auto start = clock.GetMonotonicTimestamp(); - while (clock.GetMonotonicTimestamp() - start < 100_ms); - } - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request, 1)); + { + using namespace chip::System::Clock::Literals; + // Busy-wait for 100 milliseconds. + auto & clock = chip::System::SystemClock(); + auto start = clock.GetMonotonicTimestamp(); + while (clock.GetMonotonicTimestamp() - start < 100_ms) + ; + } + return CHIP_NO_ERROR; } void OnFailureResponse_4(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - NextTest(); - } - - void OnSuccessResponse_4() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); + NextTest(); } + void OnSuccessResponse_4() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestSendCommandThatDoesNotNeedTimedInvokeWithALongTimeoutValue_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::Test::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::Test::Type; RequestType request; @@ -77113,31 +58655,19 @@ class TestClusterComplexTypes: public TestCommand (static_cast(context))->OnFailureResponse_5(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - , 10000 - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request, 10000)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_5() - { NextTest(); - } - + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_5() { NextTest(); } - CHIP_ERROR TestSendCommandThatDoesNotNeedTimedInvokeWithATooShortTimeoutValue_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::Test::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::Test::Type; RequestType request; @@ -77149,63 +58679,47 @@ class TestClusterComplexTypes: public TestCommand (static_cast(context))->OnFailureResponse_6(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - , 1 - )); - { - using namespace chip::System::Clock::Literals; - // Busy-wait for 100 milliseconds. - auto & clock = chip::System::SystemClock(); - auto start = clock.GetMonotonicTimestamp(); - while (clock.GetMonotonicTimestamp() - start < 100_ms); - } - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request, 1)); + { + using namespace chip::System::Clock::Literals; + // Busy-wait for 100 milliseconds. + auto & clock = chip::System::SystemClock(); + auto start = clock.GetMonotonicTimestamp(); + while (clock.GetMonotonicTimestamp() - start < 100_ms) + ; + } + return CHIP_NO_ERROR; } void OnFailureResponse_6(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - NextTest(); - } - - void OnSuccessResponse_6() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); + NextTest(); } + void OnSuccessResponse_6() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadAttributeThatNeedsTimedWriteInitialState_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_7, OnFailureCallback_7)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7( bool timedWriteBoolean) + void OnSuccessResponse_7(bool timedWriteBoolean) { - VerifyOrReturn(CheckValue("timedWriteBoolean", timedWriteBoolean,false - )); + VerifyOrReturn(CheckValue("timedWriteBoolean", timedWriteBoolean, false)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeThatNeedsTimedWriteWithoutATimeoutValue_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -77213,55 +58727,41 @@ class TestClusterComplexTypes: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); bool timedWriteBooleanArgument; - timedWriteBooleanArgument = true; - - ReturnErrorOnFailure(cluster.WriteAttribute(timedWriteBooleanArgument, this, OnSuccessCallback_8, OnFailureCallback_8 , chip::NullOptional - )); - return CHIP_NO_ERROR; + timedWriteBooleanArgument = true; + + ReturnErrorOnFailure(cluster.WriteAttribute( + timedWriteBooleanArgument, this, OnSuccessCallback_8, OnFailureCallback_8, chip::NullOptional)); + return CHIP_NO_ERROR; } void OnFailureResponse_8(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_NEEDS_TIMED_INTERACTION)); - NextTest(); - } - - void OnSuccessResponse_8() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_NEEDS_TIMED_INTERACTION)); + NextTest(); } + void OnSuccessResponse_8() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadAttributeThatNeedsTimedWriteStateUnchanged1_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_9, OnFailureCallback_9)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_9, OnFailureCallback_9)); + return CHIP_NO_ERROR; } - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_9( bool timedWriteBoolean) + void OnSuccessResponse_9(bool timedWriteBoolean) { - VerifyOrReturn(CheckValue("timedWriteBoolean", timedWriteBoolean,false - )); + VerifyOrReturn(CheckValue("timedWriteBoolean", timedWriteBoolean, false)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeThatNeedsTimedWriteWithATooShortTimeoutValue_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -77269,62 +58769,49 @@ class TestClusterComplexTypes: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); bool timedWriteBooleanArgument; - timedWriteBooleanArgument = true; - - ReturnErrorOnFailure(cluster.WriteAttribute(timedWriteBooleanArgument, this, OnSuccessCallback_10, OnFailureCallback_10 , 1 -)); - { - using namespace chip::System::Clock::Literals; - // Busy-wait for 100 milliseconds. - auto & clock = chip::System::SystemClock(); - auto start = clock.GetMonotonicTimestamp(); - while (clock.GetMonotonicTimestamp() - start < 100_ms); - } - return CHIP_NO_ERROR; + timedWriteBooleanArgument = true; + + ReturnErrorOnFailure(cluster.WriteAttribute( + timedWriteBooleanArgument, this, OnSuccessCallback_10, OnFailureCallback_10, 1)); + { + using namespace chip::System::Clock::Literals; + // Busy-wait for 100 milliseconds. + auto & clock = chip::System::SystemClock(); + auto start = clock.GetMonotonicTimestamp(); + while (clock.GetMonotonicTimestamp() - start < 100_ms) + ; + } + return CHIP_NO_ERROR; } void OnFailureResponse_10(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - NextTest(); - } - - void OnSuccessResponse_10() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); + NextTest(); } + void OnSuccessResponse_10() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadAttributeThatNeedsTimedWriteStateUnchanged2_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_11, OnFailureCallback_11)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_11, OnFailureCallback_11)); + return CHIP_NO_ERROR; } - void OnFailureResponse_11(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_11( bool timedWriteBoolean) + void OnSuccessResponse_11(bool timedWriteBoolean) { - VerifyOrReturn(CheckValue("timedWriteBoolean", timedWriteBoolean,false - )); + VerifyOrReturn(CheckValue("timedWriteBoolean", timedWriteBoolean, false)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeThatNeedsTimedWriteWithALongTimeoutValue_12() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -77332,54 +58819,37 @@ class TestClusterComplexTypes: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); bool timedWriteBooleanArgument; - timedWriteBooleanArgument = true; - - ReturnErrorOnFailure(cluster.WriteAttribute(timedWriteBooleanArgument, this, OnSuccessCallback_12, OnFailureCallback_12 , 10000 -)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_12(EmberAfStatus status) - { - ThrowFailureResponse(); - } + timedWriteBooleanArgument = true; - void OnSuccessResponse_12() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + timedWriteBooleanArgument, this, OnSuccessCallback_12, OnFailureCallback_12, 10000)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_12() { NextTest(); } - CHIP_ERROR TestReadAttributeThatNeedsTimedWriteStateChanged_13() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_13, OnFailureCallback_13)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_13, OnFailureCallback_13)); + return CHIP_NO_ERROR; } - void OnFailureResponse_13(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_13(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_13( bool timedWriteBoolean) + void OnSuccessResponse_13(bool timedWriteBoolean) { - VerifyOrReturn(CheckValue("timedWriteBoolean", timedWriteBoolean,true - )); + VerifyOrReturn(CheckValue("timedWriteBoolean", timedWriteBoolean, true)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeThatNeedsTimedWriteResetToDefault_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -77387,54 +58857,37 @@ class TestClusterComplexTypes: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); bool timedWriteBooleanArgument; - timedWriteBooleanArgument = false; - - ReturnErrorOnFailure(cluster.WriteAttribute(timedWriteBooleanArgument, this, OnSuccessCallback_14, OnFailureCallback_14 , 10000 -)); - return CHIP_NO_ERROR; - } + timedWriteBooleanArgument = false; - void OnFailureResponse_14(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_14() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + timedWriteBooleanArgument, this, OnSuccessCallback_14, OnFailureCallback_14, 10000)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_14() { NextTest(); } - CHIP_ERROR TestReadAttributeThatDoesNotNeedTimedWriteInitialValue_15() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_15, OnFailureCallback_15)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_15, OnFailureCallback_15)); + return CHIP_NO_ERROR; } - void OnFailureResponse_15(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_15(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_15( bool boolean) + void OnSuccessResponse_15(bool boolean) { - VerifyOrReturn(CheckValue("boolean", boolean,false - )); + VerifyOrReturn(CheckValue("boolean", boolean, false)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeThatDoesNotNeedTimedWriteWithATooShortTimeoutValue_16() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -77442,62 +58895,49 @@ class TestClusterComplexTypes: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); bool booleanArgument; - booleanArgument = true; - - ReturnErrorOnFailure(cluster.WriteAttribute(booleanArgument, this, OnSuccessCallback_16, OnFailureCallback_16 , 1 -)); - { - using namespace chip::System::Clock::Literals; - // Busy-wait for 100 milliseconds. - auto & clock = chip::System::SystemClock(); - auto start = clock.GetMonotonicTimestamp(); - while (clock.GetMonotonicTimestamp() - start < 100_ms); - } - return CHIP_NO_ERROR; + booleanArgument = true; + + ReturnErrorOnFailure(cluster.WriteAttribute( + booleanArgument, this, OnSuccessCallback_16, OnFailureCallback_16, 1)); + { + using namespace chip::System::Clock::Literals; + // Busy-wait for 100 milliseconds. + auto & clock = chip::System::SystemClock(); + auto start = clock.GetMonotonicTimestamp(); + while (clock.GetMonotonicTimestamp() - start < 100_ms) + ; + } + return CHIP_NO_ERROR; } void OnFailureResponse_16(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - NextTest(); - } - - void OnSuccessResponse_16() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); + NextTest(); } + void OnSuccessResponse_16() { ThrowSuccessResponse(); } - - - CHIP_ERROR TestReadAttributeThatDoesNotNeedTimedWriteUnchangedValue_17() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_17, OnFailureCallback_17)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_17, OnFailureCallback_17)); + return CHIP_NO_ERROR; } - void OnFailureResponse_17(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_17(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_17( bool boolean) + void OnSuccessResponse_17(bool boolean) { - VerifyOrReturn(CheckValue("boolean", boolean,false - )); + VerifyOrReturn(CheckValue("boolean", boolean, false)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeThatDoesNotNeedTimedWriteWithALongTimeoutValue_18() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -77505,54 +58945,37 @@ class TestClusterComplexTypes: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); bool booleanArgument; - booleanArgument = true; - - ReturnErrorOnFailure(cluster.WriteAttribute(booleanArgument, this, OnSuccessCallback_18, OnFailureCallback_18 , 10000 -)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_18(EmberAfStatus status) - { - ThrowFailureResponse(); - } + booleanArgument = true; - void OnSuccessResponse_18() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + booleanArgument, this, OnSuccessCallback_18, OnFailureCallback_18, 10000)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_18(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_18() { NextTest(); } - CHIP_ERROR TestReadAttributeThatDoesNotNeedTimedWriteChangedValue_19() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_19, OnFailureCallback_19)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_19, OnFailureCallback_19)); + return CHIP_NO_ERROR; } - void OnFailureResponse_19(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_19(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_19( bool boolean) + void OnSuccessResponse_19(bool boolean) { - VerifyOrReturn(CheckValue("boolean", boolean,true - )); + VerifyOrReturn(CheckValue("boolean", boolean, true)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeThatDoesNotNeedTimedWriteResetToDefault_20() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -77560,476 +58983,354 @@ class TestClusterComplexTypes: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); bool booleanArgument; - booleanArgument = false; - - ReturnErrorOnFailure(cluster.WriteAttribute(booleanArgument, this, OnSuccessCallback_20, OnFailureCallback_20)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_20(EmberAfStatus status) - { - ThrowFailureResponse(); - } + booleanArgument = false; - void OnSuccessResponse_20() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + booleanArgument, this, OnSuccessCallback_20, OnFailureCallback_20)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_20(EmberAfStatus status) { ThrowFailureResponse(); } - }; + void OnSuccessResponse_20() { NextTest(); } +}; -class TestConstraints: public TestCommand +class TestConstraints : public TestCommand { - public: - TestConstraints(): TestCommand("TestConstraints"), mTestIndex(0) +public: + TestConstraints() : TestCommand("TestConstraints"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~TestConstraints() - { - } + ~TestConstraints() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: TestConstraints\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: TestConstraints\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: TestConstraints\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: TestConstraints\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Write attribute INT32U Value\n"); - err = TestWriteAttributeInt32uValue_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Write attribute INT32U Value\n"); + err = TestWriteAttributeInt32uValue_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute INT32U Value MinValue Constraints\n"); - err = TestReadAttributeInt32uValueMinValueConstraints_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute INT32U Value MinValue Constraints\n"); + err = TestReadAttributeInt32uValueMinValueConstraints_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read attribute INT32U Value MaxValue Constraints\n"); - err = TestReadAttributeInt32uValueMaxValueConstraints_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Read attribute INT32U Value MaxValue Constraints\n"); + err = TestReadAttributeInt32uValueMaxValueConstraints_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read attribute INT32U Value NotValue Constraints\n"); - err = TestReadAttributeInt32uValueNotValueConstraints_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Read attribute INT32U Value NotValue Constraints\n"); + err = TestReadAttributeInt32uValueNotValueConstraints_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Write attribute INT32U Value Back to Default Value\n"); - err = TestWriteAttributeInt32uValueBackToDefaultValue_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Write attribute INT32U Value Back to Default Value\n"); + err = TestWriteAttributeInt32uValueBackToDefaultValue_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Write attribute CHAR_STRING Value\n"); - err = TestWriteAttributeCharStringValue_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : Write attribute CHAR_STRING Value\n"); + err = TestWriteAttributeCharStringValue_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read attribute CHAR_STRING Value MinLength Constraints\n"); - err = TestReadAttributeCharStringValueMinLengthConstraints_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : Read attribute CHAR_STRING Value MinLength Constraints\n"); + err = TestReadAttributeCharStringValueMinLengthConstraints_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read attribute CHAR_STRING Value MaxLength Constraints\n"); - err = TestReadAttributeCharStringValueMaxLengthConstraints_8(); - break; + ChipLogProgress(chipTool, " ***** Test Step 8 : Read attribute CHAR_STRING Value MaxLength Constraints\n"); + err = TestReadAttributeCharStringValueMaxLengthConstraints_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read attribute CHAR_STRING Value StartsWith Constraints\n"); - err = TestReadAttributeCharStringValueStartsWithConstraints_9(); - break; + ChipLogProgress(chipTool, " ***** Test Step 9 : Read attribute CHAR_STRING Value StartsWith Constraints\n"); + err = TestReadAttributeCharStringValueStartsWithConstraints_9(); + break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read attribute CHAR_STRING Value EndsWith Constraints\n"); - err = TestReadAttributeCharStringValueEndsWithConstraints_10(); - break; + ChipLogProgress(chipTool, " ***** Test Step 10 : Read attribute CHAR_STRING Value EndsWith Constraints\n"); + err = TestReadAttributeCharStringValueEndsWithConstraints_10(); + break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Write attribute CHAR_STRING Value\n"); - err = TestWriteAttributeCharStringValue_11(); - break; + ChipLogProgress(chipTool, " ***** Test Step 11 : Write attribute CHAR_STRING Value\n"); + err = TestWriteAttributeCharStringValue_11(); + break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints\n"); - err = TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_12(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 12 : Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints\n"); + err = TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_12(); + break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Write attribute CHAR_STRING Value\n"); - err = TestWriteAttributeCharStringValue_13(); - break; + ChipLogProgress(chipTool, " ***** Test Step 13 : Write attribute CHAR_STRING Value\n"); + err = TestWriteAttributeCharStringValue_13(); + break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints\n"); - err = TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_14(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 14 : Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints\n"); + err = TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_14(); + break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Write attribute CHAR_STRING Value\n"); - err = TestWriteAttributeCharStringValue_15(); - break; + ChipLogProgress(chipTool, " ***** Test Step 15 : Write attribute CHAR_STRING Value\n"); + err = TestWriteAttributeCharStringValue_15(); + break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints\n"); - err = TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_16(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 16 : Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints\n"); + err = TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_16(); + break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Write attribute CHAR_STRING Value\n"); - err = TestWriteAttributeCharStringValue_17(); - break; + ChipLogProgress(chipTool, " ***** Test Step 17 : Write attribute CHAR_STRING Value\n"); + err = TestWriteAttributeCharStringValue_17(); + break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Read attribute CHAR_STRING Value isHexString Constraints\n"); - err = TestReadAttributeCharStringValueIsHexStringConstraints_18(); - break; + ChipLogProgress(chipTool, " ***** Test Step 18 : Read attribute CHAR_STRING Value isHexString Constraints\n"); + err = TestReadAttributeCharStringValueIsHexStringConstraints_18(); + break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Write attribute CHAR_STRING Value\n"); - err = TestWriteAttributeCharStringValue_19(); - break; + ChipLogProgress(chipTool, " ***** Test Step 19 : Write attribute CHAR_STRING Value\n"); + err = TestWriteAttributeCharStringValue_19(); + break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Read attribute CHAR_STRING Value isHexString Constraints\n"); - err = TestReadAttributeCharStringValueIsHexStringConstraints_20(); - break; + ChipLogProgress(chipTool, " ***** Test Step 20 : Read attribute CHAR_STRING Value isHexString Constraints\n"); + err = TestReadAttributeCharStringValueIsHexStringConstraints_20(); + break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Write attribute CHAR_STRING Value Back to Default Value\n"); - err = TestWriteAttributeCharStringValueBackToDefaultValue_21(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 21 : Write attribute CHAR_STRING Value Back to Default Value\n"); + err = TestWriteAttributeCharStringValueBackToDefaultValue_21(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 22; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context) - { - (static_cast(context))->OnSuccessResponse_1(); - } - - - + static void OnSuccessCallback_1(void * context) { (static_cast(context))->OnSuccessResponse_1(); } static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint32_t int32u) + static void OnSuccessCallback_2(void * context, uint32_t int32u) { (static_cast(context))->OnSuccessResponse_2(int32u); } - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, uint32_t int32u) + static void OnSuccessCallback_3(void * context, uint32_t int32u) { (static_cast(context))->OnSuccessResponse_3(int32u); } - - - static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, uint32_t int32u) + static void OnSuccessCallback_4(void * context, uint32_t int32u) { (static_cast(context))->OnSuccessResponse_4(int32u); } - - - static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context) - { - (static_cast(context))->OnSuccessResponse_5(); - } - - - + static void OnSuccessCallback_5(void * context) { (static_cast(context))->OnSuccessResponse_5(); } static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context) - { - (static_cast(context))->OnSuccessResponse_6(); - } - - - + static void OnSuccessCallback_6(void * context) { (static_cast(context))->OnSuccessResponse_6(); } static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context, chip::CharSpan charString) + static void OnSuccessCallback_7(void * context, chip::CharSpan charString) { (static_cast(context))->OnSuccessResponse_7(charString); } - - - static void OnFailureCallback_8(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context, chip::CharSpan charString) + static void OnSuccessCallback_8(void * context, chip::CharSpan charString) { (static_cast(context))->OnSuccessResponse_8(charString); } - - - static void OnFailureCallback_9(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_9(status); } - static void OnSuccessCallback_9(void * context, chip::CharSpan charString) + static void OnSuccessCallback_9(void * context, chip::CharSpan charString) { (static_cast(context))->OnSuccessResponse_9(charString); } - - - static void OnFailureCallback_10(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_10(status); } - static void OnSuccessCallback_10(void * context, chip::CharSpan charString) + static void OnSuccessCallback_10(void * context, chip::CharSpan charString) { (static_cast(context))->OnSuccessResponse_10(charString); } - - - static void OnFailureCallback_11(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_11(status); } - static void OnSuccessCallback_11(void * context) - { - (static_cast(context))->OnSuccessResponse_11(); - } - - - + static void OnSuccessCallback_11(void * context) { (static_cast(context))->OnSuccessResponse_11(); } static void OnFailureCallback_12(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_12(status); } - static void OnSuccessCallback_12(void * context, chip::CharSpan charString) + static void OnSuccessCallback_12(void * context, chip::CharSpan charString) { (static_cast(context))->OnSuccessResponse_12(charString); } - - - static void OnFailureCallback_13(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_13(status); } - static void OnSuccessCallback_13(void * context) - { - (static_cast(context))->OnSuccessResponse_13(); - } - - - + static void OnSuccessCallback_13(void * context) { (static_cast(context))->OnSuccessResponse_13(); } static void OnFailureCallback_14(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_14(status); } - static void OnSuccessCallback_14(void * context, chip::CharSpan charString) + static void OnSuccessCallback_14(void * context, chip::CharSpan charString) { (static_cast(context))->OnSuccessResponse_14(charString); } - - - static void OnFailureCallback_15(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_15(status); } - static void OnSuccessCallback_15(void * context) - { - (static_cast(context))->OnSuccessResponse_15(); - } - - - + static void OnSuccessCallback_15(void * context) { (static_cast(context))->OnSuccessResponse_15(); } static void OnFailureCallback_16(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_16(status); } - static void OnSuccessCallback_16(void * context, chip::CharSpan charString) + static void OnSuccessCallback_16(void * context, chip::CharSpan charString) { (static_cast(context))->OnSuccessResponse_16(charString); } - - - static void OnFailureCallback_17(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_17(status); } - static void OnSuccessCallback_17(void * context) - { - (static_cast(context))->OnSuccessResponse_17(); - } - - - + static void OnSuccessCallback_17(void * context) { (static_cast(context))->OnSuccessResponse_17(); } static void OnFailureCallback_18(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_18(status); } - static void OnSuccessCallback_18(void * context, chip::CharSpan charString) + static void OnSuccessCallback_18(void * context, chip::CharSpan charString) { (static_cast(context))->OnSuccessResponse_18(charString); } - - - static void OnFailureCallback_19(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_19(status); } - static void OnSuccessCallback_19(void * context) - { - (static_cast(context))->OnSuccessResponse_19(); - } - - - + static void OnSuccessCallback_19(void * context) { (static_cast(context))->OnSuccessResponse_19(); } static void OnFailureCallback_20(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_20(status); } - static void OnSuccessCallback_20(void * context, chip::CharSpan charString) + static void OnSuccessCallback_20(void * context, chip::CharSpan charString) { (static_cast(context))->OnSuccessResponse_20(charString); } - - - static void OnFailureCallback_21(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_21(status); } - static void OnSuccessCallback_21(void * context) - { - (static_cast(context))->OnSuccessResponse_21(); - } - - - + static void OnSuccessCallback_21(void * context) { (static_cast(context))->OnSuccessResponse_21(); } // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestWriteAttributeInt32uValue_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -78037,104 +59338,75 @@ class TestConstraints: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint32_t int32uArgument; - int32uArgument = 5UL; - - ReturnErrorOnFailure(cluster.WriteAttribute(int32uArgument, this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + int32uArgument = 5UL; - void OnSuccessResponse_1() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + int32uArgument, this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestReadAttributeInt32uValueMinValueConstraints_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint32_t int32u) + void OnSuccessResponse_2(uint32_t int32u) { - VerifyOrReturn(CheckConstraintMinValue("int32u", int32u, 5UL)); + VerifyOrReturn(CheckConstraintMinValue("int32u", int32u, 5UL)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeInt32uValueMaxValueConstraints_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( uint32_t int32u) + void OnSuccessResponse_3(uint32_t int32u) { - VerifyOrReturn(CheckConstraintMaxValue("int32u", int32u, 5UL)); + VerifyOrReturn(CheckConstraintMaxValue("int32u", int32u, 5UL)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeInt32uValueNotValueConstraints_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( uint32_t int32u) + void OnSuccessResponse_4(uint32_t int32u) { - VerifyOrReturn(CheckConstraintNotValue("int32u", int32u, 6UL)); + VerifyOrReturn(CheckConstraintNotValue("int32u", int32u, 6UL)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt32uValueBackToDefaultValue_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -78142,25 +59414,17 @@ class TestConstraints: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint32_t int32uArgument; - int32uArgument = 0UL; - - ReturnErrorOnFailure(cluster.WriteAttribute(int32uArgument, this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + int32uArgument = 0UL; - void OnSuccessResponse_5() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + int32uArgument, this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_5() { NextTest(); } - CHIP_ERROR TestWriteAttributeCharStringValue_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -78168,129 +59432,93 @@ class TestConstraints: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::CharSpan charStringArgument; - charStringArgument = chip::Span("** Test **garbage: not in length on purpose", 10); + charStringArgument = chip::Span("** Test **garbage: not in length on purpose", 10); - ReturnErrorOnFailure(cluster.WriteAttribute(charStringArgument, this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + charStringArgument, this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_6() - { NextTest(); - } - + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_6() { NextTest(); } - CHIP_ERROR TestReadAttributeCharStringValueMinLengthConstraints_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_7, OnFailureCallback_7)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7( chip::CharSpan charString) + void OnSuccessResponse_7(chip::CharSpan charString) { - VerifyOrReturn(CheckConstraintMinLength("charString", charString.size(), 5)); + VerifyOrReturn(CheckConstraintMinLength("charString", charString.size(), 5)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeCharStringValueMaxLengthConstraints_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_8, OnFailureCallback_8)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_8, OnFailureCallback_8)); + return CHIP_NO_ERROR; } - void OnFailureResponse_8(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_8( chip::CharSpan charString) + void OnSuccessResponse_8(chip::CharSpan charString) { - VerifyOrReturn(CheckConstraintMaxLength("charString", charString.size(), 20)); + VerifyOrReturn(CheckConstraintMaxLength("charString", charString.size(), 20)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeCharStringValueStartsWithConstraints_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_9, OnFailureCallback_9)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_9, OnFailureCallback_9)); + return CHIP_NO_ERROR; } - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_9( chip::CharSpan charString) + void OnSuccessResponse_9(chip::CharSpan charString) { - VerifyOrReturn(CheckConstraintStartsWith("charString", charString, "**")); + VerifyOrReturn(CheckConstraintStartsWith("charString", charString, "**")); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeCharStringValueEndsWithConstraints_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_10, OnFailureCallback_10)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_10, OnFailureCallback_10)); + return CHIP_NO_ERROR; } - void OnFailureResponse_10(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_10( chip::CharSpan charString) + void OnSuccessResponse_10(chip::CharSpan charString) { - VerifyOrReturn(CheckConstraintEndsWith("charString", charString, "**")); + VerifyOrReturn(CheckConstraintEndsWith("charString", charString, "**")); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeCharStringValue_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -78298,51 +59526,37 @@ class TestConstraints: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::CharSpan charStringArgument; - charStringArgument = chip::Span("lowercasegarbage: not in length on purpose", 9); + charStringArgument = chip::Span("lowercasegarbage: not in length on purpose", 9); - ReturnErrorOnFailure(cluster.WriteAttribute(charStringArgument, this, OnSuccessCallback_11, OnFailureCallback_11)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + charStringArgument, this, OnSuccessCallback_11, OnFailureCallback_11)); + return CHIP_NO_ERROR; } - void OnFailureResponse_11(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_11() - { NextTest(); - } - + void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_11() { NextTest(); } - CHIP_ERROR TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_12() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_12, OnFailureCallback_12)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_12, OnFailureCallback_12)); + return CHIP_NO_ERROR; } - void OnFailureResponse_12(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_12( chip::CharSpan charString) + void OnSuccessResponse_12(chip::CharSpan charString) { - VerifyOrReturn(CheckConstraintIsUpperCase("charString", charString, false));VerifyOrReturn(CheckConstraintIsLowerCase("charString", charString, true)); + VerifyOrReturn(CheckConstraintIsUpperCase("charString", charString, false)); + VerifyOrReturn(CheckConstraintIsLowerCase("charString", charString, true)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeCharStringValue_13() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -78350,51 +59564,37 @@ class TestConstraints: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::CharSpan charStringArgument; - charStringArgument = chip::Span("UPPERCASEgarbage: not in length on purpose", 9); + charStringArgument = chip::Span("UPPERCASEgarbage: not in length on purpose", 9); - ReturnErrorOnFailure(cluster.WriteAttribute(charStringArgument, this, OnSuccessCallback_13, OnFailureCallback_13)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + charStringArgument, this, OnSuccessCallback_13, OnFailureCallback_13)); + return CHIP_NO_ERROR; } - void OnFailureResponse_13(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_13() - { NextTest(); - } - + void OnFailureResponse_13(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_13() { NextTest(); } - CHIP_ERROR TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_14, OnFailureCallback_14)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_14, OnFailureCallback_14)); + return CHIP_NO_ERROR; } - void OnFailureResponse_14(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_14( chip::CharSpan charString) + void OnSuccessResponse_14(chip::CharSpan charString) { - VerifyOrReturn(CheckConstraintIsUpperCase("charString", charString, true));VerifyOrReturn(CheckConstraintIsLowerCase("charString", charString, false)); + VerifyOrReturn(CheckConstraintIsUpperCase("charString", charString, true)); + VerifyOrReturn(CheckConstraintIsLowerCase("charString", charString, false)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeCharStringValue_15() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -78402,51 +59602,37 @@ class TestConstraints: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::CharSpan charStringArgument; - charStringArgument = chip::Span("lowUPPERgarbage: not in length on purpose", 8); + charStringArgument = chip::Span("lowUPPERgarbage: not in length on purpose", 8); - ReturnErrorOnFailure(cluster.WriteAttribute(charStringArgument, this, OnSuccessCallback_15, OnFailureCallback_15)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + charStringArgument, this, OnSuccessCallback_15, OnFailureCallback_15)); + return CHIP_NO_ERROR; } - void OnFailureResponse_15(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_15() - { NextTest(); - } - + void OnFailureResponse_15(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_15() { NextTest(); } - CHIP_ERROR TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_16() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_16, OnFailureCallback_16)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_16, OnFailureCallback_16)); + return CHIP_NO_ERROR; } - void OnFailureResponse_16(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_16(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_16( chip::CharSpan charString) + void OnSuccessResponse_16(chip::CharSpan charString) { - VerifyOrReturn(CheckConstraintIsUpperCase("charString", charString, false));VerifyOrReturn(CheckConstraintIsLowerCase("charString", charString, false)); + VerifyOrReturn(CheckConstraintIsUpperCase("charString", charString, false)); + VerifyOrReturn(CheckConstraintIsLowerCase("charString", charString, false)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeCharStringValue_17() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -78454,51 +59640,36 @@ class TestConstraints: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::CharSpan charStringArgument; - charStringArgument = chip::Span("ABCDEF012Vgarbage: not in length on purpose", 10); + charStringArgument = chip::Span("ABCDEF012Vgarbage: not in length on purpose", 10); - ReturnErrorOnFailure(cluster.WriteAttribute(charStringArgument, this, OnSuccessCallback_17, OnFailureCallback_17)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + charStringArgument, this, OnSuccessCallback_17, OnFailureCallback_17)); + return CHIP_NO_ERROR; } - void OnFailureResponse_17(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_17() - { NextTest(); - } - + void OnFailureResponse_17(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_17() { NextTest(); } - CHIP_ERROR TestReadAttributeCharStringValueIsHexStringConstraints_18() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_18, OnFailureCallback_18)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_18, OnFailureCallback_18)); + return CHIP_NO_ERROR; } - void OnFailureResponse_18(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_18(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_18( chip::CharSpan charString) + void OnSuccessResponse_18(chip::CharSpan charString) { - VerifyOrReturn(CheckConstraintIsHexString("charString", charString, false)); + VerifyOrReturn(CheckConstraintIsHexString("charString", charString, false)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeCharStringValue_19() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -78506,51 +59677,36 @@ class TestConstraints: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::CharSpan charStringArgument; - charStringArgument = chip::Span("ABCDEF0123garbage: not in length on purpose", 10); + charStringArgument = chip::Span("ABCDEF0123garbage: not in length on purpose", 10); - ReturnErrorOnFailure(cluster.WriteAttribute(charStringArgument, this, OnSuccessCallback_19, OnFailureCallback_19)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + charStringArgument, this, OnSuccessCallback_19, OnFailureCallback_19)); + return CHIP_NO_ERROR; } - void OnFailureResponse_19(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_19() - { NextTest(); - } - + void OnFailureResponse_19(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_19() { NextTest(); } - CHIP_ERROR TestReadAttributeCharStringValueIsHexStringConstraints_20() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_20, OnFailureCallback_20)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_20, OnFailureCallback_20)); + return CHIP_NO_ERROR; } - void OnFailureResponse_20(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_20(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_20( chip::CharSpan charString) + void OnSuccessResponse_20(chip::CharSpan charString) { - VerifyOrReturn(CheckConstraintIsHexString("charString", charString, true)); + VerifyOrReturn(CheckConstraintIsHexString("charString", charString, true)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeCharStringValueBackToDefaultValue_21() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -78558,121 +59714,88 @@ class TestConstraints: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::CharSpan charStringArgument; - charStringArgument = chip::Span("garbage: not in length on purpose", 0); + charStringArgument = chip::Span("garbage: not in length on purpose", 0); - ReturnErrorOnFailure(cluster.WriteAttribute(charStringArgument, this, OnSuccessCallback_21, OnFailureCallback_21)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + charStringArgument, this, OnSuccessCallback_21, OnFailureCallback_21)); + return CHIP_NO_ERROR; } - void OnFailureResponse_21(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_21() - { NextTest(); - } - + void OnFailureResponse_21(EmberAfStatus status) { ThrowFailureResponse(); } - }; + void OnSuccessResponse_21() { NextTest(); } +}; -class TestDelayCommands: public TestCommand +class TestDelayCommands : public TestCommand { - public: - TestDelayCommands(): TestCommand("TestDelayCommands"), mTestIndex(0) +public: + TestDelayCommands() : TestCommand("TestDelayCommands"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~TestDelayCommands() - { - } + ~TestDelayCommands() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: TestDelayCommands\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: TestDelayCommands\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: TestDelayCommands\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: TestDelayCommands\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Wait 100ms\n"); - err = TestWait100ms_1(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 1 : Wait 100ms\n"); + err = TestWait100ms_1(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 2; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - + CHIP_ERROR TestWait100ms_1() { SetIdentity(kIdentityAlpha); @@ -78680,113 +59803,86 @@ class TestDelayCommands: public TestCommand } }; -class TestLogCommands: public TestCommand +class TestLogCommands : public TestCommand { - public: - TestLogCommands(): TestCommand("TestLogCommands"), mTestIndex(0) +public: + TestLogCommands() : TestCommand("TestLogCommands"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~TestLogCommands() - { - } + ~TestLogCommands() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: TestLogCommands\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: TestLogCommands\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: TestLogCommands\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: TestLogCommands\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Log a simple message\n"); - err = TestLogASimpleMessage_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Log a simple message\n"); + err = TestLogASimpleMessage_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Do a simple user prompt message\n"); - err = TestDoASimpleUserPromptMessage_2(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 2 : Do a simple user prompt message\n"); + err = TestDoASimpleUserPromptMessage_2(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - + CHIP_ERROR TestLogASimpleMessage_1() { SetIdentity(kIdentityAlpha); return Log("This is a simple message"); } - + CHIP_ERROR TestDoASimpleUserPromptMessage_2() { SetIdentity(kIdentityAlpha); @@ -78794,13 +59890,13 @@ class TestLogCommands: public TestCommand } }; -class TestSaveAs: public TestCommand +class TestSaveAs : public TestCommand { - public: - TestSaveAs(): TestCommand("TestSaveAs"), mTestIndex(0) +public: + TestSaveAs() : TestCommand("TestSaveAs"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } ~TestSaveAs() @@ -78830,1931 +59926,1471 @@ class TestSaveAs: public TestCommand /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: TestSaveAs\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: TestSaveAs\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: TestSaveAs\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: TestSaveAs\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Send Test Add Arguments Command\n"); - err = TestSendTestAddArgumentsCommand_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Send Test Add Arguments Command\n"); + err = TestSendTestAddArgumentsCommand_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Send Test Add Arguments Command\n"); - err = TestSendTestAddArgumentsCommand_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Send Test Add Arguments Command\n"); + err = TestSendTestAddArgumentsCommand_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Send Test Add Arguments Command\n"); - err = TestSendTestAddArgumentsCommand_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Send Test Add Arguments Command\n"); + err = TestSendTestAddArgumentsCommand_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read attribute BOOLEAN Default Value\n"); - err = TestReadAttributeBooleanDefaultValue_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Read attribute BOOLEAN Default Value\n"); + err = TestReadAttributeBooleanDefaultValue_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Write attribute BOOLEAN Not Default Value\n"); - err = TestWriteAttributeBooleanNotDefaultValue_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Write attribute BOOLEAN Not Default Value\n"); + err = TestWriteAttributeBooleanNotDefaultValue_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read attribute BOOLEAN Not Default Value\n"); - err = TestReadAttributeBooleanNotDefaultValue_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : Read attribute BOOLEAN Not Default Value\n"); + err = TestReadAttributeBooleanNotDefaultValue_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Write attribute BOOLEAN DefaultValue\n"); - err = TestWriteAttributeBooleanDefaultValue_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : Write attribute BOOLEAN DefaultValue\n"); + err = TestWriteAttributeBooleanDefaultValue_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read attribute BOOLEAN False\n"); - err = TestReadAttributeBooleanFalse_8(); - break; + ChipLogProgress(chipTool, " ***** Test Step 8 : Read attribute BOOLEAN False\n"); + err = TestReadAttributeBooleanFalse_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read attribute BITMAP8 Default Value\n"); - err = TestReadAttributeBitmap8DefaultValue_9(); - break; + ChipLogProgress(chipTool, " ***** Test Step 9 : Read attribute BITMAP8 Default Value\n"); + err = TestReadAttributeBitmap8DefaultValue_9(); + break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Write attribute BITMAP8 Not Default Value\n"); - err = TestWriteAttributeBitmap8NotDefaultValue_10(); - break; + ChipLogProgress(chipTool, " ***** Test Step 10 : Write attribute BITMAP8 Not Default Value\n"); + err = TestWriteAttributeBitmap8NotDefaultValue_10(); + break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read attribute BITMAP8 Not Default Value\n"); - err = TestReadAttributeBitmap8NotDefaultValue_11(); - break; + ChipLogProgress(chipTool, " ***** Test Step 11 : Read attribute BITMAP8 Not Default Value\n"); + err = TestReadAttributeBitmap8NotDefaultValue_11(); + break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Write attribute BITMAP8 Default Value\n"); - err = TestWriteAttributeBitmap8DefaultValue_12(); - break; + ChipLogProgress(chipTool, " ***** Test Step 12 : Write attribute BITMAP8 Default Value\n"); + err = TestWriteAttributeBitmap8DefaultValue_12(); + break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read attribute BITMAP8 Default Value\n"); - err = TestReadAttributeBitmap8DefaultValue_13(); - break; + ChipLogProgress(chipTool, " ***** Test Step 13 : Read attribute BITMAP8 Default Value\n"); + err = TestReadAttributeBitmap8DefaultValue_13(); + break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read attribute BITMAP16 Default Value\n"); - err = TestReadAttributeBitmap16DefaultValue_14(); - break; + ChipLogProgress(chipTool, " ***** Test Step 14 : Read attribute BITMAP16 Default Value\n"); + err = TestReadAttributeBitmap16DefaultValue_14(); + break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Write attribute BITMAP16 Not Default Value\n"); - err = TestWriteAttributeBitmap16NotDefaultValue_15(); - break; + ChipLogProgress(chipTool, " ***** Test Step 15 : Write attribute BITMAP16 Not Default Value\n"); + err = TestWriteAttributeBitmap16NotDefaultValue_15(); + break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Read attribute BITMAP16 Not Default Value\n"); - err = TestReadAttributeBitmap16NotDefaultValue_16(); - break; + ChipLogProgress(chipTool, " ***** Test Step 16 : Read attribute BITMAP16 Not Default Value\n"); + err = TestReadAttributeBitmap16NotDefaultValue_16(); + break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Write attribute BITMAP16 Default Value\n"); - err = TestWriteAttributeBitmap16DefaultValue_17(); - break; + ChipLogProgress(chipTool, " ***** Test Step 17 : Write attribute BITMAP16 Default Value\n"); + err = TestWriteAttributeBitmap16DefaultValue_17(); + break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Read attribute BITMAP16 Default Value\n"); - err = TestReadAttributeBitmap16DefaultValue_18(); - break; + ChipLogProgress(chipTool, " ***** Test Step 18 : Read attribute BITMAP16 Default Value\n"); + err = TestReadAttributeBitmap16DefaultValue_18(); + break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Read attribute BITMAP32 Default Value\n"); - err = TestReadAttributeBitmap32DefaultValue_19(); - break; + ChipLogProgress(chipTool, " ***** Test Step 19 : Read attribute BITMAP32 Default Value\n"); + err = TestReadAttributeBitmap32DefaultValue_19(); + break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Write attribute BITMAP32 Not Default Value\n"); - err = TestWriteAttributeBitmap32NotDefaultValue_20(); - break; + ChipLogProgress(chipTool, " ***** Test Step 20 : Write attribute BITMAP32 Not Default Value\n"); + err = TestWriteAttributeBitmap32NotDefaultValue_20(); + break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Read attribute BITMAP32 Not Default Value\n"); - err = TestReadAttributeBitmap32NotDefaultValue_21(); - break; + ChipLogProgress(chipTool, " ***** Test Step 21 : Read attribute BITMAP32 Not Default Value\n"); + err = TestReadAttributeBitmap32NotDefaultValue_21(); + break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Write attribute BITMAP32 Default Value\n"); - err = TestWriteAttributeBitmap32DefaultValue_22(); - break; + ChipLogProgress(chipTool, " ***** Test Step 22 : Write attribute BITMAP32 Default Value\n"); + err = TestWriteAttributeBitmap32DefaultValue_22(); + break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Read attribute BITMAP32 Default Value\n"); - err = TestReadAttributeBitmap32DefaultValue_23(); - break; + ChipLogProgress(chipTool, " ***** Test Step 23 : Read attribute BITMAP32 Default Value\n"); + err = TestReadAttributeBitmap32DefaultValue_23(); + break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Read attribute BITMAP64 Default Value\n"); - err = TestReadAttributeBitmap64DefaultValue_24(); - break; + ChipLogProgress(chipTool, " ***** Test Step 24 : Read attribute BITMAP64 Default Value\n"); + err = TestReadAttributeBitmap64DefaultValue_24(); + break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Write attribute BITMAP64 Not Default Value\n"); - err = TestWriteAttributeBitmap64NotDefaultValue_25(); - break; + ChipLogProgress(chipTool, " ***** Test Step 25 : Write attribute BITMAP64 Not Default Value\n"); + err = TestWriteAttributeBitmap64NotDefaultValue_25(); + break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Read attribute BITMAP64 Default Value\n"); - err = TestReadAttributeBitmap64DefaultValue_26(); - break; + ChipLogProgress(chipTool, " ***** Test Step 26 : Read attribute BITMAP64 Default Value\n"); + err = TestReadAttributeBitmap64DefaultValue_26(); + break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Write attribute BITMAP64 Default Value\n"); - err = TestWriteAttributeBitmap64DefaultValue_27(); - break; + ChipLogProgress(chipTool, " ***** Test Step 27 : Write attribute BITMAP64 Default Value\n"); + err = TestWriteAttributeBitmap64DefaultValue_27(); + break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Read attribute BITMAP64 Default Value\n"); - err = TestReadAttributeBitmap64DefaultValue_28(); - break; + ChipLogProgress(chipTool, " ***** Test Step 28 : Read attribute BITMAP64 Default Value\n"); + err = TestReadAttributeBitmap64DefaultValue_28(); + break; case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Read attribute INT8U Default Value\n"); - err = TestReadAttributeInt8uDefaultValue_29(); - break; + ChipLogProgress(chipTool, " ***** Test Step 29 : Read attribute INT8U Default Value\n"); + err = TestReadAttributeInt8uDefaultValue_29(); + break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Write attribute INT8U Not Default Value\n"); - err = TestWriteAttributeInt8uNotDefaultValue_30(); - break; + ChipLogProgress(chipTool, " ***** Test Step 30 : Write attribute INT8U Not Default Value\n"); + err = TestWriteAttributeInt8uNotDefaultValue_30(); + break; case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Read attribute INT8U Not Default Value\n"); - err = TestReadAttributeInt8uNotDefaultValue_31(); - break; + ChipLogProgress(chipTool, " ***** Test Step 31 : Read attribute INT8U Not Default Value\n"); + err = TestReadAttributeInt8uNotDefaultValue_31(); + break; case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Write attribute INT8U Default Value\n"); - err = TestWriteAttributeInt8uDefaultValue_32(); - break; + ChipLogProgress(chipTool, " ***** Test Step 32 : Write attribute INT8U Default Value\n"); + err = TestWriteAttributeInt8uDefaultValue_32(); + break; case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Read attribute INT8U Default Value\n"); - err = TestReadAttributeInt8uDefaultValue_33(); - break; + ChipLogProgress(chipTool, " ***** Test Step 33 : Read attribute INT8U Default Value\n"); + err = TestReadAttributeInt8uDefaultValue_33(); + break; case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Read attribute INT16U Default Value\n"); - err = TestReadAttributeInt16uDefaultValue_34(); - break; + ChipLogProgress(chipTool, " ***** Test Step 34 : Read attribute INT16U Default Value\n"); + err = TestReadAttributeInt16uDefaultValue_34(); + break; case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Write attribute INT16U Not Default Value\n"); - err = TestWriteAttributeInt16uNotDefaultValue_35(); - break; + ChipLogProgress(chipTool, " ***** Test Step 35 : Write attribute INT16U Not Default Value\n"); + err = TestWriteAttributeInt16uNotDefaultValue_35(); + break; case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Read attribute INT16U Not Default Value\n"); - err = TestReadAttributeInt16uNotDefaultValue_36(); - break; + ChipLogProgress(chipTool, " ***** Test Step 36 : Read attribute INT16U Not Default Value\n"); + err = TestReadAttributeInt16uNotDefaultValue_36(); + break; case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Write attribute INT16U Default Value\n"); - err = TestWriteAttributeInt16uDefaultValue_37(); - break; + ChipLogProgress(chipTool, " ***** Test Step 37 : Write attribute INT16U Default Value\n"); + err = TestWriteAttributeInt16uDefaultValue_37(); + break; case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : Read attribute INT16U Default Value\n"); - err = TestReadAttributeInt16uDefaultValue_38(); - break; + ChipLogProgress(chipTool, " ***** Test Step 38 : Read attribute INT16U Default Value\n"); + err = TestReadAttributeInt16uDefaultValue_38(); + break; case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : Read attribute INT32U Default Value\n"); - err = TestReadAttributeInt32uDefaultValue_39(); - break; + ChipLogProgress(chipTool, " ***** Test Step 39 : Read attribute INT32U Default Value\n"); + err = TestReadAttributeInt32uDefaultValue_39(); + break; case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : Write attribute INT32U Not Default Value\n"); - err = TestWriteAttributeInt32uNotDefaultValue_40(); - break; + ChipLogProgress(chipTool, " ***** Test Step 40 : Write attribute INT32U Not Default Value\n"); + err = TestWriteAttributeInt32uNotDefaultValue_40(); + break; case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : Read attribute INT32U Not Default Value\n"); - err = TestReadAttributeInt32uNotDefaultValue_41(); - break; + ChipLogProgress(chipTool, " ***** Test Step 41 : Read attribute INT32U Not Default Value\n"); + err = TestReadAttributeInt32uNotDefaultValue_41(); + break; case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : Write attribute INT32U Default Value\n"); - err = TestWriteAttributeInt32uDefaultValue_42(); - break; + ChipLogProgress(chipTool, " ***** Test Step 42 : Write attribute INT32U Default Value\n"); + err = TestWriteAttributeInt32uDefaultValue_42(); + break; case 43: - ChipLogProgress(chipTool, " ***** Test Step 43 : Read attribute INT32U Default Value\n"); - err = TestReadAttributeInt32uDefaultValue_43(); - break; + ChipLogProgress(chipTool, " ***** Test Step 43 : Read attribute INT32U Default Value\n"); + err = TestReadAttributeInt32uDefaultValue_43(); + break; case 44: - ChipLogProgress(chipTool, " ***** Test Step 44 : Read attribute INT64U Default Value\n"); - err = TestReadAttributeInt64uDefaultValue_44(); - break; + ChipLogProgress(chipTool, " ***** Test Step 44 : Read attribute INT64U Default Value\n"); + err = TestReadAttributeInt64uDefaultValue_44(); + break; case 45: - ChipLogProgress(chipTool, " ***** Test Step 45 : Write attribute INT64U Not Default Value\n"); - err = TestWriteAttributeInt64uNotDefaultValue_45(); - break; + ChipLogProgress(chipTool, " ***** Test Step 45 : Write attribute INT64U Not Default Value\n"); + err = TestWriteAttributeInt64uNotDefaultValue_45(); + break; case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : Read attribute INT64U Not Default Value\n"); - err = TestReadAttributeInt64uNotDefaultValue_46(); - break; + ChipLogProgress(chipTool, " ***** Test Step 46 : Read attribute INT64U Not Default Value\n"); + err = TestReadAttributeInt64uNotDefaultValue_46(); + break; case 47: - ChipLogProgress(chipTool, " ***** Test Step 47 : Write attribute INT64U Default Value\n"); - err = TestWriteAttributeInt64uDefaultValue_47(); - break; + ChipLogProgress(chipTool, " ***** Test Step 47 : Write attribute INT64U Default Value\n"); + err = TestWriteAttributeInt64uDefaultValue_47(); + break; case 48: - ChipLogProgress(chipTool, " ***** Test Step 48 : Read attribute INT64U Default Value\n"); - err = TestReadAttributeInt64uDefaultValue_48(); - break; + ChipLogProgress(chipTool, " ***** Test Step 48 : Read attribute INT64U Default Value\n"); + err = TestReadAttributeInt64uDefaultValue_48(); + break; case 49: - ChipLogProgress(chipTool, " ***** Test Step 49 : Read attribute INT8S Default Value\n"); - err = TestReadAttributeInt8sDefaultValue_49(); - break; + ChipLogProgress(chipTool, " ***** Test Step 49 : Read attribute INT8S Default Value\n"); + err = TestReadAttributeInt8sDefaultValue_49(); + break; case 50: - ChipLogProgress(chipTool, " ***** Test Step 50 : Write attribute INT8S Not Default Value\n"); - err = TestWriteAttributeInt8sNotDefaultValue_50(); - break; + ChipLogProgress(chipTool, " ***** Test Step 50 : Write attribute INT8S Not Default Value\n"); + err = TestWriteAttributeInt8sNotDefaultValue_50(); + break; case 51: - ChipLogProgress(chipTool, " ***** Test Step 51 : Read attribute INT8S Not Default Value\n"); - err = TestReadAttributeInt8sNotDefaultValue_51(); - break; + ChipLogProgress(chipTool, " ***** Test Step 51 : Read attribute INT8S Not Default Value\n"); + err = TestReadAttributeInt8sNotDefaultValue_51(); + break; case 52: - ChipLogProgress(chipTool, " ***** Test Step 52 : Write attribute INT8S Default Value\n"); - err = TestWriteAttributeInt8sDefaultValue_52(); - break; + ChipLogProgress(chipTool, " ***** Test Step 52 : Write attribute INT8S Default Value\n"); + err = TestWriteAttributeInt8sDefaultValue_52(); + break; case 53: - ChipLogProgress(chipTool, " ***** Test Step 53 : Read attribute INT8S Default Value\n"); - err = TestReadAttributeInt8sDefaultValue_53(); - break; + ChipLogProgress(chipTool, " ***** Test Step 53 : Read attribute INT8S Default Value\n"); + err = TestReadAttributeInt8sDefaultValue_53(); + break; case 54: - ChipLogProgress(chipTool, " ***** Test Step 54 : Read attribute INT16S Default Value\n"); - err = TestReadAttributeInt16sDefaultValue_54(); - break; + ChipLogProgress(chipTool, " ***** Test Step 54 : Read attribute INT16S Default Value\n"); + err = TestReadAttributeInt16sDefaultValue_54(); + break; case 55: - ChipLogProgress(chipTool, " ***** Test Step 55 : Write attribute INT16S Not Default Value\n"); - err = TestWriteAttributeInt16sNotDefaultValue_55(); - break; + ChipLogProgress(chipTool, " ***** Test Step 55 : Write attribute INT16S Not Default Value\n"); + err = TestWriteAttributeInt16sNotDefaultValue_55(); + break; case 56: - ChipLogProgress(chipTool, " ***** Test Step 56 : Read attribute INT16S Not Default Value\n"); - err = TestReadAttributeInt16sNotDefaultValue_56(); - break; + ChipLogProgress(chipTool, " ***** Test Step 56 : Read attribute INT16S Not Default Value\n"); + err = TestReadAttributeInt16sNotDefaultValue_56(); + break; case 57: - ChipLogProgress(chipTool, " ***** Test Step 57 : Write attribute INT16S Default Value\n"); - err = TestWriteAttributeInt16sDefaultValue_57(); - break; + ChipLogProgress(chipTool, " ***** Test Step 57 : Write attribute INT16S Default Value\n"); + err = TestWriteAttributeInt16sDefaultValue_57(); + break; case 58: - ChipLogProgress(chipTool, " ***** Test Step 58 : Read attribute INT16S Default Value\n"); - err = TestReadAttributeInt16sDefaultValue_58(); - break; + ChipLogProgress(chipTool, " ***** Test Step 58 : Read attribute INT16S Default Value\n"); + err = TestReadAttributeInt16sDefaultValue_58(); + break; case 59: - ChipLogProgress(chipTool, " ***** Test Step 59 : Read attribute INT32S Default Value\n"); - err = TestReadAttributeInt32sDefaultValue_59(); - break; + ChipLogProgress(chipTool, " ***** Test Step 59 : Read attribute INT32S Default Value\n"); + err = TestReadAttributeInt32sDefaultValue_59(); + break; case 60: - ChipLogProgress(chipTool, " ***** Test Step 60 : Write attribute INT32S Not Default Value\n"); - err = TestWriteAttributeInt32sNotDefaultValue_60(); - break; + ChipLogProgress(chipTool, " ***** Test Step 60 : Write attribute INT32S Not Default Value\n"); + err = TestWriteAttributeInt32sNotDefaultValue_60(); + break; case 61: - ChipLogProgress(chipTool, " ***** Test Step 61 : Read attribute INT32S Not Default Value\n"); - err = TestReadAttributeInt32sNotDefaultValue_61(); - break; + ChipLogProgress(chipTool, " ***** Test Step 61 : Read attribute INT32S Not Default Value\n"); + err = TestReadAttributeInt32sNotDefaultValue_61(); + break; case 62: - ChipLogProgress(chipTool, " ***** Test Step 62 : Write attribute INT32S Default Value\n"); - err = TestWriteAttributeInt32sDefaultValue_62(); - break; + ChipLogProgress(chipTool, " ***** Test Step 62 : Write attribute INT32S Default Value\n"); + err = TestWriteAttributeInt32sDefaultValue_62(); + break; case 63: - ChipLogProgress(chipTool, " ***** Test Step 63 : Read attribute INT32S Default Value\n"); - err = TestReadAttributeInt32sDefaultValue_63(); - break; + ChipLogProgress(chipTool, " ***** Test Step 63 : Read attribute INT32S Default Value\n"); + err = TestReadAttributeInt32sDefaultValue_63(); + break; case 64: - ChipLogProgress(chipTool, " ***** Test Step 64 : Read attribute INT64S Default Value\n"); - err = TestReadAttributeInt64sDefaultValue_64(); - break; + ChipLogProgress(chipTool, " ***** Test Step 64 : Read attribute INT64S Default Value\n"); + err = TestReadAttributeInt64sDefaultValue_64(); + break; case 65: - ChipLogProgress(chipTool, " ***** Test Step 65 : Write attribute INTS Not Default Value\n"); - err = TestWriteAttributeIntsNotDefaultValue_65(); - break; + ChipLogProgress(chipTool, " ***** Test Step 65 : Write attribute INTS Not Default Value\n"); + err = TestWriteAttributeIntsNotDefaultValue_65(); + break; case 66: - ChipLogProgress(chipTool, " ***** Test Step 66 : Read attribute INT64S Not Default Value\n"); - err = TestReadAttributeInt64sNotDefaultValue_66(); - break; + ChipLogProgress(chipTool, " ***** Test Step 66 : Read attribute INT64S Not Default Value\n"); + err = TestReadAttributeInt64sNotDefaultValue_66(); + break; case 67: - ChipLogProgress(chipTool, " ***** Test Step 67 : Write attribute INT64S Default Value\n"); - err = TestWriteAttributeInt64sDefaultValue_67(); - break; + ChipLogProgress(chipTool, " ***** Test Step 67 : Write attribute INT64S Default Value\n"); + err = TestWriteAttributeInt64sDefaultValue_67(); + break; case 68: - ChipLogProgress(chipTool, " ***** Test Step 68 : Read attribute INT64S Default Value\n"); - err = TestReadAttributeInt64sDefaultValue_68(); - break; + ChipLogProgress(chipTool, " ***** Test Step 68 : Read attribute INT64S Default Value\n"); + err = TestReadAttributeInt64sDefaultValue_68(); + break; case 69: - ChipLogProgress(chipTool, " ***** Test Step 69 : Read attribute ENUM8 Default Value\n"); - err = TestReadAttributeEnum8DefaultValue_69(); - break; + ChipLogProgress(chipTool, " ***** Test Step 69 : Read attribute ENUM8 Default Value\n"); + err = TestReadAttributeEnum8DefaultValue_69(); + break; case 70: - ChipLogProgress(chipTool, " ***** Test Step 70 : Write attribute ENUM8 Not Default Value\n"); - err = TestWriteAttributeEnum8NotDefaultValue_70(); - break; + ChipLogProgress(chipTool, " ***** Test Step 70 : Write attribute ENUM8 Not Default Value\n"); + err = TestWriteAttributeEnum8NotDefaultValue_70(); + break; case 71: - ChipLogProgress(chipTool, " ***** Test Step 71 : Read attribute ENUM8 Not Default Value\n"); - err = TestReadAttributeEnum8NotDefaultValue_71(); - break; + ChipLogProgress(chipTool, " ***** Test Step 71 : Read attribute ENUM8 Not Default Value\n"); + err = TestReadAttributeEnum8NotDefaultValue_71(); + break; case 72: - ChipLogProgress(chipTool, " ***** Test Step 72 : Write attribute ENUM8 Default Value\n"); - err = TestWriteAttributeEnum8DefaultValue_72(); - break; + ChipLogProgress(chipTool, " ***** Test Step 72 : Write attribute ENUM8 Default Value\n"); + err = TestWriteAttributeEnum8DefaultValue_72(); + break; case 73: - ChipLogProgress(chipTool, " ***** Test Step 73 : Read attribute ENUM8 Default Value\n"); - err = TestReadAttributeEnum8DefaultValue_73(); - break; + ChipLogProgress(chipTool, " ***** Test Step 73 : Read attribute ENUM8 Default Value\n"); + err = TestReadAttributeEnum8DefaultValue_73(); + break; case 74: - ChipLogProgress(chipTool, " ***** Test Step 74 : Read attribute ENUM16 Default Value\n"); - err = TestReadAttributeEnum16DefaultValue_74(); - break; + ChipLogProgress(chipTool, " ***** Test Step 74 : Read attribute ENUM16 Default Value\n"); + err = TestReadAttributeEnum16DefaultValue_74(); + break; case 75: - ChipLogProgress(chipTool, " ***** Test Step 75 : Write attribute ENUM16 Not Default Value\n"); - err = TestWriteAttributeEnum16NotDefaultValue_75(); - break; + ChipLogProgress(chipTool, " ***** Test Step 75 : Write attribute ENUM16 Not Default Value\n"); + err = TestWriteAttributeEnum16NotDefaultValue_75(); + break; case 76: - ChipLogProgress(chipTool, " ***** Test Step 76 : Read attribute ENUM16 Not Default Value\n"); - err = TestReadAttributeEnum16NotDefaultValue_76(); - break; + ChipLogProgress(chipTool, " ***** Test Step 76 : Read attribute ENUM16 Not Default Value\n"); + err = TestReadAttributeEnum16NotDefaultValue_76(); + break; case 77: - ChipLogProgress(chipTool, " ***** Test Step 77 : Write attribute ENUM16 Default Value\n"); - err = TestWriteAttributeEnum16DefaultValue_77(); - break; + ChipLogProgress(chipTool, " ***** Test Step 77 : Write attribute ENUM16 Default Value\n"); + err = TestWriteAttributeEnum16DefaultValue_77(); + break; case 78: - ChipLogProgress(chipTool, " ***** Test Step 78 : Read attribute ENUM16 Default Value\n"); - err = TestReadAttributeEnum16DefaultValue_78(); - break; + ChipLogProgress(chipTool, " ***** Test Step 78 : Read attribute ENUM16 Default Value\n"); + err = TestReadAttributeEnum16DefaultValue_78(); + break; case 79: - ChipLogProgress(chipTool, " ***** Test Step 79 : Read attribute EPOCH_US Default Value\n"); - err = TestReadAttributeEpochUsDefaultValue_79(); - break; + ChipLogProgress(chipTool, " ***** Test Step 79 : Read attribute EPOCH_US Default Value\n"); + err = TestReadAttributeEpochUsDefaultValue_79(); + break; case 80: - ChipLogProgress(chipTool, " ***** Test Step 80 : Write attribute EPOCH_US Not Default Value\n"); - err = TestWriteAttributeEpochUsNotDefaultValue_80(); - break; + ChipLogProgress(chipTool, " ***** Test Step 80 : Write attribute EPOCH_US Not Default Value\n"); + err = TestWriteAttributeEpochUsNotDefaultValue_80(); + break; case 81: - ChipLogProgress(chipTool, " ***** Test Step 81 : Read attribute EPOCH_US Not Default Value\n"); - err = TestReadAttributeEpochUsNotDefaultValue_81(); - break; + ChipLogProgress(chipTool, " ***** Test Step 81 : Read attribute EPOCH_US Not Default Value\n"); + err = TestReadAttributeEpochUsNotDefaultValue_81(); + break; case 82: - ChipLogProgress(chipTool, " ***** Test Step 82 : Write attribute EPOCH_US Default Value\n"); - err = TestWriteAttributeEpochUsDefaultValue_82(); - break; + ChipLogProgress(chipTool, " ***** Test Step 82 : Write attribute EPOCH_US Default Value\n"); + err = TestWriteAttributeEpochUsDefaultValue_82(); + break; case 83: - ChipLogProgress(chipTool, " ***** Test Step 83 : Read attribute EPOCH_US Default Value\n"); - err = TestReadAttributeEpochUsDefaultValue_83(); - break; + ChipLogProgress(chipTool, " ***** Test Step 83 : Read attribute EPOCH_US Default Value\n"); + err = TestReadAttributeEpochUsDefaultValue_83(); + break; case 84: - ChipLogProgress(chipTool, " ***** Test Step 84 : Read attribute EPOCH_S Default Value\n"); - err = TestReadAttributeEpochSDefaultValue_84(); - break; + ChipLogProgress(chipTool, " ***** Test Step 84 : Read attribute EPOCH_S Default Value\n"); + err = TestReadAttributeEpochSDefaultValue_84(); + break; case 85: - ChipLogProgress(chipTool, " ***** Test Step 85 : Write attribute EPOCH_S Not Default Value\n"); - err = TestWriteAttributeEpochSNotDefaultValue_85(); - break; + ChipLogProgress(chipTool, " ***** Test Step 85 : Write attribute EPOCH_S Not Default Value\n"); + err = TestWriteAttributeEpochSNotDefaultValue_85(); + break; case 86: - ChipLogProgress(chipTool, " ***** Test Step 86 : Read attribute EPOCH_S Not Default Value\n"); - err = TestReadAttributeEpochSNotDefaultValue_86(); - break; + ChipLogProgress(chipTool, " ***** Test Step 86 : Read attribute EPOCH_S Not Default Value\n"); + err = TestReadAttributeEpochSNotDefaultValue_86(); + break; case 87: - ChipLogProgress(chipTool, " ***** Test Step 87 : Write attribute EPOCH_S Default Value\n"); - err = TestWriteAttributeEpochSDefaultValue_87(); - break; + ChipLogProgress(chipTool, " ***** Test Step 87 : Write attribute EPOCH_S Default Value\n"); + err = TestWriteAttributeEpochSDefaultValue_87(); + break; case 88: - ChipLogProgress(chipTool, " ***** Test Step 88 : Read attribute EPOCH_S Default Value\n"); - err = TestReadAttributeEpochSDefaultValue_88(); - break; + ChipLogProgress(chipTool, " ***** Test Step 88 : Read attribute EPOCH_S Default Value\n"); + err = TestReadAttributeEpochSDefaultValue_88(); + break; case 89: - ChipLogProgress(chipTool, " ***** Test Step 89 : Read attribute vendor_id Default Value\n"); - err = TestReadAttributeVendorIdDefaultValue_89(); - break; + ChipLogProgress(chipTool, " ***** Test Step 89 : Read attribute vendor_id Default Value\n"); + err = TestReadAttributeVendorIdDefaultValue_89(); + break; case 90: - ChipLogProgress(chipTool, " ***** Test Step 90 : Write attribute vendor_id Not Default Value\n"); - err = TestWriteAttributeVendorIdNotDefaultValue_90(); - break; + ChipLogProgress(chipTool, " ***** Test Step 90 : Write attribute vendor_id Not Default Value\n"); + err = TestWriteAttributeVendorIdNotDefaultValue_90(); + break; case 91: - ChipLogProgress(chipTool, " ***** Test Step 91 : Read attribute vendor_id Not Default Value\n"); - err = TestReadAttributeVendorIdNotDefaultValue_91(); - break; + ChipLogProgress(chipTool, " ***** Test Step 91 : Read attribute vendor_id Not Default Value\n"); + err = TestReadAttributeVendorIdNotDefaultValue_91(); + break; case 92: - ChipLogProgress(chipTool, " ***** Test Step 92 : Write attribute vendor_id Default Value\n"); - err = TestWriteAttributeVendorIdDefaultValue_92(); - break; + ChipLogProgress(chipTool, " ***** Test Step 92 : Write attribute vendor_id Default Value\n"); + err = TestWriteAttributeVendorIdDefaultValue_92(); + break; case 93: - ChipLogProgress(chipTool, " ***** Test Step 93 : Read attribute vendor_id Default Value\n"); - err = TestReadAttributeVendorIdDefaultValue_93(); - break; + ChipLogProgress(chipTool, " ***** Test Step 93 : Read attribute vendor_id Default Value\n"); + err = TestReadAttributeVendorIdDefaultValue_93(); + break; case 94: - ChipLogProgress(chipTool, " ***** Test Step 94 : Read attribute char_string Default Value\n"); - err = TestReadAttributeCharStringDefaultValue_94(); - break; + ChipLogProgress(chipTool, " ***** Test Step 94 : Read attribute char_string Default Value\n"); + err = TestReadAttributeCharStringDefaultValue_94(); + break; case 95: - ChipLogProgress(chipTool, " ***** Test Step 95 : Read attribute char_string Default Value and compare to saved value\n"); - err = TestReadAttributeCharStringDefaultValueAndCompareToSavedValue_95(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 95 : Read attribute char_string Default Value and compare to saved value\n"); + err = TestReadAttributeCharStringDefaultValueAndCompareToSavedValue_95(); + break; case 96: - ChipLogProgress(chipTool, " ***** Test Step 96 : Write attribute char_string Not Default Value\n"); - err = TestWriteAttributeCharStringNotDefaultValue_96(); - break; + ChipLogProgress(chipTool, " ***** Test Step 96 : Write attribute char_string Not Default Value\n"); + err = TestWriteAttributeCharStringNotDefaultValue_96(); + break; case 97: - ChipLogProgress(chipTool, " ***** Test Step 97 : Read attribute char_string Not Default Value\n"); - err = TestReadAttributeCharStringNotDefaultValue_97(); - break; + ChipLogProgress(chipTool, " ***** Test Step 97 : Read attribute char_string Not Default Value\n"); + err = TestReadAttributeCharStringNotDefaultValue_97(); + break; case 98: - ChipLogProgress(chipTool, " ***** Test Step 98 : Read attribute char_string Not Default Value and compare to saved value\n"); - err = TestReadAttributeCharStringNotDefaultValueAndCompareToSavedValue_98(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 98 : Read attribute char_string Not Default Value and compare to saved value\n"); + err = TestReadAttributeCharStringNotDefaultValueAndCompareToSavedValue_98(); + break; case 99: - ChipLogProgress(chipTool, " ***** Test Step 99 : Write attribute char_string Not Default Value from saved value\n"); - err = TestWriteAttributeCharStringNotDefaultValueFromSavedValue_99(); - break; + ChipLogProgress(chipTool, " ***** Test Step 99 : Write attribute char_string Not Default Value from saved value\n"); + err = TestWriteAttributeCharStringNotDefaultValueFromSavedValue_99(); + break; case 100: - ChipLogProgress(chipTool, " ***** Test Step 100 : Read attribute char_string Not Default Value and compare to expected value\n"); - err = TestReadAttributeCharStringNotDefaultValueAndCompareToExpectedValue_100(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 100 : Read attribute char_string Not Default Value and compare to expected value\n"); + err = TestReadAttributeCharStringNotDefaultValueAndCompareToExpectedValue_100(); + break; case 101: - ChipLogProgress(chipTool, " ***** Test Step 101 : Write attribute char_string Default Value\n"); - err = TestWriteAttributeCharStringDefaultValue_101(); - break; + ChipLogProgress(chipTool, " ***** Test Step 101 : Write attribute char_string Default Value\n"); + err = TestWriteAttributeCharStringDefaultValue_101(); + break; case 102: - ChipLogProgress(chipTool, " ***** Test Step 102 : Read attribute octet_string Default Value\n"); - err = TestReadAttributeOctetStringDefaultValue_102(); - break; + ChipLogProgress(chipTool, " ***** Test Step 102 : Read attribute octet_string Default Value\n"); + err = TestReadAttributeOctetStringDefaultValue_102(); + break; case 103: - ChipLogProgress(chipTool, " ***** Test Step 103 : Read attribute octet_string Default Value and compare to saved value\n"); - err = TestReadAttributeOctetStringDefaultValueAndCompareToSavedValue_103(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 103 : Read attribute octet_string Default Value and compare to saved value\n"); + err = TestReadAttributeOctetStringDefaultValueAndCompareToSavedValue_103(); + break; case 104: - ChipLogProgress(chipTool, " ***** Test Step 104 : Write attribute octet_string Not Default Value\n"); - err = TestWriteAttributeOctetStringNotDefaultValue_104(); - break; + ChipLogProgress(chipTool, " ***** Test Step 104 : Write attribute octet_string Not Default Value\n"); + err = TestWriteAttributeOctetStringNotDefaultValue_104(); + break; case 105: - ChipLogProgress(chipTool, " ***** Test Step 105 : Read attribute octet_string Not Default Value\n"); - err = TestReadAttributeOctetStringNotDefaultValue_105(); - break; + ChipLogProgress(chipTool, " ***** Test Step 105 : Read attribute octet_string Not Default Value\n"); + err = TestReadAttributeOctetStringNotDefaultValue_105(); + break; case 106: - ChipLogProgress(chipTool, " ***** Test Step 106 : Read attribute octet_string Not Default Value and compare to saved value\n"); - err = TestReadAttributeOctetStringNotDefaultValueAndCompareToSavedValue_106(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 106 : Read attribute octet_string Not Default Value and compare to saved value\n"); + err = TestReadAttributeOctetStringNotDefaultValueAndCompareToSavedValue_106(); + break; case 107: - ChipLogProgress(chipTool, " ***** Test Step 107 : Write attribute octet_string Not Default Value from saved value\n"); - err = TestWriteAttributeOctetStringNotDefaultValueFromSavedValue_107(); - break; + ChipLogProgress(chipTool, " ***** Test Step 107 : Write attribute octet_string Not Default Value from saved value\n"); + err = TestWriteAttributeOctetStringNotDefaultValueFromSavedValue_107(); + break; case 108: - ChipLogProgress(chipTool, " ***** Test Step 108 : Read attribute octet_string Not Default Value and compare to expected value\n"); - err = TestReadAttributeOctetStringNotDefaultValueAndCompareToExpectedValue_108(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 108 : Read attribute octet_string Not Default Value and compare to expected value\n"); + err = TestReadAttributeOctetStringNotDefaultValueAndCompareToExpectedValue_108(); + break; case 109: - ChipLogProgress(chipTool, " ***** Test Step 109 : Write attribute octet_string Default Value\n"); - err = TestWriteAttributeOctetStringDefaultValue_109(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 109 : Write attribute octet_string Default Value\n"); + err = TestWriteAttributeOctetStringDefaultValue_109(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 110; chip::Optional mCluster; chip::Optional mEndpoint; -uint8_t TestAddArgumentDefaultValue; -bool readAttributeBooleanDefaultValue; -uint8_t readAttributeBitmap8DefaultValue; -uint16_t readAttributeBitmap16DefaultValue; -uint32_t readAttributeBitmap32DefaultValue; -uint64_t readAttributeBitmap64DefaultValue; -uint8_t readAttributeInt8uDefaultValue; -uint16_t readAttributeInt16uDefaultValue; -uint32_t readAttributeInt32uDefaultValue; -uint64_t readAttributeInt64uDefaultValue; -int8_t readAttributeInt8sDefaultValue; -int16_t readAttributeInt16sDefaultValue; -int32_t readAttributeInt32sDefaultValue; -int64_t readAttributeInt64sDefaultValue; -uint8_t readAttributeEnum8DefaultValue; -uint16_t readAttributeEnum16DefaultValue; -uint64_t readAttributeEpochUSDefaultValue; -uint32_t readAttributeEpochSDefaultValue; -chip::VendorId readAttributeVendorIdDefaultValue; -char * readAttributeCharStringDefaultValueBuffer = nullptr;chip::CharSpan readAttributeCharStringDefaultValue; -char * readAttributeCharStringNotDefaultValueBuffer = nullptr;chip::CharSpan readAttributeCharStringNotDefaultValue; -uint8_t * readAttributeOctetStringDefaultValueBuffer = nullptr;chip::ByteSpan readAttributeOctetStringDefaultValue; -uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan readAttributeOctetStringNotDefaultValue; - - - - - - - - - - - - - - - - - - - - - - + uint8_t TestAddArgumentDefaultValue; + bool readAttributeBooleanDefaultValue; + uint8_t readAttributeBitmap8DefaultValue; + uint16_t readAttributeBitmap16DefaultValue; + uint32_t readAttributeBitmap32DefaultValue; + uint64_t readAttributeBitmap64DefaultValue; + uint8_t readAttributeInt8uDefaultValue; + uint16_t readAttributeInt16uDefaultValue; + uint32_t readAttributeInt32uDefaultValue; + uint64_t readAttributeInt64uDefaultValue; + int8_t readAttributeInt8sDefaultValue; + int16_t readAttributeInt16sDefaultValue; + int32_t readAttributeInt32sDefaultValue; + int64_t readAttributeInt64sDefaultValue; + uint8_t readAttributeEnum8DefaultValue; + uint16_t readAttributeEnum16DefaultValue; + uint64_t readAttributeEpochUSDefaultValue; + uint32_t readAttributeEpochSDefaultValue; + chip::VendorId readAttributeVendorIdDefaultValue; + char * readAttributeCharStringDefaultValueBuffer = nullptr; + chip::CharSpan readAttributeCharStringDefaultValue; + char * readAttributeCharStringNotDefaultValueBuffer = nullptr; + chip::CharSpan readAttributeCharStringNotDefaultValue; + uint8_t * readAttributeOctetStringDefaultValueBuffer = nullptr; + chip::ByteSpan readAttributeOctetStringDefaultValue; + uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr; + chip::ByteSpan readAttributeOctetStringNotDefaultValue; static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, bool boolean) + static void OnSuccessCallback_4(void * context, bool boolean) { (static_cast(context))->OnSuccessResponse_4(boolean); } - - - static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context) - { - (static_cast(context))->OnSuccessResponse_5(); - } - - - + static void OnSuccessCallback_5(void * context) { (static_cast(context))->OnSuccessResponse_5(); } static void OnFailureCallback_6(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, bool boolean) + static void OnSuccessCallback_6(void * context, bool boolean) { (static_cast(context))->OnSuccessResponse_6(boolean); } - - - static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context) - { - (static_cast(context))->OnSuccessResponse_7(); - } - - - + static void OnSuccessCallback_7(void * context) { (static_cast(context))->OnSuccessResponse_7(); } static void OnFailureCallback_8(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context, bool boolean) + static void OnSuccessCallback_8(void * context, bool boolean) { (static_cast(context))->OnSuccessResponse_8(boolean); } - - - static void OnFailureCallback_9(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_9(status); } - static void OnSuccessCallback_9(void * context, uint8_t bitmap8) + static void OnSuccessCallback_9(void * context, uint8_t bitmap8) { (static_cast(context))->OnSuccessResponse_9(bitmap8); } - - - static void OnFailureCallback_10(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_10(status); } - static void OnSuccessCallback_10(void * context) - { - (static_cast(context))->OnSuccessResponse_10(); - } - - - + static void OnSuccessCallback_10(void * context) { (static_cast(context))->OnSuccessResponse_10(); } static void OnFailureCallback_11(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_11(status); } - static void OnSuccessCallback_11(void * context, uint8_t bitmap8) + static void OnSuccessCallback_11(void * context, uint8_t bitmap8) { (static_cast(context))->OnSuccessResponse_11(bitmap8); } - - - static void OnFailureCallback_12(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_12(status); } - static void OnSuccessCallback_12(void * context) - { - (static_cast(context))->OnSuccessResponse_12(); - } - - - + static void OnSuccessCallback_12(void * context) { (static_cast(context))->OnSuccessResponse_12(); } static void OnFailureCallback_13(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_13(status); } - static void OnSuccessCallback_13(void * context, uint8_t bitmap8) + static void OnSuccessCallback_13(void * context, uint8_t bitmap8) { (static_cast(context))->OnSuccessResponse_13(bitmap8); } - - - static void OnFailureCallback_14(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_14(status); } - static void OnSuccessCallback_14(void * context, uint16_t bitmap16) + static void OnSuccessCallback_14(void * context, uint16_t bitmap16) { (static_cast(context))->OnSuccessResponse_14(bitmap16); } - - - static void OnFailureCallback_15(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_15(status); } - static void OnSuccessCallback_15(void * context) - { - (static_cast(context))->OnSuccessResponse_15(); - } - - - + static void OnSuccessCallback_15(void * context) { (static_cast(context))->OnSuccessResponse_15(); } static void OnFailureCallback_16(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_16(status); } - static void OnSuccessCallback_16(void * context, uint16_t bitmap16) + static void OnSuccessCallback_16(void * context, uint16_t bitmap16) { (static_cast(context))->OnSuccessResponse_16(bitmap16); } - - - static void OnFailureCallback_17(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_17(status); } - static void OnSuccessCallback_17(void * context) - { - (static_cast(context))->OnSuccessResponse_17(); - } - - - + static void OnSuccessCallback_17(void * context) { (static_cast(context))->OnSuccessResponse_17(); } static void OnFailureCallback_18(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_18(status); } - static void OnSuccessCallback_18(void * context, uint16_t bitmap16) + static void OnSuccessCallback_18(void * context, uint16_t bitmap16) { (static_cast(context))->OnSuccessResponse_18(bitmap16); } - - - static void OnFailureCallback_19(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_19(status); } - static void OnSuccessCallback_19(void * context, uint32_t bitmap32) + static void OnSuccessCallback_19(void * context, uint32_t bitmap32) { (static_cast(context))->OnSuccessResponse_19(bitmap32); } - - - static void OnFailureCallback_20(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_20(status); } - static void OnSuccessCallback_20(void * context) - { - (static_cast(context))->OnSuccessResponse_20(); - } - - - + static void OnSuccessCallback_20(void * context) { (static_cast(context))->OnSuccessResponse_20(); } static void OnFailureCallback_21(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_21(status); } - static void OnSuccessCallback_21(void * context, uint32_t bitmap32) + static void OnSuccessCallback_21(void * context, uint32_t bitmap32) { (static_cast(context))->OnSuccessResponse_21(bitmap32); } - - - static void OnFailureCallback_22(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_22(status); } - static void OnSuccessCallback_22(void * context) - { - (static_cast(context))->OnSuccessResponse_22(); - } - - - + static void OnSuccessCallback_22(void * context) { (static_cast(context))->OnSuccessResponse_22(); } static void OnFailureCallback_23(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_23(status); } - static void OnSuccessCallback_23(void * context, uint32_t bitmap32) + static void OnSuccessCallback_23(void * context, uint32_t bitmap32) { (static_cast(context))->OnSuccessResponse_23(bitmap32); } - - - static void OnFailureCallback_24(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_24(status); } - static void OnSuccessCallback_24(void * context, uint64_t bitmap64) + static void OnSuccessCallback_24(void * context, uint64_t bitmap64) { (static_cast(context))->OnSuccessResponse_24(bitmap64); } - - - static void OnFailureCallback_25(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_25(status); } - static void OnSuccessCallback_25(void * context) - { - (static_cast(context))->OnSuccessResponse_25(); - } - - - + static void OnSuccessCallback_25(void * context) { (static_cast(context))->OnSuccessResponse_25(); } static void OnFailureCallback_26(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_26(status); } - static void OnSuccessCallback_26(void * context, uint64_t bitmap64) + static void OnSuccessCallback_26(void * context, uint64_t bitmap64) { (static_cast(context))->OnSuccessResponse_26(bitmap64); } - - - static void OnFailureCallback_27(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_27(status); } - static void OnSuccessCallback_27(void * context) - { - (static_cast(context))->OnSuccessResponse_27(); - } - - - + static void OnSuccessCallback_27(void * context) { (static_cast(context))->OnSuccessResponse_27(); } static void OnFailureCallback_28(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_28(status); } - static void OnSuccessCallback_28(void * context, uint64_t bitmap64) + static void OnSuccessCallback_28(void * context, uint64_t bitmap64) { (static_cast(context))->OnSuccessResponse_28(bitmap64); } - - - static void OnFailureCallback_29(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_29(status); } - static void OnSuccessCallback_29(void * context, uint8_t int8u) + static void OnSuccessCallback_29(void * context, uint8_t int8u) { (static_cast(context))->OnSuccessResponse_29(int8u); } - - - static void OnFailureCallback_30(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_30(status); } - static void OnSuccessCallback_30(void * context) - { - (static_cast(context))->OnSuccessResponse_30(); - } - - - + static void OnSuccessCallback_30(void * context) { (static_cast(context))->OnSuccessResponse_30(); } static void OnFailureCallback_31(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_31(status); } - static void OnSuccessCallback_31(void * context, uint8_t int8u) + static void OnSuccessCallback_31(void * context, uint8_t int8u) { (static_cast(context))->OnSuccessResponse_31(int8u); } - - - static void OnFailureCallback_32(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_32(status); } - static void OnSuccessCallback_32(void * context) - { - (static_cast(context))->OnSuccessResponse_32(); - } - - - + static void OnSuccessCallback_32(void * context) { (static_cast(context))->OnSuccessResponse_32(); } static void OnFailureCallback_33(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_33(status); } - static void OnSuccessCallback_33(void * context, uint8_t int8u) + static void OnSuccessCallback_33(void * context, uint8_t int8u) { (static_cast(context))->OnSuccessResponse_33(int8u); } - - - static void OnFailureCallback_34(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_34(status); } - static void OnSuccessCallback_34(void * context, uint16_t int16u) + static void OnSuccessCallback_34(void * context, uint16_t int16u) { (static_cast(context))->OnSuccessResponse_34(int16u); } - - - static void OnFailureCallback_35(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_35(status); } - static void OnSuccessCallback_35(void * context) - { - (static_cast(context))->OnSuccessResponse_35(); - } - - - + static void OnSuccessCallback_35(void * context) { (static_cast(context))->OnSuccessResponse_35(); } static void OnFailureCallback_36(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_36(status); } - static void OnSuccessCallback_36(void * context, uint16_t int16u) + static void OnSuccessCallback_36(void * context, uint16_t int16u) { (static_cast(context))->OnSuccessResponse_36(int16u); } - - - static void OnFailureCallback_37(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_37(status); } - static void OnSuccessCallback_37(void * context) - { - (static_cast(context))->OnSuccessResponse_37(); - } - - - + static void OnSuccessCallback_37(void * context) { (static_cast(context))->OnSuccessResponse_37(); } static void OnFailureCallback_38(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_38(status); } - static void OnSuccessCallback_38(void * context, uint16_t int16u) + static void OnSuccessCallback_38(void * context, uint16_t int16u) { (static_cast(context))->OnSuccessResponse_38(int16u); } - - - static void OnFailureCallback_39(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_39(status); } - static void OnSuccessCallback_39(void * context, uint32_t int32u) + static void OnSuccessCallback_39(void * context, uint32_t int32u) { (static_cast(context))->OnSuccessResponse_39(int32u); } - - - static void OnFailureCallback_40(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_40(status); } - static void OnSuccessCallback_40(void * context) - { - (static_cast(context))->OnSuccessResponse_40(); - } - - - + static void OnSuccessCallback_40(void * context) { (static_cast(context))->OnSuccessResponse_40(); } static void OnFailureCallback_41(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_41(status); } - static void OnSuccessCallback_41(void * context, uint32_t int32u) + static void OnSuccessCallback_41(void * context, uint32_t int32u) { (static_cast(context))->OnSuccessResponse_41(int32u); } - - - static void OnFailureCallback_42(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_42(status); } - static void OnSuccessCallback_42(void * context) - { - (static_cast(context))->OnSuccessResponse_42(); - } - - - + static void OnSuccessCallback_42(void * context) { (static_cast(context))->OnSuccessResponse_42(); } static void OnFailureCallback_43(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_43(status); } - static void OnSuccessCallback_43(void * context, uint32_t int32u) + static void OnSuccessCallback_43(void * context, uint32_t int32u) { (static_cast(context))->OnSuccessResponse_43(int32u); } - - - static void OnFailureCallback_44(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_44(status); } - static void OnSuccessCallback_44(void * context, uint64_t int64u) + static void OnSuccessCallback_44(void * context, uint64_t int64u) { (static_cast(context))->OnSuccessResponse_44(int64u); } - - - static void OnFailureCallback_45(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_45(status); } - static void OnSuccessCallback_45(void * context) - { - (static_cast(context))->OnSuccessResponse_45(); - } - - - + static void OnSuccessCallback_45(void * context) { (static_cast(context))->OnSuccessResponse_45(); } static void OnFailureCallback_46(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_46(status); } - static void OnSuccessCallback_46(void * context, uint64_t int64u) + static void OnSuccessCallback_46(void * context, uint64_t int64u) { (static_cast(context))->OnSuccessResponse_46(int64u); } - - - static void OnFailureCallback_47(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_47(status); } - static void OnSuccessCallback_47(void * context) - { - (static_cast(context))->OnSuccessResponse_47(); - } - - - + static void OnSuccessCallback_47(void * context) { (static_cast(context))->OnSuccessResponse_47(); } static void OnFailureCallback_48(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_48(status); } - static void OnSuccessCallback_48(void * context, uint64_t int64u) + static void OnSuccessCallback_48(void * context, uint64_t int64u) { (static_cast(context))->OnSuccessResponse_48(int64u); } - - - static void OnFailureCallback_49(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_49(status); } - static void OnSuccessCallback_49(void * context, int8_t int8s) + static void OnSuccessCallback_49(void * context, int8_t int8s) { (static_cast(context))->OnSuccessResponse_49(int8s); } - - - static void OnFailureCallback_50(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_50(status); } - static void OnSuccessCallback_50(void * context) - { - (static_cast(context))->OnSuccessResponse_50(); - } - - - + static void OnSuccessCallback_50(void * context) { (static_cast(context))->OnSuccessResponse_50(); } static void OnFailureCallback_51(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_51(status); } - static void OnSuccessCallback_51(void * context, int8_t int8s) + static void OnSuccessCallback_51(void * context, int8_t int8s) { (static_cast(context))->OnSuccessResponse_51(int8s); } - - - static void OnFailureCallback_52(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_52(status); } - static void OnSuccessCallback_52(void * context) - { - (static_cast(context))->OnSuccessResponse_52(); - } - - - + static void OnSuccessCallback_52(void * context) { (static_cast(context))->OnSuccessResponse_52(); } static void OnFailureCallback_53(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_53(status); } - static void OnSuccessCallback_53(void * context, int8_t int8s) + static void OnSuccessCallback_53(void * context, int8_t int8s) { (static_cast(context))->OnSuccessResponse_53(int8s); } - - - static void OnFailureCallback_54(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_54(status); } - static void OnSuccessCallback_54(void * context, int16_t int16s) + static void OnSuccessCallback_54(void * context, int16_t int16s) { (static_cast(context))->OnSuccessResponse_54(int16s); } - - - - static void OnFailureCallback_55(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_55(status); - } - - static void OnSuccessCallback_55(void * context) + static void OnFailureCallback_55(void * context, EmberAfStatus status) { - (static_cast(context))->OnSuccessResponse_55(); + (static_cast(context))->OnFailureResponse_55(status); } - - + static void OnSuccessCallback_55(void * context) { (static_cast(context))->OnSuccessResponse_55(); } static void OnFailureCallback_56(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_56(status); } - static void OnSuccessCallback_56(void * context, int16_t int16s) + static void OnSuccessCallback_56(void * context, int16_t int16s) { (static_cast(context))->OnSuccessResponse_56(int16s); } - - - static void OnFailureCallback_57(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_57(status); } - static void OnSuccessCallback_57(void * context) - { - (static_cast(context))->OnSuccessResponse_57(); - } - - - + static void OnSuccessCallback_57(void * context) { (static_cast(context))->OnSuccessResponse_57(); } static void OnFailureCallback_58(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_58(status); } - static void OnSuccessCallback_58(void * context, int16_t int16s) + static void OnSuccessCallback_58(void * context, int16_t int16s) { (static_cast(context))->OnSuccessResponse_58(int16s); } - - - static void OnFailureCallback_59(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_59(status); } - static void OnSuccessCallback_59(void * context, int32_t int32s) + static void OnSuccessCallback_59(void * context, int32_t int32s) { (static_cast(context))->OnSuccessResponse_59(int32s); } - - - static void OnFailureCallback_60(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_60(status); } - static void OnSuccessCallback_60(void * context) - { - (static_cast(context))->OnSuccessResponse_60(); - } - - - + static void OnSuccessCallback_60(void * context) { (static_cast(context))->OnSuccessResponse_60(); } static void OnFailureCallback_61(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_61(status); } - static void OnSuccessCallback_61(void * context, int32_t int32s) + static void OnSuccessCallback_61(void * context, int32_t int32s) { (static_cast(context))->OnSuccessResponse_61(int32s); } - - - static void OnFailureCallback_62(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_62(status); } - static void OnSuccessCallback_62(void * context) - { - (static_cast(context))->OnSuccessResponse_62(); - } - - - + static void OnSuccessCallback_62(void * context) { (static_cast(context))->OnSuccessResponse_62(); } static void OnFailureCallback_63(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_63(status); } - static void OnSuccessCallback_63(void * context, int32_t int32s) + static void OnSuccessCallback_63(void * context, int32_t int32s) { (static_cast(context))->OnSuccessResponse_63(int32s); } - - - static void OnFailureCallback_64(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_64(status); } - static void OnSuccessCallback_64(void * context, int64_t int64s) + static void OnSuccessCallback_64(void * context, int64_t int64s) { (static_cast(context))->OnSuccessResponse_64(int64s); } - - - static void OnFailureCallback_65(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_65(status); } - static void OnSuccessCallback_65(void * context) - { - (static_cast(context))->OnSuccessResponse_65(); - } - - - + static void OnSuccessCallback_65(void * context) { (static_cast(context))->OnSuccessResponse_65(); } static void OnFailureCallback_66(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_66(status); } - static void OnSuccessCallback_66(void * context, int64_t int64s) + static void OnSuccessCallback_66(void * context, int64_t int64s) { (static_cast(context))->OnSuccessResponse_66(int64s); } - - - static void OnFailureCallback_67(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_67(status); } - static void OnSuccessCallback_67(void * context) - { - (static_cast(context))->OnSuccessResponse_67(); - } - - - + static void OnSuccessCallback_67(void * context) { (static_cast(context))->OnSuccessResponse_67(); } static void OnFailureCallback_68(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_68(status); } - static void OnSuccessCallback_68(void * context, int64_t int64s) + static void OnSuccessCallback_68(void * context, int64_t int64s) { (static_cast(context))->OnSuccessResponse_68(int64s); } - - - static void OnFailureCallback_69(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_69(status); } - static void OnSuccessCallback_69(void * context, uint8_t enum8) + static void OnSuccessCallback_69(void * context, uint8_t enum8) { (static_cast(context))->OnSuccessResponse_69(enum8); } - - - static void OnFailureCallback_70(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_70(status); } - static void OnSuccessCallback_70(void * context) - { - (static_cast(context))->OnSuccessResponse_70(); - } - - - + static void OnSuccessCallback_70(void * context) { (static_cast(context))->OnSuccessResponse_70(); } static void OnFailureCallback_71(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_71(status); } - static void OnSuccessCallback_71(void * context, uint8_t enum8) + static void OnSuccessCallback_71(void * context, uint8_t enum8) { (static_cast(context))->OnSuccessResponse_71(enum8); } - - - static void OnFailureCallback_72(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_72(status); } - static void OnSuccessCallback_72(void * context) - { - (static_cast(context))->OnSuccessResponse_72(); - } - - - + static void OnSuccessCallback_72(void * context) { (static_cast(context))->OnSuccessResponse_72(); } static void OnFailureCallback_73(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_73(status); } - static void OnSuccessCallback_73(void * context, uint8_t enum8) + static void OnSuccessCallback_73(void * context, uint8_t enum8) { (static_cast(context))->OnSuccessResponse_73(enum8); } - - - static void OnFailureCallback_74(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_74(status); } - static void OnSuccessCallback_74(void * context, uint16_t enum16) + static void OnSuccessCallback_74(void * context, uint16_t enum16) { (static_cast(context))->OnSuccessResponse_74(enum16); } - - - static void OnFailureCallback_75(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_75(status); } - static void OnSuccessCallback_75(void * context) - { - (static_cast(context))->OnSuccessResponse_75(); - } - - - + static void OnSuccessCallback_75(void * context) { (static_cast(context))->OnSuccessResponse_75(); } static void OnFailureCallback_76(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_76(status); } - static void OnSuccessCallback_76(void * context, uint16_t enum16) + static void OnSuccessCallback_76(void * context, uint16_t enum16) { (static_cast(context))->OnSuccessResponse_76(enum16); } - - - static void OnFailureCallback_77(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_77(status); } - static void OnSuccessCallback_77(void * context) - { - (static_cast(context))->OnSuccessResponse_77(); - } - - - + static void OnSuccessCallback_77(void * context) { (static_cast(context))->OnSuccessResponse_77(); } static void OnFailureCallback_78(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_78(status); } - static void OnSuccessCallback_78(void * context, uint16_t enum16) + static void OnSuccessCallback_78(void * context, uint16_t enum16) { (static_cast(context))->OnSuccessResponse_78(enum16); } - - - static void OnFailureCallback_79(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_79(status); } - static void OnSuccessCallback_79(void * context, uint64_t epochUs) + static void OnSuccessCallback_79(void * context, uint64_t epochUs) { (static_cast(context))->OnSuccessResponse_79(epochUs); } - - - static void OnFailureCallback_80(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_80(status); } - static void OnSuccessCallback_80(void * context) - { - (static_cast(context))->OnSuccessResponse_80(); - } - - - + static void OnSuccessCallback_80(void * context) { (static_cast(context))->OnSuccessResponse_80(); } static void OnFailureCallback_81(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_81(status); } - static void OnSuccessCallback_81(void * context, uint64_t epochUs) + static void OnSuccessCallback_81(void * context, uint64_t epochUs) { (static_cast(context))->OnSuccessResponse_81(epochUs); } - - - static void OnFailureCallback_82(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_82(status); } - static void OnSuccessCallback_82(void * context) - { - (static_cast(context))->OnSuccessResponse_82(); - } - - - + static void OnSuccessCallback_82(void * context) { (static_cast(context))->OnSuccessResponse_82(); } static void OnFailureCallback_83(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_83(status); } - static void OnSuccessCallback_83(void * context, uint64_t epochUs) + static void OnSuccessCallback_83(void * context, uint64_t epochUs) { (static_cast(context))->OnSuccessResponse_83(epochUs); } - - - static void OnFailureCallback_84(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_84(status); } - static void OnSuccessCallback_84(void * context, uint32_t epochS) + static void OnSuccessCallback_84(void * context, uint32_t epochS) { (static_cast(context))->OnSuccessResponse_84(epochS); } - - - static void OnFailureCallback_85(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_85(status); } - static void OnSuccessCallback_85(void * context) - { - (static_cast(context))->OnSuccessResponse_85(); - } - - - + static void OnSuccessCallback_85(void * context) { (static_cast(context))->OnSuccessResponse_85(); } static void OnFailureCallback_86(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_86(status); } - static void OnSuccessCallback_86(void * context, uint32_t epochS) + static void OnSuccessCallback_86(void * context, uint32_t epochS) { (static_cast(context))->OnSuccessResponse_86(epochS); } - - - static void OnFailureCallback_87(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_87(status); } - static void OnSuccessCallback_87(void * context) - { - (static_cast(context))->OnSuccessResponse_87(); - } - - - + static void OnSuccessCallback_87(void * context) { (static_cast(context))->OnSuccessResponse_87(); } static void OnFailureCallback_88(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_88(status); } - static void OnSuccessCallback_88(void * context, uint32_t epochS) + static void OnSuccessCallback_88(void * context, uint32_t epochS) { (static_cast(context))->OnSuccessResponse_88(epochS); } - - - static void OnFailureCallback_89(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_89(status); } - static void OnSuccessCallback_89(void * context, chip::VendorId vendorId) + static void OnSuccessCallback_89(void * context, chip::VendorId vendorId) { (static_cast(context))->OnSuccessResponse_89(vendorId); } - - - static void OnFailureCallback_90(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_90(status); } - static void OnSuccessCallback_90(void * context) - { - (static_cast(context))->OnSuccessResponse_90(); - } - - - + static void OnSuccessCallback_90(void * context) { (static_cast(context))->OnSuccessResponse_90(); } static void OnFailureCallback_91(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_91(status); } - static void OnSuccessCallback_91(void * context, chip::VendorId vendorId) + static void OnSuccessCallback_91(void * context, chip::VendorId vendorId) { (static_cast(context))->OnSuccessResponse_91(vendorId); } - - - static void OnFailureCallback_92(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_92(status); } - static void OnSuccessCallback_92(void * context) - { - (static_cast(context))->OnSuccessResponse_92(); - } - - - + static void OnSuccessCallback_92(void * context) { (static_cast(context))->OnSuccessResponse_92(); } static void OnFailureCallback_93(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_93(status); } - static void OnSuccessCallback_93(void * context, chip::VendorId vendorId) + static void OnSuccessCallback_93(void * context, chip::VendorId vendorId) { (static_cast(context))->OnSuccessResponse_93(vendorId); } - - - static void OnFailureCallback_94(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_94(status); } - static void OnSuccessCallback_94(void * context, chip::CharSpan charString) + static void OnSuccessCallback_94(void * context, chip::CharSpan charString) { (static_cast(context))->OnSuccessResponse_94(charString); } - - - static void OnFailureCallback_95(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_95(status); } - static void OnSuccessCallback_95(void * context, chip::CharSpan charString) + static void OnSuccessCallback_95(void * context, chip::CharSpan charString) { (static_cast(context))->OnSuccessResponse_95(charString); } - - - static void OnFailureCallback_96(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_96(status); } - static void OnSuccessCallback_96(void * context) - { - (static_cast(context))->OnSuccessResponse_96(); - } - - - + static void OnSuccessCallback_96(void * context) { (static_cast(context))->OnSuccessResponse_96(); } static void OnFailureCallback_97(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_97(status); } - static void OnSuccessCallback_97(void * context, chip::CharSpan charString) + static void OnSuccessCallback_97(void * context, chip::CharSpan charString) { (static_cast(context))->OnSuccessResponse_97(charString); } - - - static void OnFailureCallback_98(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_98(status); } - static void OnSuccessCallback_98(void * context, chip::CharSpan charString) + static void OnSuccessCallback_98(void * context, chip::CharSpan charString) { (static_cast(context))->OnSuccessResponse_98(charString); } - - - static void OnFailureCallback_99(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_99(status); } - static void OnSuccessCallback_99(void * context) - { - (static_cast(context))->OnSuccessResponse_99(); - } - - - + static void OnSuccessCallback_99(void * context) { (static_cast(context))->OnSuccessResponse_99(); } static void OnFailureCallback_100(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_100(status); } - static void OnSuccessCallback_100(void * context, chip::CharSpan charString) + static void OnSuccessCallback_100(void * context, chip::CharSpan charString) { (static_cast(context))->OnSuccessResponse_100(charString); } - - - static void OnFailureCallback_101(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_101(status); } - static void OnSuccessCallback_101(void * context) - { - (static_cast(context))->OnSuccessResponse_101(); - } - - - + static void OnSuccessCallback_101(void * context) { (static_cast(context))->OnSuccessResponse_101(); } static void OnFailureCallback_102(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_102(status); } - static void OnSuccessCallback_102(void * context, chip::ByteSpan octetString) + static void OnSuccessCallback_102(void * context, chip::ByteSpan octetString) { (static_cast(context))->OnSuccessResponse_102(octetString); } - - - static void OnFailureCallback_103(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_103(status); } - static void OnSuccessCallback_103(void * context, chip::ByteSpan octetString) + static void OnSuccessCallback_103(void * context, chip::ByteSpan octetString) { (static_cast(context))->OnSuccessResponse_103(octetString); } - - - static void OnFailureCallback_104(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_104(status); } - static void OnSuccessCallback_104(void * context) - { - (static_cast(context))->OnSuccessResponse_104(); - } - - - + static void OnSuccessCallback_104(void * context) { (static_cast(context))->OnSuccessResponse_104(); } static void OnFailureCallback_105(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_105(status); } - static void OnSuccessCallback_105(void * context, chip::ByteSpan octetString) + static void OnSuccessCallback_105(void * context, chip::ByteSpan octetString) { (static_cast(context))->OnSuccessResponse_105(octetString); } - - - static void OnFailureCallback_106(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_106(status); } - static void OnSuccessCallback_106(void * context, chip::ByteSpan octetString) + static void OnSuccessCallback_106(void * context, chip::ByteSpan octetString) { (static_cast(context))->OnSuccessResponse_106(octetString); } - - - static void OnFailureCallback_107(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_107(status); } - static void OnSuccessCallback_107(void * context) - { - (static_cast(context))->OnSuccessResponse_107(); - } - - - + static void OnSuccessCallback_107(void * context) { (static_cast(context))->OnSuccessResponse_107(); } static void OnFailureCallback_108(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_108(status); } - static void OnSuccessCallback_108(void * context, chip::ByteSpan octetString) + static void OnSuccessCallback_108(void * context, chip::ByteSpan octetString) { (static_cast(context))->OnSuccessResponse_108(octetString); } - - - static void OnFailureCallback_109(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_109(status); } - static void OnSuccessCallback_109(void * context) - { - (static_cast(context))->OnSuccessResponse_109(); - } - - - + static void OnSuccessCallback_109(void * context) { (static_cast(context))->OnSuccessResponse_109(); } // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestSendTestAddArgumentsCommand_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type; RequestType request; - request.arg1 = 3; - request.arg2 = 17; - + request.arg1 = 3; + request.arg2 = 17; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_1(data.returnValue); }; @@ -80763,40 +61399,29 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint8_t returnValue) + void OnSuccessResponse_1(uint8_t returnValue) { - VerifyOrReturn(CheckValue("returnValue", returnValue,20 - )); + VerifyOrReturn(CheckValue("returnValue", returnValue, 20)); - TestAddArgumentDefaultValue = returnValue; + TestAddArgumentDefaultValue = returnValue; NextTest(); - } - - - + } - CHIP_ERROR TestSendTestAddArgumentsCommand_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type; RequestType request; - request.arg1 = 3; - request.arg2 = 17; - + request.arg1 = 3; + request.arg2 = 17; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_2(data.returnValue); }; @@ -80805,38 +61430,27 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan (static_cast(context))->OnFailureResponse_2(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint8_t returnValue) + void OnSuccessResponse_2(uint8_t returnValue) { - VerifyOrReturn(CheckValue("returnValue", returnValue,TestAddArgumentDefaultValue - )); + VerifyOrReturn(CheckValue("returnValue", returnValue, TestAddArgumentDefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestSendTestAddArgumentsCommand_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type; RequestType request; - request.arg1 = 3; - request.arg2 =TestAddArgumentDefaultValue; + request.arg1 = 3; + request.arg2 = TestAddArgumentDefaultValue; auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(data.returnValue); @@ -80846,58 +61460,40 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( uint8_t returnValue) + void OnSuccessResponse_3(uint8_t returnValue) { - VerifyOrReturn(CheckConstraintNotValue("returnValue", returnValue, TestAddArgumentDefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("returnValue", returnValue, TestAddArgumentDefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeBooleanDefaultValue_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( bool boolean) + void OnSuccessResponse_4(bool boolean) { - VerifyOrReturn(CheckValue("boolean", boolean,0 - )); + VerifyOrReturn(CheckValue("boolean", boolean, 0)); - readAttributeBooleanDefaultValue = boolean; + readAttributeBooleanDefaultValue = boolean; NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeBooleanNotDefaultValue_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -80905,52 +61501,37 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); bool booleanArgument; - booleanArgument = 1; - - ReturnErrorOnFailure(cluster.WriteAttribute(booleanArgument, this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + booleanArgument = 1; - void OnSuccessResponse_5() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + booleanArgument, this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_5() { NextTest(); } - CHIP_ERROR TestReadAttributeBooleanNotDefaultValue_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( bool boolean) + void OnSuccessResponse_6(bool boolean) { - VerifyOrReturn(CheckConstraintNotValue("boolean", boolean, readAttributeBooleanDefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("boolean", boolean, readAttributeBooleanDefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeBooleanDefaultValue_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -80958,82 +61539,58 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); bool booleanArgument; - booleanArgument =readAttributeBooleanDefaultValue; + booleanArgument = readAttributeBooleanDefaultValue; - ReturnErrorOnFailure(cluster.WriteAttribute(booleanArgument, this, OnSuccessCallback_7, OnFailureCallback_7)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + booleanArgument, this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_7() - { NextTest(); - } - + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_7() { NextTest(); } - CHIP_ERROR TestReadAttributeBooleanFalse_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_8, OnFailureCallback_8)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_8, OnFailureCallback_8)); + return CHIP_NO_ERROR; } - void OnFailureResponse_8(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_8( bool boolean) + void OnSuccessResponse_8(bool boolean) { - VerifyOrReturn(CheckValue("boolean", boolean,readAttributeBooleanDefaultValue - )); + VerifyOrReturn(CheckValue("boolean", boolean, readAttributeBooleanDefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeBitmap8DefaultValue_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_9, OnFailureCallback_9)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_9, OnFailureCallback_9)); + return CHIP_NO_ERROR; } - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_9( uint8_t bitmap8) + void OnSuccessResponse_9(uint8_t bitmap8) { - VerifyOrReturn(CheckValue("bitmap8", bitmap8,0 - )); + VerifyOrReturn(CheckValue("bitmap8", bitmap8, 0)); - readAttributeBitmap8DefaultValue = bitmap8; + readAttributeBitmap8DefaultValue = bitmap8; NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeBitmap8NotDefaultValue_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -81041,52 +61598,37 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t bitmap8Argument; - bitmap8Argument = 1; - - ReturnErrorOnFailure(cluster.WriteAttribute(bitmap8Argument, this, OnSuccessCallback_10, OnFailureCallback_10)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_10(EmberAfStatus status) - { - ThrowFailureResponse(); - } + bitmap8Argument = 1; - void OnSuccessResponse_10() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + bitmap8Argument, this, OnSuccessCallback_10, OnFailureCallback_10)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_10() { NextTest(); } - CHIP_ERROR TestReadAttributeBitmap8NotDefaultValue_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_11, OnFailureCallback_11)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_11, OnFailureCallback_11)); + return CHIP_NO_ERROR; } - void OnFailureResponse_11(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_11( uint8_t bitmap8) + void OnSuccessResponse_11(uint8_t bitmap8) { - VerifyOrReturn(CheckConstraintNotValue("bitmap8", bitmap8, readAttributeBitmap8DefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("bitmap8", bitmap8, readAttributeBitmap8DefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeBitmap8DefaultValue_12() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -81094,82 +61636,58 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t bitmap8Argument; - bitmap8Argument =readAttributeBitmap8DefaultValue; + bitmap8Argument = readAttributeBitmap8DefaultValue; - ReturnErrorOnFailure(cluster.WriteAttribute(bitmap8Argument, this, OnSuccessCallback_12, OnFailureCallback_12)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + bitmap8Argument, this, OnSuccessCallback_12, OnFailureCallback_12)); + return CHIP_NO_ERROR; } - void OnFailureResponse_12(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_12() - { NextTest(); - } - + void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_12() { NextTest(); } - CHIP_ERROR TestReadAttributeBitmap8DefaultValue_13() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_13, OnFailureCallback_13)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_13, OnFailureCallback_13)); + return CHIP_NO_ERROR; } - void OnFailureResponse_13(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_13(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_13( uint8_t bitmap8) + void OnSuccessResponse_13(uint8_t bitmap8) { - VerifyOrReturn(CheckValue("bitmap8", bitmap8,readAttributeBitmap8DefaultValue - )); + VerifyOrReturn(CheckValue("bitmap8", bitmap8, readAttributeBitmap8DefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeBitmap16DefaultValue_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_14, OnFailureCallback_14)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_14, OnFailureCallback_14)); + return CHIP_NO_ERROR; } - void OnFailureResponse_14(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_14( uint16_t bitmap16) + void OnSuccessResponse_14(uint16_t bitmap16) { - VerifyOrReturn(CheckValue("bitmap16", bitmap16,0U - )); + VerifyOrReturn(CheckValue("bitmap16", bitmap16, 0U)); - readAttributeBitmap16DefaultValue = bitmap16; + readAttributeBitmap16DefaultValue = bitmap16; NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeBitmap16NotDefaultValue_15() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -81177,52 +61695,37 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t bitmap16Argument; - bitmap16Argument = 1U; - - ReturnErrorOnFailure(cluster.WriteAttribute(bitmap16Argument, this, OnSuccessCallback_15, OnFailureCallback_15)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_15(EmberAfStatus status) - { - ThrowFailureResponse(); - } + bitmap16Argument = 1U; - void OnSuccessResponse_15() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + bitmap16Argument, this, OnSuccessCallback_15, OnFailureCallback_15)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_15(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_15() { NextTest(); } - CHIP_ERROR TestReadAttributeBitmap16NotDefaultValue_16() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_16, OnFailureCallback_16)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_16, OnFailureCallback_16)); + return CHIP_NO_ERROR; } - void OnFailureResponse_16(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_16(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_16( uint16_t bitmap16) + void OnSuccessResponse_16(uint16_t bitmap16) { - VerifyOrReturn(CheckConstraintNotValue("bitmap16", bitmap16, readAttributeBitmap16DefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("bitmap16", bitmap16, readAttributeBitmap16DefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeBitmap16DefaultValue_17() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -81230,82 +61733,58 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t bitmap16Argument; - bitmap16Argument =readAttributeBitmap16DefaultValue; + bitmap16Argument = readAttributeBitmap16DefaultValue; - ReturnErrorOnFailure(cluster.WriteAttribute(bitmap16Argument, this, OnSuccessCallback_17, OnFailureCallback_17)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + bitmap16Argument, this, OnSuccessCallback_17, OnFailureCallback_17)); + return CHIP_NO_ERROR; } - void OnFailureResponse_17(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_17() - { NextTest(); - } - + void OnFailureResponse_17(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_17() { NextTest(); } - CHIP_ERROR TestReadAttributeBitmap16DefaultValue_18() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_18, OnFailureCallback_18)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_18, OnFailureCallback_18)); + return CHIP_NO_ERROR; } - void OnFailureResponse_18(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_18(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_18( uint16_t bitmap16) + void OnSuccessResponse_18(uint16_t bitmap16) { - VerifyOrReturn(CheckValue("bitmap16", bitmap16,readAttributeBitmap16DefaultValue - )); + VerifyOrReturn(CheckValue("bitmap16", bitmap16, readAttributeBitmap16DefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeBitmap32DefaultValue_19() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_19, OnFailureCallback_19)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_19, OnFailureCallback_19)); + return CHIP_NO_ERROR; } - void OnFailureResponse_19(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_19(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_19( uint32_t bitmap32) + void OnSuccessResponse_19(uint32_t bitmap32) { - VerifyOrReturn(CheckValue("bitmap32", bitmap32,0UL - )); + VerifyOrReturn(CheckValue("bitmap32", bitmap32, 0UL)); - readAttributeBitmap32DefaultValue = bitmap32; + readAttributeBitmap32DefaultValue = bitmap32; NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeBitmap32NotDefaultValue_20() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -81313,52 +61792,37 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint32_t bitmap32Argument; - bitmap32Argument = 1UL; - - ReturnErrorOnFailure(cluster.WriteAttribute(bitmap32Argument, this, OnSuccessCallback_20, OnFailureCallback_20)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_20(EmberAfStatus status) - { - ThrowFailureResponse(); - } + bitmap32Argument = 1UL; - void OnSuccessResponse_20() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + bitmap32Argument, this, OnSuccessCallback_20, OnFailureCallback_20)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_20(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_20() { NextTest(); } - CHIP_ERROR TestReadAttributeBitmap32NotDefaultValue_21() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_21, OnFailureCallback_21)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_21, OnFailureCallback_21)); + return CHIP_NO_ERROR; } - void OnFailureResponse_21(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_21(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_21( uint32_t bitmap32) + void OnSuccessResponse_21(uint32_t bitmap32) { - VerifyOrReturn(CheckConstraintNotValue("bitmap32", bitmap32, readAttributeBitmap32DefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("bitmap32", bitmap32, readAttributeBitmap32DefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeBitmap32DefaultValue_22() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -81366,82 +61830,58 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint32_t bitmap32Argument; - bitmap32Argument =readAttributeBitmap32DefaultValue; + bitmap32Argument = readAttributeBitmap32DefaultValue; - ReturnErrorOnFailure(cluster.WriteAttribute(bitmap32Argument, this, OnSuccessCallback_22, OnFailureCallback_22)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + bitmap32Argument, this, OnSuccessCallback_22, OnFailureCallback_22)); + return CHIP_NO_ERROR; } - void OnFailureResponse_22(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_22() - { NextTest(); - } - + void OnFailureResponse_22(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_22() { NextTest(); } - CHIP_ERROR TestReadAttributeBitmap32DefaultValue_23() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_23, OnFailureCallback_23)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_23, OnFailureCallback_23)); + return CHIP_NO_ERROR; } - void OnFailureResponse_23(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_23(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_23( uint32_t bitmap32) + void OnSuccessResponse_23(uint32_t bitmap32) { - VerifyOrReturn(CheckValue("bitmap32", bitmap32,readAttributeBitmap32DefaultValue - )); + VerifyOrReturn(CheckValue("bitmap32", bitmap32, readAttributeBitmap32DefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeBitmap64DefaultValue_24() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_24, OnFailureCallback_24)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_24, OnFailureCallback_24)); + return CHIP_NO_ERROR; } - void OnFailureResponse_24(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_24(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_24( uint64_t bitmap64) + void OnSuccessResponse_24(uint64_t bitmap64) { - VerifyOrReturn(CheckValue("bitmap64", bitmap64,0ULL - )); + VerifyOrReturn(CheckValue("bitmap64", bitmap64, 0ULL)); - readAttributeBitmap64DefaultValue = bitmap64; + readAttributeBitmap64DefaultValue = bitmap64; NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeBitmap64NotDefaultValue_25() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -81449,52 +61889,37 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint64_t bitmap64Argument; - bitmap64Argument = 1ULL; - - ReturnErrorOnFailure(cluster.WriteAttribute(bitmap64Argument, this, OnSuccessCallback_25, OnFailureCallback_25)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_25(EmberAfStatus status) - { - ThrowFailureResponse(); - } + bitmap64Argument = 1ULL; - void OnSuccessResponse_25() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + bitmap64Argument, this, OnSuccessCallback_25, OnFailureCallback_25)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_25(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_25() { NextTest(); } - CHIP_ERROR TestReadAttributeBitmap64DefaultValue_26() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_26, OnFailureCallback_26)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_26, OnFailureCallback_26)); + return CHIP_NO_ERROR; } - void OnFailureResponse_26(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_26(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_26( uint64_t bitmap64) + void OnSuccessResponse_26(uint64_t bitmap64) { - VerifyOrReturn(CheckConstraintNotValue("bitmap64", bitmap64, readAttributeBitmap64DefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("bitmap64", bitmap64, readAttributeBitmap64DefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeBitmap64DefaultValue_27() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -81502,82 +61927,58 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint64_t bitmap64Argument; - bitmap64Argument =readAttributeBitmap64DefaultValue; + bitmap64Argument = readAttributeBitmap64DefaultValue; - ReturnErrorOnFailure(cluster.WriteAttribute(bitmap64Argument, this, OnSuccessCallback_27, OnFailureCallback_27)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + bitmap64Argument, this, OnSuccessCallback_27, OnFailureCallback_27)); + return CHIP_NO_ERROR; } - void OnFailureResponse_27(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_27() - { NextTest(); - } - + void OnFailureResponse_27(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_27() { NextTest(); } - CHIP_ERROR TestReadAttributeBitmap64DefaultValue_28() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_28, OnFailureCallback_28)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_28, OnFailureCallback_28)); + return CHIP_NO_ERROR; } - void OnFailureResponse_28(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_28(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_28( uint64_t bitmap64) + void OnSuccessResponse_28(uint64_t bitmap64) { - VerifyOrReturn(CheckValue("bitmap64", bitmap64,readAttributeBitmap64DefaultValue - )); + VerifyOrReturn(CheckValue("bitmap64", bitmap64, readAttributeBitmap64DefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeInt8uDefaultValue_29() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_29, OnFailureCallback_29)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_29, OnFailureCallback_29)); + return CHIP_NO_ERROR; } - void OnFailureResponse_29(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_29(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_29( uint8_t int8u) + void OnSuccessResponse_29(uint8_t int8u) { - VerifyOrReturn(CheckValue("int8u", int8u,0 - )); + VerifyOrReturn(CheckValue("int8u", int8u, 0)); - readAttributeInt8uDefaultValue = int8u; + readAttributeInt8uDefaultValue = int8u; NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt8uNotDefaultValue_30() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -81585,52 +61986,37 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t int8uArgument; - int8uArgument = 1; - - ReturnErrorOnFailure(cluster.WriteAttribute(int8uArgument, this, OnSuccessCallback_30, OnFailureCallback_30)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_30(EmberAfStatus status) - { - ThrowFailureResponse(); - } + int8uArgument = 1; - void OnSuccessResponse_30() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + int8uArgument, this, OnSuccessCallback_30, OnFailureCallback_30)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_30(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_30() { NextTest(); } - CHIP_ERROR TestReadAttributeInt8uNotDefaultValue_31() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_31, OnFailureCallback_31)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_31, OnFailureCallback_31)); + return CHIP_NO_ERROR; } - void OnFailureResponse_31(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_31(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_31( uint8_t int8u) + void OnSuccessResponse_31(uint8_t int8u) { - VerifyOrReturn(CheckConstraintNotValue("int8u", int8u, readAttributeInt8uDefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("int8u", int8u, readAttributeInt8uDefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt8uDefaultValue_32() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -81638,82 +62024,58 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t int8uArgument; - int8uArgument =readAttributeInt8uDefaultValue; + int8uArgument = readAttributeInt8uDefaultValue; - ReturnErrorOnFailure(cluster.WriteAttribute(int8uArgument, this, OnSuccessCallback_32, OnFailureCallback_32)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + int8uArgument, this, OnSuccessCallback_32, OnFailureCallback_32)); + return CHIP_NO_ERROR; } - void OnFailureResponse_32(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_32() - { NextTest(); - } - + void OnFailureResponse_32(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_32() { NextTest(); } - CHIP_ERROR TestReadAttributeInt8uDefaultValue_33() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_33, OnFailureCallback_33)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_33, OnFailureCallback_33)); + return CHIP_NO_ERROR; } - void OnFailureResponse_33(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_33(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_33( uint8_t int8u) + void OnSuccessResponse_33(uint8_t int8u) { - VerifyOrReturn(CheckValue("int8u", int8u,readAttributeInt8uDefaultValue - )); + VerifyOrReturn(CheckValue("int8u", int8u, readAttributeInt8uDefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeInt16uDefaultValue_34() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_34, OnFailureCallback_34)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_34, OnFailureCallback_34)); + return CHIP_NO_ERROR; } - void OnFailureResponse_34(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_34(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_34( uint16_t int16u) + void OnSuccessResponse_34(uint16_t int16u) { - VerifyOrReturn(CheckValue("int16u", int16u,0U - )); + VerifyOrReturn(CheckValue("int16u", int16u, 0U)); - readAttributeInt16uDefaultValue = int16u; + readAttributeInt16uDefaultValue = int16u; NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt16uNotDefaultValue_35() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -81721,52 +62083,37 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t int16uArgument; - int16uArgument = 1U; - - ReturnErrorOnFailure(cluster.WriteAttribute(int16uArgument, this, OnSuccessCallback_35, OnFailureCallback_35)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_35(EmberAfStatus status) - { - ThrowFailureResponse(); - } + int16uArgument = 1U; - void OnSuccessResponse_35() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + int16uArgument, this, OnSuccessCallback_35, OnFailureCallback_35)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_35(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_35() { NextTest(); } - CHIP_ERROR TestReadAttributeInt16uNotDefaultValue_36() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_36, OnFailureCallback_36)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_36, OnFailureCallback_36)); + return CHIP_NO_ERROR; } - void OnFailureResponse_36(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_36( uint16_t int16u) - { - VerifyOrReturn(CheckConstraintNotValue("int16u", int16u, readAttributeInt16uDefaultValue)); - - NextTest(); - } + void OnFailureResponse_36(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_36(uint16_t int16u) + { + VerifyOrReturn(CheckConstraintNotValue("int16u", int16u, readAttributeInt16uDefaultValue)); - + NextTest(); + } - CHIP_ERROR TestWriteAttributeInt16uDefaultValue_37() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -81774,82 +62121,58 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t int16uArgument; - int16uArgument =readAttributeInt16uDefaultValue; + int16uArgument = readAttributeInt16uDefaultValue; - ReturnErrorOnFailure(cluster.WriteAttribute(int16uArgument, this, OnSuccessCallback_37, OnFailureCallback_37)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + int16uArgument, this, OnSuccessCallback_37, OnFailureCallback_37)); + return CHIP_NO_ERROR; } - void OnFailureResponse_37(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_37() - { NextTest(); - } - + void OnFailureResponse_37(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_37() { NextTest(); } - CHIP_ERROR TestReadAttributeInt16uDefaultValue_38() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_38, OnFailureCallback_38)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_38, OnFailureCallback_38)); + return CHIP_NO_ERROR; } - void OnFailureResponse_38(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_38(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_38( uint16_t int16u) + void OnSuccessResponse_38(uint16_t int16u) { - VerifyOrReturn(CheckValue("int16u", int16u,readAttributeInt16uDefaultValue - )); + VerifyOrReturn(CheckValue("int16u", int16u, readAttributeInt16uDefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeInt32uDefaultValue_39() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_39, OnFailureCallback_39)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_39, OnFailureCallback_39)); + return CHIP_NO_ERROR; } - void OnFailureResponse_39(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_39(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_39( uint32_t int32u) + void OnSuccessResponse_39(uint32_t int32u) { - VerifyOrReturn(CheckValue("int32u", int32u,0UL - )); + VerifyOrReturn(CheckValue("int32u", int32u, 0UL)); - readAttributeInt32uDefaultValue = int32u; + readAttributeInt32uDefaultValue = int32u; NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt32uNotDefaultValue_40() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -81857,52 +62180,37 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint32_t int32uArgument; - int32uArgument = 1UL; - - ReturnErrorOnFailure(cluster.WriteAttribute(int32uArgument, this, OnSuccessCallback_40, OnFailureCallback_40)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_40(EmberAfStatus status) - { - ThrowFailureResponse(); - } + int32uArgument = 1UL; - void OnSuccessResponse_40() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + int32uArgument, this, OnSuccessCallback_40, OnFailureCallback_40)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_40(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_40() { NextTest(); } - CHIP_ERROR TestReadAttributeInt32uNotDefaultValue_41() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_41, OnFailureCallback_41)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_41, OnFailureCallback_41)); + return CHIP_NO_ERROR; } - void OnFailureResponse_41(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_41(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_41( uint32_t int32u) + void OnSuccessResponse_41(uint32_t int32u) { - VerifyOrReturn(CheckConstraintNotValue("int32u", int32u, readAttributeInt32uDefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("int32u", int32u, readAttributeInt32uDefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt32uDefaultValue_42() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -81910,82 +62218,58 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint32_t int32uArgument; - int32uArgument =readAttributeInt32uDefaultValue; + int32uArgument = readAttributeInt32uDefaultValue; - ReturnErrorOnFailure(cluster.WriteAttribute(int32uArgument, this, OnSuccessCallback_42, OnFailureCallback_42)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + int32uArgument, this, OnSuccessCallback_42, OnFailureCallback_42)); + return CHIP_NO_ERROR; } - void OnFailureResponse_42(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_42() - { NextTest(); - } - + void OnFailureResponse_42(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_42() { NextTest(); } - CHIP_ERROR TestReadAttributeInt32uDefaultValue_43() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_43, OnFailureCallback_43)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_43, OnFailureCallback_43)); + return CHIP_NO_ERROR; } - void OnFailureResponse_43(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_43(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_43( uint32_t int32u) + void OnSuccessResponse_43(uint32_t int32u) { - VerifyOrReturn(CheckValue("int32u", int32u,readAttributeInt32uDefaultValue - )); + VerifyOrReturn(CheckValue("int32u", int32u, readAttributeInt32uDefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeInt64uDefaultValue_44() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_44, OnFailureCallback_44)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_44, OnFailureCallback_44)); + return CHIP_NO_ERROR; } - void OnFailureResponse_44(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_44(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_44( uint64_t int64u) + void OnSuccessResponse_44(uint64_t int64u) { - VerifyOrReturn(CheckValue("int64u", int64u,0ULL - )); + VerifyOrReturn(CheckValue("int64u", int64u, 0ULL)); - readAttributeInt64uDefaultValue = int64u; + readAttributeInt64uDefaultValue = int64u; NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt64uNotDefaultValue_45() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -81993,52 +62277,37 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint64_t int64uArgument; - int64uArgument = 1ULL; - - ReturnErrorOnFailure(cluster.WriteAttribute(int64uArgument, this, OnSuccessCallback_45, OnFailureCallback_45)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_45(EmberAfStatus status) - { - ThrowFailureResponse(); - } + int64uArgument = 1ULL; - void OnSuccessResponse_45() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + int64uArgument, this, OnSuccessCallback_45, OnFailureCallback_45)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_45(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_45() { NextTest(); } - CHIP_ERROR TestReadAttributeInt64uNotDefaultValue_46() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_46, OnFailureCallback_46)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_46, OnFailureCallback_46)); + return CHIP_NO_ERROR; } - void OnFailureResponse_46(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_46(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_46( uint64_t int64u) + void OnSuccessResponse_46(uint64_t int64u) { - VerifyOrReturn(CheckConstraintNotValue("int64u", int64u, readAttributeInt64uDefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("int64u", int64u, readAttributeInt64uDefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt64uDefaultValue_47() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -82046,82 +62315,58 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint64_t int64uArgument; - int64uArgument =readAttributeInt64uDefaultValue; + int64uArgument = readAttributeInt64uDefaultValue; - ReturnErrorOnFailure(cluster.WriteAttribute(int64uArgument, this, OnSuccessCallback_47, OnFailureCallback_47)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + int64uArgument, this, OnSuccessCallback_47, OnFailureCallback_47)); + return CHIP_NO_ERROR; } - void OnFailureResponse_47(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_47() - { NextTest(); - } - + void OnFailureResponse_47(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_47() { NextTest(); } - CHIP_ERROR TestReadAttributeInt64uDefaultValue_48() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_48, OnFailureCallback_48)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_48, OnFailureCallback_48)); + return CHIP_NO_ERROR; } - void OnFailureResponse_48(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_48(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_48( uint64_t int64u) + void OnSuccessResponse_48(uint64_t int64u) { - VerifyOrReturn(CheckValue("int64u", int64u,readAttributeInt64uDefaultValue - )); + VerifyOrReturn(CheckValue("int64u", int64u, readAttributeInt64uDefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeInt8sDefaultValue_49() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_49, OnFailureCallback_49)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_49, OnFailureCallback_49)); + return CHIP_NO_ERROR; } - void OnFailureResponse_49(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_49(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_49( int8_t int8s) + void OnSuccessResponse_49(int8_t int8s) { - VerifyOrReturn(CheckValue("int8s", int8s,0 - )); + VerifyOrReturn(CheckValue("int8s", int8s, 0)); - readAttributeInt8sDefaultValue = int8s; + readAttributeInt8sDefaultValue = int8s; NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt8sNotDefaultValue_50() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -82129,52 +62374,37 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); int8_t int8sArgument; - int8sArgument = 1; - - ReturnErrorOnFailure(cluster.WriteAttribute(int8sArgument, this, OnSuccessCallback_50, OnFailureCallback_50)); - return CHIP_NO_ERROR; - } + int8sArgument = 1; - void OnFailureResponse_50(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_50() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + int8sArgument, this, OnSuccessCallback_50, OnFailureCallback_50)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_50(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_50() { NextTest(); } - CHIP_ERROR TestReadAttributeInt8sNotDefaultValue_51() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_51, OnFailureCallback_51)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_51, OnFailureCallback_51)); + return CHIP_NO_ERROR; } - void OnFailureResponse_51(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_51(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_51( int8_t int8s) + void OnSuccessResponse_51(int8_t int8s) { - VerifyOrReturn(CheckConstraintNotValue("int8s", int8s, readAttributeInt8sDefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("int8s", int8s, readAttributeInt8sDefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt8sDefaultValue_52() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -82182,82 +62412,58 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); int8_t int8sArgument; - int8sArgument =readAttributeInt8sDefaultValue; + int8sArgument = readAttributeInt8sDefaultValue; - ReturnErrorOnFailure(cluster.WriteAttribute(int8sArgument, this, OnSuccessCallback_52, OnFailureCallback_52)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + int8sArgument, this, OnSuccessCallback_52, OnFailureCallback_52)); + return CHIP_NO_ERROR; } - void OnFailureResponse_52(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_52() - { NextTest(); - } - + void OnFailureResponse_52(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_52() { NextTest(); } - CHIP_ERROR TestReadAttributeInt8sDefaultValue_53() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_53, OnFailureCallback_53)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_53, OnFailureCallback_53)); + return CHIP_NO_ERROR; } - void OnFailureResponse_53(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_53(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_53( int8_t int8s) + void OnSuccessResponse_53(int8_t int8s) { - VerifyOrReturn(CheckValue("int8s", int8s,readAttributeInt8sDefaultValue - )); + VerifyOrReturn(CheckValue("int8s", int8s, readAttributeInt8sDefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeInt16sDefaultValue_54() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_54, OnFailureCallback_54)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_54, OnFailureCallback_54)); + return CHIP_NO_ERROR; } - void OnFailureResponse_54(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_54(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_54( int16_t int16s) + void OnSuccessResponse_54(int16_t int16s) { - VerifyOrReturn(CheckValue("int16s", int16s,0 - )); + VerifyOrReturn(CheckValue("int16s", int16s, 0)); - readAttributeInt16sDefaultValue = int16s; + readAttributeInt16sDefaultValue = int16s; NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt16sNotDefaultValue_55() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -82265,52 +62471,37 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t int16sArgument; - int16sArgument = 1; - - ReturnErrorOnFailure(cluster.WriteAttribute(int16sArgument, this, OnSuccessCallback_55, OnFailureCallback_55)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_55(EmberAfStatus status) - { - ThrowFailureResponse(); - } + int16sArgument = 1; - void OnSuccessResponse_55() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + int16sArgument, this, OnSuccessCallback_55, OnFailureCallback_55)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_55(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_55() { NextTest(); } - CHIP_ERROR TestReadAttributeInt16sNotDefaultValue_56() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_56, OnFailureCallback_56)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_56, OnFailureCallback_56)); + return CHIP_NO_ERROR; } - void OnFailureResponse_56(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_56(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_56( int16_t int16s) + void OnSuccessResponse_56(int16_t int16s) { - VerifyOrReturn(CheckConstraintNotValue("int16s", int16s, readAttributeInt16sDefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("int16s", int16s, readAttributeInt16sDefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt16sDefaultValue_57() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -82318,82 +62509,58 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); int16_t int16sArgument; - int16sArgument =readAttributeInt16sDefaultValue; + int16sArgument = readAttributeInt16sDefaultValue; - ReturnErrorOnFailure(cluster.WriteAttribute(int16sArgument, this, OnSuccessCallback_57, OnFailureCallback_57)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + int16sArgument, this, OnSuccessCallback_57, OnFailureCallback_57)); + return CHIP_NO_ERROR; } - void OnFailureResponse_57(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_57() - { NextTest(); - } - + void OnFailureResponse_57(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_57() { NextTest(); } - CHIP_ERROR TestReadAttributeInt16sDefaultValue_58() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_58, OnFailureCallback_58)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_58, OnFailureCallback_58)); + return CHIP_NO_ERROR; } - void OnFailureResponse_58(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_58(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_58( int16_t int16s) + void OnSuccessResponse_58(int16_t int16s) { - VerifyOrReturn(CheckValue("int16s", int16s,readAttributeInt16sDefaultValue - )); + VerifyOrReturn(CheckValue("int16s", int16s, readAttributeInt16sDefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeInt32sDefaultValue_59() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_59, OnFailureCallback_59)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_59, OnFailureCallback_59)); + return CHIP_NO_ERROR; } - void OnFailureResponse_59(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_59(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_59( int32_t int32s) + void OnSuccessResponse_59(int32_t int32s) { - VerifyOrReturn(CheckValue("int32s", int32s,0L - )); + VerifyOrReturn(CheckValue("int32s", int32s, 0L)); - readAttributeInt32sDefaultValue = int32s; + readAttributeInt32sDefaultValue = int32s; NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt32sNotDefaultValue_60() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -82401,52 +62568,37 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); int32_t int32sArgument; - int32sArgument = 1L; - - ReturnErrorOnFailure(cluster.WriteAttribute(int32sArgument, this, OnSuccessCallback_60, OnFailureCallback_60)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_60(EmberAfStatus status) - { - ThrowFailureResponse(); - } + int32sArgument = 1L; - void OnSuccessResponse_60() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + int32sArgument, this, OnSuccessCallback_60, OnFailureCallback_60)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_60(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_60() { NextTest(); } - CHIP_ERROR TestReadAttributeInt32sNotDefaultValue_61() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_61, OnFailureCallback_61)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_61, OnFailureCallback_61)); + return CHIP_NO_ERROR; } - void OnFailureResponse_61(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_61(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_61( int32_t int32s) + void OnSuccessResponse_61(int32_t int32s) { - VerifyOrReturn(CheckConstraintNotValue("int32s", int32s, readAttributeInt32sDefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("int32s", int32s, readAttributeInt32sDefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt32sDefaultValue_62() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -82454,82 +62606,58 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); int32_t int32sArgument; - int32sArgument =readAttributeInt32sDefaultValue; + int32sArgument = readAttributeInt32sDefaultValue; - ReturnErrorOnFailure(cluster.WriteAttribute(int32sArgument, this, OnSuccessCallback_62, OnFailureCallback_62)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + int32sArgument, this, OnSuccessCallback_62, OnFailureCallback_62)); + return CHIP_NO_ERROR; } - void OnFailureResponse_62(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_62() - { NextTest(); - } - + void OnFailureResponse_62(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_62() { NextTest(); } - CHIP_ERROR TestReadAttributeInt32sDefaultValue_63() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_63, OnFailureCallback_63)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_63, OnFailureCallback_63)); + return CHIP_NO_ERROR; } - void OnFailureResponse_63(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_63(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_63( int32_t int32s) + void OnSuccessResponse_63(int32_t int32s) { - VerifyOrReturn(CheckValue("int32s", int32s,readAttributeInt32sDefaultValue - )); + VerifyOrReturn(CheckValue("int32s", int32s, readAttributeInt32sDefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeInt64sDefaultValue_64() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_64, OnFailureCallback_64)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_64, OnFailureCallback_64)); + return CHIP_NO_ERROR; } - void OnFailureResponse_64(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_64(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_64( int64_t int64s) + void OnSuccessResponse_64(int64_t int64s) { - VerifyOrReturn(CheckValue("int64s", int64s,0LL - )); + VerifyOrReturn(CheckValue("int64s", int64s, 0LL)); - readAttributeInt64sDefaultValue = int64s; + readAttributeInt64sDefaultValue = int64s; NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeIntsNotDefaultValue_65() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -82537,52 +62665,37 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); int64_t int64sArgument; - int64sArgument = 1LL; - - ReturnErrorOnFailure(cluster.WriteAttribute(int64sArgument, this, OnSuccessCallback_65, OnFailureCallback_65)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_65(EmberAfStatus status) - { - ThrowFailureResponse(); - } + int64sArgument = 1LL; - void OnSuccessResponse_65() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + int64sArgument, this, OnSuccessCallback_65, OnFailureCallback_65)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_65(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_65() { NextTest(); } - CHIP_ERROR TestReadAttributeInt64sNotDefaultValue_66() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_66, OnFailureCallback_66)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_66, OnFailureCallback_66)); + return CHIP_NO_ERROR; } - void OnFailureResponse_66(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_66(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_66( int64_t int64s) + void OnSuccessResponse_66(int64_t int64s) { - VerifyOrReturn(CheckConstraintNotValue("int64s", int64s, readAttributeInt64sDefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("int64s", int64s, readAttributeInt64sDefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeInt64sDefaultValue_67() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -82590,82 +62703,58 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); int64_t int64sArgument; - int64sArgument =readAttributeInt64sDefaultValue; + int64sArgument = readAttributeInt64sDefaultValue; - ReturnErrorOnFailure(cluster.WriteAttribute(int64sArgument, this, OnSuccessCallback_67, OnFailureCallback_67)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + int64sArgument, this, OnSuccessCallback_67, OnFailureCallback_67)); + return CHIP_NO_ERROR; } - void OnFailureResponse_67(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_67() - { NextTest(); - } - + void OnFailureResponse_67(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_67() { NextTest(); } - CHIP_ERROR TestReadAttributeInt64sDefaultValue_68() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_68, OnFailureCallback_68)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_68, OnFailureCallback_68)); + return CHIP_NO_ERROR; } - void OnFailureResponse_68(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_68(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_68( int64_t int64s) + void OnSuccessResponse_68(int64_t int64s) { - VerifyOrReturn(CheckValue("int64s", int64s,readAttributeInt64sDefaultValue - )); + VerifyOrReturn(CheckValue("int64s", int64s, readAttributeInt64sDefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeEnum8DefaultValue_69() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_69, OnFailureCallback_69)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_69, OnFailureCallback_69)); + return CHIP_NO_ERROR; } - void OnFailureResponse_69(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_69(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_69( uint8_t enum8) + void OnSuccessResponse_69(uint8_t enum8) { - VerifyOrReturn(CheckValue("enum8", enum8,0 - )); + VerifyOrReturn(CheckValue("enum8", enum8, 0)); - readAttributeEnum8DefaultValue = enum8; + readAttributeEnum8DefaultValue = enum8; NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeEnum8NotDefaultValue_70() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -82673,52 +62762,37 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t enum8Argument; - enum8Argument = 1; - - ReturnErrorOnFailure(cluster.WriteAttribute(enum8Argument, this, OnSuccessCallback_70, OnFailureCallback_70)); - return CHIP_NO_ERROR; - } + enum8Argument = 1; - void OnFailureResponse_70(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_70() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + enum8Argument, this, OnSuccessCallback_70, OnFailureCallback_70)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_70(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_70() { NextTest(); } - CHIP_ERROR TestReadAttributeEnum8NotDefaultValue_71() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_71, OnFailureCallback_71)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_71, OnFailureCallback_71)); + return CHIP_NO_ERROR; } - void OnFailureResponse_71(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_71(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_71( uint8_t enum8) + void OnSuccessResponse_71(uint8_t enum8) { - VerifyOrReturn(CheckConstraintNotValue("enum8", enum8, readAttributeEnum8DefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("enum8", enum8, readAttributeEnum8DefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeEnum8DefaultValue_72() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -82726,82 +62800,58 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t enum8Argument; - enum8Argument =readAttributeEnum8DefaultValue; + enum8Argument = readAttributeEnum8DefaultValue; - ReturnErrorOnFailure(cluster.WriteAttribute(enum8Argument, this, OnSuccessCallback_72, OnFailureCallback_72)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + enum8Argument, this, OnSuccessCallback_72, OnFailureCallback_72)); + return CHIP_NO_ERROR; } - void OnFailureResponse_72(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_72() - { NextTest(); - } - + void OnFailureResponse_72(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_72() { NextTest(); } - CHIP_ERROR TestReadAttributeEnum8DefaultValue_73() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_73, OnFailureCallback_73)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_73, OnFailureCallback_73)); + return CHIP_NO_ERROR; } - void OnFailureResponse_73(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_73(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_73( uint8_t enum8) + void OnSuccessResponse_73(uint8_t enum8) { - VerifyOrReturn(CheckValue("enum8", enum8,readAttributeEnum8DefaultValue - )); + VerifyOrReturn(CheckValue("enum8", enum8, readAttributeEnum8DefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeEnum16DefaultValue_74() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_74, OnFailureCallback_74)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_74, OnFailureCallback_74)); + return CHIP_NO_ERROR; } - void OnFailureResponse_74(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_74(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_74( uint16_t enum16) + void OnSuccessResponse_74(uint16_t enum16) { - VerifyOrReturn(CheckValue("enum16", enum16,0U - )); + VerifyOrReturn(CheckValue("enum16", enum16, 0U)); - readAttributeEnum16DefaultValue = enum16; + readAttributeEnum16DefaultValue = enum16; NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeEnum16NotDefaultValue_75() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -82809,52 +62859,37 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t enum16Argument; - enum16Argument = 1U; - - ReturnErrorOnFailure(cluster.WriteAttribute(enum16Argument, this, OnSuccessCallback_75, OnFailureCallback_75)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_75(EmberAfStatus status) - { - ThrowFailureResponse(); - } + enum16Argument = 1U; - void OnSuccessResponse_75() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + enum16Argument, this, OnSuccessCallback_75, OnFailureCallback_75)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_75(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_75() { NextTest(); } - CHIP_ERROR TestReadAttributeEnum16NotDefaultValue_76() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_76, OnFailureCallback_76)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_76, OnFailureCallback_76)); + return CHIP_NO_ERROR; } - void OnFailureResponse_76(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_76(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_76( uint16_t enum16) + void OnSuccessResponse_76(uint16_t enum16) { - VerifyOrReturn(CheckConstraintNotValue("enum16", enum16, readAttributeEnum16DefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("enum16", enum16, readAttributeEnum16DefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeEnum16DefaultValue_77() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -82862,82 +62897,58 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t enum16Argument; - enum16Argument =readAttributeEnum16DefaultValue; + enum16Argument = readAttributeEnum16DefaultValue; - ReturnErrorOnFailure(cluster.WriteAttribute(enum16Argument, this, OnSuccessCallback_77, OnFailureCallback_77)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + enum16Argument, this, OnSuccessCallback_77, OnFailureCallback_77)); + return CHIP_NO_ERROR; } - void OnFailureResponse_77(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_77() - { NextTest(); - } - + void OnFailureResponse_77(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_77() { NextTest(); } - CHIP_ERROR TestReadAttributeEnum16DefaultValue_78() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_78, OnFailureCallback_78)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_78, OnFailureCallback_78)); + return CHIP_NO_ERROR; } - void OnFailureResponse_78(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_78(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_78( uint16_t enum16) + void OnSuccessResponse_78(uint16_t enum16) { - VerifyOrReturn(CheckValue("enum16", enum16,readAttributeEnum16DefaultValue - )); + VerifyOrReturn(CheckValue("enum16", enum16, readAttributeEnum16DefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeEpochUsDefaultValue_79() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_79, OnFailureCallback_79)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_79, OnFailureCallback_79)); + return CHIP_NO_ERROR; } - void OnFailureResponse_79(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_79(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_79( uint64_t epochUs) + void OnSuccessResponse_79(uint64_t epochUs) { - VerifyOrReturn(CheckValue("epochUs", epochUs,0ULL - )); + VerifyOrReturn(CheckValue("epochUs", epochUs, 0ULL)); - readAttributeEpochUSDefaultValue = epochUs; + readAttributeEpochUSDefaultValue = epochUs; NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeEpochUsNotDefaultValue_80() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -82945,52 +62956,37 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint64_t epochUsArgument; - epochUsArgument = 1ULL; - - ReturnErrorOnFailure(cluster.WriteAttribute(epochUsArgument, this, OnSuccessCallback_80, OnFailureCallback_80)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_80(EmberAfStatus status) - { - ThrowFailureResponse(); - } + epochUsArgument = 1ULL; - void OnSuccessResponse_80() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + epochUsArgument, this, OnSuccessCallback_80, OnFailureCallback_80)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_80(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_80() { NextTest(); } - CHIP_ERROR TestReadAttributeEpochUsNotDefaultValue_81() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_81, OnFailureCallback_81)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_81, OnFailureCallback_81)); + return CHIP_NO_ERROR; } - void OnFailureResponse_81(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_81(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_81( uint64_t epochUs) + void OnSuccessResponse_81(uint64_t epochUs) { - VerifyOrReturn(CheckConstraintNotValue("epochUs", epochUs, readAttributeEpochUSDefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("epochUs", epochUs, readAttributeEpochUSDefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeEpochUsDefaultValue_82() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -82998,82 +62994,58 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint64_t epochUsArgument; - epochUsArgument =readAttributeEpochUSDefaultValue; + epochUsArgument = readAttributeEpochUSDefaultValue; - ReturnErrorOnFailure(cluster.WriteAttribute(epochUsArgument, this, OnSuccessCallback_82, OnFailureCallback_82)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + epochUsArgument, this, OnSuccessCallback_82, OnFailureCallback_82)); + return CHIP_NO_ERROR; } - void OnFailureResponse_82(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_82() - { NextTest(); - } - + void OnFailureResponse_82(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_82() { NextTest(); } - CHIP_ERROR TestReadAttributeEpochUsDefaultValue_83() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_83, OnFailureCallback_83)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_83, OnFailureCallback_83)); + return CHIP_NO_ERROR; } - void OnFailureResponse_83(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_83(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_83( uint64_t epochUs) + void OnSuccessResponse_83(uint64_t epochUs) { - VerifyOrReturn(CheckValue("epochUs", epochUs,readAttributeEpochUSDefaultValue - )); + VerifyOrReturn(CheckValue("epochUs", epochUs, readAttributeEpochUSDefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeEpochSDefaultValue_84() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_84, OnFailureCallback_84)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_84, OnFailureCallback_84)); + return CHIP_NO_ERROR; } - void OnFailureResponse_84(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_84(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_84( uint32_t epochS) + void OnSuccessResponse_84(uint32_t epochS) { - VerifyOrReturn(CheckValue("epochS", epochS,0UL - )); + VerifyOrReturn(CheckValue("epochS", epochS, 0UL)); - readAttributeEpochSDefaultValue = epochS; + readAttributeEpochSDefaultValue = epochS; NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeEpochSNotDefaultValue_85() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -83081,52 +63053,37 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint32_t epochSArgument; - epochSArgument = 1UL; - - ReturnErrorOnFailure(cluster.WriteAttribute(epochSArgument, this, OnSuccessCallback_85, OnFailureCallback_85)); - return CHIP_NO_ERROR; - } + epochSArgument = 1UL; - void OnFailureResponse_85(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_85() - { NextTest(); - } + ReturnErrorOnFailure(cluster.WriteAttribute( + epochSArgument, this, OnSuccessCallback_85, OnFailureCallback_85)); + return CHIP_NO_ERROR; + } + void OnFailureResponse_85(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_85() { NextTest(); } - CHIP_ERROR TestReadAttributeEpochSNotDefaultValue_86() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_86, OnFailureCallback_86)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_86, OnFailureCallback_86)); + return CHIP_NO_ERROR; } - void OnFailureResponse_86(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_86(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_86( uint32_t epochS) + void OnSuccessResponse_86(uint32_t epochS) { - VerifyOrReturn(CheckConstraintNotValue("epochS", epochS, readAttributeEpochSDefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("epochS", epochS, readAttributeEpochSDefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeEpochSDefaultValue_87() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -83134,82 +63091,58 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint32_t epochSArgument; - epochSArgument =readAttributeEpochSDefaultValue; + epochSArgument = readAttributeEpochSDefaultValue; - ReturnErrorOnFailure(cluster.WriteAttribute(epochSArgument, this, OnSuccessCallback_87, OnFailureCallback_87)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + epochSArgument, this, OnSuccessCallback_87, OnFailureCallback_87)); + return CHIP_NO_ERROR; } - void OnFailureResponse_87(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_87() - { NextTest(); - } - + void OnFailureResponse_87(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_87() { NextTest(); } - CHIP_ERROR TestReadAttributeEpochSDefaultValue_88() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_88, OnFailureCallback_88)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_88, OnFailureCallback_88)); + return CHIP_NO_ERROR; } - void OnFailureResponse_88(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_88(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_88( uint32_t epochS) + void OnSuccessResponse_88(uint32_t epochS) { - VerifyOrReturn(CheckValue("epochS", epochS,readAttributeEpochSDefaultValue - )); + VerifyOrReturn(CheckValue("epochS", epochS, readAttributeEpochSDefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeVendorIdDefaultValue_89() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_89, OnFailureCallback_89)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_89, OnFailureCallback_89)); + return CHIP_NO_ERROR; } - void OnFailureResponse_89(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_89(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_89( chip::VendorId vendorId) + void OnSuccessResponse_89(chip::VendorId vendorId) { - VerifyOrReturn(CheckValue("vendorId", vendorId,0U - )); + VerifyOrReturn(CheckValue("vendorId", vendorId, 0U)); - readAttributeVendorIdDefaultValue = vendorId; + readAttributeVendorIdDefaultValue = vendorId; NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeVendorIdNotDefaultValue_90() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -83217,52 +63150,37 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::VendorId vendorIdArgument; - vendorIdArgument =static_cast(1); + vendorIdArgument = static_cast(1); - ReturnErrorOnFailure(cluster.WriteAttribute(vendorIdArgument, this, OnSuccessCallback_90, OnFailureCallback_90)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + vendorIdArgument, this, OnSuccessCallback_90, OnFailureCallback_90)); + return CHIP_NO_ERROR; } - void OnFailureResponse_90(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_90() - { NextTest(); - } - + void OnFailureResponse_90(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_90() { NextTest(); } - CHIP_ERROR TestReadAttributeVendorIdNotDefaultValue_91() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_91, OnFailureCallback_91)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_91, OnFailureCallback_91)); + return CHIP_NO_ERROR; } - void OnFailureResponse_91(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_91(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_91( chip::VendorId vendorId) + void OnSuccessResponse_91(chip::VendorId vendorId) { - VerifyOrReturn(CheckConstraintNotValue("vendorId", vendorId, readAttributeVendorIdDefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("vendorId", vendorId, readAttributeVendorIdDefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeVendorIdDefaultValue_92() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -83270,116 +63188,84 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::VendorId vendorIdArgument; - vendorIdArgument =readAttributeVendorIdDefaultValue; + vendorIdArgument = readAttributeVendorIdDefaultValue; - ReturnErrorOnFailure(cluster.WriteAttribute(vendorIdArgument, this, OnSuccessCallback_92, OnFailureCallback_92)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + vendorIdArgument, this, OnSuccessCallback_92, OnFailureCallback_92)); + return CHIP_NO_ERROR; } - void OnFailureResponse_92(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_92() - { NextTest(); - } - + void OnFailureResponse_92(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_92() { NextTest(); } - CHIP_ERROR TestReadAttributeVendorIdDefaultValue_93() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_93, OnFailureCallback_93)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_93, OnFailureCallback_93)); + return CHIP_NO_ERROR; } - void OnFailureResponse_93(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_93(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_93( chip::VendorId vendorId) + void OnSuccessResponse_93(chip::VendorId vendorId) { - VerifyOrReturn(CheckValue("vendorId", vendorId,readAttributeVendorIdDefaultValue - )); + VerifyOrReturn(CheckValue("vendorId", vendorId, readAttributeVendorIdDefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeCharStringDefaultValue_94() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_94, OnFailureCallback_94)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_94, OnFailureCallback_94)); + return CHIP_NO_ERROR; } - void OnFailureResponse_94(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_94(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_94( chip::CharSpan charString) + void OnSuccessResponse_94(chip::CharSpan charString) { - VerifyOrReturn(CheckValueAsString("charString", charString,chip::CharSpan("", 0) - )); + VerifyOrReturn(CheckValueAsString("charString", charString, chip::CharSpan("", 0))); - if (readAttributeCharStringDefaultValueBuffer != nullptr) - { - chip::Platform::MemoryFree(readAttributeCharStringDefaultValueBuffer); - } - readAttributeCharStringDefaultValueBuffer = static_cast(chip::Platform::MemoryAlloc(charString.size())); - memcpy(readAttributeCharStringDefaultValueBuffer, charString.data(), charString.size()); - readAttributeCharStringDefaultValue = chip::CharSpan(readAttributeCharStringDefaultValueBuffer, charString.size()); + if (readAttributeCharStringDefaultValueBuffer != nullptr) + { + chip::Platform::MemoryFree(readAttributeCharStringDefaultValueBuffer); + } + readAttributeCharStringDefaultValueBuffer = static_cast(chip::Platform::MemoryAlloc(charString.size())); + memcpy(readAttributeCharStringDefaultValueBuffer, charString.data(), charString.size()); + readAttributeCharStringDefaultValue = chip::CharSpan(readAttributeCharStringDefaultValueBuffer, charString.size()); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeCharStringDefaultValueAndCompareToSavedValue_95() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_95, OnFailureCallback_95)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_95, OnFailureCallback_95)); + return CHIP_NO_ERROR; } - void OnFailureResponse_95(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_95(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_95( chip::CharSpan charString) + void OnSuccessResponse_95(chip::CharSpan charString) { - VerifyOrReturn(CheckValueAsString("charString", charString,readAttributeCharStringDefaultValue - )); + VerifyOrReturn(CheckValueAsString("charString", charString, readAttributeCharStringDefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeCharStringNotDefaultValue_96() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -83387,88 +63273,64 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::CharSpan charStringArgument; - charStringArgument = chip::Span("NotDefaultgarbage: not in length on purpose", 10); + charStringArgument = chip::Span("NotDefaultgarbage: not in length on purpose", 10); - ReturnErrorOnFailure(cluster.WriteAttribute(charStringArgument, this, OnSuccessCallback_96, OnFailureCallback_96)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + charStringArgument, this, OnSuccessCallback_96, OnFailureCallback_96)); + return CHIP_NO_ERROR; } - void OnFailureResponse_96(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_96() - { NextTest(); - } - + void OnFailureResponse_96(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_96() { NextTest(); } - CHIP_ERROR TestReadAttributeCharStringNotDefaultValue_97() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_97, OnFailureCallback_97)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_97, OnFailureCallback_97)); + return CHIP_NO_ERROR; } - void OnFailureResponse_97(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_97(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_97( chip::CharSpan charString) + void OnSuccessResponse_97(chip::CharSpan charString) { - VerifyOrReturn(CheckValueAsString("charString", charString,chip::CharSpan("NotDefault", 10) - )); + VerifyOrReturn(CheckValueAsString("charString", charString, chip::CharSpan("NotDefault", 10))); - if (readAttributeCharStringNotDefaultValueBuffer != nullptr) - { - chip::Platform::MemoryFree(readAttributeCharStringNotDefaultValueBuffer); - } - readAttributeCharStringNotDefaultValueBuffer = static_cast(chip::Platform::MemoryAlloc(charString.size())); - memcpy(readAttributeCharStringNotDefaultValueBuffer, charString.data(), charString.size()); - readAttributeCharStringNotDefaultValue = chip::CharSpan(readAttributeCharStringNotDefaultValueBuffer, charString.size()); + if (readAttributeCharStringNotDefaultValueBuffer != nullptr) + { + chip::Platform::MemoryFree(readAttributeCharStringNotDefaultValueBuffer); + } + readAttributeCharStringNotDefaultValueBuffer = static_cast(chip::Platform::MemoryAlloc(charString.size())); + memcpy(readAttributeCharStringNotDefaultValueBuffer, charString.data(), charString.size()); + readAttributeCharStringNotDefaultValue = chip::CharSpan(readAttributeCharStringNotDefaultValueBuffer, charString.size()); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeCharStringNotDefaultValueAndCompareToSavedValue_98() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_98, OnFailureCallback_98)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_98, OnFailureCallback_98)); + return CHIP_NO_ERROR; } - void OnFailureResponse_98(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_98(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_98( chip::CharSpan charString) + void OnSuccessResponse_98(chip::CharSpan charString) { - VerifyOrReturn(CheckValueAsString("charString", charString,readAttributeCharStringNotDefaultValue - )); + VerifyOrReturn(CheckValueAsString("charString", charString, readAttributeCharStringNotDefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeCharStringNotDefaultValueFromSavedValue_99() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -83476,53 +63338,37 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::CharSpan charStringArgument; - charStringArgument =readAttributeCharStringNotDefaultValue; + charStringArgument = readAttributeCharStringNotDefaultValue; - ReturnErrorOnFailure(cluster.WriteAttribute(charStringArgument, this, OnSuccessCallback_99, OnFailureCallback_99)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + charStringArgument, this, OnSuccessCallback_99, OnFailureCallback_99)); + return CHIP_NO_ERROR; } - void OnFailureResponse_99(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_99() - { NextTest(); - } - + void OnFailureResponse_99(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_99() { NextTest(); } - CHIP_ERROR TestReadAttributeCharStringNotDefaultValueAndCompareToExpectedValue_100() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_100, OnFailureCallback_100)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_100, OnFailureCallback_100)); + return CHIP_NO_ERROR; } - void OnFailureResponse_100(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_100(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_100( chip::CharSpan charString) + void OnSuccessResponse_100(chip::CharSpan charString) { - VerifyOrReturn(CheckValueAsString("charString", charString,chip::CharSpan("NotDefault", 10) - )); + VerifyOrReturn(CheckValueAsString("charString", charString, chip::CharSpan("NotDefault", 10))); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeCharStringDefaultValue_101() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -83530,88 +63376,64 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::CharSpan charStringArgument; - charStringArgument =readAttributeCharStringDefaultValue; + charStringArgument = readAttributeCharStringDefaultValue; - ReturnErrorOnFailure(cluster.WriteAttribute(charStringArgument, this, OnSuccessCallback_101, OnFailureCallback_101)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + charStringArgument, this, OnSuccessCallback_101, OnFailureCallback_101)); + return CHIP_NO_ERROR; } - void OnFailureResponse_101(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_101() - { NextTest(); - } - + void OnFailureResponse_101(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_101() { NextTest(); } - CHIP_ERROR TestReadAttributeOctetStringDefaultValue_102() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_102, OnFailureCallback_102)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_102, OnFailureCallback_102)); + return CHIP_NO_ERROR; } - void OnFailureResponse_102(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_102(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_102( chip::ByteSpan octetString) + void OnSuccessResponse_102(chip::ByteSpan octetString) { - VerifyOrReturn(CheckValueAsString("octetString", octetString,chip::ByteSpan(chip::Uint8::from_const_char(""), 0) - )); + VerifyOrReturn(CheckValueAsString("octetString", octetString, chip::ByteSpan(chip::Uint8::from_const_char(""), 0))); - if (readAttributeOctetStringDefaultValueBuffer != nullptr) - { - chip::Platform::MemoryFree(readAttributeOctetStringDefaultValueBuffer); - } - readAttributeOctetStringDefaultValueBuffer = static_cast(chip::Platform::MemoryAlloc(octetString.size())); - memcpy(readAttributeOctetStringDefaultValueBuffer, octetString.data(), octetString.size()); - readAttributeOctetStringDefaultValue = chip::ByteSpan(readAttributeOctetStringDefaultValueBuffer, octetString.size()); + if (readAttributeOctetStringDefaultValueBuffer != nullptr) + { + chip::Platform::MemoryFree(readAttributeOctetStringDefaultValueBuffer); + } + readAttributeOctetStringDefaultValueBuffer = static_cast(chip::Platform::MemoryAlloc(octetString.size())); + memcpy(readAttributeOctetStringDefaultValueBuffer, octetString.data(), octetString.size()); + readAttributeOctetStringDefaultValue = chip::ByteSpan(readAttributeOctetStringDefaultValueBuffer, octetString.size()); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeOctetStringDefaultValueAndCompareToSavedValue_103() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_103, OnFailureCallback_103)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_103, OnFailureCallback_103)); + return CHIP_NO_ERROR; } - void OnFailureResponse_103(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_103(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_103( chip::ByteSpan octetString) + void OnSuccessResponse_103(chip::ByteSpan octetString) { - VerifyOrReturn(CheckValueAsString("octetString", octetString,readAttributeOctetStringDefaultValue - )); + VerifyOrReturn(CheckValueAsString("octetString", octetString, readAttributeOctetStringDefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeOctetStringNotDefaultValue_104() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -83619,88 +63441,65 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::ByteSpan octetStringArgument; - octetStringArgument = chip::ByteSpan(chip::Uint8::from_const_char("NotDefaultgarbage: not in length on purpose"), 10); + octetStringArgument = chip::ByteSpan(chip::Uint8::from_const_char("NotDefaultgarbage: not in length on purpose"), 10); - ReturnErrorOnFailure(cluster.WriteAttribute(octetStringArgument, this, OnSuccessCallback_104, OnFailureCallback_104)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + octetStringArgument, this, OnSuccessCallback_104, OnFailureCallback_104)); + return CHIP_NO_ERROR; } - void OnFailureResponse_104(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_104() - { NextTest(); - } - + void OnFailureResponse_104(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_104() { NextTest(); } - CHIP_ERROR TestReadAttributeOctetStringNotDefaultValue_105() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_105, OnFailureCallback_105)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_105, OnFailureCallback_105)); + return CHIP_NO_ERROR; } - void OnFailureResponse_105(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_105(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_105( chip::ByteSpan octetString) + void OnSuccessResponse_105(chip::ByteSpan octetString) { - VerifyOrReturn(CheckValueAsString("octetString", octetString,chip::ByteSpan(chip::Uint8::from_const_char("NotDefault"), 10) - )); + VerifyOrReturn( + CheckValueAsString("octetString", octetString, chip::ByteSpan(chip::Uint8::from_const_char("NotDefault"), 10))); - if (readAttributeOctetStringNotDefaultValueBuffer != nullptr) - { - chip::Platform::MemoryFree(readAttributeOctetStringNotDefaultValueBuffer); - } - readAttributeOctetStringNotDefaultValueBuffer = static_cast(chip::Platform::MemoryAlloc(octetString.size())); - memcpy(readAttributeOctetStringNotDefaultValueBuffer, octetString.data(), octetString.size()); - readAttributeOctetStringNotDefaultValue = chip::ByteSpan(readAttributeOctetStringNotDefaultValueBuffer, octetString.size()); + if (readAttributeOctetStringNotDefaultValueBuffer != nullptr) + { + chip::Platform::MemoryFree(readAttributeOctetStringNotDefaultValueBuffer); + } + readAttributeOctetStringNotDefaultValueBuffer = static_cast(chip::Platform::MemoryAlloc(octetString.size())); + memcpy(readAttributeOctetStringNotDefaultValueBuffer, octetString.data(), octetString.size()); + readAttributeOctetStringNotDefaultValue = chip::ByteSpan(readAttributeOctetStringNotDefaultValueBuffer, octetString.size()); NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeOctetStringNotDefaultValueAndCompareToSavedValue_106() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_106, OnFailureCallback_106)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_106, OnFailureCallback_106)); + return CHIP_NO_ERROR; } - void OnFailureResponse_106(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_106(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_106( chip::ByteSpan octetString) + void OnSuccessResponse_106(chip::ByteSpan octetString) { - VerifyOrReturn(CheckValueAsString("octetString", octetString,readAttributeOctetStringNotDefaultValue - )); + VerifyOrReturn(CheckValueAsString("octetString", octetString, readAttributeOctetStringNotDefaultValue)); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeOctetStringNotDefaultValueFromSavedValue_107() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -83708,53 +63507,38 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::ByteSpan octetStringArgument; - octetStringArgument =readAttributeOctetStringNotDefaultValue; + octetStringArgument = readAttributeOctetStringNotDefaultValue; - ReturnErrorOnFailure(cluster.WriteAttribute(octetStringArgument, this, OnSuccessCallback_107, OnFailureCallback_107)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + octetStringArgument, this, OnSuccessCallback_107, OnFailureCallback_107)); + return CHIP_NO_ERROR; } - void OnFailureResponse_107(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_107() - { NextTest(); - } - + void OnFailureResponse_107(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_107() { NextTest(); } - CHIP_ERROR TestReadAttributeOctetStringNotDefaultValueAndCompareToExpectedValue_108() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_108, OnFailureCallback_108)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_108, OnFailureCallback_108)); + return CHIP_NO_ERROR; } - void OnFailureResponse_108(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_108(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_108( chip::ByteSpan octetString) + void OnSuccessResponse_108(chip::ByteSpan octetString) { - VerifyOrReturn(CheckValueAsString("octetString", octetString,chip::ByteSpan(chip::Uint8::from_const_char("NotDefault"), 10) - )); + VerifyOrReturn( + CheckValueAsString("octetString", octetString, chip::ByteSpan(chip::Uint8::from_const_char("NotDefault"), 10))); NextTest(); - } - - - + } - CHIP_ERROR TestWriteAttributeOctetStringDefaultValue_109() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -83762,87 +63546,78 @@ uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr;chip::ByteSpan cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::ByteSpan octetStringArgument; - octetStringArgument =readAttributeOctetStringDefaultValue; + octetStringArgument = readAttributeOctetStringDefaultValue; - ReturnErrorOnFailure(cluster.WriteAttribute(octetStringArgument, this, OnSuccessCallback_109, OnFailureCallback_109)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + octetStringArgument, this, OnSuccessCallback_109, OnFailureCallback_109)); + return CHIP_NO_ERROR; } - void OnFailureResponse_109(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_109() - { NextTest(); - } - + void OnFailureResponse_109(EmberAfStatus status) { ThrowFailureResponse(); } - }; + void OnSuccessResponse_109() { NextTest(); } +}; -class TestConfigVariables: public TestCommand +class TestConfigVariables : public TestCommand { - public: - TestConfigVariables(): TestCommand("TestConfigVariables"), mTestIndex(0) +public: + TestConfigVariables() : TestCommand("TestConfigVariables"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("arg1", 0, UINT8_MAX, &mArg1); - AddArgument("returnValueWithArg1", 0, UINT8_MAX, &mReturnValueWithArg1); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("arg1", 0, UINT8_MAX, &mArg1); + AddArgument("returnValueWithArg1", 0, UINT8_MAX, &mReturnValueWithArg1); } - ~TestConfigVariables() - { - } + ~TestConfigVariables() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: TestConfigVariables\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: TestConfigVariables\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: TestConfigVariables\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: TestConfigVariables\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Send Test Add Arguments Command\n"); - err = TestSendTestAddArgumentsCommand_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Send Test Add Arguments Command\n"); + err = TestSendTestAddArgumentsCommand_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Send Test Add Arguments Command\n"); - err = TestSendTestAddArgumentsCommand_2(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 2 : Send Test Add Arguments Command\n"); + err = TestSendTestAddArgumentsCommand_2(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; @@ -83851,52 +63626,27 @@ class TestConfigVariables: public TestCommand chip::Optional mArg1; chip::Optional mReturnValueWithArg1; -uint8_t TestAddArgumentDefaultValue; - - - - - - - - - - - - - - - - - - - - - - + uint8_t TestAddArgumentDefaultValue; // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestSendTestAddArgumentsCommand_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type; RequestType request; - request.arg1 = 3; - request.arg2 = 17; - + request.arg1 = 3; + request.arg2 = 17; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_1(data.returnValue); }; @@ -83905,39 +63655,28 @@ uint8_t TestAddArgumentDefaultValue; (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint8_t returnValue) + void OnSuccessResponse_1(uint8_t returnValue) { - VerifyOrReturn(CheckValue("returnValue", returnValue,20 - )); + VerifyOrReturn(CheckValue("returnValue", returnValue, 20)); - TestAddArgumentDefaultValue = returnValue; + TestAddArgumentDefaultValue = returnValue; NextTest(); - } - - - + } - CHIP_ERROR TestSendTestAddArgumentsCommand_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type; RequestType request; - request.arg1 = mArg1.HasValue() ? mArg1.Value() : 5; - request.arg2 =TestAddArgumentDefaultValue; + request.arg1 = mArg1.HasValue() ? mArg1.Value() : 5; + request.arg2 = TestAddArgumentDefaultValue; auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_2(data.returnValue); @@ -83947,540 +63686,395 @@ uint8_t TestAddArgumentDefaultValue; (static_cast(context))->OnFailureResponse_2(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint8_t returnValue) + void OnSuccessResponse_2(uint8_t returnValue) { - VerifyOrReturn(CheckValue("returnValue", returnValue,mReturnValueWithArg1.HasValue() ? mReturnValueWithArg1.Value() : 25 - )); + VerifyOrReturn(CheckValue("returnValue", returnValue, mReturnValueWithArg1.HasValue() ? mReturnValueWithArg1.Value() : 25)); NextTest(); - } - - - }; + } +}; -class TestDescriptorCluster: public TestCommand +class TestDescriptorCluster : public TestCommand { - public: - TestDescriptorCluster(): TestCommand("TestDescriptorCluster"), mTestIndex(0) +public: + TestDescriptorCluster() : TestCommand("TestDescriptorCluster"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~TestDescriptorCluster() - { - } + ~TestDescriptorCluster() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: TestDescriptorCluster\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: TestDescriptorCluster\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: TestDescriptorCluster\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: TestDescriptorCluster\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute Device list\n"); - err = TestReadAttributeDeviceList_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute Device list\n"); + err = TestReadAttributeDeviceList_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute Server list\n"); - err = TestReadAttributeServerList_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute Server list\n"); + err = TestReadAttributeServerList_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read attribute Client list\n"); - err = TestReadAttributeClientList_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Read attribute Client list\n"); + err = TestReadAttributeClientList_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read attribute Parts list\n"); - err = TestReadAttributePartsList_4(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 4 : Read attribute Parts list\n"); + err = TestReadAttributePartsList_4(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 5; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, const chip::app::DataModel::DecodableList & deviceList) + static void OnSuccessCallback_1( + void * context, + const chip::app::DataModel::DecodableList & deviceList) { (static_cast(context))->OnSuccessResponse_1(deviceList); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, const chip::app::DataModel::DecodableList & serverList) + static void OnSuccessCallback_2(void * context, const chip::app::DataModel::DecodableList & serverList) { (static_cast(context))->OnSuccessResponse_2(serverList); } - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, const chip::app::DataModel::DecodableList & clientList) + static void OnSuccessCallback_3(void * context, const chip::app::DataModel::DecodableList & clientList) { (static_cast(context))->OnSuccessResponse_3(clientList); } - - - static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, const chip::app::DataModel::DecodableList & partsList) + static void OnSuccessCallback_4(void * context, const chip::app::DataModel::DecodableList & partsList) { (static_cast(context))->OnSuccessResponse_4(partsList); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadAttributeDeviceList_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::DescriptorClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( const chip::app::DataModel::DecodableList & deviceList) + void OnSuccessResponse_1( + const chip::app::DataModel::DecodableList & deviceList) { - { - auto iter_0 = deviceList.begin(); - VerifyOrReturn(CheckNextListItemDecodes("deviceList", iter_0, 0)); - VerifyOrReturn(CheckValue("deviceList[0].type", iter_0.GetValue().type,22UL - )); - VerifyOrReturn(CheckValue("deviceList[0].revision", iter_0.GetValue().revision,1U - )); - VerifyOrReturn(CheckNoMoreListItems("deviceList", iter_0, 1)); - } + { + auto iter_0 = deviceList.begin(); + VerifyOrReturn(CheckNextListItemDecodes("deviceList", iter_0, 0)); + VerifyOrReturn(CheckValue("deviceList[0].type", iter_0.GetValue().type, 22UL)); + VerifyOrReturn(CheckValue("deviceList[0].revision", iter_0.GetValue().revision, 1U)); + VerifyOrReturn(CheckNoMoreListItems("deviceList", iter_0, 1)); + } NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeServerList_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::DescriptorClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( const chip::app::DataModel::DecodableList & serverList) - { - { - auto iter_0 = serverList.begin(); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 0)); - VerifyOrReturn(CheckValue("serverList[0]", iter_0.GetValue(),3UL - )); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 1)); - VerifyOrReturn(CheckValue("serverList[1]", iter_0.GetValue(),4UL - )); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 2)); - VerifyOrReturn(CheckValue("serverList[2]", iter_0.GetValue(),29UL - )); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 3)); - VerifyOrReturn(CheckValue("serverList[3]", iter_0.GetValue(),30UL - )); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 4)); - VerifyOrReturn(CheckValue("serverList[4]", iter_0.GetValue(),31UL - )); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 5)); - VerifyOrReturn(CheckValue("serverList[5]", iter_0.GetValue(),40UL - )); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 6)); - VerifyOrReturn(CheckValue("serverList[6]", iter_0.GetValue(),42UL - )); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 7)); - VerifyOrReturn(CheckValue("serverList[7]", iter_0.GetValue(),43UL - )); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 8)); - VerifyOrReturn(CheckValue("serverList[8]", iter_0.GetValue(),46UL - )); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 9)); - VerifyOrReturn(CheckValue("serverList[9]", iter_0.GetValue(),48UL - )); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 10)); - VerifyOrReturn(CheckValue("serverList[10]", iter_0.GetValue(),49UL - )); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 11)); - VerifyOrReturn(CheckValue("serverList[11]", iter_0.GetValue(),50UL - )); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 12)); - VerifyOrReturn(CheckValue("serverList[12]", iter_0.GetValue(),51UL - )); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 13)); - VerifyOrReturn(CheckValue("serverList[13]", iter_0.GetValue(),52UL - )); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 14)); - VerifyOrReturn(CheckValue("serverList[14]", iter_0.GetValue(),53UL - )); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 15)); - VerifyOrReturn(CheckValue("serverList[15]", iter_0.GetValue(),54UL - )); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 16)); - VerifyOrReturn(CheckValue("serverList[16]", iter_0.GetValue(),55UL - )); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 17)); - VerifyOrReturn(CheckValue("serverList[17]", iter_0.GetValue(),60UL - )); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 18)); - VerifyOrReturn(CheckValue("serverList[18]", iter_0.GetValue(),62UL - )); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 19)); - VerifyOrReturn(CheckValue("serverList[19]", iter_0.GetValue(),63UL - )); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 20)); - VerifyOrReturn(CheckValue("serverList[20]", iter_0.GetValue(),64UL - )); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 21)); - VerifyOrReturn(CheckValue("serverList[21]", iter_0.GetValue(),65UL - )); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 22)); - VerifyOrReturn(CheckValue("serverList[22]", iter_0.GetValue(),1029UL - )); - VerifyOrReturn(CheckNoMoreListItems("serverList", iter_0, 23)); - } + void OnSuccessResponse_2(const chip::app::DataModel::DecodableList & serverList) + { + { + auto iter_0 = serverList.begin(); + VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 0)); + VerifyOrReturn(CheckValue("serverList[0]", iter_0.GetValue(), 3UL)); + VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 1)); + VerifyOrReturn(CheckValue("serverList[1]", iter_0.GetValue(), 4UL)); + VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 2)); + VerifyOrReturn(CheckValue("serverList[2]", iter_0.GetValue(), 29UL)); + VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 3)); + VerifyOrReturn(CheckValue("serverList[3]", iter_0.GetValue(), 30UL)); + VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 4)); + VerifyOrReturn(CheckValue("serverList[4]", iter_0.GetValue(), 31UL)); + VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 5)); + VerifyOrReturn(CheckValue("serverList[5]", iter_0.GetValue(), 40UL)); + VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 6)); + VerifyOrReturn(CheckValue("serverList[6]", iter_0.GetValue(), 42UL)); + VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 7)); + VerifyOrReturn(CheckValue("serverList[7]", iter_0.GetValue(), 43UL)); + VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 8)); + VerifyOrReturn(CheckValue("serverList[8]", iter_0.GetValue(), 46UL)); + VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 9)); + VerifyOrReturn(CheckValue("serverList[9]", iter_0.GetValue(), 48UL)); + VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 10)); + VerifyOrReturn(CheckValue("serverList[10]", iter_0.GetValue(), 49UL)); + VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 11)); + VerifyOrReturn(CheckValue("serverList[11]", iter_0.GetValue(), 50UL)); + VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 12)); + VerifyOrReturn(CheckValue("serverList[12]", iter_0.GetValue(), 51UL)); + VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 13)); + VerifyOrReturn(CheckValue("serverList[13]", iter_0.GetValue(), 52UL)); + VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 14)); + VerifyOrReturn(CheckValue("serverList[14]", iter_0.GetValue(), 53UL)); + VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 15)); + VerifyOrReturn(CheckValue("serverList[15]", iter_0.GetValue(), 54UL)); + VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 16)); + VerifyOrReturn(CheckValue("serverList[16]", iter_0.GetValue(), 55UL)); + VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 17)); + VerifyOrReturn(CheckValue("serverList[17]", iter_0.GetValue(), 60UL)); + VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 18)); + VerifyOrReturn(CheckValue("serverList[18]", iter_0.GetValue(), 62UL)); + VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 19)); + VerifyOrReturn(CheckValue("serverList[19]", iter_0.GetValue(), 63UL)); + VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 20)); + VerifyOrReturn(CheckValue("serverList[20]", iter_0.GetValue(), 64UL)); + VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 21)); + VerifyOrReturn(CheckValue("serverList[21]", iter_0.GetValue(), 65UL)); + VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 22)); + VerifyOrReturn(CheckValue("serverList[22]", iter_0.GetValue(), 1029UL)); + VerifyOrReturn(CheckNoMoreListItems("serverList", iter_0, 23)); + } NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributeClientList_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::DescriptorClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( const chip::app::DataModel::DecodableList & clientList) + void OnSuccessResponse_3(const chip::app::DataModel::DecodableList & clientList) { - { - auto iter_0 = clientList.begin(); - VerifyOrReturn(CheckNextListItemDecodes("clientList", iter_0, 0)); - VerifyOrReturn(CheckValue("clientList[0]", iter_0.GetValue(),41UL - )); - VerifyOrReturn(CheckNoMoreListItems("clientList", iter_0, 1)); - } + { + auto iter_0 = clientList.begin(); + VerifyOrReturn(CheckNextListItemDecodes("clientList", iter_0, 0)); + VerifyOrReturn(CheckValue("clientList[0]", iter_0.GetValue(), 41UL)); + VerifyOrReturn(CheckNoMoreListItems("clientList", iter_0, 1)); + } NextTest(); - } - - - + } - CHIP_ERROR TestReadAttributePartsList_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::DescriptorClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( const chip::app::DataModel::DecodableList & partsList) + void OnSuccessResponse_4(const chip::app::DataModel::DecodableList & partsList) { - { - auto iter_0 = partsList.begin(); - VerifyOrReturn(CheckNextListItemDecodes("partsList", iter_0, 0)); - VerifyOrReturn(CheckValue("partsList[0]", iter_0.GetValue(),1U - )); - VerifyOrReturn(CheckNextListItemDecodes("partsList", iter_0, 1)); - VerifyOrReturn(CheckValue("partsList[1]", iter_0.GetValue(),2U - )); - VerifyOrReturn(CheckNoMoreListItems("partsList", iter_0, 2)); - } + { + auto iter_0 = partsList.begin(); + VerifyOrReturn(CheckNextListItemDecodes("partsList", iter_0, 0)); + VerifyOrReturn(CheckValue("partsList[0]", iter_0.GetValue(), 1U)); + VerifyOrReturn(CheckNextListItemDecodes("partsList", iter_0, 1)); + VerifyOrReturn(CheckValue("partsList[1]", iter_0.GetValue(), 2U)); + VerifyOrReturn(CheckNoMoreListItems("partsList", iter_0, 2)); + } NextTest(); - } - - - }; + } +}; -class TestBasicInformation: public TestCommand +class TestBasicInformation : public TestCommand { - public: - TestBasicInformation(): TestCommand("TestBasicInformation"), mTestIndex(0) +public: + TestBasicInformation() : TestCommand("TestBasicInformation"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~TestBasicInformation() - { - } + ~TestBasicInformation() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: TestBasicInformation\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: TestBasicInformation\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: TestBasicInformation\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: TestBasicInformation\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Write location\n"); - err = TestWriteLocation_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Write location\n"); + err = TestWriteLocation_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Restore initial location value\n"); - err = TestRestoreInitialLocationValue_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Restore initial location value\n"); + err = TestRestoreInitialLocationValue_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read AttributeList value\n"); - err = TestReadAttributeListValue_3(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 3 : Read AttributeList value\n"); + err = TestReadAttributeListValue_3(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 4; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context) - { - (static_cast(context))->OnSuccessResponse_1(); - } - - - + static void OnSuccessCallback_1(void * context) { (static_cast(context))->OnSuccessResponse_1(); } static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context) - { - (static_cast(context))->OnSuccessResponse_2(); - } - - - + static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, const chip::app::DataModel::DecodableList & attributeList) + static void OnSuccessCallback_3(void * context, const chip::app::DataModel::DecodableList & attributeList) { (static_cast(context))->OnSuccessResponse_3(attributeList); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestWriteLocation_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; @@ -84488,25 +64082,17 @@ class TestBasicInformation: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::CharSpan locationArgument; - locationArgument = chip::Span("usgarbage: not in length on purpose", 2); + locationArgument = chip::Span("usgarbage: not in length on purpose", 2); - ReturnErrorOnFailure(cluster.WriteAttribute(locationArgument, this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + locationArgument, this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_1() - { NextTest(); - } - + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestRestoreInitialLocationValue_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; @@ -84514,224 +64100,161 @@ class TestBasicInformation: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::CharSpan locationArgument; - locationArgument = chip::Span("garbage: not in length on purpose", 0); + locationArgument = chip::Span("garbage: not in length on purpose", 0); - ReturnErrorOnFailure(cluster.WriteAttribute(locationArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + locationArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_2() - { NextTest(); - } - + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_2() { NextTest(); } - CHIP_ERROR TestReadAttributeListValue_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( const chip::app::DataModel::DecodableList & attributeList) - { - { - auto iter_0 = attributeList.begin(); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); - VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(),0UL - )); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); - VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(),1UL - )); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); - VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(),2UL - )); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); - VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(),3UL - )); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); - VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(),4UL - )); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); - VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(),5UL - )); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); - VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(),6UL - )); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 7)); - VerifyOrReturn(CheckValue("attributeList[7]", iter_0.GetValue(),7UL - )); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 8)); - VerifyOrReturn(CheckValue("attributeList[8]", iter_0.GetValue(),8UL - )); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 9)); - VerifyOrReturn(CheckValue("attributeList[9]", iter_0.GetValue(),9UL - )); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 10)); - VerifyOrReturn(CheckValue("attributeList[10]", iter_0.GetValue(),10UL - )); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 11)); - VerifyOrReturn(CheckValue("attributeList[11]", iter_0.GetValue(),11UL - )); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 12)); - VerifyOrReturn(CheckValue("attributeList[12]", iter_0.GetValue(),12UL - )); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 13)); - VerifyOrReturn(CheckValue("attributeList[13]", iter_0.GetValue(),13UL - )); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 14)); - VerifyOrReturn(CheckValue("attributeList[14]", iter_0.GetValue(),14UL - )); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 15)); - VerifyOrReturn(CheckValue("attributeList[15]", iter_0.GetValue(),15UL - )); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 16)); - VerifyOrReturn(CheckValue("attributeList[16]", iter_0.GetValue(),16UL - )); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 17)); - VerifyOrReturn(CheckValue("attributeList[17]", iter_0.GetValue(),17UL - )); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 18)); - VerifyOrReturn(CheckValue("attributeList[18]", iter_0.GetValue(),18UL - )); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 19)); - VerifyOrReturn(CheckValue("attributeList[19]", iter_0.GetValue(),65531UL - )); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 20)); - VerifyOrReturn(CheckValue("attributeList[20]", iter_0.GetValue(),65533UL - )); - VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 21)); - } + void OnSuccessResponse_3(const chip::app::DataModel::DecodableList & attributeList) + { + { + auto iter_0 = attributeList.begin(); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); + VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 0UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); + VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 1UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); + VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 2UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); + VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 3UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); + VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 4UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); + VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 5UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); + VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 6UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 7)); + VerifyOrReturn(CheckValue("attributeList[7]", iter_0.GetValue(), 7UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 8)); + VerifyOrReturn(CheckValue("attributeList[8]", iter_0.GetValue(), 8UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 9)); + VerifyOrReturn(CheckValue("attributeList[9]", iter_0.GetValue(), 9UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 10)); + VerifyOrReturn(CheckValue("attributeList[10]", iter_0.GetValue(), 10UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 11)); + VerifyOrReturn(CheckValue("attributeList[11]", iter_0.GetValue(), 11UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 12)); + VerifyOrReturn(CheckValue("attributeList[12]", iter_0.GetValue(), 12UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 13)); + VerifyOrReturn(CheckValue("attributeList[13]", iter_0.GetValue(), 13UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 14)); + VerifyOrReturn(CheckValue("attributeList[14]", iter_0.GetValue(), 14UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 15)); + VerifyOrReturn(CheckValue("attributeList[15]", iter_0.GetValue(), 15UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 16)); + VerifyOrReturn(CheckValue("attributeList[16]", iter_0.GetValue(), 16UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 17)); + VerifyOrReturn(CheckValue("attributeList[17]", iter_0.GetValue(), 17UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 18)); + VerifyOrReturn(CheckValue("attributeList[18]", iter_0.GetValue(), 18UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 19)); + VerifyOrReturn(CheckValue("attributeList[19]", iter_0.GetValue(), 65531UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 20)); + VerifyOrReturn(CheckValue("attributeList[20]", iter_0.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 21)); + } NextTest(); - } - - - }; + } +}; -class TestIdentifyCluster: public TestCommand +class TestIdentifyCluster : public TestCommand { - public: - TestIdentifyCluster(): TestCommand("TestIdentifyCluster"), mTestIndex(0) +public: + TestIdentifyCluster() : TestCommand("TestIdentifyCluster"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~TestIdentifyCluster() - { - } + ~TestIdentifyCluster() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: TestIdentifyCluster\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: TestIdentifyCluster\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: TestIdentifyCluster\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: TestIdentifyCluster\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Send Identify command and expect success response\n"); - err = TestSendIdentifyCommandAndExpectSuccessResponse_1(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 1 : Send Identify command and expect success response\n"); + err = TestSendIdentifyCommandAndExpectSuccessResponse_1(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 2; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestSendIdentifyCommandAndExpectSuccessResponse_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; - using RequestType = chip::app::Clusters::Identify::Commands::Identify::Type; + using RequestType = chip::app::Clusters::Identify::Commands::Identify::Type; RequestType request; - request.identifyTime = 0U; - + request.identifyTime = 0U; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_1(); }; @@ -84740,200 +64263,161 @@ class TestIdentifyCluster: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_1() - { NextTest(); - } - + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - }; + void OnSuccessResponse_1() { NextTest(); } +}; -class TestGroupsCluster: public TestCommand +class TestGroupsCluster : public TestCommand { - public: - TestGroupsCluster(): TestCommand("TestGroupsCluster"), mTestIndex(0) +public: + TestGroupsCluster() : TestCommand("TestGroupsCluster"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~TestGroupsCluster() - { - } + ~TestGroupsCluster() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: TestGroupsCluster\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: TestGroupsCluster\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: TestGroupsCluster\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: TestGroupsCluster\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : View Group 0 (invalid)\n"); - err = TestViewGroup0Invalid_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : View Group 0 (invalid)\n"); + err = TestViewGroup0Invalid_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : View Group 1 (not found)\n"); - err = TestViewGroup1NotFound_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : View Group 1 (not found)\n"); + err = TestViewGroup1NotFound_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Add Group 1 (new)\n"); - err = TestAddGroup1New_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Add Group 1 (new)\n"); + err = TestAddGroup1New_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : View Group 1 (new)\n"); - err = TestViewGroup1New_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : View Group 1 (new)\n"); + err = TestViewGroup1New_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : View Group 2 (not found)\n"); - err = TestViewGroup2NotFound_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : View Group 2 (not found)\n"); + err = TestViewGroup2NotFound_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Get Group Membership 1 (all)\n"); - err = TestGetGroupMembership1All_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : Get Group Membership 1 (all)\n"); + err = TestGetGroupMembership1All_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : View Group 3 (not found)\n"); - err = TestViewGroup3NotFound_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : View Group 3 (not found)\n"); + err = TestViewGroup3NotFound_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : View Group 1 (existing)\n"); - err = TestViewGroup1Existing_8(); - break; + ChipLogProgress(chipTool, " ***** Test Step 8 : View Group 1 (existing)\n"); + err = TestViewGroup1Existing_8(); + break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Remove Group 0 (invalid)\n"); - err = TestRemoveGroup0Invalid_9(); - break; + ChipLogProgress(chipTool, " ***** Test Step 9 : Remove Group 0 (invalid)\n"); + err = TestRemoveGroup0Invalid_9(); + break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Remove Group 4 (not found)\n"); - err = TestRemoveGroup4NotFound_10(); - break; + ChipLogProgress(chipTool, " ***** Test Step 10 : Remove Group 4 (not found)\n"); + err = TestRemoveGroup4NotFound_10(); + break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : View Group 1 (not removed)\n"); - err = TestViewGroup1NotRemoved_11(); - break; + ChipLogProgress(chipTool, " ***** Test Step 11 : View Group 1 (not removed)\n"); + err = TestViewGroup1NotRemoved_11(); + break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : View Group 2 (removed)\n"); - err = TestViewGroup2Removed_12(); - break; + ChipLogProgress(chipTool, " ***** Test Step 12 : View Group 2 (removed)\n"); + err = TestViewGroup2Removed_12(); + break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Get Group Membership 3\n"); - err = TestGetGroupMembership3_13(); - break; + ChipLogProgress(chipTool, " ***** Test Step 13 : Get Group Membership 3\n"); + err = TestGetGroupMembership3_13(); + break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Remove All\n"); - err = TestRemoveAll_14(); - break; + ChipLogProgress(chipTool, " ***** Test Step 14 : Remove All\n"); + err = TestRemoveAll_14(); + break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : View Group 1 (removed)\n"); - err = TestViewGroup1Removed_15(); - break; + ChipLogProgress(chipTool, " ***** Test Step 15 : View Group 1 (removed)\n"); + err = TestViewGroup1Removed_15(); + break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : View Group 2 (still removed)\n"); - err = TestViewGroup2StillRemoved_16(); - break; + ChipLogProgress(chipTool, " ***** Test Step 16 : View Group 2 (still removed)\n"); + err = TestViewGroup2StillRemoved_16(); + break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : View Group 3 (removed)\n"); - err = TestViewGroup3Removed_17(); - break; + ChipLogProgress(chipTool, " ***** Test Step 17 : View Group 3 (removed)\n"); + err = TestViewGroup3Removed_17(); + break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Get Group Membership 4\n"); - err = TestGetGroupMembership4_18(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 18 : Get Group Membership 4\n"); + err = TestGetGroupMembership4_18(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 19; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestViewGroup0Invalid_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; + using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; RequestType request; - request.groupId = 0U; - + request.groupId = 0U; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_1(data.status, data.groupId, data.groupName); }; @@ -84942,44 +64426,29 @@ class TestGroupsCluster: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint8_t status, uint16_t groupId, chip::CharSpan groupName) + void OnSuccessResponse_1(uint8_t status, uint16_t groupId, chip::CharSpan groupName) { - VerifyOrReturn(CheckValue("status", status,135 - )); - - - VerifyOrReturn(CheckValue("groupId", groupId,0U - )); - + VerifyOrReturn(CheckValue("status", status, 135)); + VerifyOrReturn(CheckValue("groupId", groupId, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestViewGroup1NotFound_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; + using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; RequestType request; - request.groupId = 1U; - + request.groupId = 1U; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_2(data.status, data.groupId, data.groupName); }; @@ -84988,44 +64457,29 @@ class TestGroupsCluster: public TestCommand (static_cast(context))->OnFailureResponse_2(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint8_t status, uint16_t groupId, chip::CharSpan groupName) + void OnSuccessResponse_2(uint8_t status, uint16_t groupId, chip::CharSpan groupName) { - VerifyOrReturn(CheckValue("status", status,139 - )); - - - VerifyOrReturn(CheckValue("groupId", groupId,1U - )); - + VerifyOrReturn(CheckValue("status", status, 139)); + VerifyOrReturn(CheckValue("groupId", groupId, 1U)); NextTest(); - } - - - + } - CHIP_ERROR TestAddGroup1New_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::Groups::Commands::AddGroup::Type; + using RequestType = chip::app::Clusters::Groups::Commands::AddGroup::Type; RequestType request; - request.groupId = 1U; - request.groupName = chip::Span("Group #1garbage: not in length on purpose", 8); + request.groupId = 1U; + request.groupName = chip::Span("Group #1garbage: not in length on purpose", 8); auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(data.status, data.groupId); @@ -85035,42 +64489,29 @@ class TestGroupsCluster: public TestCommand (static_cast(context))->OnFailureResponse_3(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( uint8_t status, uint16_t groupId) + void OnSuccessResponse_3(uint8_t status, uint16_t groupId) { - VerifyOrReturn(CheckValue("status", status,0 - )); + VerifyOrReturn(CheckValue("status", status, 0)); - - VerifyOrReturn(CheckValue("groupId", groupId,1U - )); + VerifyOrReturn(CheckValue("groupId", groupId, 1U)); NextTest(); - } - - - + } - CHIP_ERROR TestViewGroup1New_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; + using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; RequestType request; - request.groupId = 1U; - + request.groupId = 1U; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_4(data.status, data.groupId, data.groupName); }; @@ -85079,46 +64520,31 @@ class TestGroupsCluster: public TestCommand (static_cast(context))->OnFailureResponse_4(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( uint8_t status, uint16_t groupId, chip::CharSpan groupName) + void OnSuccessResponse_4(uint8_t status, uint16_t groupId, chip::CharSpan groupName) { - VerifyOrReturn(CheckValue("status", status,0 - )); - - - VerifyOrReturn(CheckValue("groupId", groupId,1U - )); + VerifyOrReturn(CheckValue("status", status, 0)); + VerifyOrReturn(CheckValue("groupId", groupId, 1U)); - VerifyOrReturn(CheckValueAsString("groupName", groupName,chip::CharSpan("Group #1", 8) - )); + VerifyOrReturn(CheckValueAsString("groupName", groupName, chip::CharSpan("Group #1", 8))); NextTest(); - } - - - + } - CHIP_ERROR TestViewGroup2NotFound_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; + using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; RequestType request; - request.groupId = 4369U; - + request.groupId = 4369U; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_5(data.status, data.groupId, data.groupName); }; @@ -85127,44 +64553,29 @@ class TestGroupsCluster: public TestCommand (static_cast(context))->OnFailureResponse_5(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5( uint8_t status, uint16_t groupId, chip::CharSpan groupName) + void OnSuccessResponse_5(uint8_t status, uint16_t groupId, chip::CharSpan groupName) { - VerifyOrReturn(CheckValue("status", status,139 - )); - - - VerifyOrReturn(CheckValue("groupId", groupId,4369U - )); - + VerifyOrReturn(CheckValue("status", status, 139)); + VerifyOrReturn(CheckValue("groupId", groupId, 4369U)); NextTest(); - } - - - + } - CHIP_ERROR TestGetGroupMembership1All_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::Groups::Commands::GetGroupMembership::Type; + using RequestType = chip::app::Clusters::Groups::Commands::GetGroupMembership::Type; RequestType request; - - request.groupList = chip::app::DataModel::List(); + + request.groupList = chip::app::DataModel::List(); auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_6(data.capacity, data.groupList); @@ -85174,47 +64585,34 @@ class TestGroupsCluster: public TestCommand (static_cast(context))->OnFailureResponse_6(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6( uint8_t capacity, const chip::app::DataModel::DecodableList & groupList) + void OnSuccessResponse_6(uint8_t capacity, const chip::app::DataModel::DecodableList & groupList) { - VerifyOrReturn(CheckValue("capacity", capacity,255 - )); - + VerifyOrReturn(CheckValue("capacity", capacity, 255)); - { - auto iter_0 = groupList.begin(); - VerifyOrReturn(CheckNextListItemDecodes("groupList", iter_0, 0)); - VerifyOrReturn(CheckValue("groupList[0]", iter_0.GetValue(),1U - )); - VerifyOrReturn(CheckNoMoreListItems("groupList", iter_0, 1)); - } + { + auto iter_0 = groupList.begin(); + VerifyOrReturn(CheckNextListItemDecodes("groupList", iter_0, 0)); + VerifyOrReturn(CheckValue("groupList[0]", iter_0.GetValue(), 1U)); + VerifyOrReturn(CheckNoMoreListItems("groupList", iter_0, 1)); + } NextTest(); - } - - - + } - CHIP_ERROR TestViewGroup3NotFound_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; + using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; RequestType request; - request.groupId = 32767U; - + request.groupId = 32767U; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_7(data.status, data.groupId, data.groupName); }; @@ -85223,44 +64621,29 @@ class TestGroupsCluster: public TestCommand (static_cast(context))->OnFailureResponse_7(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7( uint8_t status, uint16_t groupId, chip::CharSpan groupName) + void OnSuccessResponse_7(uint8_t status, uint16_t groupId, chip::CharSpan groupName) { - VerifyOrReturn(CheckValue("status", status,139 - )); - - - VerifyOrReturn(CheckValue("groupId", groupId,32767U - )); - + VerifyOrReturn(CheckValue("status", status, 139)); + VerifyOrReturn(CheckValue("groupId", groupId, 32767U)); NextTest(); - } - - - + } - CHIP_ERROR TestViewGroup1Existing_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; + using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; RequestType request; - request.groupId = 1U; - + request.groupId = 1U; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_8(data.status, data.groupId, data.groupName); }; @@ -85269,46 +64652,31 @@ class TestGroupsCluster: public TestCommand (static_cast(context))->OnFailureResponse_8(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_8(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_8( uint8_t status, uint16_t groupId, chip::CharSpan groupName) + void OnSuccessResponse_8(uint8_t status, uint16_t groupId, chip::CharSpan groupName) { - VerifyOrReturn(CheckValue("status", status,0 - )); - + VerifyOrReturn(CheckValue("status", status, 0)); - VerifyOrReturn(CheckValue("groupId", groupId,1U - )); + VerifyOrReturn(CheckValue("groupId", groupId, 1U)); - - VerifyOrReturn(CheckValueAsString("groupName", groupName,chip::CharSpan("Group #1", 8) - )); + VerifyOrReturn(CheckValueAsString("groupName", groupName, chip::CharSpan("Group #1", 8))); NextTest(); - } - - - + } - CHIP_ERROR TestRemoveGroup0Invalid_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::Groups::Commands::RemoveGroup::Type; + using RequestType = chip::app::Clusters::Groups::Commands::RemoveGroup::Type; RequestType request; - request.groupId = 0U; - + request.groupId = 0U; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_9(data.status, data.groupId); }; @@ -85317,42 +64685,29 @@ class TestGroupsCluster: public TestCommand (static_cast(context))->OnFailureResponse_9(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_9(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_9( uint8_t status, uint16_t groupId) + void OnSuccessResponse_9(uint8_t status, uint16_t groupId) { - VerifyOrReturn(CheckValue("status", status,135 - )); - + VerifyOrReturn(CheckValue("status", status, 135)); - VerifyOrReturn(CheckValue("groupId", groupId,0U - )); + VerifyOrReturn(CheckValue("groupId", groupId, 0U)); NextTest(); - } - - - + } - CHIP_ERROR TestRemoveGroup4NotFound_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::Groups::Commands::RemoveGroup::Type; + using RequestType = chip::app::Clusters::Groups::Commands::RemoveGroup::Type; RequestType request; - request.groupId = 4U; - + request.groupId = 4U; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_10(data.status, data.groupId); }; @@ -85361,42 +64716,29 @@ class TestGroupsCluster: public TestCommand (static_cast(context))->OnFailureResponse_10(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_10(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_10( uint8_t status, uint16_t groupId) + void OnSuccessResponse_10(uint8_t status, uint16_t groupId) { - VerifyOrReturn(CheckValue("status", status,139 - )); - + VerifyOrReturn(CheckValue("status", status, 139)); - VerifyOrReturn(CheckValue("groupId", groupId,4U - )); + VerifyOrReturn(CheckValue("groupId", groupId, 4U)); NextTest(); - } - - - + } - CHIP_ERROR TestViewGroup1NotRemoved_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; + using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; RequestType request; - request.groupId = 1U; - + request.groupId = 1U; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_11(data.status, data.groupId, data.groupName); }; @@ -85405,46 +64747,31 @@ class TestGroupsCluster: public TestCommand (static_cast(context))->OnFailureResponse_11(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_11(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_11( uint8_t status, uint16_t groupId, chip::CharSpan groupName) + void OnSuccessResponse_11(uint8_t status, uint16_t groupId, chip::CharSpan groupName) { - VerifyOrReturn(CheckValue("status", status,0 - )); - + VerifyOrReturn(CheckValue("status", status, 0)); - VerifyOrReturn(CheckValue("groupId", groupId,1U - )); + VerifyOrReturn(CheckValue("groupId", groupId, 1U)); - - VerifyOrReturn(CheckValueAsString("groupName", groupName,chip::CharSpan("Group #1", 8) - )); + VerifyOrReturn(CheckValueAsString("groupName", groupName, chip::CharSpan("Group #1", 8))); NextTest(); - } - - - + } - CHIP_ERROR TestViewGroup2Removed_12() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; + using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; RequestType request; - request.groupId = 4369U; - + request.groupId = 4369U; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_12(data.status, data.groupId, data.groupName); }; @@ -85453,49 +64780,34 @@ class TestGroupsCluster: public TestCommand (static_cast(context))->OnFailureResponse_12(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_12(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_12( uint8_t status, uint16_t groupId, chip::CharSpan groupName) + void OnSuccessResponse_12(uint8_t status, uint16_t groupId, chip::CharSpan groupName) { - VerifyOrReturn(CheckValue("status", status,139 - )); - - - VerifyOrReturn(CheckValue("groupId", groupId,4369U - )); - + VerifyOrReturn(CheckValue("status", status, 139)); + VerifyOrReturn(CheckValue("groupId", groupId, 4369U)); NextTest(); - } - - - + } - CHIP_ERROR TestGetGroupMembership3_13() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::Groups::Commands::GetGroupMembership::Type; + using RequestType = chip::app::Clusters::Groups::Commands::GetGroupMembership::Type; RequestType request; - - uint16_t groupListList_0[4]; - groupListList_0[0] = 1U; - groupListList_0[1] = 2U; - groupListList_0[2] = 4369U; - groupListList_0[3] = 3U; - request.groupList = groupListList_0; + + uint16_t groupListList_0[4]; + groupListList_0[0] = 1U; + groupListList_0[1] = 2U; + groupListList_0[2] = 4369U; + groupListList_0[3] = 3U; + request.groupList = groupListList_0; auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_13(data.capacity, data.groupList); @@ -85505,43 +64817,30 @@ class TestGroupsCluster: public TestCommand (static_cast(context))->OnFailureResponse_13(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_13(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_13(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_13( uint8_t capacity, const chip::app::DataModel::DecodableList & groupList) + void OnSuccessResponse_13(uint8_t capacity, const chip::app::DataModel::DecodableList & groupList) { - VerifyOrReturn(CheckValue("capacity", capacity,255 - )); + VerifyOrReturn(CheckValue("capacity", capacity, 255)); - - { - auto iter_0 = groupList.begin(); - VerifyOrReturn(CheckNextListItemDecodes("groupList", iter_0, 0)); - VerifyOrReturn(CheckValue("groupList[0]", iter_0.GetValue(),1U - )); - VerifyOrReturn(CheckNoMoreListItems("groupList", iter_0, 1)); - } + { + auto iter_0 = groupList.begin(); + VerifyOrReturn(CheckNextListItemDecodes("groupList", iter_0, 0)); + VerifyOrReturn(CheckValue("groupList[0]", iter_0.GetValue(), 1U)); + VerifyOrReturn(CheckNoMoreListItems("groupList", iter_0, 1)); + } NextTest(); - } - - - + } - CHIP_ERROR TestRemoveAll_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type; + using RequestType = chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type; RequestType request; @@ -85553,34 +64852,22 @@ class TestGroupsCluster: public TestCommand (static_cast(context))->OnFailureResponse_14(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_14(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_14() - { NextTest(); - } - + void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_14() { NextTest(); } - CHIP_ERROR TestViewGroup1Removed_15() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; + using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; RequestType request; - request.groupId = 1U; - + request.groupId = 1U; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_15(data.status, data.groupId, data.groupName); }; @@ -85589,44 +64876,29 @@ class TestGroupsCluster: public TestCommand (static_cast(context))->OnFailureResponse_15(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_15(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_15(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_15( uint8_t status, uint16_t groupId, chip::CharSpan groupName) + void OnSuccessResponse_15(uint8_t status, uint16_t groupId, chip::CharSpan groupName) { - VerifyOrReturn(CheckValue("status", status,139 - )); - - - VerifyOrReturn(CheckValue("groupId", groupId,1U - )); - + VerifyOrReturn(CheckValue("status", status, 139)); + VerifyOrReturn(CheckValue("groupId", groupId, 1U)); NextTest(); - } - - - + } - CHIP_ERROR TestViewGroup2StillRemoved_16() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; + using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; RequestType request; - request.groupId = 4369U; - + request.groupId = 4369U; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_16(data.status, data.groupId, data.groupName); }; @@ -85635,44 +64907,29 @@ class TestGroupsCluster: public TestCommand (static_cast(context))->OnFailureResponse_16(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_16(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_16(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_16( uint8_t status, uint16_t groupId, chip::CharSpan groupName) + void OnSuccessResponse_16(uint8_t status, uint16_t groupId, chip::CharSpan groupName) { - VerifyOrReturn(CheckValue("status", status,139 - )); - - - VerifyOrReturn(CheckValue("groupId", groupId,4369U - )); - + VerifyOrReturn(CheckValue("status", status, 139)); + VerifyOrReturn(CheckValue("groupId", groupId, 4369U)); NextTest(); - } - - - + } - CHIP_ERROR TestViewGroup3Removed_17() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; + using RequestType = chip::app::Clusters::Groups::Commands::ViewGroup::Type; RequestType request; - request.groupId = 32767U; - + request.groupId = 32767U; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_17(data.status, data.groupId, data.groupName); }; @@ -85681,50 +64938,35 @@ class TestGroupsCluster: public TestCommand (static_cast(context))->OnFailureResponse_17(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_17(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_17(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_17( uint8_t status, uint16_t groupId, chip::CharSpan groupName) + void OnSuccessResponse_17(uint8_t status, uint16_t groupId, chip::CharSpan groupName) { - VerifyOrReturn(CheckValue("status", status,139 - )); - - - VerifyOrReturn(CheckValue("groupId", groupId,32767U - )); - - - - NextTest(); - } + VerifyOrReturn(CheckValue("status", status, 139)); + VerifyOrReturn(CheckValue("groupId", groupId, 32767U)); - + NextTest(); + } - CHIP_ERROR TestGetGroupMembership4_18() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::Groups::Commands::GetGroupMembership::Type; + using RequestType = chip::app::Clusters::Groups::Commands::GetGroupMembership::Type; RequestType request; - - uint16_t groupListList_0[5]; - groupListList_0[0] = 1U; - groupListList_0[1] = 2U; - groupListList_0[2] = 4369U; - groupListList_0[3] = 3U; - groupListList_0[4] = 32767U; - request.groupList = groupListList_0; + + uint16_t groupListList_0[5]; + groupListList_0[0] = 1U; + groupListList_0[1] = 2U; + groupListList_0[2] = 4369U; + groupListList_0[3] = 3U; + groupListList_0[4] = 32767U; + request.groupList = groupListList_0; auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_18(data.capacity, data.groupList); @@ -85734,818 +64976,621 @@ class TestGroupsCluster: public TestCommand (static_cast(context))->OnFailureResponse_18(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_18(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_18(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_18( uint8_t capacity, const chip::app::DataModel::DecodableList & groupList) + void OnSuccessResponse_18(uint8_t capacity, const chip::app::DataModel::DecodableList & groupList) { - VerifyOrReturn(CheckValue("capacity", capacity,255 - )); - + VerifyOrReturn(CheckValue("capacity", capacity, 255)); - { - auto iter_0 = groupList.begin(); - VerifyOrReturn(CheckNoMoreListItems("groupList", iter_0, 0)); - } + { + auto iter_0 = groupList.begin(); + VerifyOrReturn(CheckNoMoreListItems("groupList", iter_0, 0)); + } NextTest(); - } - - - }; + } +}; -class TestGroupKeyManagementCluster: public TestCommand +class TestGroupKeyManagementCluster : public TestCommand { - public: - TestGroupKeyManagementCluster(): TestCommand("TestGroupKeyManagementCluster"), mTestIndex(0) +public: + TestGroupKeyManagementCluster() : TestCommand("TestGroupKeyManagementCluster"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~TestGroupKeyManagementCluster() - { - } + ~TestGroupKeyManagementCluster() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: TestGroupKeyManagementCluster\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: TestGroupKeyManagementCluster\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: TestGroupKeyManagementCluster\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: TestGroupKeyManagementCluster\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read maxGroupsPerFabric\n"); - err = TestReadMaxGroupsPerFabric_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Read maxGroupsPerFabric\n"); + err = TestReadMaxGroupsPerFabric_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read maxGroupKeysPerFabric\n"); - err = TestReadMaxGroupKeysPerFabric_2(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 2 : Read maxGroupKeysPerFabric\n"); + err = TestReadMaxGroupKeysPerFabric_2(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint16_t maxGroupsPerFabric) + static void OnSuccessCallback_1(void * context, uint16_t maxGroupsPerFabric) { (static_cast(context))->OnSuccessResponse_1(maxGroupsPerFabric); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint16_t maxGroupKeysPerFabric) + static void OnSuccessCallback_2(void * context, uint16_t maxGroupKeysPerFabric) { (static_cast(context))->OnSuccessResponse_2(maxGroupKeysPerFabric); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadMaxGroupsPerFabric_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::GroupKeyManagementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint16_t maxGroupsPerFabric) + void OnSuccessResponse_1(uint16_t maxGroupsPerFabric) { - VerifyOrReturn(CheckValue("maxGroupsPerFabric", maxGroupsPerFabric,1U - )); + VerifyOrReturn(CheckValue("maxGroupsPerFabric", maxGroupsPerFabric, 1U)); NextTest(); - } - - - + } - CHIP_ERROR TestReadMaxGroupKeysPerFabric_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::GroupKeyManagementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint16_t maxGroupKeysPerFabric) + void OnSuccessResponse_2(uint16_t maxGroupKeysPerFabric) { - VerifyOrReturn(CheckValue("maxGroupKeysPerFabric", maxGroupKeysPerFabric,1U - )); + VerifyOrReturn(CheckValue("maxGroupKeysPerFabric", maxGroupKeysPerFabric, 1U)); NextTest(); - } - - - }; + } +}; -class TestOperationalCredentialsCluster: public TestCommand +class TestOperationalCredentialsCluster : public TestCommand { - public: - TestOperationalCredentialsCluster(): TestCommand("TestOperationalCredentialsCluster"), mTestIndex(0) +public: + TestOperationalCredentialsCluster() : TestCommand("TestOperationalCredentialsCluster"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~TestOperationalCredentialsCluster() - { - } + ~TestOperationalCredentialsCluster() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: TestOperationalCredentialsCluster\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: TestOperationalCredentialsCluster\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: TestOperationalCredentialsCluster\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: TestOperationalCredentialsCluster\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read number of supported fabrics\n"); - err = TestReadNumberOfSupportedFabrics_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Read number of supported fabrics\n"); + err = TestReadNumberOfSupportedFabrics_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read number of commissioned fabrics\n"); - err = TestReadNumberOfCommissionedFabrics_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Read number of commissioned fabrics\n"); + err = TestReadNumberOfCommissionedFabrics_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read current fabric index\n"); - err = TestReadCurrentFabricIndex_3(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 3 : Read current fabric index\n"); + err = TestReadCurrentFabricIndex_3(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 4; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint8_t supportedFabrics) + static void OnSuccessCallback_1(void * context, uint8_t supportedFabrics) { (static_cast(context))->OnSuccessResponse_1(supportedFabrics); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint8_t commissionedFabrics) + static void OnSuccessCallback_2(void * context, uint8_t commissionedFabrics) { (static_cast(context))->OnSuccessResponse_2(commissionedFabrics); } - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, chip::FabricIndex currentFabricIndex) + static void OnSuccessCallback_3(void * context, chip::FabricIndex currentFabricIndex) { (static_cast(context))->OnSuccessResponse_3(currentFabricIndex); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadNumberOfSupportedFabrics_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::OperationalCredentialsClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint8_t supportedFabrics) + void OnSuccessResponse_1(uint8_t supportedFabrics) { - VerifyOrReturn(CheckConstraintType("supportedFabrics", "", "uint8"));VerifyOrReturn(CheckConstraintMinValue("supportedFabrics", supportedFabrics, 4)); + VerifyOrReturn(CheckConstraintType("supportedFabrics", "", "uint8")); + VerifyOrReturn(CheckConstraintMinValue("supportedFabrics", supportedFabrics, 4)); NextTest(); - } - - - + } - CHIP_ERROR TestReadNumberOfCommissionedFabrics_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::OperationalCredentialsClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint8_t commissionedFabrics) + void OnSuccessResponse_2(uint8_t commissionedFabrics) { - VerifyOrReturn(CheckConstraintType("commissionedFabrics", "", "uint8"));VerifyOrReturn(CheckConstraintMinValue("commissionedFabrics", commissionedFabrics, 1)); + VerifyOrReturn(CheckConstraintType("commissionedFabrics", "", "uint8")); + VerifyOrReturn(CheckConstraintMinValue("commissionedFabrics", commissionedFabrics, 1)); NextTest(); - } - - - + } - CHIP_ERROR TestReadCurrentFabricIndex_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::OperationalCredentialsClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( chip::FabricIndex currentFabricIndex) + void OnSuccessResponse_3(chip::FabricIndex currentFabricIndex) { - VerifyOrReturn(CheckConstraintType("currentFabricIndex", "", "uint8"));VerifyOrReturn(CheckConstraintMinValue("currentFabricIndex", currentFabricIndex, 1)); + VerifyOrReturn(CheckConstraintType("currentFabricIndex", "", "uint8")); + VerifyOrReturn(CheckConstraintMinValue("currentFabricIndex", currentFabricIndex, 1)); NextTest(); - } - - - }; + } +}; -class TestModeSelectCluster: public TestCommand +class TestModeSelectCluster : public TestCommand { - public: - TestModeSelectCluster(): TestCommand("TestModeSelectCluster"), mTestIndex(0) +public: + TestModeSelectCluster() : TestCommand("TestModeSelectCluster"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~TestModeSelectCluster() - { - } + ~TestModeSelectCluster() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: TestModeSelectCluster\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: TestModeSelectCluster\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: TestModeSelectCluster\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: TestModeSelectCluster\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read CurrentMode\n"); - err = TestReadCurrentMode_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Read CurrentMode\n"); + err = TestReadCurrentMode_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read OnMode\n"); - err = TestReadOnMode_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Read OnMode\n"); + err = TestReadOnMode_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read StartUpMode\n"); - err = TestReadStartUpMode_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Read StartUpMode\n"); + err = TestReadStartUpMode_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read Description\n"); - err = TestReadDescription_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Read Description\n"); + err = TestReadDescription_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read SupportedModes\n"); - err = TestReadSupportedModes_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Read SupportedModes\n"); + err = TestReadSupportedModes_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Change to Supported Mode\n"); - err = TestChangeToSupportedMode_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : Change to Supported Mode\n"); + err = TestChangeToSupportedMode_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Verify Current Mode Change\n"); - err = TestVerifyCurrentModeChange_7(); - break; + ChipLogProgress(chipTool, " ***** Test Step 7 : Verify Current Mode Change\n"); + err = TestVerifyCurrentModeChange_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Change to Unsupported Mode\n"); - err = TestChangeToUnsupportedMode_8(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 8 : Change to Unsupported Mode\n"); + err = TestChangeToUnsupportedMode_8(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 9; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint8_t currentMode) + static void OnSuccessCallback_1(void * context, uint8_t currentMode) { (static_cast(context))->OnSuccessResponse_1(currentMode); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint8_t onMode) + static void OnSuccessCallback_2(void * context, uint8_t onMode) { (static_cast(context))->OnSuccessResponse_2(onMode); } - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, uint8_t startUpMode) + static void OnSuccessCallback_3(void * context, uint8_t startUpMode) { (static_cast(context))->OnSuccessResponse_3(startUpMode); } - - - static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, chip::CharSpan description) + static void OnSuccessCallback_4(void * context, chip::CharSpan description) { (static_cast(context))->OnSuccessResponse_4(description); } - - - static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context, const chip::app::DataModel::DecodableList & supportedModes) + static void OnSuccessCallback_5( + void * context, + const chip::app::DataModel::DecodableList & + supportedModes) { (static_cast(context))->OnSuccessResponse_5(supportedModes); } - - - static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context, uint8_t currentMode) + static void OnSuccessCallback_7(void * context, uint8_t currentMode) { (static_cast(context))->OnSuccessResponse_7(currentMode); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadCurrentMode_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ModeSelectClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1( uint8_t currentMode) + void OnSuccessResponse_1(uint8_t currentMode) { - VerifyOrReturn(CheckValue("currentMode", currentMode,0 - )); + VerifyOrReturn(CheckValue("currentMode", currentMode, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadOnMode_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ModeSelectClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( uint8_t onMode) + void OnSuccessResponse_2(uint8_t onMode) { - VerifyOrReturn(CheckValue("onMode", onMode,0 - )); + VerifyOrReturn(CheckValue("onMode", onMode, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadStartUpMode_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ModeSelectClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( uint8_t startUpMode) + void OnSuccessResponse_3(uint8_t startUpMode) { - VerifyOrReturn(CheckValue("startUpMode", startUpMode,0 - )); + VerifyOrReturn(CheckValue("startUpMode", startUpMode, 0)); NextTest(); - } - - - + } - CHIP_ERROR TestReadDescription_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ModeSelectClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( chip::CharSpan description) + void OnSuccessResponse_4(chip::CharSpan description) { - VerifyOrReturn(CheckValueAsString("description", description,chip::CharSpan("Coffee", 6) - )); + VerifyOrReturn(CheckValueAsString("description", description, chip::CharSpan("Coffee", 6))); NextTest(); - } - - - + } - CHIP_ERROR TestReadSupportedModes_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ModeSelectClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5( const chip::app::DataModel::DecodableList & supportedModes) - { - { - auto iter_0 = supportedModes.begin(); - VerifyOrReturn(CheckNextListItemDecodes("supportedModes", iter_0, 0)); - VerifyOrReturn(CheckValueAsString("supportedModes[0].label", iter_0.GetValue().label,chip::CharSpan("Black", 5) - )); - VerifyOrReturn(CheckValue("supportedModes[0].mode", iter_0.GetValue().mode,0 - )); - VerifyOrReturn(CheckValue("supportedModes[0].semanticTag", iter_0.GetValue().semanticTag,0UL - )); - VerifyOrReturn(CheckNextListItemDecodes("supportedModes", iter_0, 1)); - VerifyOrReturn(CheckValueAsString("supportedModes[1].label", iter_0.GetValue().label,chip::CharSpan("Cappuccino", 10) - )); - VerifyOrReturn(CheckValue("supportedModes[1].mode", iter_0.GetValue().mode,4 - )); - VerifyOrReturn(CheckValue("supportedModes[1].semanticTag", iter_0.GetValue().semanticTag,0UL - )); - VerifyOrReturn(CheckNextListItemDecodes("supportedModes", iter_0, 2)); - VerifyOrReturn(CheckValueAsString("supportedModes[2].label", iter_0.GetValue().label,chip::CharSpan("Espresso", 8) - )); - VerifyOrReturn(CheckValue("supportedModes[2].mode", iter_0.GetValue().mode,7 - )); - VerifyOrReturn(CheckValue("supportedModes[2].semanticTag", iter_0.GetValue().semanticTag,0UL - )); - VerifyOrReturn(CheckNoMoreListItems("supportedModes", iter_0, 3)); - } + void OnSuccessResponse_5( + const chip::app::DataModel::DecodableList & + supportedModes) + { + { + auto iter_0 = supportedModes.begin(); + VerifyOrReturn(CheckNextListItemDecodes("supportedModes", iter_0, 0)); + VerifyOrReturn(CheckValueAsString("supportedModes[0].label", iter_0.GetValue().label, chip::CharSpan("Black", 5))); + VerifyOrReturn(CheckValue("supportedModes[0].mode", iter_0.GetValue().mode, 0)); + VerifyOrReturn(CheckValue("supportedModes[0].semanticTag", iter_0.GetValue().semanticTag, 0UL)); + VerifyOrReturn(CheckNextListItemDecodes("supportedModes", iter_0, 1)); + VerifyOrReturn( + CheckValueAsString("supportedModes[1].label", iter_0.GetValue().label, chip::CharSpan("Cappuccino", 10))); + VerifyOrReturn(CheckValue("supportedModes[1].mode", iter_0.GetValue().mode, 4)); + VerifyOrReturn(CheckValue("supportedModes[1].semanticTag", iter_0.GetValue().semanticTag, 0UL)); + VerifyOrReturn(CheckNextListItemDecodes("supportedModes", iter_0, 2)); + VerifyOrReturn(CheckValueAsString("supportedModes[2].label", iter_0.GetValue().label, chip::CharSpan("Espresso", 8))); + VerifyOrReturn(CheckValue("supportedModes[2].mode", iter_0.GetValue().mode, 7)); + VerifyOrReturn(CheckValue("supportedModes[2].semanticTag", iter_0.GetValue().semanticTag, 0UL)); + VerifyOrReturn(CheckNoMoreListItems("supportedModes", iter_0, 3)); + } NextTest(); - } - - - + } - CHIP_ERROR TestChangeToSupportedMode_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type; + using RequestType = chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type; RequestType request; - request.newMode = 4; - + request.newMode = 4; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_6(); }; @@ -86554,62 +65599,42 @@ class TestModeSelectCluster: public TestCommand (static_cast(context))->OnFailureResponse_6(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_6() - { NextTest(); - } - + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_6() { NextTest(); } - CHIP_ERROR TestVerifyCurrentModeChange_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ModeSelectClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_7, OnFailureCallback_7)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7( uint8_t currentMode) + void OnSuccessResponse_7(uint8_t currentMode) { - VerifyOrReturn(CheckValue("currentMode", currentMode,4 - )); + VerifyOrReturn(CheckValue("currentMode", currentMode, 4)); NextTest(); - } - - - + } - CHIP_ERROR TestChangeToUnsupportedMode_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type; + using RequestType = chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type; RequestType request; - request.newMode = 2; - + request.newMode = 2; + auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_8(); }; @@ -86618,197 +65643,139 @@ class TestModeSelectCluster: public TestCommand (static_cast(context))->OnFailureResponse_8(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_8(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_8() - { ThrowSuccessResponse(); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } + void OnSuccessResponse_8() { ThrowSuccessResponse(); } +}; - }; - -class TestGroupMessaging: public TestCommand +class TestGroupMessaging : public TestCommand { - public: - TestGroupMessaging(): TestCommand("TestGroupMessaging"), mTestIndex(0) +public: + TestGroupMessaging() : TestCommand("TestGroupMessaging"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~TestGroupMessaging() - { - } + ~TestGroupMessaging() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: TestGroupMessaging\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: TestGroupMessaging\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: TestGroupMessaging\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: TestGroupMessaging\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Group Write Attribute\n"); - err = TestGroupWriteAttribute_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Group Write Attribute\n"); + err = TestGroupWriteAttribute_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read back Attribute\n"); - err = TestReadBackAttribute_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Read back Attribute\n"); + err = TestReadBackAttribute_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Restore initial location value\n"); - err = TestRestoreInitialLocationValue_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Restore initial location value\n"); + err = TestRestoreInitialLocationValue_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read back Attribute\n"); - err = TestReadBackAttribute_4(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 4 : Read back Attribute\n"); + err = TestReadBackAttribute_4(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 5; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnDoneCallback_1(void * context) - { - (static_cast(context))->OnDoneResponse_1(); - } + static void OnDoneCallback_1(void * context) { (static_cast(context))->OnDoneResponse_1(); } static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context) - { - (static_cast(context))->OnSuccessResponse_1(); - } - - - + static void OnSuccessCallback_1(void * context) { (static_cast(context))->OnSuccessResponse_1(); } static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, chip::CharSpan location) + static void OnSuccessCallback_2(void * context, chip::CharSpan location) { (static_cast(context))->OnSuccessResponse_2(location); } - - - static void OnDoneCallback_3(void * context) - { - (static_cast(context))->OnDoneResponse_3(); - } + static void OnDoneCallback_3(void * context) { (static_cast(context))->OnDoneResponse_3(); } static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context) - { - (static_cast(context))->OnSuccessResponse_3(); - } - - - + static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } static void OnFailureCallback_4(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, chip::CharSpan location) + static void OnSuccessCallback_4(void * context, chip::CharSpan location) { (static_cast(context))->OnSuccessResponse_4(location); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestGroupWriteAttribute_1() { const chip::GroupId groupId = 1234; @@ -86816,57 +65783,39 @@ class TestGroupMessaging: public TestCommand cluster.AssociateWithGroup(mDevices[kIdentityAlpha], groupId); chip::CharSpan locationArgument; - locationArgument = chip::Span("usgarbage: not in length on purpose", 2); + locationArgument = chip::Span("usgarbage: not in length on purpose", 2); - ReturnErrorOnFailure(cluster.WriteAttribute(locationArgument, this, OnSuccessCallback_1, OnFailureCallback_1, OnDoneCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + locationArgument, this, OnSuccessCallback_1, OnFailureCallback_1, OnDoneCallback_1)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_1() - { NextTest(); - } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnDoneResponse_1() - { - NextTest(); - } + void OnSuccessResponse_1() { NextTest(); } - + void OnDoneResponse_1() { NextTest(); } - CHIP_ERROR TestReadBackAttribute_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2( chip::CharSpan location) + void OnSuccessResponse_2(chip::CharSpan location) { - VerifyOrReturn(CheckValueAsString("location", location,chip::CharSpan("us", 2) - )); + VerifyOrReturn(CheckValueAsString("location", location, chip::CharSpan("us", 2))); NextTest(); - } - - - + } - CHIP_ERROR TestRestoreInitialLocationValue_3() { const chip::GroupId groupId = 1234; @@ -86874,702 +65823,540 @@ class TestGroupMessaging: public TestCommand cluster.AssociateWithGroup(mDevices[kIdentityAlpha], groupId); chip::CharSpan locationArgument; - locationArgument = chip::Span("garbage: not in length on purpose", 0); + locationArgument = chip::Span("garbage: not in length on purpose", 0); - ReturnErrorOnFailure(cluster.WriteAttribute(locationArgument, this, OnSuccessCallback_3, OnFailureCallback_3, OnDoneCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.WriteAttribute( + locationArgument, this, OnSuccessCallback_3, OnFailureCallback_3, OnDoneCallback_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_3() - { NextTest(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnDoneResponse_3() - { - NextTest(); - } + void OnSuccessResponse_3() { NextTest(); } - + void OnDoneResponse_3() { NextTest(); } - CHIP_ERROR TestReadBackAttribute_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4( chip::CharSpan location) + void OnSuccessResponse_4(chip::CharSpan location) { - VerifyOrReturn(CheckValueAsString("location", location,chip::CharSpan("", 0) - )); + VerifyOrReturn(CheckValueAsString("location", location, chip::CharSpan("", 0))); NextTest(); - } - - - }; + } +}; -class Test_TC_SWDIAG_1_1: public TestCommand +class Test_TC_SWDIAG_1_1 : public TestCommand { - public: - Test_TC_SWDIAG_1_1(): TestCommand("Test_TC_SWDIAG_1_1"), mTestIndex(0) +public: + Test_TC_SWDIAG_1_1() : TestCommand("Test_TC_SWDIAG_1_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_SWDIAG_1_1() - { - } + ~Test_TC_SWDIAG_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_SWDIAG_1_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SWDIAG_1_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SWDIAG_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SWDIAG_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads CurrentHeapFree non-global attribute value from DUT\n"); - err = TestReadsCurrentHeapFreeNonGlobalAttributeValueFromDut_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads CurrentHeapFree non-global attribute value from DUT\n"); + err = TestReadsCurrentHeapFreeNonGlobalAttributeValueFromDut_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads CurrentHeapUsed non-global attribute value from DUT\n"); - if (ShouldSkip("A_CURRENTHEAPUSED")) - { - NextTest(); - return; - } - err = TestReadsCurrentHeapUsedNonGlobalAttributeValueFromDut_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads CurrentHeapUsed non-global attribute value from DUT\n"); + if (ShouldSkip("A_CURRENTHEAPUSED")) + { + NextTest(); + return; + } + err = TestReadsCurrentHeapUsedNonGlobalAttributeValueFromDut_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads CurrentHeapHighWaterMark non-global attribute value from DUT\n"); - if (ShouldSkip("A_CURRENTHEAPHIGHWATERMARK")) - { - NextTest(); - return; - } - err = TestReadsCurrentHeapHighWaterMarkNonGlobalAttributeValueFromDut_3(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads CurrentHeapHighWaterMark non-global attribute value from DUT\n"); + if (ShouldSkip("A_CURRENTHEAPHIGHWATERMARK")) + { + NextTest(); + return; + } + err = TestReadsCurrentHeapHighWaterMarkNonGlobalAttributeValueFromDut_3(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 4; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint64_t currentHeapFree) + static void OnSuccessCallback_1(void * context, uint64_t currentHeapFree) { (static_cast(context))->OnSuccessResponse_1(currentHeapFree); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint64_t currentHeapUsed) + static void OnSuccessCallback_2(void * context, uint64_t currentHeapUsed) { (static_cast(context))->OnSuccessResponse_2(currentHeapUsed); } - - - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, uint64_t currentHeapHighWatermark) + static void OnSuccessCallback_3(void * context, uint64_t currentHeapHighWatermark) { (static_cast(context))->OnSuccessResponse_3(currentHeapHighWatermark); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadsCurrentHeapFreeNonGlobalAttributeValueFromDut_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::SoftwareDiagnosticsClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } void OnFailureResponse_1(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_1( uint64_t currentHeapFree) + void OnSuccessResponse_1(uint64_t currentHeapFree) { - VerifyOrReturn(CheckConstraintType("currentHeapFree", "", "uint64")); + VerifyOrReturn(CheckConstraintType("currentHeapFree", "", "uint64")); NextTest(); - } - - - + } - CHIP_ERROR TestReadsCurrentHeapUsedNonGlobalAttributeValueFromDut_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::SoftwareDiagnosticsClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_2( uint64_t currentHeapUsed) + void OnSuccessResponse_2(uint64_t currentHeapUsed) { - VerifyOrReturn(CheckConstraintType("currentHeapUsed", "", "uint64")); + VerifyOrReturn(CheckConstraintType("currentHeapUsed", "", "uint64")); NextTest(); - } - - - + } - CHIP_ERROR TestReadsCurrentHeapHighWaterMarkNonGlobalAttributeValueFromDut_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::SoftwareDiagnosticsClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_3( uint64_t currentHeapHighWatermark) + void OnSuccessResponse_3(uint64_t currentHeapHighWatermark) { - VerifyOrReturn(CheckConstraintType("currentHeapHighWatermark", "", "uint64")); + VerifyOrReturn(CheckConstraintType("currentHeapHighWatermark", "", "uint64")); NextTest(); - } - - - }; + } +}; -class Test_TC_SWDIAG_2_1: public TestCommand +class Test_TC_SWDIAG_2_1 : public TestCommand { - public: - Test_TC_SWDIAG_2_1(): TestCommand("Test_TC_SWDIAG_2_1"), mTestIndex(0) +public: + Test_TC_SWDIAG_2_1() : TestCommand("Test_TC_SWDIAG_2_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_SWDIAG_2_1() - { - } + ~Test_TC_SWDIAG_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_SWDIAG_2_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SWDIAG_2_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SWDIAG_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SWDIAG_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { - } + // 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++) + { + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - // // Tests methods // - }; -class Test_TC_SWDIAG_3_1: public TestCommand +class Test_TC_SWDIAG_3_1 : public TestCommand { - public: - Test_TC_SWDIAG_3_1(): TestCommand("Test_TC_SWDIAG_3_1"), mTestIndex(0) +public: + Test_TC_SWDIAG_3_1() : TestCommand("Test_TC_SWDIAG_3_1"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_SWDIAG_3_1() - { - } + ~Test_TC_SWDIAG_3_1() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_SWDIAG_3_1\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SWDIAG_3_1\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SWDIAG_3_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SWDIAG_3_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads CurrentHeapUsed attribute value from DUT\n"); - if (ShouldSkip("A_CURRENTHEAPUSED")) - { - NextTest(); - return; - } - err = TestReadsCurrentHeapUsedAttributeValueFromDut_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads CurrentHeapUsed attribute value from DUT\n"); + if (ShouldSkip("A_CURRENTHEAPUSED")) + { + NextTest(); + return; + } + err = TestReadsCurrentHeapUsedAttributeValueFromDut_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads CurrentHeapHighWaterMark attribute value from DUT\n"); - if (ShouldSkip("A_CURRENTHEAPHIGHWATERMARK")) - { - NextTest(); - return; - } - err = TestReadsCurrentHeapHighWaterMarkAttributeValueFromDut_2(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads CurrentHeapHighWaterMark attribute value from DUT\n"); + if (ShouldSkip("A_CURRENTHEAPHIGHWATERMARK")) + { + NextTest(); + return; + } + err = TestReadsCurrentHeapHighWaterMarkAttributeValueFromDut_2(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 3; chip::Optional mCluster; chip::Optional mEndpoint; - - - - - - - - - - - - - - - - - - - - - - - static void OnFailureCallback_1(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); } - static void OnSuccessCallback_1(void * context, uint64_t currentHeapUsed) + static void OnSuccessCallback_1(void * context, uint64_t currentHeapUsed) { (static_cast(context))->OnSuccessResponse_1(currentHeapUsed); } - - - static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint64_t currentHeapHighWatermark) + static void OnSuccessCallback_2(void * context, uint64_t currentHeapHighWatermark) { (static_cast(context))->OnSuccessResponse_2(currentHeapHighWatermark); } - - - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestReadsCurrentHeapUsedAttributeValueFromDut_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::SoftwareDiagnosticsClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; } void OnFailureResponse_1(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_1( uint64_t currentHeapUsed) + void OnSuccessResponse_1(uint64_t currentHeapUsed) { - VerifyOrReturn(CheckValue("currentHeapUsed", currentHeapUsed,0ULL - )); + VerifyOrReturn(CheckValue("currentHeapUsed", currentHeapUsed, 0ULL)); NextTest(); - } - - - + } - CHIP_ERROR TestReadsCurrentHeapHighWaterMarkAttributeValueFromDut_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::SoftwareDiagnosticsClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute(this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(EmberAfStatus status) { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } - void OnSuccessResponse_2( uint64_t currentHeapHighWatermark) + void OnSuccessResponse_2(uint64_t currentHeapHighWatermark) { - VerifyOrReturn(CheckValue("currentHeapHighWatermark", currentHeapHighWatermark,0ULL - )); + VerifyOrReturn(CheckValue("currentHeapHighWatermark", currentHeapHighWatermark, 0ULL)); NextTest(); - } - - - }; + } +}; -class TestSubscribe_OnOff: public TestCommand +class TestSubscribe_OnOff : public TestCommand { - public: - TestSubscribe_OnOff(): TestCommand("TestSubscribe_OnOff"), mTestIndex(0) +public: + TestSubscribe_OnOff() : TestCommand("TestSubscribe_OnOff"), mTestIndex(0) { - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~TestSubscribe_OnOff() - { - } + ~TestSubscribe_OnOff() {} /////////// TestCommand Interface ///////// void NextTest() override { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: TestSubscribe_OnOff\n"); - } + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: TestSubscribe_OnOff\n"); + } - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: TestSubscribe_OnOff\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: TestSubscribe_OnOff\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - Wait(); + 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++) - { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Set OnOff Attribute to false\n"); - err = TestSetOnOffAttributeToFalse_1(); - break; + ChipLogProgress(chipTool, " ***** Test Step 1 : Set OnOff Attribute to false\n"); + err = TestSetOnOffAttributeToFalse_1(); + break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Report: Subscribe OnOff Attribute\n"); - err = TestReportSubscribeOnOffAttribute_2(); - break; + ChipLogProgress(chipTool, " ***** Test Step 2 : Report: Subscribe OnOff Attribute\n"); + err = TestReportSubscribeOnOffAttribute_2(); + break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Subscribe OnOff Attribute\n"); - err = TestSubscribeOnOffAttribute_3(); - break; + ChipLogProgress(chipTool, " ***** Test Step 3 : Subscribe OnOff Attribute\n"); + err = TestSubscribeOnOffAttribute_3(); + break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Turn On the light to see attribute change\n"); - err = TestTurnOnTheLightToSeeAttributeChange_4(); - break; + ChipLogProgress(chipTool, " ***** Test Step 4 : Turn On the light to see attribute change\n"); + err = TestTurnOnTheLightToSeeAttributeChange_4(); + break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Check for attribute report\n"); - err = TestCheckForAttributeReport_5(); - break; + ChipLogProgress(chipTool, " ***** Test Step 5 : Check for attribute report\n"); + err = TestCheckForAttributeReport_5(); + break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Turn Off the light to see attribute change\n"); - err = TestTurnOffTheLightToSeeAttributeChange_6(); - break; + ChipLogProgress(chipTool, " ***** Test Step 6 : Turn Off the light to see attribute change\n"); + err = TestTurnOffTheLightToSeeAttributeChange_6(); + break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Check for attribute report\n"); - err = TestCheckForAttributeReport_7(); - break; - } + ChipLogProgress(chipTool, " ***** Test Step 7 : Check for attribute report\n"); + err = TestCheckForAttributeReport_7(); + break; + } - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - - private: +private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 8; chip::Optional mCluster; chip::Optional mEndpoint; - - typedef void (* Test_TestSubscribe_OnOff_OnOff_ReportCallback -)(void * context, bool value); - Test_TestSubscribe_OnOff_OnOff_ReportCallback - mTest_TestSubscribe_OnOff_OnOff_Reported - = nullptr; - - - - - - - - - - - - - - - - - - - - - + typedef void (*Test_TestSubscribe_OnOff_OnOff_ReportCallback)(void * context, bool value); + Test_TestSubscribe_OnOff_OnOff_ReportCallback mTest_TestSubscribe_OnOff_OnOff_Reported = nullptr; static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, bool onOff) + static void OnSuccessCallback_2(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_2(onOff); } - bool mReceivedReport_2 = false; - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, bool onOff) + static void OnSuccessCallback_3(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_3(onOff); } @@ -87579,53 +66366,44 @@ class TestSubscribe_OnOff: public TestCommand (static_cast(context))->OnSubscriptionEstablishedResponse_3(); } - - static void OnFailureCallback_5(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context, bool onOff) + static void OnSuccessCallback_5(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_5(onOff); } - bool mReceivedReport_5 = false; - static void OnFailureCallback_7(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context, bool onOff) + static void OnSuccessCallback_7(void * context, bool onOff) { (static_cast(context))->OnSuccessResponse_7(onOff); } - bool mReceivedReport_7 = false; - // // Tests methods // - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - - CHIP_ERROR TestSetOnOffAttributeToFalse_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -87637,56 +66415,33 @@ class TestSubscribe_OnOff: public TestCommand (static_cast(context))->OnFailureResponse_1(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_1() - { NextTest(); - } - + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestReportSubscribeOnOffAttribute_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - mTest_TestSubscribe_OnOff_OnOff_Reported - = OnSuccessCallback_2; - return WaitForMs(0); + mTest_TestSubscribe_OnOff_OnOff_Reported = OnSuccessCallback_2; + return WaitForMs(0); } - void OnFailureResponse_2(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_2( bool onOff) - { mReceivedReport_2 = true; - - VerifyOrReturn(CheckValue("onOff", onOff,false - )); - - - } + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } + void OnSuccessResponse_2(bool onOff) + { + mReceivedReport_2 = true; - + VerifyOrReturn(CheckValue("onOff", onOff, false)); + } - CHIP_ERROR TestSubscribeOnOffAttribute_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -87694,45 +66449,37 @@ class TestSubscribe_OnOff: public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t minIntervalArgument; - minIntervalArgument = 2U; - uint16_t maxIntervalArgument; - maxIntervalArgument = 10U; - - ReturnErrorOnFailure(cluster.SubscribeAttribute(this, OnSuccessCallback_3, OnFailureCallback_3, minIntervalArgument, maxIntervalArgument, OnSubscriptionEstablished_3)); - return CHIP_NO_ERROR; + minIntervalArgument = 2U; + uint16_t maxIntervalArgument; + maxIntervalArgument = 10U; + + ReturnErrorOnFailure(cluster.SubscribeAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3, minIntervalArgument, maxIntervalArgument, OnSubscriptionEstablished_3)); + return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3( bool value) + void OnSuccessResponse_3(bool value) { - if ( mTest_TestSubscribe_OnOff_OnOff_Reported -) { - auto callback = mTest_TestSubscribe_OnOff_OnOff_Reported -; - mTest_TestSubscribe_OnOff_OnOff_Reported - = nullptr; - callback(this, value); - } - } + if (mTest_TestSubscribe_OnOff_OnOff_Reported) + { + auto callback = mTest_TestSubscribe_OnOff_OnOff_Reported; + mTest_TestSubscribe_OnOff_OnOff_Reported = nullptr; + callback(this, value); + } + } void OnSubscriptionEstablishedResponse_3() { - VerifyOrReturn(mReceivedReport_2, Exit("Initial report not received!")); + VerifyOrReturn(mReceivedReport_2, Exit("Initial report not received!")); NextTest(); } - - - - CHIP_ERROR TestTurnOnTheLightToSeeAttributeChange_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -87744,60 +66491,39 @@ class TestSubscribe_OnOff: public TestCommand (static_cast(context))->OnFailureResponse_4(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_4() - { NextTest(); - } - + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_4() { NextTest(); } - CHIP_ERROR TestCheckForAttributeReport_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - mTest_TestSubscribe_OnOff_OnOff_Reported - = OnSuccessCallback_5; - return CHIP_NO_ERROR; + mTest_TestSubscribe_OnOff_OnOff_Reported = OnSuccessCallback_5; + return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5( bool onOff) - { mReceivedReport_5 = true; + void OnSuccessResponse_5(bool onOff) + { + mReceivedReport_5 = true; - VerifyOrReturn(CheckValue("onOff", onOff,true - )); + VerifyOrReturn(CheckValue("onOff", onOff, true)); NextTest(); - } - - - + } - CHIP_ERROR TestTurnOffTheLightToSeeAttributeChange_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; + using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -87809,55 +66535,35 @@ class TestSubscribe_OnOff: public TestCommand (static_cast(context))->OnFailureResponse_6(status); }; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, - endpoint, - request - )); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) - { - ThrowFailureResponse(); - } - - void OnSuccessResponse_6() - { NextTest(); - } - + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - + void OnSuccessResponse_6() { NextTest(); } - CHIP_ERROR TestCheckForAttributeReport_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - mTest_TestSubscribe_OnOff_OnOff_Reported - = OnSuccessCallback_7; - return CHIP_NO_ERROR; + mTest_TestSubscribe_OnOff_OnOff_Reported = OnSuccessCallback_7; + return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) - { - ThrowFailureResponse(); - } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7( bool onOff) - { mReceivedReport_7 = true; + void OnSuccessResponse_7(bool onOff) + { + mReceivedReport_7 = true; - VerifyOrReturn(CheckValue("onOff", onOff,false - )); + VerifyOrReturn(CheckValue("onOff", onOff, false)); NextTest(); - } - - - }; - + } +}; void registerCommandsTests(Commands & commands) {